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