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