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