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