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