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