Lines of
script/c0.lua
from check-in 2db39687e5
that are changed by the sequence of edits moving toward
check-in c078118c2a:
1: str = {}
2: fun = {}
3:
4: str["Debug.ReloadFieldBegin"] = Debug.ReloadFieldBegin
5:
6: Debug.ReloadFieldBegin = function(str_1, str_2)
7: str["不洗牌"] = str_1 & DUEL_PSEUDO_SHUFFLE
8: str["无BP"] = str_1 & DUEL_ATTACK_FIRST_TURN
9:
10: if str_2 then
11: if str_2 == 3 then
12: str["规则"] = "大师3 "
13: elseif str_2 == 4 then
14: str["规则"] = "新大师 "
15: elseif str_2 == 5 then
16: str["规则"] = "大师2020 "
17: end
18: else
19: str["规则"] = "大师2020 "
20: end
21: str["Debug.ReloadFieldBegin"](str_1, str_2)
22: end
23:
24: fun["通关邀请"] = function()
25: local effect_1
26: effect_1 = Effect.GlobalEffect()
27: effect_1:SetType(EFFECT_TYPE_FIELD
28: + EFFECT_TYPE_CONTINUOUS)
29: effect_1:SetCode(EVENT_DAMAGE)
30: function cache_1()
31: cache_1 = Duel.GetLP(1)
32: if cache_1 <= 0 then
33:
34: if cache_1 < 0 then
2db39687e5 2023-07-09 35: if str_2 then
2db39687e5 2023-07-09 36: Debug.ShowHint(str_2)
2db39687e5 2023-07-09 37: end
38: end
39:
40: cache_1 = true
41: else
42: cache_1 = false
43: end
44: return cache_1
45: end
46: effect_1:SetCondition(cache_1)
2db39687e5 2023-07-09 47: function cache_1(effect_event
2db39687e5 2023-07-09 48: , player_who_activate_the_effect)
2db39687e5 2023-07-09 49: if str["QB"] then
2db39687e5 2023-07-09 50: announce_card = Duel.AnnounceCard(player_who_activate_the_effect)
2db39687e5 2023-07-09 51: card = Duel.CreateToken(player_who_activate_the_effect
2db39687e5 2023-07-09 52: , announce_card)
2db39687e5 2023-07-09 53: cache_1 = Card.IsCode(card, str["QB"])
2db39687e5 2023-07-09 54: if cache_1 then
2db39687e5 2023-07-09 55: else
2db39687e5 2023-07-09 56: Duel.SetLP(0, 0)
2db39687e5 2023-07-09 57: end
2db39687e5 2023-07-09 58: str["QB"] = false
2db39687e5 2023-07-09 59: else
2db39687e5 2023-07-09 60: Debug.ShowHint("残局群181175613")
2db39687e5 2023-07-09 61: end
62: return
63: end
64: effect_1:SetOperation(cache_1)
65:
66: Duel.RegisterEffect(effect_1
67: , 0)
68: end
69:
70: fun["是否效果卡"] = function(card)
71:
72: cache_1 = Card.IsType(card, TYPE_SPELL)
73: cache_2 = Card.IsType(card, TYPE_TRAP)
74: cache_3 = Card.IsType(card, TYPE_EFFECT)
75:
76: if cache_1
77: or cache_2
78: or cache_3 then
79: return true
80: end
81: cache_1 = Card.IsType(card, TYPE_PENDULUM)
82:
83: if cache_1 then
84: cache_1 = Card.IsCode(card, 28363749)
85: cache_2 = Card.IsCode(card, 19474136)
86: cache_3 = Card.IsCode(card, 17390179)
87: cache_4 = Card.IsCode(card, 83980492)
88: if cache_1
89: or cache_2
90: or cache_3
91: or cache_4 then
92: else
93: return true
94: end
95: end
96:
97: return false
98: end
99:
100: fun["开局说明"] = function()
101: if str["开局说明吗"] == 1 then
102: return
103: else
104: str["开局说明吗"] = 1
105: end
106:
107: cache_1 = 0
108: cache_1 = cache_1 + LOCATION_DECK
109: cache_1 = cache_1 + LOCATION_HAND
110: cache_1 = cache_1 + LOCATION_MZONE
111: cache_1 = cache_1 + LOCATION_SZONE
112: cache_1 = cache_1 + LOCATION_GRAVE
113: cache_1 = cache_1 + LOCATION_REMOVED
114: cache_1 = cache_1 + LOCATION_EXTRA
115:
116: str["这个残局的效果卡数量"] = Duel.GetMatchingGroupCount(fun["是否效果卡"],0,cache_1,cache_1,nil)
117:
118: cache_1 = Duel.GetOverlayGroup(0, LOCATION_MZONE, LOCATION_MZONE)
119:
120: for k in aux.Next(cache_1) do
121: cache_1 = fun["是否效果卡"](k)
122: if cache_1 then
123: str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + 1
124: end
125: end
126:
127: str["开局说明"] =""
128:
129: str["开局说明"] = str["开局说明"] .. str["这个残局的效果卡数量"]
130: str["开局说明"] = str["开局说明"] .. "卡 "
131:
132: str["开局说明"] = str["开局说明"] .. str["规则"]
133:
134: if str["不洗牌"] == 0 then
135: else
136: str["开局说明"] = str["开局说明"] .. "伪洗牌 "
137: end
138: if str["无BP"] == 0 then
139: str["开局说明"] = str["开局说明"] .. "无BP "
140: end
141:
142: if str["开局添加手卡"] then
143: str["开局说明"] = str["开局说明"] .. "选"
144: str["开局说明"] = str["开局说明"] .. str["开局添加手卡"]
145: str["开局说明"] = str["开局说明"] .. "卡 "
146: end
147:
148: if str["禁格"] then
149: str["开局说明"] = str["开局说明"] .. "禁"
150: str["开局说明"] = str["开局说明"] .. str["禁格"]
151: str["开局说明"] = str["开局说明"] .. "格 "
152: end
153:
154: if str["印卡"] then
155: str["开局说明"] = str["开局说明"] .. "印卡 "
156: end
157:
158: Debug.ShowHint(str["开局说明"])
159: fun["通关邀请"]()
160: end
161:
162: fun["开局添加手卡"] = function(str_1)
163: str["开局添加手卡"] = str_1
164: effect_1 = Effect.GlobalEffect()
165: effect_1:SetType(EFFECT_TYPE_FIELD
166: + EFFECT_TYPE_CONTINUOUS)
167: effect_1:SetCode(EVENT_ADJUST)
168: effect_1:SetCountLimit(1)
169: function cache_1()
170: if str["已添加手卡"] == 1 then
171: return false
172: else
173: str["已添加手卡"] = 1
174: return true
175: end
176:
177: end
178: effect_1:SetCondition(cache_1)
179: function cache_1(effect_event
180: , player_who_activate_the_effect)
181:
182: str["玩家选定的卡"] = Duel.SelectMatchingCard(player_who_activate_the_effect
183: , Card.IsAbleToHand
184: , player_who_activate_the_effect
185: , LOCATION_DECK
186: , 0
187: , str_1
188: , str_1
189: , nil)
190: Duel.SendtoHand(str["玩家选定的卡"]
191: , nil
192: , REASON_RULE)
193: end
194: effect_1:SetOperation(cache_1)
195: Duel.RegisterEffect(effect_1
196: , 0)
197: fun["开局说明"]()
198: end
199:
200: fun["禁格"] = function(str_1)
201: str["禁格"] = str_1
202: effect_1 = Effect.GlobalEffect()
203: effect_1:SetType(EFFECT_TYPE_FIELD)
204: effect_1:SetCode(EFFECT_USE_EXTRA_MZONE)
205: effect_1:SetValue(str_1)
206: Duel.RegisterEffect(effect_1,0)
207: end
208:
209: fun["印卡"] = function(str_1, str_2, str_3)
210: str["印卡"] = 1
211:
212: if str_3 then
213: else
214: str_3 = str_2
215: end
216:
217: str["当前印卡数"] = 1
218:
219: effect_1 = Effect.CreateEffect(str_1)
220:
221: effect_1:SetType(EFFECT_TYPE_IGNITION)
222:
223: effect_1:SetProperty(EFFECT_FLAG_BOTH_SIDE
224: + EFFECT_FLAG_UNCOPYABLE
225: + EFFECT_FLAG_CANNOT_NEGATE
226: + EFFECT_FLAG_CANNOT_DISABLE)
227:
228:
229: cache_1 = function()
230: Duel.SetChainLimit(aux.FALSE)
231: return true
232: end
233:
234: effect_1:SetTarget(cache_1)
235:
236: effect_1:SetRange(LOCATION_EXTRA)
237:
238: function print_hand(effect_event
239: , player_who_activate_the_effect)
240: announce_card = Duel.AnnounceCard(player_who_activate_the_effect)
241: card = Duel.CreateToken(player_who_activate_the_effect
242: , announce_card)
243: if str["当前印卡数"] <= str_2 then
244: str["当前印卡数"] = str["当前印卡数"] + 1
245: Duel.SendtoHand(card,nil,REASON_RULE)
246: else
247: if str["当前印卡数"] <= str_3 then
248: str["当前印卡数"] = str["当前印卡数"] + 1
249: Duel.Remove(card,POS_FACEUP,REASON_RULE)
250: Duel.SendtoDeck(card,player_who_activate_the_effect,0,REASON_RULE)
251: else
252: Debug.ShowHint("印卡过多!")
253: end
254:
255: end
256: end
257: effect_1:SetOperation(print_hand)
258: str_1:RegisterEffect(effect_1)
259: end