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