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