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