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