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