Lines of
script/c0.lua
from check-in 53293329e0
that are changed by the sequence of edits moving toward
check-in 2033f4039c:
1: local string = string
2: local table = table
3: local Debug = Debug
4: local Effect = Effect
5: local Duel = Duel
6: local Card = Card
7: local s = {}
8: s["效卡之类排"] = {
9: TYPE_SPELL
10: , TYPE_TRAP
11: , TYPE_EFFECT
12: }
13: s["无效灵摆怪兽之卡编排"] = {
14: 28363749
15: , 19474136
16: , 17390179
17: , 83980492
18: }
19: s["全区"] = LOCATION_HAND + LOCATION_MZONE + LOCATION_SZONE + LOCATION_GRAVE + LOCATION_REMOVED + LOCATION_DECK + LOCATION_EXTRA
20: do
21: local h1
22: --~ 则对
23: h1 = {
24: [3] = "大师3 "
25: , [4] = "新大师 "
26: , [5] = "大师2020 "
27: }
28: s["Debug.ReloadFieldBegin"] = _G.Debug.ReloadFieldBegin
29: --~ 模
30: --~ 则数
31: function _G.Debug.ReloadFieldBegin(u1, u2)
32: s["伪洗卡"] = u1 & DUEL_PSEUDO_SHUFFLE
33: s["战段"] = u1 & DUEL_ATTACK_FIRST_TURN
34: s["机智"] = u1 & DUEL_SIMPLE_AI
35: if u2 then
36: s["则"] = h1[u2]
37: else
38: s["则"] = h1[5]
39: end
40: s["Debug.ReloadFieldBegin"](u1, u2)
41: end
42: end
43: do
44: local h1
45: --~ “调该效果”的效果
46: s["_开局洗卡抽卡"] = function(u1)
47: Duel.ShuffleDeck(0)
48: Duel.Draw(0, h1, REASON_RULE)
49: u1:Reset()
50: end
51: s["开局洗卡抽卡"] = function(u1)
52: local h2
53: --~ 抽卡之数
54: h1 = u1
55: s["开局洗卡抽卡之数"] = u1
56: --~ 效果
57: h2 = Effect.GlobalEffect()
58: h2:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
59: h2:SetCode(EVENT_ADJUST)
60: h2:SetCondition(aux.TRUE)
61: h2:SetOperation(s["_开局洗卡抽卡"])
62: Duel.RegisterEffect(h2, 0)
63: end
64: end
65: s["不被连锁"] = function()
66: Duel.SetChainLimit(aux.FALSE)
67: return true
68: end
69: do
70: local h1, h2
71: --~ 原解邀请
72: h1 = "残局群181175613"
73: --~ 二解邀请,备用:圣魔术师
74: h2 = "爆貘团:「你居然二解了,请加群告诉我怎么二解。」"
75: --~ 通关之邀
76: s["_通关之邀"] = function()
77: local h3
78: --~ 对方之血
79: h3 = Duel.GetLP(1)
80: if h3 <= 0 then
81: if h3 == 0 then
82: Debug.ShowHint(h1)
83: else
84: Debug.ShowHint(h2)
85: end
86: end
87: end
88: s["通关之邀"] = function()
89: local h1
90: --~ 效果
91: h1 = Effect.GlobalEffect()
92: h1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
93: h1:SetCode(EVENT_DAMAGE)
94: h1:SetCondition(s["_通关之邀"])
95: h1:SetOperation(aux.NULL)
96: Duel.RegisterEffect(h1, 0)
97: end
98: end
99: s["是否效卡"] = function(card)
100: for i = 1, #s["效卡之类排"] do
101: if Card.IsType(card, s["效卡之类排"][i]) then
102: return true
103: end
104: end
105: if Card.IsType(card, TYPE_PENDULUM) then
106: for i = 1, #s["无效灵摆怪兽之卡编排"] do
107: if Card.IsCode(card, s["无效灵摆怪兽之卡编排"][i]) then
108: else
109: return true
110: end
111: end
112: end
113: end
114: do
115: local h1
116: --~ “调该效果”的效果
117: --~ “调该效果”的玩家
118: s["_开局选卡入手"] = function(u1, u2)
119: local h2
120: --~ 玩家选定的卡
121: h2 = Duel.SelectMatchingCard(u2, Card.IsAbleToHand, u2, LOCATION_DECK, 0, h1, h1, nil)
122: Duel.SendtoHand(h2, nil, REASON_RULE)
123: u1:Reset()
124: end
125: s["开局选卡入手"] = function(u1)
126: local h2
127: s["开局选卡入手之数"] = u1
128: --~ 开局选卡入手之数
129: h1 = u1
130: --~ 效果
131: h2 = Effect.GlobalEffect()
132: h2:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
133: h2:SetCode(EVENT_ADJUST)
134: h2:SetCondition(aux.TRUE)
135: h2:SetOperation(s["_开局选卡入手"])
136: Duel.RegisterEffect(h2, 0)
137: end
138: end
53293329e0 2024-02-17 139: --~ 禁几个我方「主怪格」
53293329e0 2024-02-17 140: s["禁几个我方「主怪格」"] = function(u1)
141: local h1
53293329e0 2024-02-17 142: s["量之禁我方「主怪格」"] = u1
143: --~ 效果
144: h1 = Effect.GlobalEffect()
145: h1:SetCode(EFFECT_USE_EXTRA_MZONE)
146: h1:SetValue(u1)
147: Duel.RegisterEffect(h1, 0)
148: end
53293329e0 2024-02-17 149: --~ 禁几个我方「魔陷格」
53293329e0 2024-02-17 150: s["禁几个我方「魔陷格」"] = function(u1)
151: local h1
53293329e0 2024-02-17 152: s["量之禁我方「魔陷格」"] = u1
153: --~ 效果
154: h1 = Effect.GlobalEffect()
155: h1:SetCode(EFFECT_USE_EXTRA_SZONE)
156: h1:SetValue(u1)
157: Duel.RegisterEffect(h1, 0)
158: end
159: do
160: s["Debug.ReloadFieldEnd"] = _G.Debug.ReloadFieldEnd
53293329e0 2024-02-17 161: --~ 禁几个我方「主怪格」
53293329e0 2024-02-17 162: --~ 禁几个我方「魔陷格」
163: function _G.Debug.ReloadFieldEnd(u1, u2)
164: s["Debug.ReloadFieldEnd"]()
165: if u1 then
53293329e0 2024-02-17 166: s["禁几个我方「主怪格」"](u1)
167: end
168: if u2 then
53293329e0 2024-02-17 169: s["禁几个我方「魔陷格」"](u2)
170: end
171: end
172: end
173: do
174: local h1, h2, h3, h4
175: --~ 印卡过多之示
176: h1 = "印卡过多"
177: --~ 现之印卡数
178: h2 = 1
179: --~ 印手卡之上限
180: h3 = 0
181: --~ 总印卡之上限
182: h4 = 0
183: --~ 「调该效果」的效果
184: --~ 「调该效果」的玩家
185: s["_印卡"] = function(u1, u2)
186: local h5, h6
187: --~ 印卡之卡编
188: h5 = Duel.AnnounceCard(u2)
189: --~ 卡
190: h6 = Duel.CreateToken(u2, h5)
191: if h2 <= h3 then
192: h2 = h2 + 1
193: Duel.SendtoHand(h6, nil, REASON_RULE)
194: else
195: if h2 <= h4 then
196: h2 = h2 + 1
197: Duel.SendtoDeck(h6, u2, 0, REASON_RULE)
198: else
199: Debug.ShowHint(h1)
200: u1:Reset()
201: end
202: end
203: end
204: s["印卡"] = function(u1, u2, u3)
205: local h5, h6
206: h3 = u2
207: h4 = u3 or u2
208: Debug.ShowHint("点击对方额外卡组可以进行印卡\n手卡只能印" .. h3 .. "张\n最多可以印" .. h4 .. "张")
209: h5 = Effect.CreateEffect(u1)
210: h5:SetType(EFFECT_TYPE_IGNITION)
211: h5:SetProperty(EFFECT_FLAG_BOTH_SIDE + EFFECT_FLAG_UNCOPYABLE + EFFECT_FLAG_CANNOT_NEGATE + EFFECT_FLAG_CANNOT_DISABLE)
212: h5:SetTarget(s["不被连锁"])
213: h5:SetRange(LOCATION_EXTRA)
214: h5:SetOperation(s["_印卡"])
215: u1:RegisterEffect(h5)
216: end
217: end
218: s["开局之示"] = function()
219: local h1, h2, h3
220: --~ 此局效卡之数
221: h2 = Duel.GetMatchingGroupCount(s["是否效卡"], 0, s["全区"], s["全区"], nil)
222: --~ 超量材组
223: h3 = Duel.GetOverlayGroup(0, LOCATION_MZONE, LOCATION_MZONE)
224: for u1 in aux.Next(h3) do
225: if s["是否效卡"](u1) then
226: h2 = h2 + 1
227: end
228: end
229: --~ 开局说明
230: h1 = h2 .. "卡 " .. s["则"]
231: if s["伪洗卡"] == 0 then
232: else
233: h1 = h1 .. "伪洗卡 "
234: end
235: if s["战段"] == 0 then
236: h1 = h1 .. "无战段 "
237: end
238: if s["机智"] == 0 then
239: h1 = h1 .. "无机智 "
240: end
241: if s["开局选卡入手之数"] then
242: h1 = h1 .. "选" .. s["开局选卡入手之数"] .. "卡 "
243: end
244: if s["量之禁「主怪格」"] then
53293329e0 2024-02-17 245: h1 = h1 .. "禁" .. s["量之禁我方「主怪格」"] .. "怪格 "
246: end
247: if s["量之禁「魔陷格」"] then
53293329e0 2024-02-17 248: h1 = h1 .. "禁" .. s["量之禁我方「魔陷格」"] .. "魔格 "
249: end
250: if s["开局洗卡抽卡之数"] then
251: h1 = h1 .. "抽" .. s["开局洗卡抽卡之数"] .. "卡 "
252: end
253: Debug.ShowHint(h1)
254: end
255: do
256: s["aux.BeginPuzzle"] = _G.aux.BeginPuzzle
257: --~ 开局洗卡抽卡之数
258: --~ 开局选卡入手之数
259: --~ 传入对方额外卡组最上面的表侧卡,并将其作为印卡源
260: --~ 能往手卡印几张卡
261: --~ 最多能印几张卡
262: function _G.aux.BeginPuzzle(u1, u2, u3, u4, u5)
263: s["aux.BeginPuzzle"]()
264: if u1 then
265: s["开局选卡入手"](u1)
266: end
267: if u2 then
268: s["禁格"](u2)
269: end
270: if u3 then
271: s["印卡"](u3, u4, u5)
272: else
273: end
274: s["开局之示"]()
275: s["通关之邀"]()
276: end
277: end