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