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