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