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