Lines of
script/c0.lua
from check-in 45478ef823
that are changed by the sequence of edits moving toward
check-in 993a6dbc45:
1: str = {}
2:
3: fun = {}
4:
5: str["Debug.ReloadFieldBegin"] = Debug.ReloadFieldBegin
6:
7: Debug.ReloadFieldBegin = function(str_1, str_2) --{
8: str["不洗牌"] = str_1 & DUEL_PSEUDO_SHUFFLE
9:
10: str["无BP"] = str_1 & DUEL_ATTACK_FIRST_TURN
11:
12: if str_2 then --{
45478ef823 2023-07-13 13: if str_2 == 3 then --{
45478ef823 2023-07-13 14: str["规则"] = "大师3 "
45478ef823 2023-07-13 15:
45478ef823 2023-07-13 16: --}
45478ef823 2023-07-13 17:
45478ef823 2023-07-13 18: elseif str_2 == 4 then --{
45478ef823 2023-07-13 19: str["规则"] = "新大师 "
45478ef823 2023-07-13 20:
45478ef823 2023-07-13 21: --}
45478ef823 2023-07-13 22:
45478ef823 2023-07-13 23: elseif str_2 == 5 then --{
45478ef823 2023-07-13 24: str["规则"] = "大师2020 "
45478ef823 2023-07-13 25:
45478ef823 2023-07-13 26: --}
45478ef823 2023-07-13 27:
45478ef823 2023-07-13 28: end --}
45478ef823 2023-07-13 29:
45478ef823 2023-07-13 30: else --{
45478ef823 2023-07-13 31: str["规则"] = "大师2020 "
45478ef823 2023-07-13 32:
45478ef823 2023-07-13 33: end --}
45478ef823 2023-07-13 34:
45478ef823 2023-07-13 35: str["Debug.ReloadFieldBegin"](str_1, str_2)
45478ef823 2023-07-13 36:
45478ef823 2023-07-13 37: end --}
45478ef823 2023-07-13 38:
45478ef823 2023-07-13 39: fun["通关邀请"] = function() --{
40: effect_1 = Effect.GlobalEffect()
41:
42: effect_1:SetType(EFFECT_TYPE_FIELD
43: + EFFECT_TYPE_CONTINUOUS)
44:
45: effect_1:SetCode(EVENT_DAMAGE)
46:
47: function cache_1() --{
48: cache_1 = Duel.GetLP(1)
49:
50: if cache_1 <= 0 then --{
51: if cache_1 < 0 then --{
52: Debug.ShowHint("QB:「你居然二解了,请加群告诉我怎么二解。」")
53:
54: end --}
45478ef823 2023-07-13 55:
56: cache_1 = true
57:
58: --}
45478ef823 2023-07-13 59:
60: else --{
61: cache_1 = false
62:
63: end --}
45478ef823 2023-07-13 64:
65: return cache_1
66:
67: end --}
68:
69: effect_1:SetCondition(cache_1)
70:
71: function cache_1() --{
72: Debug.ShowHint("残局群181175613")
73:
74: end --}
45478ef823 2023-07-13 75:
76: effect_1:SetOperation(cache_1)
77:
78: Duel.RegisterEffect(effect_1
79: , 0)
80:
81: end --}
45478ef823 2023-07-13 82:
83: fun["是否效果卡"] = function(card) --{
84: cache_1 = Card.IsType(card, TYPE_SPELL)
85:
86: cache_2 = Card.IsType(card, TYPE_TRAP)
87:
88: cache_3 = Card.IsType(card, TYPE_EFFECT)
89:
90: if cache_1
91: or cache_2
92: or cache_3 then --{
93: return true
94:
95: end --}
45478ef823 2023-07-13 96:
97: cache_1 = Card.IsType(card, TYPE_PENDULUM)
98:
99: if cache_1 then --{
100: cache_1 = Card.IsCode(card, 28363749)
101:
102: cache_2 = Card.IsCode(card, 19474136)
103:
104: cache_3 = Card.IsCode(card, 17390179)
105:
106: cache_4 = Card.IsCode(card, 83980492)
107:
108: if cache_1
109: or cache_2
110: or cache_3
111: or cache_4 then --{
112: --}
45478ef823 2023-07-13 113:
114: else --{
115: return true
116:
117: end --}
45478ef823 2023-07-13 118:
119: end --}
45478ef823 2023-07-13 120:
121: return false
122:
123: end --}
124:
125: fun["开局说明"] = function() --{
126: if str["开局说明吗"] == 1 then --{
127: return
128:
129: --}
45478ef823 2023-07-13 130:
131: else --{
132: str["开局说明吗"] = 1
133:
134: end --}
45478ef823 2023-07-13 135:
136: cache_1 = 0
137: cache_1 = cache_1 + LOCATION_DECK
138: cache_1 = cache_1 + LOCATION_HAND
139: cache_1 = cache_1 + LOCATION_MZONE
140: cache_1 = cache_1 + LOCATION_SZONE
141: cache_1 = cache_1 + LOCATION_GRAVE
142: cache_1 = cache_1 + LOCATION_REMOVED
143: cache_1 = cache_1 + LOCATION_EXTRA
144:
145: str["这个残局的效果卡数量"] = Duel.GetMatchingGroupCount(fun["是否效果卡"],0,cache_1,cache_1,nil)
146:
147: cache_1 = Duel.GetOverlayGroup(0, LOCATION_MZONE, LOCATION_MZONE)
148:
149: for k in aux.Next(cache_1) do --{
150: cache_1 = fun["是否效果卡"](k)
151:
152: if cache_1 then --{
153: str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + 1
154:
155: end --}
45478ef823 2023-07-13 156:
157: end --}
45478ef823 2023-07-13 158:
159: str["开局说明"] =""
160: str["开局说明"] = str["开局说明"] .. str["这个残局的效果卡数量"]
161: str["开局说明"] = str["开局说明"] .. "卡 "
162: str["开局说明"] = str["开局说明"] .. str["规则"]
163:
164: if str["不洗牌"] == 0 then --{
165: --}
45478ef823 2023-07-13 166:
167: else --{
168: str["开局说明"] = str["开局说明"] .. "伪洗牌 "
169:
170: end --}
45478ef823 2023-07-13 171:
172: if str["无BP"] == 0 then --{
173: str["开局说明"] = str["开局说明"] .. "无BP "
174:
175: end --}
45478ef823 2023-07-13 176:
177: if str["开局添加手卡"] then --{
178: str["开局说明"] = str["开局说明"] .. "选"
179: str["开局说明"] = str["开局说明"] .. str["开局添加手卡"]
180: str["开局说明"] = str["开局说明"] .. "卡 "
181:
182: end --}
45478ef823 2023-07-13 183:
184: if str["禁格"] then --{
185: str["开局说明"] = str["开局说明"] .. "禁"
186: str["开局说明"] = str["开局说明"] .. str["禁格"]
187: str["开局说明"] = str["开局说明"] .. "格 "
188:
189: end --}
45478ef823 2023-07-13 190:
191: if str["印卡"] then --{
192: str["开局说明"] = str["开局说明"] .. "印卡 "
193:
194: end --}
45478ef823 2023-07-13 195:
196: Debug.ShowHint(str["开局说明"])
197:
198: fun["通关邀请"]()
199:
200: end --}
45478ef823 2023-07-13 201:
202: fun["开局添加手卡"] = function(str_1) --{
203: str["开局添加手卡"] = str_1
204:
205: effect_1 = Effect.GlobalEffect()
206:
207: effect_1:SetType(EFFECT_TYPE_FIELD
208: + EFFECT_TYPE_CONTINUOUS)
209:
210: effect_1:SetCode(EVENT_ADJUST)
211:
212: effect_1:SetCountLimit(1)
213:
214: function cache_1() --{
215: if str["已添加手卡"] == 1 then --{
216: return false
217:
218: --}
45478ef823 2023-07-13 219:
220: else --{
221: str["已添加手卡"] = 1
222:
223: return true
224:
225: end --}
45478ef823 2023-07-13 226:
227: end--}
45478ef823 2023-07-13 228:
229: effect_1:SetCondition(cache_1)
230:
231: function cache_1(effect_event
232: , player_who_activate_the_effect) --{
233: str["玩家选定的卡"] = Duel.SelectMatchingCard(player_who_activate_the_effect
234: , Card.IsAbleToHand
235: , player_who_activate_the_effect
236: , LOCATION_DECK
237: , 0
238: , str_1
239: , str_1
240: , nil)
241:
242: Duel.SendtoHand(str["玩家选定的卡"]
243: , nil
244: , REASON_RULE)
245:
246: end --}
45478ef823 2023-07-13 247:
248: effect_1:SetOperation(cache_1)
249:
250: Duel.RegisterEffect(effect_1
251: , 0)
252:
253: fun["开局说明"]()
254:
255: end --}
45478ef823 2023-07-13 256:
257: fun["禁格"] = function(str_1) --{
258: str["禁格"] = str_1
259:
260: effect_1 = Effect.GlobalEffect()
261:
262: effect_1:SetType(EFFECT_TYPE_FIELD)
263:
264: effect_1:SetCode(EFFECT_USE_EXTRA_MZONE)
265:
266: effect_1:SetValue(str_1)
267:
268: Duel.RegisterEffect(effect_1,0)
269:
270: end --}
45478ef823 2023-07-13 271:
272: fun["印卡"] = function(str_1, str_2, str_3) --{
273: str["印卡"] = 1
274:
275: if str_3 then --{
276: --}
45478ef823 2023-07-13 277:
278: else --{
279: str_3 = str_2
280:
281: end --}
45478ef823 2023-07-13 282:
283: str["当前印卡数"] = 1
284:
285: effect_1 = Effect.CreateEffect(str_1)
286:
287: effect_1:SetType(EFFECT_TYPE_IGNITION)
288:
289: effect_1:SetProperty(EFFECT_FLAG_BOTH_SIDE
290: + EFFECT_FLAG_UNCOPYABLE
291: + EFFECT_FLAG_CANNOT_NEGATE
292: + EFFECT_FLAG_CANNOT_DISABLE)
293:
294: cache_1 = function() --{
295: Duel.SetChainLimit(aux.FALSE)
296:
297: return true
298:
299: end --}
45478ef823 2023-07-13 300:
301: effect_1:SetTarget(cache_1)
302:
303: effect_1:SetRange(LOCATION_EXTRA)
304:
305: function print_hand(effect_event
306: , player_who_activate_the_effect) --{
307: announce_card = Duel.AnnounceCard(player_who_activate_the_effect)
308:
309: card = Duel.CreateToken(player_who_activate_the_effect
310: , announce_card)
311:
312: if str["当前印卡数"] <= str_2 then --{
313: str["当前印卡数"] = str["当前印卡数"] + 1
314:
315: Duel.SendtoHand(card,nil,REASON_RULE)
316:
317: --}
45478ef823 2023-07-13 318:
319: else --{
320: if str["当前印卡数"] <= str_3 then --{
321: str["当前印卡数"] = str["当前印卡数"] + 1
322:
323: Duel.Remove(card,POS_FACEUP,REASON_RULE)
324:
325: Duel.SendtoDeck(card,player_who_activate_the_effect,0,REASON_RULE)
326:
327: --}
45478ef823 2023-07-13 328:
329: else --{
330: Debug.ShowHint("印卡过多!")
331:
332: end --}
45478ef823 2023-07-13 333:
334: end --}
45478ef823 2023-07-13 335:
336: end --}
45478ef823 2023-07-13 337:
338: effect_1:SetOperation(print_hand)
339:
340: str_1:RegisterEffect(effect_1)
341:
342: end --}
45478ef823 2023-07-13 343:
344: fun["全部回到卡组"] = function() --{
345: Debug.ShowHint("胜利条件:让对方的卡回到卡组。")
346:
347: effect_1 = Effect.GlobalEffect()
348:
349: effect_1:SetType(EFFECT_TYPE_FIELD
350: + EFFECT_TYPE_CONTINUOUS)
351:
352: effect_1:SetCode(EVENT_ADJUST)
353:
354: cache_1 = function() --{
355: cache_1 = 0
356: cache_1 = cache_1 + LOCATION_HAND
357: cache_1 = cache_1 + LOCATION_MZONE
358: cache_1 = cache_1 + LOCATION_SZONE
359: cache_1 = cache_1 + LOCATION_GRAVE
360: cache_1 = cache_1 + LOCATION_REMOVED
361:
362: cache_1 = Duel.GetFieldGroupCount(1,cache_1,0)
363:
364: if cache_1 == 0 then --{
365: return true
366:
367: --}
45478ef823 2023-07-13 368:
369: else --{
370: return false
371:
372: end --}
45478ef823 2023-07-13 373:
374: end --}
45478ef823 2023-07-13 375:
376: effect_1:SetCondition(cache_1)
377:
378: cache_1 = function() --{
379: Debug.ShowHint("目标已达成!")
380:
381: Duel.SetLP(1,0)
382:
383: end --}
45478ef823 2023-07-13 384:
385: effect_1:SetOperation(cache_1)
386:
387: Duel.RegisterEffect(effect_1,0)
388:
389: end --}
45478ef823 2023-07-13 390:
45478ef823 2023-07-13 391: