Lines of
script/c0.lua
from check-in 1706ec3d64
that are changed by the sequence of edits moving toward
check-in 492df84f91:
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
139: --~ 禁几个「主怪格」
140: s["禁几个「主怪格」"] = function(u1)
141: local h1
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
149: --~ 禁几个「魔陷格」
150: s["禁几个「魔陷格」"] = function(u1)
151: local h1
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
161: --~ 开局洗卡抽卡之数
162: --~ 禁几个我方怪兽格
163: --~ 禁几个我方魔陷格
164: function _G.Debug.ReloadFieldEnd(u1)
165: s["Debug.ReloadFieldEnd"]()
166: if u1 then
167: s["开局洗卡抽卡"](u1)
168: end
169: end
170: end
171: do
172: local h1, h2, h3, h4
173: --~ 印卡过多之示
174: h1 = "印卡过多"
175: --~ 现之印卡数
176: h2 = 1
177: --~ 印手卡之上限
178: h3 = 0
179: --~ 总印卡之上限
180: h4 = 0
181: --~ 「调该效果」的效果
182: --~ 「调该效果」的玩家
183: s["_印卡"] = function(u1, u2)
184: local h5, h6
185: --~ 印卡之卡编
186: h5 = Duel.AnnounceCard(u2)
187: --~ 卡
188: h6 = Duel.CreateToken(u2, h5)
189: if h2 <= h3 then
190: h2 = h2 + 1
191: Duel.SendtoHand(h6, nil, REASON_RULE)
192: else
193: if h2 <= h4 then
194: h2 = h2 + 1
195: Duel.SendtoDeck(h6, u2, 0, REASON_RULE)
196: else
197: Debug.ShowHint(h1)
198: u1:Reset()
199: end
200: end
201: end
202: s["印卡"] = function(u1, u2, u3)
203: local h5, h6
204: h3 = u2
205: h4 = u3 or u2
206: Debug.ShowHint("点击对方额外卡组可以进行印卡\n手卡只能印" .. h3 .. "张\n最多可以印" .. h4 .. "张")
207: h5 = Effect.CreateEffect(u1)
208: h5:SetType(EFFECT_TYPE_IGNITION)
209: h5:SetProperty(EFFECT_FLAG_BOTH_SIDE + EFFECT_FLAG_UNCOPYABLE + EFFECT_FLAG_CANNOT_NEGATE + EFFECT_FLAG_CANNOT_DISABLE)
210: h5:SetTarget(s["不被连锁"])
211: h5:SetRange(LOCATION_EXTRA)
212: h5:SetOperation(s["_印卡"])
213: u1:RegisterEffect(h5)
214: end
215: end
216: s["开局之示"] = function()
217: local h1, h2, h3
218: --~ 此局效卡之数
219: h2 = Duel.GetMatchingGroupCount(s["是否效卡"], 0, s["全区"], s["全区"], nil)
220: --~ 超量材组
221: h3 = Duel.GetOverlayGroup(0, LOCATION_MZONE, LOCATION_MZONE)
222: for u1 in aux.Next(h3) do
223: if s["是否效卡"](u1) then
224: h2 = h2 + 1
225: end
226: end
227: --~ 开局说明
228: h1 = h2 .. "卡 " .. s["则"]
229: if s["伪洗卡"] == 0 then
230: else
231: h1 = h1 .. "伪洗卡 "
232: end
233: if s["战段"] == 0 then
234: h1 = h1 .. "无战段 "
235: end
236: if s["机智"] == 0 then
237: h1 = h1 .. "无机智 "
238: end
239: if s["开局选卡入手之数"] then
240: h1 = h1 .. "选" .. s["开局选卡入手之数"] .. "卡 "
241: end
1706ec3d64 2024-02-17 242: if s["禁格之数"] then
1706ec3d64 2024-02-17 243: h1 = h1 .. "禁" .. s["禁格之数"] .. "格 "
244: end
245: if s["开局洗卡抽卡之数"] then
246: h1 = h1 .. "抽" .. s["开局洗卡抽卡之数"] .. "卡 "
247: end
248: Debug.ShowHint(h1)
249: end
250: do
251: s["aux.BeginPuzzle"] = _G.aux.BeginPuzzle
252: --~ 开局洗卡抽卡之数
253: --~ 开局选卡入手之数
254: --~ 传入对方额外卡组最上面的表侧卡,并将其作为印卡源
255: --~ 能往手卡印几张卡
256: --~ 最多能印几张卡
257: function _G.aux.BeginPuzzle(u1, u2, u3, u4, u5)
258: s["aux.BeginPuzzle"]()
259: if u1 then
260: s["开局选卡入手"](u1)
261: end
262: if u2 then
263: s["禁格"](u2)
264: end
265: if u3 then
266: s["印卡"](u3, u4, u5)
267: else
268: end
269: s["开局之示"]()
270: s["通关之邀"]()
271: end
272: end