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