Lines of
script/c0.lua
from check-in b345bc2db9
that are changed by the sequence of edits moving toward
check-in 63daf9144a:
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:
81: fun["Debug.ReloadFieldBegin"] = Debug.ReloadFieldBegin
82:
83: Debug.ReloadFieldBegin = function(str_1, str_2) --{
84:
85: str["不洗牌"] = str_1 & DUEL_PSEUDO_SHUFFLE
86:
87: str["无BP"] = str_1 & DUEL_ATTACK_FIRST_TURN
88:
89: if str_2 then --{
90:
91: str["规则"] = str["规则表"][str_2]
92:
93: --}
94:
95: else --{
96:
97: str["规则"] = str["规则表"][5]
98:
99: end --}
100:
101: fun["Debug.ReloadFieldBegin"](str_1, str_2)
102:
103: end --}
104:
105: fun["aux.BeginPuzzle"] = aux.BeginPuzzle
106:
107: aux.BeginPuzzle = function(str_1, str_2) --{
108:
109: fun["aux.BeginPuzzle"]()
110:
111: if str_1 then --{
112:
113: fun["开局添加手卡"](str_1)
114:
115: end --}
116:
117: if str_2 then --{
118:
119: fun["禁格"](str_2)
120:
121: end --}
122:
123: fun["开局说明"]()
124:
125: fun["通关邀请"]()
126:
127: end --}
128:
129: fun["通关邀请"] = function() --{
130:
131: effect_1 = Effect.GlobalEffect()
132:
133: effect_1:SetType(EFFECT_TYPE_FIELD
134: + EFFECT_TYPE_CONTINUOUS)
135:
136: effect_1:SetCode(EVENT_DAMAGE)
137:
138: function cache_1() --{
139:
140: cache_1 = Duel.GetLP(1)
141:
142: if cache_1 <= 0 then --{
143:
144: if cache_1 == 0 then --{
145:
146: --}
147:
148: else --{
149:
150: Debug.ShowHint(str["二解弹窗"])
151:
152: end --}
153:
154: Debug.ShowHint(str["原解弹窗"])
155:
156: --}
157:
158: else --{
159:
160: return false
161:
162: end --}
163:
164: end --}
165:
166: effect_1:SetCondition(cache_1)
167:
168: effect_1:SetOperation(aux.NULL)
169:
170: Duel.RegisterEffect(effect_1
171: , 0)
172:
173: end --}
174:
175: fun["是否效果卡"] = function(card) --{
176:
177: cache_1 = #str["效果卡的种类表"]
178:
179: for i = 1, cache_1 do --{
180:
181: cache_1 = Card.IsType(card, str["效果卡的种类表"][i])
182:
183: if cache_1 then --{
184:
185: return true
186: end --}
187:
188: end --}
189:
190: cache_1 = Card.IsType(card, TYPE_PENDULUM)
191:
192: if cache_1 then --{
193:
194: cache_1 = #str["无效果灵摆怪兽表"]
195:
196: for i = 1, cache_1 do --{
197:
198: cache_1 = Card.IsCode(card, str["无效果灵摆怪兽表"][i])
199:
200: if cache_1 then --{
201:
202: --}
203:
204: else --{
205:
206: return true
207:
208: end --}
209:
210: end --}
211:
212: end --}
213:
214: return false
215:
216: end --}
217:
218: fun["开局说明"] = function() --{
219:
220: str["这个残局的效果卡数量"] = Duel.GetMatchingGroupCount(fun["是否效果卡"],0,str["所有区域"],str["所有区域"],nil)
221:
222: cache_1 = Duel.GetOverlayGroup(0, LOCATION_MZONE, LOCATION_MZONE)
223:
224: for k in aux.Next(cache_1) do --{
225:
226: cache_1 = fun["是否效果卡"](k)
227:
228: if cache_1 then --{
229:
230: str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + 1
231:
232: end --}
233:
234: end --}
235:
236: str["开局说明"] = ""
237:
238: str["开局说明"] = str["开局说明"] .. str["这个残局的效果卡数量"]
239: str["开局说明"] = str["开局说明"] .. str["效果卡数量的后缀"]
240:
241: str["开局说明"] = str["开局说明"] .. str["规则"]
242:
243: if str["不洗牌"] == 0 then --{
244:
245: --}
246:
247: else --{
248:
249: str["开局说明"] = str["开局说明"] .. str["不洗牌的说明"]
250:
251: end --}
252:
253: if str["无BP"] == 0 then --{
254:
255: str["开局说明"] = str["开局说明"] .. str["无BP的说明"]
256:
257: end --}
258:
259: if str["开局添加手卡"] then --{
260:
261: str["开局说明"] = str["开局说明"] .. str["选卡的前缀"]
262: str["开局说明"] = str["开局说明"] .. str["开局添加手卡"]
263: str["开局说明"] = str["开局说明"] .. str["选卡的后缀"]
264:
265: end --}
266:
267: if str["禁格"] then --{
268:
269: str["开局说明"] = str["开局说明"] .. str["禁格的前缀"]
270: str["开局说明"] = str["开局说明"] .. str["禁格"]
271: str["开局说明"] = str["开局说明"] .. str["禁格的后缀"]
272:
273: end --}
274:
275: if str["随机抽卡的数量"] then --{
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: str["随机抽卡的数量"] = str_1
429:
430: end --}
431: