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