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