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