Lines of
script/c0.lua
from check-in 66a03a682a
that are changed by the sequence of edits moving toward
check-in 9a1184f29f:
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:
66a03a682a 2023-07-20 30: str["当前印卡数"] = 1
66a03a682a 2023-07-20 31:
32: str["印卡过多的弹窗"] = "印卡过多!"
33:
34: str["印卡弹窗1"] = "点击对方额外卡组可以进行印卡。\n手卡只能印 "
35: str["印卡弹窗2"] = " 张。\n最多可以印 "
36: str["印卡弹窗3"] = " 张"
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(str_1, str_2) --{
114:
115: fun["aux.BeginPuzzle"]()
116:
117: if str_1 then --{
118:
119: fun["开局添加手卡"](str_1)
120:
121: end --}
122:
123: if str_2 then --{
124:
125: fun["禁格"](str_2)
126:
127: end --}
128:
129: fun["开局说明"]()
130:
131: fun["通关邀请"]()
132:
133: end --}
134:
135: fun["通关邀请"] = function() --{
136:
137: effect_1 = Effect.GlobalEffect()
138:
139: effect_1:SetType(EFFECT_TYPE_FIELD
140: + EFFECT_TYPE_CONTINUOUS)
141:
142: effect_1:SetCode(EVENT_DAMAGE)
143:
144: function cache_1() --{
145:
146: cache_1 = Duel.GetLP(1)
147:
148: if cache_1 <= 0 then --{
149:
150: if cache_1 == 0 then --{
151:
152: --}
153:
154: else --{
155:
156: Debug.ShowHint(str["二解弹窗"])
157:
158: end --}
159:
160: Debug.ShowHint(str["原解弹窗"])
161:
162: --}
163:
164: else --{
165:
166: return false
167:
168: end --}
169:
170: end --}
171:
172: effect_1:SetCondition(cache_1)
173:
174: effect_1:SetOperation(aux.NULL)
175:
176: Duel.RegisterEffect(effect_1
177: , 0)
178:
179: end --}
180:
181: fun["是否效果卡"] = function(card) --{
182:
183: cache_1 = #str["效果卡的种类表"]
184:
185: for i = 1, cache_1 do --{
186:
187: cache_1 = Card.IsType(card, str["效果卡的种类表"][i])
188:
189: if cache_1 then --{
190:
191: return true
192: end --}
193:
194: end --}
195:
196: cache_1 = Card.IsType(card, TYPE_PENDULUM)
197:
198: if cache_1 then --{
199:
200: cache_1 = #str["无效果灵摆怪兽表"]
201:
202: for i = 1, cache_1 do --{
203:
204: cache_1 = Card.IsCode(card, str["无效果灵摆怪兽表"][i])
205:
206: if cache_1 then --{
207:
208: --}
209:
210: else --{
211:
212: return true
213:
214: end --}
215:
216: end --}
217:
218: end --}
219:
220: return false
221:
222: end --}
223:
224: fun["开局说明"] = function() --{
225:
226: str["这个残局的效果卡数量"] = Duel.GetMatchingGroupCount(fun["是否效果卡"],0,str["所有区域"],str["所有区域"],nil)
227:
228: cache_1 = Duel.GetOverlayGroup(0, LOCATION_MZONE, LOCATION_MZONE)
229:
230: for k in aux.Next(cache_1) do --{
231:
232: cache_1 = fun["是否效果卡"](k)
233:
234: if cache_1 then --{
235:
236: str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + 1
237:
238: end --}
239:
240: end --}
241:
242: str["开局说明"] = ""
243:
244: str["开局说明"] = str["开局说明"] .. str["这个残局的效果卡数量"]
245: str["开局说明"] = str["开局说明"] .. str["效果卡数量的后缀"]
246:
247: str["开局说明"] = str["开局说明"] .. str["规则"]
248:
249: if str["不洗牌"] == 0 then --{
250:
251: --}
252:
253: else --{
254:
255: str["开局说明"] = str["开局说明"] .. str["不洗牌的说明"]
256:
257: end --}
258:
259: if str["无BP"] == 0 then --{
260:
261: str["开局说明"] = str["开局说明"] .. str["无BP的说明"]
262:
263: end --}
264:
265: if str["开局添加手卡"] then --{
266:
267: str["开局说明"] = str["开局说明"] .. str["选卡的前缀"]
268: str["开局说明"] = str["开局说明"] .. str["开局添加手卡"]
269: str["开局说明"] = str["开局说明"] .. str["选卡的后缀"]
270:
271: end --}
272:
273: if str["禁格"] then --{
274:
275: str["开局说明"] = str["开局说明"] .. str["禁格的前缀"]
276: str["开局说明"] = str["开局说明"] .. str["禁格"]
277: str["开局说明"] = str["开局说明"] .. str["禁格的后缀"]
278:
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: effect_1:SetType(EFFECT_TYPE_IGNITION)
361:
362: effect_1:SetProperty(EFFECT_FLAG_BOTH_SIDE
363: + EFFECT_FLAG_UNCOPYABLE
364: + EFFECT_FLAG_CANNOT_NEGATE
365: + EFFECT_FLAG_CANNOT_DISABLE)
366:
367: cache_1 = function() --{
368:
369: Duel.SetChainLimit(aux.FALSE)
370:
371: return true
372:
373: end --}
374:
375: effect_1:SetTarget(cache_1)
376:
377: effect_1:SetRange(LOCATION_EXTRA)
378:
379: function print_hand(effect_event
380: , player_who_activate_the_effect) --{
381:
382: announce_card = Duel.AnnounceCard(player_who_activate_the_effect)
383:
384: card = Duel.CreateToken(player_who_activate_the_effect
385: , announce_card)
386:
387: if str["当前印卡数"] <= str_2 then --{
388:
389: str["当前印卡数"] = str["当前印卡数"] + 1
390:
391: Duel.SendtoHand(card,nil,REASON_RULE)
392:
393: --}
394:
395: else --{
396:
397: if str["当前印卡数"] <= str_3 then --{
398:
399: str["当前印卡数"] = str["当前印卡数"] + 1
400:
401: Duel.Remove(card,POS_FACEUP,REASON_RULE)
402:
403: Duel.SendtoDeck(card,player_who_activate_the_effect,0,REASON_RULE)
404:
405: --}
406:
407: else --{
408:
409: Debug.ShowHint(str["印卡过多的弹窗"])
410:
411: effect_event:Reset()
412:
413: end --}
414:
415: end --}
416:
417: end --}
418:
419: effect_1:SetOperation(print_hand)
420:
421: str_1:RegisterEffect(effect_1)
422:
423: end --}
424: