Lines of
script/c0.lua
from check-in bd740b7cb0
that are changed by the sequence of edits moving toward
check-in 2ce6e15f6b:
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:
9: str["无BP"] = str_1 & DUEL_ATTACK_FIRST_TURN
bd740b7cb0 2023-07-11 10:
11: if str_2 then --{
12: if str_2 == 3 then --{
13: str["规则"] = "大师3 "
14: --}
15: elseif str_2 == 4 then --{
16: str["规则"] = "新大师 "
17: --}
18: elseif str_2 == 5 then --{
19: str["规则"] = "大师2020 "
20: --}
21: end --}
22: else --{
23: str["规则"] = "大师2020 "
24: end --}
25: str["Debug.ReloadFieldBegin"](str_1, str_2)
26: end --}
27:
28: fun["通关邀请"] = function() --{
29: effect_1 = Effect.GlobalEffect()
30:
31: effect_1:SetType(EFFECT_TYPE_FIELD
32: + EFFECT_TYPE_CONTINUOUS)
33:
34: effect_1:SetCode(EVENT_DAMAGE)
bd740b7cb0 2023-07-11 35:
36: function cache_1() --{
37: cache_1 = Duel.GetLP(1)
bd740b7cb0 2023-07-11 38:
39: if cache_1 <= 0 then --{
40: if cache_1 < 0 then --{
41: Debug.ShowHint("QB:「你居然二解了,请加群告诉我怎么二解。」")
bd740b7cb0 2023-07-11 42:
43: end --}
44: cache_1 = true
bd740b7cb0 2023-07-11 45:
46: --}
47: else --{
48: cache_1 = false
bd740b7cb0 2023-07-11 49:
50: end --}
51: return cache_1
bd740b7cb0 2023-07-11 52:
53: end --}
54:
55: effect_1:SetCondition(cache_1)
56:
57: function cache_1() --{
58: Debug.ShowHint("残局群181175613")
59:
60: return
61: end --}
62: effect_1:SetOperation(cache_1)
63:
64: Duel.RegisterEffect(effect_1
65: , 0)
66:
67: end --}
68:
69: fun["是否效果卡"] = function(card)
70: cache_1 = Card.IsType(card, TYPE_SPELL)
71: cache_2 = Card.IsType(card, TYPE_TRAP)
72: cache_3 = Card.IsType(card, TYPE_EFFECT)
73: if cache_1
74: or cache_2
75: or cache_3 then
76: return true
77: end
78: cache_1 = Card.IsType(card, TYPE_PENDULUM)
79: if cache_1 then
80: cache_1 = Card.IsCode(card, 28363749)
81: cache_2 = Card.IsCode(card, 19474136)
82: cache_3 = Card.IsCode(card, 17390179)
83: cache_4 = Card.IsCode(card, 83980492)
84: if cache_1
85: or cache_2
86: or cache_3
87: or cache_4 then
88: else
89: return true
90: end
91: end
92: return false
93: end
94:
95: fun["开局说明"] = function()
96: if str["开局说明吗"] == 1 then
97: return
98: else
99: str["开局说明吗"] = 1
100: end
101: cache_1 = 0
102: cache_1 = cache_1 + LOCATION_DECK
103: cache_1 = cache_1 + LOCATION_HAND
104: cache_1 = cache_1 + LOCATION_MZONE
105: cache_1 = cache_1 + LOCATION_SZONE
106: cache_1 = cache_1 + LOCATION_GRAVE
107: cache_1 = cache_1 + LOCATION_REMOVED
108: cache_1 = cache_1 + LOCATION_EXTRA
109: str["这个残局的效果卡数量"] = Duel.GetMatchingGroupCount(fun["是否效果卡"],0,cache_1,cache_1,nil)
110: cache_1 = Duel.GetOverlayGroup(0, LOCATION_MZONE, LOCATION_MZONE)
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: str["开局说明"] =""
118: str["开局说明"] = str["开局说明"] .. str["这个残局的效果卡数量"]
119: str["开局说明"] = str["开局说明"] .. "卡 "
120: str["开局说明"] = str["开局说明"] .. str["规则"]
121: if str["不洗牌"] == 0 then
122: else
123: str["开局说明"] = str["开局说明"] .. "伪洗牌 "
124: end
125: if str["无BP"] == 0 then
126: str["开局说明"] = str["开局说明"] .. "无BP "
127: end
128: if str["开局添加手卡"] then
129: str["开局说明"] = str["开局说明"] .. "选"
130: str["开局说明"] = str["开局说明"] .. str["开局添加手卡"]
131: str["开局说明"] = str["开局说明"] .. "卡 "
132: end
133: if str["禁格"] then
134: str["开局说明"] = str["开局说明"] .. "禁"
135: str["开局说明"] = str["开局说明"] .. str["禁格"]
136: str["开局说明"] = str["开局说明"] .. "格 "
137: end
138: if str["印卡"] then
139: str["开局说明"] = str["开局说明"] .. "印卡 "
140: end
141: Debug.ShowHint(str["开局说明"])
142: fun["通关邀请"]()
143: end
144:
145: fun["开局添加手卡"] = function(str_1)
146: str["开局添加手卡"] = str_1
147: effect_1 = Effect.GlobalEffect()
148: effect_1:SetType(EFFECT_TYPE_FIELD
149: + EFFECT_TYPE_CONTINUOUS)
150: effect_1:SetCode(EVENT_ADJUST)
151: effect_1:SetCountLimit(1)
152: function cache_1()
153: if str["已添加手卡"] == 1 then
154: return false
155: else
156: str["已添加手卡"] = 1
157: return true
158: end
159: end
160: effect_1:SetCondition(cache_1)
161: function cache_1(effect_event
162: , player_who_activate_the_effect)
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: if str_3 then
193: else
194: str_3 = str_2
195: end
196: str["当前印卡数"] = 1
197: effect_1 = Effect.CreateEffect(str_1)
198: effect_1:SetType(EFFECT_TYPE_IGNITION)
199: effect_1:SetProperty(EFFECT_FLAG_BOTH_SIDE
200: + EFFECT_FLAG_UNCOPYABLE
201: + EFFECT_FLAG_CANNOT_NEGATE
202: + EFFECT_FLAG_CANNOT_DISABLE)
203: cache_1 = function()
204: Duel.SetChainLimit(aux.FALSE)
205: return true
206: end
207: effect_1:SetTarget(cache_1)
208: effect_1:SetRange(LOCATION_EXTRA)
209: function print_hand(effect_event
210: , player_who_activate_the_effect)
211: announce_card = Duel.AnnounceCard(player_who_activate_the_effect)
212: card = Duel.CreateToken(player_who_activate_the_effect
213: , announce_card)
214: if str["当前印卡数"] <= str_2 then
215: str["当前印卡数"] = str["当前印卡数"] + 1
216: Duel.SendtoHand(card,nil,REASON_RULE)
217: else
218: if str["当前印卡数"] <= str_3 then
219: str["当前印卡数"] = str["当前印卡数"] + 1
220: Duel.Remove(card,POS_FACEUP,REASON_RULE)
221: Duel.SendtoDeck(card,player_who_activate_the_effect,0,REASON_RULE)
222: else
223: Debug.ShowHint("印卡过多!")
224: end
225: end
226: end
227: effect_1:SetOperation(print_hand)
228: str_1:RegisterEffect(effect_1)
229: end
230:
231: fun["全部回到卡组"] = function()
232: Debug.ShowHint("胜利条件:让对方的卡回到卡组。")
233:
234: effect_1 = Effect.GlobalEffect()
235:
236: effect_1:SetType(EFFECT_TYPE_FIELD
237: + EFFECT_TYPE_CONTINUOUS)
238:
239: effect_1:SetCode(EVENT_ADJUST)
240:
241: cache_1 = function()
242: cache_1 = 0
243: cache_1 = cache_1 + LOCATION_HAND
244: cache_1 = cache_1 + LOCATION_MZONE
245: cache_1 = cache_1 + LOCATION_SZONE
246: cache_1 = cache_1 + LOCATION_GRAVE
247: cache_1 = cache_1 + LOCATION_REMOVED
248:
249: cache_1 = Duel.GetFieldGroupCount(1,cache_1,0)
250:
251: if cache_1 == 0 then
252: return true
253: else
254: return false
255: end
256: end
257:
258: effect_1:SetCondition(cache_1)
259:
260: cache_1 = function()
261: Debug.ShowHint("目标已达成!")
262: Duel.SetLP(1,0)
263: end
264:
265: effect_1:SetOperation(cache_1)
266:
267: Duel.RegisterEffect(effect_1,0)
268: end
269:
270:
271:
272:
273:
274:
275:
276:
277:
278: