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