Lines of
script/c0.lua
from check-in 0b9e931ff1
that are changed by the sequence of edits moving toward
check-in ef8dd0e5a0:
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
0b9e931ff1 2024-02-17 43: do
0b9e931ff1 2024-02-17 44: local h1
0b9e931ff1 2024-02-17 45: --~ “调该效果”的效果
0b9e931ff1 2024-02-17 46: s["_开局洗卡抽卡"] = function(u1)
0b9e931ff1 2024-02-17 47: Duel.ShuffleDeck(0)
0b9e931ff1 2024-02-17 48: Duel.Draw(0, h1, REASON_RULE)
0b9e931ff1 2024-02-17 49: u1:Reset()
0b9e931ff1 2024-02-17 50: end
0b9e931ff1 2024-02-17 51: s["开局洗卡抽卡"] = function(u1)
0b9e931ff1 2024-02-17 52: local h2
0b9e931ff1 2024-02-17 53: --~ 抽卡之数
0b9e931ff1 2024-02-17 54: h1 = u1
0b9e931ff1 2024-02-17 55: s["「开局洗卡抽卡」之量"] = u1
0b9e931ff1 2024-02-17 56: --~ 效果
0b9e931ff1 2024-02-17 57: h2 = Effect.GlobalEffect()
0b9e931ff1 2024-02-17 58: h2:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
0b9e931ff1 2024-02-17 59: h2:SetCode(EVENT_ADJUST)
0b9e931ff1 2024-02-17 60: h2:SetCondition(aux.TRUE)
0b9e931ff1 2024-02-17 61: h2:SetOperation(s["_开局洗卡抽卡"])
0b9e931ff1 2024-02-17 62: Duel.RegisterEffect(h2, 0)
0b9e931ff1 2024-02-17 63: end
0b9e931ff1 2024-02-17 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: function _G.Debug.ReloadFieldEnd(u1, u2)
164: s["Debug.ReloadFieldEnd"]()
165: if u1 then
166: s["「禁主怪格」之几个"](u1)
167: end
168: if u2 then
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
245: h1 = h1 .. "禁" .. s["「禁主怪格」之量"] .. "怪格 "
246: end
247: if s["「禁魔陷格」之量"] then
248: h1 = h1 .. "禁" .. s["「禁魔陷格」之量"] .. "魔格 "
249: end
0b9e931ff1 2024-02-17 250: if s["「开局洗卡抽卡」之量"] then
0b9e931ff1 2024-02-17 251: h1 = h1 .. "抽" .. s["「开局洗卡抽卡」之量"] .. "卡 "
0b9e931ff1 2024-02-17 252: end
253: Debug.ShowHint(h1)
254: end
255: do
256: s["aux.BeginPuzzle"] = _G.aux.BeginPuzzle
0b9e931ff1 2024-02-17 257: --~ 「开局洗卡抽卡」之量
258: --~ 「开局选卡入手」之量
259: --~ 传入对方额外卡组最上面表侧卡,并将其作为印卡源
260: --~ 能印手卡几张
261: --~ 最多能印卡几张
0b9e931ff1 2024-02-17 262: function _G.aux.BeginPuzzle(u1, u2, u3, u4, u5)
263: s["aux.BeginPuzzle"]()
264: if u1 then
0b9e931ff1 2024-02-17 265: s["开局洗卡抽卡"](u1)
266: end
267: if u2 then
0b9e931ff1 2024-02-17 268: s["开局选卡入手"](u2)
0b9e931ff1 2024-02-17 269: end
0b9e931ff1 2024-02-17 270: if u3 then
0b9e931ff1 2024-02-17 271: s["印卡"](u3, u4, u5)
272: else
273: end
274: s["开局示"]()
275: s["通关邀"]()
276: end
277: end