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