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