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