Lines of
script/c0.lua
from check-in d5d0e03305
that are changed by the sequence of edits moving toward
check-in 8b9b3f86d2:
1: str = {}
2:
3: fun = {}
4:
5: str["Debug.ReloadFieldBegin"] = Debug.ReloadFieldBegin
6:
7: Debug.ReloadFieldBegin = function(str_1, str_2) --{
8: str["不洗牌"] = str_1 & DUEL_PSEUDO_SHUFFLE
9:
10: str["无BP"] = str_1 & DUEL_ATTACK_FIRST_TURN
11:
12: if str_2 then --{
13: if str_2 == 3 then --{
14: str["规则"] = "大师3 "
15: --}
16: elseif str_2 == 4 then --{
17: str["规则"] = "新大师 "
18: --}
19: elseif str_2 == 5 then --{
20: str["规则"] = "大师2020 "
21: --}
22: end --}
23: else --{
24: str["规则"] = "大师2020 "
25: end --}
26: str["Debug.ReloadFieldBegin"](str_1, str_2)
27: end --}
28: fun["通关邀请"] = function() --{
29: effect_1 = Effect.GlobalEffect()
30:
31: effect_1:SetType(EFFECT_TYPE_FIELD
32: + EFFECT_TYPE_CONTINUOUS)
33:
34: effect_1:SetCode(EVENT_DAMAGE)
35:
36: function cache_1() --{
37: cache_1 = Duel.GetLP(1)
38:
39: if cache_1 <= 0 then --{
40: if cache_1 < 0 then --{
41: Debug.ShowHint("QB:「你居然二解了,请加群告诉我怎么二解。」")
42: end --}
43: cache_1 = true
44: --}
45: else --{
46: cache_1 = false
47: end --}
48: return cache_1
49: end --}
50: effect_1:SetCondition(cache_1)
51:
52: function cache_1() --{
53: Debug.ShowHint("残局群181175613")
54: end --}
55: effect_1:SetOperation(cache_1)
56:
57: Duel.RegisterEffect(effect_1
58: , 0)
59: end --}
60: fun["是否效果卡"] = function(card) --{
61: cache_1 = Card.IsType(card, TYPE_SPELL)
62:
63: cache_2 = Card.IsType(card, TYPE_TRAP)
64:
65: cache_3 = Card.IsType(card, TYPE_EFFECT)
66:
67: if cache_1
68: or cache_2
69: or cache_3 then --{
70: return true
71: end --}
72: cache_1 = Card.IsType(card, TYPE_PENDULUM)
73:
74: if cache_1 then --{
75: cache_1 = Card.IsCode(card, 28363749)
76:
77: cache_2 = Card.IsCode(card, 19474136)
78:
79: cache_3 = Card.IsCode(card, 17390179)
80:
81: cache_4 = Card.IsCode(card, 83980492)
82:
83: if cache_1
84: or cache_2
85: or cache_3
86: or cache_4 then --{
87: --}
88: else --{
89: return true
90: end --}
91: end --}
92: return false
93: end --}
d5d0e03305 2023-07-11 94:
95: fun["开局说明"] = function() --{
96: if str["开局说明吗"] == 1 then --{
97: return
98: --}
99: else --{
100: str["开局说明吗"] = 1
101: end --}
102: cache_1 = 0
103: cache_1 = cache_1 + LOCATION_DECK
104: cache_1 = cache_1 + LOCATION_HAND
105: cache_1 = cache_1 + LOCATION_MZONE
106: cache_1 = cache_1 + LOCATION_SZONE
107: cache_1 = cache_1 + LOCATION_GRAVE
108: cache_1 = cache_1 + LOCATION_REMOVED
109: cache_1 = cache_1 + LOCATION_EXTRA
110:
111: str["这个残局的效果卡数量"] = Duel.GetMatchingGroupCount(fun["是否效果卡"],0,cache_1,cache_1,nil)
112:
113: cache_1 = Duel.GetOverlayGroup(0, LOCATION_MZONE, LOCATION_MZONE)
114:
115: for k in aux.Next(cache_1) do --{
116: cache_1 = fun["是否效果卡"](k)
117:
118: if cache_1 then --{
119: str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + 1
120: end --}
121: end --}
122: str["开局说明"] =""
123: str["开局说明"] = str["开局说明"] .. str["这个残局的效果卡数量"]
124: str["开局说明"] = str["开局说明"] .. "卡 "
125: str["开局说明"] = str["开局说明"] .. str["规则"]
126:
127: if str["不洗牌"] == 0 then --{
128: --}
129: else --{
130: str["开局说明"] = str["开局说明"] .. "伪洗牌 "
131: end --}
132: if str["无BP"] == 0 then --{
133: str["开局说明"] = str["开局说明"] .. "无BP "
134: end --}
135: if str["开局添加手卡"] then --{
136: str["开局说明"] = str["开局说明"] .. "选"
137: str["开局说明"] = str["开局说明"] .. str["开局添加手卡"]
138: str["开局说明"] = str["开局说明"] .. "卡 "
139: end --}
140: if str["禁格"] then --{
141: str["开局说明"] = str["开局说明"] .. "禁"
142: str["开局说明"] = str["开局说明"] .. str["禁格"]
143: str["开局说明"] = str["开局说明"] .. "格 "
144: end --}
145: if str["印卡"] then --{
146: str["开局说明"] = str["开局说明"] .. "印卡 "
147: end --}
148: Debug.ShowHint(str["开局说明"])
149:
150: fun["通关邀请"]()
151: end --}
d5d0e03305 2023-07-11 152:
153: fun["开局添加手卡"] = function(str_1) --{
154: str["开局添加手卡"] = str_1
155:
156: effect_1 = Effect.GlobalEffect()
157:
158: effect_1:SetType(EFFECT_TYPE_FIELD
159: + EFFECT_TYPE_CONTINUOUS)
160:
161: effect_1:SetCode(EVENT_ADJUST)
162:
163: effect_1:SetCountLimit(1)
164:
165: function cache_1() --{
166: if str["已添加手卡"] == 1 then --{
167: return false
168: --}
169: else --{
170: str["已添加手卡"] = 1
171:
172: return true
173: end --}
174: end--}
175: effect_1:SetCondition(cache_1)
176:
177: function cache_1(effect_event
178: , player_who_activate_the_effect) --{
179: str["玩家选定的卡"] = Duel.SelectMatchingCard(player_who_activate_the_effect
180: , Card.IsAbleToHand
181: , player_who_activate_the_effect
182: , LOCATION_DECK
183: , 0
184: , str_1
185: , str_1
186: , nil)
187:
188: Duel.SendtoHand(str["玩家选定的卡"]
189: , nil
190: , REASON_RULE)
191: end --}
192: effect_1:SetOperation(cache_1)
193:
194: Duel.RegisterEffect(effect_1
195: , 0)
196:
197: fun["开局说明"]()
198: end --}
d5d0e03305 2023-07-11 199:
200: fun["禁格"] = function(str_1) --{
201: str["禁格"] = str_1
202:
203: effect_1 = Effect.GlobalEffect()
204:
205: effect_1:SetType(EFFECT_TYPE_FIELD)
206:
207: effect_1:SetCode(EFFECT_USE_EXTRA_MZONE)
208:
209: effect_1:SetValue(str_1)
210:
211: Duel.RegisterEffect(effect_1,0)
212: end --}
d5d0e03305 2023-07-11 213:
214: fun["印卡"] = function(str_1, str_2, str_3) --{
215: str["印卡"] = 1
216:
217: if str_3 then --{
218: --}
219: else --{
220: str_3 = str_2
221: end --}
222: str["当前印卡数"] = 1
223:
224: effect_1 = Effect.CreateEffect(str_1)
225:
226: effect_1:SetType(EFFECT_TYPE_IGNITION)
227:
228: effect_1:SetProperty(EFFECT_FLAG_BOTH_SIDE
229: + EFFECT_FLAG_UNCOPYABLE
230: + EFFECT_FLAG_CANNOT_NEGATE
231: + EFFECT_FLAG_CANNOT_DISABLE)
232:
233: cache_1 = function() --{
234: Duel.SetChainLimit(aux.FALSE)
235:
236: return true
237: end --}
238: effect_1:SetTarget(cache_1)
239:
240: effect_1:SetRange(LOCATION_EXTRA)
241:
242: function print_hand(effect_event
243: , player_who_activate_the_effect) --{
244: announce_card = Duel.AnnounceCard(player_who_activate_the_effect)
245:
246: card = Duel.CreateToken(player_who_activate_the_effect
247: , announce_card)
248:
249: if str["当前印卡数"] <= str_2 then --{
250: str["当前印卡数"] = str["当前印卡数"] + 1
251:
252: Duel.SendtoHand(card,nil,REASON_RULE)
253: --}
254: else --{
255: if str["当前印卡数"] <= str_3 then --{
256: str["当前印卡数"] = str["当前印卡数"] + 1
257:
258: Duel.Remove(card,POS_FACEUP,REASON_RULE)
259:
260: Duel.SendtoDeck(card,player_who_activate_the_effect,0,REASON_RULE)
261: --}
262: else --{
263: Debug.ShowHint("印卡过多!")
264: end --}
265: end --}
266: end --}
267: effect_1:SetOperation(print_hand)
268:
269: str_1:RegisterEffect(effect_1)
270: end --}
d5d0e03305 2023-07-11 271:
272: fun["全部回到卡组"] = function() --{
273: Debug.ShowHint("胜利条件:让对方的卡回到卡组。")
274:
275: effect_1 = Effect.GlobalEffect()
276:
277: effect_1:SetType(EFFECT_TYPE_FIELD
278: + EFFECT_TYPE_CONTINUOUS)
279:
280: effect_1:SetCode(EVENT_ADJUST)
281:
282: cache_1 = function() --{
283: cache_1 = 0
284: cache_1 = cache_1 + LOCATION_HAND
285: cache_1 = cache_1 + LOCATION_MZONE
286: cache_1 = cache_1 + LOCATION_SZONE
287: cache_1 = cache_1 + LOCATION_GRAVE
288: cache_1 = cache_1 + LOCATION_REMOVED
289:
290: cache_1 = Duel.GetFieldGroupCount(1,cache_1,0)
291:
292: if cache_1 == 0 then --{
293: return true
294: --}
295: else --{
296: return false
297: end --}
298: end --}
299:
300: effect_1:SetCondition(cache_1)
301:
302: cache_1 = function() --{
303: Debug.ShowHint("目标已达成!")
304: Duel.SetLP(1,0)
305: end --}
306:
307: effect_1:SetOperation(cache_1)
308:
309: Duel.RegisterEffect(effect_1,0)
310: end --}
d5d0e03305 2023-07-11 311:
d5d0e03305 2023-07-11 312:
d5d0e03305 2023-07-11 313:
d5d0e03305 2023-07-11 314:
315: