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