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