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