Lines of
script/c0.lua
from check-in c1424b8fad
that are changed by the sequence of edits moving toward
check-in d1721f832d:
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: cache_1 = true
80:
81: --}
82:
83: else --{
84:
85: cache_1 = false
86:
87: end --}
88:
89: return cache_1
90:
91: end --}
92:
93: effect_1:SetCondition(cache_1)
94:
95: function cache_1() --{
96:
97: Debug.ShowHint("残局群181175613")
98:
99: end --}
100:
101: effect_1:SetOperation(cache_1)
102:
103: Duel.RegisterEffect(effect_1
104: , 0)
105:
106: end --}
107:
108: fun["是否效果卡"] = function(card) --{
109:
110: cache_1 = Card.IsType(card, TYPE_SPELL)
111:
112: cache_2 = Card.IsType(card, TYPE_TRAP)
113:
114: cache_3 = Card.IsType(card, TYPE_EFFECT)
115:
116: if cache_1
117: or cache_2
118: or cache_3 then --{
119:
120: return true
121:
122: end --}
123:
124: cache_1 = Card.IsType(card, TYPE_PENDULUM)
125:
126: if cache_1 then --{
127:
128: cache_1 = Card.IsCode(card, 28363749)
129:
130: cache_2 = Card.IsCode(card, 19474136)
131:
132: cache_3 = Card.IsCode(card, 17390179)
133:
134: cache_4 = Card.IsCode(card, 83980492)
135:
136: if cache_1
137: or cache_2
138: or cache_3
139: or cache_4 then --{
140:
141: --}
142:
143: else --{
144:
145: return true
146:
147: end --}
148:
149: end --}
150:
151: return false
152:
153: end --}
154:
155: fun["开局说明"] = function() --{
156:
157: if str["开局说明吗"] == 1 then --{
158:
159: return
160:
161: --}
162:
163: else --{
164:
165: str["开局说明吗"] = 1
166:
167: end --}
168:
169: cache_1 = 0
170: cache_1 = cache_1 + LOCATION_DECK
171: cache_1 = cache_1 + LOCATION_HAND
172: cache_1 = cache_1 + LOCATION_MZONE
173: cache_1 = cache_1 + LOCATION_SZONE
174: cache_1 = cache_1 + LOCATION_GRAVE
175: cache_1 = cache_1 + LOCATION_REMOVED
176: cache_1 = cache_1 + LOCATION_EXTRA
177:
178: str["这个残局的效果卡数量"] = Duel.GetMatchingGroupCount(fun["是否效果卡"],0,cache_1,cache_1,nil)
179:
180: cache_1 = Duel.GetOverlayGroup(0, LOCATION_MZONE, LOCATION_MZONE)
181:
182: for k in aux.Next(cache_1) do --{
183:
184: cache_1 = fun["是否效果卡"](k)
185:
186: if cache_1 then --{
187:
188: str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + 1
189:
190: end --}
191:
192: end --}
193:
194: str["开局说明"] =""
195: str["开局说明"] = str["开局说明"] .. str["这个残局的效果卡数量"]
196: str["开局说明"] = str["开局说明"] .. "卡 "
197: str["开局说明"] = str["开局说明"] .. str["规则"]
198:
199: if str["不洗牌"] == 0 then --{
200:
201: --}
202:
203: else --{
204:
205: str["开局说明"] = str["开局说明"] .. "伪洗牌 "
206:
207: end --}
208:
209: if str["无BP"] == 0 then --{
210:
211: str["开局说明"] = str["开局说明"] .. "无BP "
212:
213: end --}
214:
215: if str["开局添加手卡"] then --{
216:
217: str["开局说明"] = str["开局说明"] .. "选"
218: str["开局说明"] = str["开局说明"] .. str["开局添加手卡"]
219: str["开局说明"] = str["开局说明"] .. "卡 "
220:
221: end --}
222:
223: if str["禁格"] then --{
224:
225: str["开局说明"] = str["开局说明"] .. "禁"
226: str["开局说明"] = str["开局说明"] .. str["禁格"]
227: str["开局说明"] = str["开局说明"] .. "格 "
228:
229: end --}
230:
231: if str["印卡"] then --{
232:
233: str["开局说明"] = str["开局说明"] .. "印卡 "
234:
235: end --}
236:
237: Debug.ShowHint(str["开局说明"])
238:
239: end --}
240:
241: fun["开局添加手卡"] = function(str_1) --{
242:
243: str["开局添加手卡"] = str_1
244:
c1424b8fad 2023-07-16 245: effect_1 = Effect.GlobalEffect()
c1424b8fad 2023-07-16 246:
c1424b8fad 2023-07-16 247: effect_1:SetType(EFFECT_TYPE_FIELD
c1424b8fad 2023-07-16 248: + EFFECT_TYPE_CONTINUOUS)
c1424b8fad 2023-07-16 249:
c1424b8fad 2023-07-16 250: effect_1:SetCode(EVENT_ADJUST)
c1424b8fad 2023-07-16 251:
c1424b8fad 2023-07-16 252: effect_1:SetCountLimit(1)
c1424b8fad 2023-07-16 253:
c1424b8fad 2023-07-16 254: function cache_1() --{
c1424b8fad 2023-07-16 255:
c1424b8fad 2023-07-16 256: if str["已添加手卡"] == 1 then --{
c1424b8fad 2023-07-16 257:
c1424b8fad 2023-07-16 258: return false
c1424b8fad 2023-07-16 259:
c1424b8fad 2023-07-16 260: --}
c1424b8fad 2023-07-16 261:
c1424b8fad 2023-07-16 262: else --{
c1424b8fad 2023-07-16 263:
c1424b8fad 2023-07-16 264: str["已添加手卡"] = 1
c1424b8fad 2023-07-16 265:
c1424b8fad 2023-07-16 266: return true
c1424b8fad 2023-07-16 267:
c1424b8fad 2023-07-16 268: end --}
c1424b8fad 2023-07-16 269:
c1424b8fad 2023-07-16 270: end--}
c1424b8fad 2023-07-16 271:
c1424b8fad 2023-07-16 272: effect_1:SetCondition(cache_1)
c1424b8fad 2023-07-16 273:
c1424b8fad 2023-07-16 274: function cache_1(effect_event
c1424b8fad 2023-07-16 275: , player_who_activate_the_effect) --{
c1424b8fad 2023-07-16 276:
c1424b8fad 2023-07-16 277: str["玩家选定的卡"] = Duel.SelectMatchingCard(player_who_activate_the_effect
278: , Card.IsAbleToHand
c1424b8fad 2023-07-16 279: , player_who_activate_the_effect
280: , LOCATION_DECK
281: , 0
282: , str_1
283: , str_1
284: , nil)
285:
286: Duel.SendtoHand(str["玩家选定的卡"]
287: , nil
288: , REASON_RULE)
c1424b8fad 2023-07-16 289:
c1424b8fad 2023-07-16 290: end --}
c1424b8fad 2023-07-16 291:
c1424b8fad 2023-07-16 292: effect_1:SetOperation(cache_1)
c1424b8fad 2023-07-16 293:
c1424b8fad 2023-07-16 294: Duel.RegisterEffect(effect_1
c1424b8fad 2023-07-16 295: , 0)
296:
297: end --}
298:
299: fun["禁格"] = function(str_1) --{
300:
301: str["禁格"] = str_1
302:
303: effect_1 = Effect.GlobalEffect()
304:
305: effect_1:SetType(EFFECT_TYPE_FIELD)
306:
307: effect_1:SetCode(EFFECT_USE_EXTRA_MZONE)
308:
309: effect_1:SetValue(str_1)
310:
311: Duel.RegisterEffect(effect_1,0)
312:
313: end --}
314:
315: fun["印卡"] = function(str_1, str_2, str_3) --{
316:
317: str["印卡"] = 1
318:
319: if str_3 then --{
320:
321: --}
322:
323: else --{
324:
325: str_3 = str_2
326:
327: end --}
328:
329: str["当前印卡数"] = 1
330:
331: effect_1 = Effect.CreateEffect(str_1)
332:
333: effect_1:SetType(EFFECT_TYPE_IGNITION)
334:
335: effect_1:SetProperty(EFFECT_FLAG_BOTH_SIDE
336: + EFFECT_FLAG_UNCOPYABLE
337: + EFFECT_FLAG_CANNOT_NEGATE
338: + EFFECT_FLAG_CANNOT_DISABLE)
339:
340: cache_1 = function() --{
341:
342: Duel.SetChainLimit(aux.FALSE)
343:
344: return true
345:
346: end --}
347:
348: effect_1:SetTarget(cache_1)
349:
350: effect_1:SetRange(LOCATION_EXTRA)
351:
352: function print_hand(effect_event
353: , player_who_activate_the_effect) --{
354:
355: announce_card = Duel.AnnounceCard(player_who_activate_the_effect)
356:
357: card = Duel.CreateToken(player_who_activate_the_effect
358: , announce_card)
359:
360: if str["当前印卡数"] <= str_2 then --{
361:
362: str["当前印卡数"] = str["当前印卡数"] + 1
363:
364: Duel.SendtoHand(card,nil,REASON_RULE)
365:
366: --}
367:
368: else --{
369:
370: if str["当前印卡数"] <= str_3 then --{
371:
372: str["当前印卡数"] = str["当前印卡数"] + 1
373:
374: Duel.Remove(card,POS_FACEUP,REASON_RULE)
375:
376: Duel.SendtoDeck(card,player_who_activate_the_effect,0,REASON_RULE)
377:
378: --}
379:
380: else --{
381:
382: Debug.ShowHint("印卡过多!")
383:
384: end --}
385:
386: end --}
387:
388: end --}
389:
390: effect_1:SetOperation(print_hand)
391:
392: str_1:RegisterEffect(effect_1)
393:
394: end --}
395:
396: fun["全部回到卡组"] = function() --{
397:
398: Debug.ShowHint("胜利条件:让对方的卡回到卡组。")
399:
400: effect_1 = Effect.GlobalEffect()
401:
402: effect_1:SetType(EFFECT_TYPE_FIELD
403: + EFFECT_TYPE_CONTINUOUS)
404:
405: effect_1:SetCode(EVENT_ADJUST)
406:
407: cache_1 = function() --{
408:
409: cache_1 = 0
410: cache_1 = cache_1 + LOCATION_HAND
411: cache_1 = cache_1 + LOCATION_MZONE
412: cache_1 = cache_1 + LOCATION_SZONE
413: cache_1 = cache_1 + LOCATION_GRAVE
414: cache_1 = cache_1 + LOCATION_REMOVED
415:
416: cache_1 = Duel.GetFieldGroupCount(1,cache_1,0)
417:
418: if cache_1 == 0 then --{
419:
420: return true
421:
422: --}
423:
424: else --{
425:
426: return false
427:
428: end --}
429:
430: end --}
431:
432: effect_1:SetCondition(cache_1)
433:
434: cache_1 = function() --{
435:
436: Debug.ShowHint("目标已达成!")
437:
438: Duel.SetLP(1,0)
439:
440: end --}
441:
442: effect_1:SetOperation(cache_1)
443:
444: Duel.RegisterEffect(effect_1,0)
445:
446: end --}
447: