Lines of
script/c0.lua
from check-in ba4bd27237
that are changed by the sequence of edits moving toward
check-in e78ba68423:
1:
2: local str = {}
3:
4: local math = math
5: local string = string
6: local table = table
7:
8: _G.fun = {}
9:
10: ---------------------------------
11:
12: local cache_1
13: local cache_2
14: local cache_3
15: local cache_4
16: local cache_5
17: local cache_6
18: local cache_7
19: local cache_8
20: local cache_9
21:
22: local _
23:
24: str["效果卡的种类表"] = {
25:
26: TYPE_SPELL
27: , TYPE_TRAP
28: , TYPE_EFFECT
29: }
30:
31: str["无效果灵摆怪兽表"] = {
32:
33: 28363749
34: , 19474136
35: , 17390179
36: , 83980492
37: }
38:
39: cache_1 = 0
40:
41: cache_1 = cache_1 + LOCATION_HAND
42: + LOCATION_MZONE
43: + LOCATION_SZONE
44: + LOCATION_GRAVE
45: + LOCATION_REMOVED
46:
47: str["除卡组与额外卡组以外的区域"] = cache_1
48:
49: cache_1 = cache_1 + LOCATION_DECK
50: + LOCATION_EXTRA
51:
52: str["所有区域"] = cache_1
53:
54: --第一层-------------------------------
55:
56: local cache_1
57: local cache_2
58: local cache_3
59: local cache_4
60: local cache_5
61: local cache_6
62: local cache_7
63: local cache_8
64: local cache_9
65:
66: local _
67:
68: fun["一_通关邀请"] = function() --{
69:
70: str["效果"] = Effect.GlobalEffect()
71:
72: str["效果"]:SetType(EFFECT_TYPE_FIELD
73: + EFFECT_TYPE_CONTINUOUS)
74:
75: str["效果"]:SetCode(EVENT_DAMAGE)
76:
77: function cache_1() --{
78:
79: cache_1 = Duel.GetLP(1)
80:
81: if cache_1 <= 0 then --{
82:
83: if cache_1 == 0 then --{
84:
85: --}
86:
87: else --{
88:
89: Debug.ShowHint("QB:「你居然二解了,请加群告诉我怎么二解。」")
90:
91: end --}
92:
93: Debug.ShowHint("残局群181175613")
94:
95: --}
96:
97: else --{
98:
99: return false
100:
101: end --}
102:
103: end --}
104:
105: str["效果"]:SetCondition(cache_1)
106:
107: str["效果"]:SetOperation(aux.NULL)
108:
109: Duel.RegisterEffect(str["效果"]
110: , 0)
111:
112: end --}
113:
114: fun["一_是否效果卡"] = function(card) --{
115:
116: for i = 1, #str["效果卡的种类表"] do --{
117:
118: if Card.IsType(card, str["效果卡的种类表"][i]) then --{
119:
120: return true
121: end --}
122:
123: end --}
124:
125: if Card.IsType(card, TYPE_PENDULUM) then --{
126:
127: for i = 1, #str["无效果灵摆怪兽表"] do --{
128:
129: if Card.IsCode(card, str["无效果灵摆怪兽表"][i]) then --{
130:
131: --}
132:
133: else --{
134:
135: return true
136:
137: end --}
138:
139: end --}
140:
141: end --}
142:
143: return false
144:
145: end --}
146:
147: fun["一_开局添加手卡"] = function(str_1) --{
148:
149: str["开局添加手卡的数量"] = str_1
150:
151: str["效果"] = Effect.GlobalEffect()
152:
153: str["效果"]:SetType(EFFECT_TYPE_FIELD
154: + EFFECT_TYPE_CONTINUOUS)
155:
156: str["效果"]:SetCode(EVENT_ADJUST)
157:
158: str["效果"]:SetCondition(aux.TRUE)
159:
160: function cache_1(effect_event
161: , player_who_activate_the_effect) --{
162:
163: str["玩家选定的卡"] = Duel.SelectMatchingCard(player_who_activate_the_effect
164: , Card.IsAbleToHand
165: , player_who_activate_the_effect
166: , LOCATION_DECK
167: , 0
168: , str_1
169: , str_1
170: , nil)
171:
172: Duel.SendtoHand(str["玩家选定的卡"]
173: , nil
174: , REASON_RULE)
175:
176: effect_event:Reset()
177:
178: end --}
179:
180: str["效果"]:SetOperation(cache_1)
181:
182: Duel.RegisterEffect(str["效果"]
183: , 0)
184:
185: end --}
186:
187: --第二层-------------------------------
188:
189: local cache_1
190: local cache_2
191: local cache_3
192: local cache_4
193: local cache_5
194: local cache_6
195: local cache_7
196: local cache_8
197: local cache_9
198:
199: local _
200:
201: fun["二_开局说明"] = function() --{
202:
203: str["这个残局的效果卡数量"] = Duel.GetMatchingGroupCount(fun["是否效果卡"]
204: , 0
205: , str["所有区域"]
206: , str["所有区域"]
207: , nil)
208:
209: str["超量素材组"] = Duel.GetOverlayGroup(0
210: , LOCATION_MZONE
211: , LOCATION_MZONE)
212:
213: for k in aux.Next(str["超量素材组"]) do --{
214:
215: if fun["一_是否效果卡"](k) then --{
216:
217: str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + 1
218:
219: end --}
220:
221: end --}
222:
223: str["开局说明"] = str["这个残局的效果卡数量"]
224: .. "卡 "
225: .. str["规则"]
226:
227: if str["不洗牌"] == 0 then --{
228:
229: --}
230:
231: else --{
232:
233: str["开局说明"] = str["开局说明"] .. "伪洗牌 "
234:
235: end --}
236:
237: if str["无BP"] == 0 then --{
238:
239: str["开局说明"] = str["开局说明"] .. "无BP "
240:
241: end --}
242:
243: if str["开局添加手卡"] then --{
244:
245: str["开局说明"] = str["开局说明"]
246: .. "选"
247: .. str["开局添加手卡的数量"]
248: .. "卡 "
249:
250: end --}
251:
252: if str["禁格"] then --{
253:
254: str["开局说明"] = str["开局说明"]
255: .. "禁"
256: .. str["禁格的数量"]
257: .. "格 "
258:
259: end --}
260:
261: if str["随机抽卡的数量"] then --{
262:
263: str["开局说明"] = str["开局说明"]
264: .. "抽"
265: .. str["随机抽卡的数量"]
266: .. "卡 "
267: end --}
268:
269: Debug.ShowHint(str["开局说明"])
270:
271: end --}
272:
273: --第三层-------------------------------
274:
275: local cache_1
276: local cache_2
277: local cache_3
278: local cache_4
279: local cache_5
280: local cache_6
281: local cache_7
282: local cache_8
283: local cache_9
284:
285: local _
286:
287: --兼容层-------------------------------
288:
289: fun["Debug.ReloadFieldBegin"] = Debug.ReloadFieldBegin
290:
291: Debug.ReloadFieldBegin = function(str_1, str_2) --{
292:
293: str["不洗牌"] = str_1 & DUEL_PSEUDO_SHUFFLE
294:
295: str["无BP"] = str_1 & DUEL_ATTACK_FIRST_TURN
296:
297: str["规则表"] = {
298:
299: [3] = "大师3 "
300: , [4] = "新大师 "
301: , [5] = "大师2020 "
302: }
303:
304: if str_2 then --{
305:
306: str["规则"] = str["规则表"][str_2]
307:
308: --}
309:
310: else --{
311:
312: str["规则"] = str["规则表"][5]
313:
314: end --}
315:
316: fun["Debug.ReloadFieldBegin"](str_1, str_2)
317:
318: end --}
319:
320: fun["Debug.ReloadFieldEnd"] = Debug.ReloadFieldEnd
321:
322: Debug.ReloadFieldEnd = function(str_1) --{
323:
324: fun["Debug.ReloadFieldEnd"]()
325:
326: if str_1 then --{
327:
328: fun["随机抽卡"](str_1)
329:
330: end --}
331:
332: end --}
333:
334: fun["aux.BeginPuzzle"] = aux.BeginPuzzle
335:
336: aux.BeginPuzzle = function(str_1, str_2) --{
337:
338: fun["aux.BeginPuzzle"]()
339:
340: if str_1 then --{
341:
342: fun["开局添加手卡"](str_1)
343:
344: end --}
345:
346: if str_2 then --{
347:
348: fun["禁格"](str_2)
349:
350: end --}
351:
352: fun["开局说明"]()
353:
354: fun["通关邀请"]()
355:
356: fun["失败得分"]()
357:
358: end --}
359:
360:
361:
362:
363:
ba4bd27237 2023-08-02 364: fun["禁格"] = function(str_1) --{
ba4bd27237 2023-08-02 365:
ba4bd27237 2023-08-02 366: str["禁格的数量"] = str_1
ba4bd27237 2023-08-02 367:
ba4bd27237 2023-08-02 368: str["效果"] = Effect.GlobalEffect()
ba4bd27237 2023-08-02 369:
ba4bd27237 2023-08-02 370: str["效果"]:SetCode(EFFECT_USE_EXTRA_MZONE)
ba4bd27237 2023-08-02 371:
ba4bd27237 2023-08-02 372: str["效果"]:SetValue(str_1)
ba4bd27237 2023-08-02 373:
ba4bd27237 2023-08-02 374: Duel.RegisterEffect(str["效果"],0)
ba4bd27237 2023-08-02 375:
ba4bd27237 2023-08-02 376: end --}
377:
378: fun["该效果不能被连锁"] = function() --{
379:
380: Duel.SetChainLimit(aux.FALSE)
381:
382: return true
383: end --}
384:
385: fun["印卡"] = function(str_1, str_2, str_3) --{
386:
387: if str_3 then --{
388:
389: --}
390:
391: else --{
392:
393: str_3 = str_2
394:
395: end --}
396:
397: Debug.ShowHint("点击对方额外卡组可以进行印卡。\n手卡只能印 "
398: .. str_2
399: .. " 张。\n最多可以印 "
400: .. str_3
401: .. " 张")
402:
403: str["效果"] = Effect.CreateEffect(str_1)
404:
405: str["当前印卡数"] = 1
406:
407: str["效果"]:SetType(EFFECT_TYPE_IGNITION)
408:
409: str["效果"]:SetProperty(EFFECT_FLAG_BOTH_SIDE
410: + EFFECT_FLAG_UNCOPYABLE
411: + EFFECT_FLAG_CANNOT_NEGATE
412: + EFFECT_FLAG_CANNOT_DISABLE)
413:
414: str["效果"]:SetTarget(fun["该效果不能被连锁"])
415:
416: str["效果"]:SetRange(LOCATION_EXTRA)
417:
418: function print_hand(effect_event
419: , player_who_activate_the_effect) --{
420:
421: announce_card = Duel.AnnounceCard(player_who_activate_the_effect)
422:
423: card = Duel.CreateToken(player_who_activate_the_effect
424: , announce_card)
425:
426: if str["当前印卡数"] <= str_2 then --{
427:
428: str["当前印卡数"] = str["当前印卡数"] + 1
429:
430: Duel.SendtoHand(card,nil,REASON_RULE)
431:
432: --}
433:
434: else --{
435:
436: if str["当前印卡数"] <= str_3 then --{
437:
438: str["当前印卡数"] = str["当前印卡数"] + 1
439:
440: Duel.Remove(card,POS_FACEUP,REASON_RULE)
441:
442: Duel.SendtoDeck(card,player_who_activate_the_effect,0,REASON_RULE)
443:
444: --}
445:
446: else --{
447:
448: Debug.ShowHint("印卡过多!")
449:
450: effect_event:Reset()
451:
452: end --}
453:
454: end --}
455:
456: end --}
457:
458: str["效果"]:SetOperation(print_hand)
459:
460: str_1:RegisterEffect(str["效果"])
461:
462: end --}
463:
464: fun["随机抽卡"] = function(str_1) --{
465:
466: str["随机抽卡的数量"] = str_1
467:
468: str["效果"] = Effect.GlobalEffect()
469:
470: str["效果"]:SetType(EFFECT_TYPE_FIELD
471: + EFFECT_TYPE_CONTINUOUS)
472:
473: str["效果"]:SetCode(EVENT_ADJUST)
474:
475: str["效果"]:SetCondition(aux.TRUE)
476:
477: function cache_1(effect_event
478: , player_who_activate_the_effect) --{
479:
480: Duel.ShuffleDeck(0)
481:
482: Duel.Draw(0,str_1,REASON_RULE)
483:
484: effect_event:Reset()
485:
486: end --}
487:
488: str["效果"]:SetOperation(cache_1)
489:
490: Duel.RegisterEffect(str["效果"]
491: , 0)
492:
493: end --}
494:
495: fun["失败得分"] = function() --{
496:
497: str["失败得分表"] = {
498:
499: [0] = "神龙之圣刻印"
500: , [100] = "调和支援士"
501: , [200] = "深渊的暗杀者"
502: , [300] = "救援猫"
503: , [400] = "注射天使 莉莉"
504: , [500] = "不知火的隐者"
505: , [600] = "影依猎鹰"
506: , [700] = "铁兽战线 姬特"
507: , [800] = "召唤僧"
508: , [900] = "恩底弥翁的仆从"
509: , [1000] = "机壳工具 丑恶"
510: , [1100] = "欧尼斯特"
511: , [1200] = "次元吸引者"
512: , [1300] = "黑羽-疾风之盖尔"
513: , [1400] = "加农炮兵"
514: , [1500] = "教导的大神祗官"
515: , [1600] = "地中族导师"
516: , [1700] = "相剑师-莫邪"
517: , [1800] = "宝玉兽-青玉飞马"
518: , [1900] = "命运英雄 血魔-D"
519: , [2000] = "流离的狮鹫骑手"
520: , [2100] = "电子龙"
521: , [2200] = "古遗物-死镰"
522: , [2300] = "能朋克 调狐"
523: , [2400] = "俱舍怒威族·芬里尔狼"
524: , [2500] = "黑魔术师"
525: , [2600] = "雅典娜"
526: , [2700] = "暗黑界的龙神 格拉法"
527: , [2800] = "魔导兽 刻耳柏洛斯尊主"
528: , [2900] = "元素英雄 永生侠"
529: , [3000] = "青眼白龙"
530: }
531:
532: str["对方玩家的初始生命值"] = Duel.GetLP(1)
533:
534: str["效果"] = Effect.GlobalEffect()
535:
536: str["效果"]:SetType(EFFECT_TYPE_FIELD
537: + EFFECT_TYPE_CONTINUOUS)
538:
539: str["效果"]:SetCode(EVENT_PHASE_START+PHASE_END)
540:
541: function cache_1(effect_event
542: , player_who_activate_the_effect) --{
543:
544: cache_1 = Duel.GetLP(1) - str["对方玩家的初始生命值"]
545:
546: if cache_1 > 0 then --{
547:
548: return
549:
550: --}
551:
552: else --{
553:
554: cache_1 = math.abs(cache_1) / (str["对方玩家的初始生命值"] - 100)
555:
556: cache_1 = math.tointeger(cache_1 * 3000 // 100 * 100)
557:
558: end --}
559:
560: if cache_1 > 3000 then --{
561:
562: --}
563:
564: else --{
565:
566: Debug.ShowHint("这局,您的得分是 "
567: .. cache_1
568: .. " 分!\n处于「"
569: .. str["失败得分表"][cache_1]
570: .. "」级别!")
571:
572: end --}
573:
574: effect_event:Reset()
575:
576: end --}
577:
578: str["效果"]:SetOperation(cache_1)
579:
580: Duel.RegisterEffect(str["效果"]
581: , 0)
582:
583: end --}
584: