Lines of
script/c0.lua
from check-in ad8a165722
that are changed by the sequence of edits moving toward
check-in ac819336b2:
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: function s["开局洗牌抽牌"](u1)
ad8a165722 2024-02-14 45: local h1, h2
46: s["开局洗牌抽牌之数"] = u1
47: --~ 效果
ad8a165722 2024-02-14 48: h1 = Effect.GlobalEffect()
ad8a165722 2024-02-14 49: h1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
ad8a165722 2024-02-14 50: h1:SetCode(EVENT_ADJUST)
ad8a165722 2024-02-14 51: h1:SetCondition(aux.TRUE)
ad8a165722 2024-02-14 52: -- 随机抽牌
ad8a165722 2024-02-14 53: --~ 调该效果的效果
ad8a165722 2024-02-14 54: function h2(u2)
ad8a165722 2024-02-14 55: Duel.ShuffleDeck(0)
ad8a165722 2024-02-14 56: Duel.Draw(0, u1, REASON_RULE)
ad8a165722 2024-02-14 57: u2:Reset()
ad8a165722 2024-02-14 58: end
ad8a165722 2024-02-14 59: h1:SetOperation(h2)
ad8a165722 2024-02-14 60: Duel.RegisterEffect(h1, 0)
61: end
62: end
63: function s.["不被连锁"]()
64: Duel.SetChainLimit(aux.FALSE)
65: return true
66: end
67: do
68: local h1, h2
69: --~ 原解邀请
70: h1 = "残局群181175613"
71: --~ 二解邀请,备用:圣魔术师
72: h2 = "爆貘团:「你居然二解了,请加群告诉我怎么二解。」"
73: function s["通关之邀"]()
74: local h3, h4
75: --~ 效果
76: h3 = Effect.GlobalEffect()
77: h3:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
78: h3:SetCode(EVENT_DAMAGE)
79: --~ 通关之邀
80: function h4()
81: local h5
82: --~ 对方之血
83: h5 = Duel.GetLP(1)
84: if h5 <= 0 then
85: if h5 == 0 then
86: Debug.ShowHint(h1)
87: else
88: Debug.ShowHint(h2)
89: end
90: else
91: return false
92: end
93: end
94: h3:SetCondition(h4)
95: h3:SetOperation(aux.NULL)
96: Duel.RegisterEffect(h3, 0)
97: end
98: end
99: function s.["是否效牌"](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: function s["开局选牌入手"](u1)
115: local h1, h2
116: str["开局选牌入手之数"] = u1
117: --~ 效果
118: h1 = Effect.GlobalEffect()
119: h1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
120: h1:SetCode(EVENT_ADJUST)
121: h1:SetCondition(aux.TRUE)
122: --~ 调该效果的效果
123: --~ 调该效果的玩家
124: function h2(u2, u3)
125: local h3
126: --~ 玩家选定的牌
127: h3 = Duel.SelectMatchingCard(u3, Card.IsAbleToHand, u3, LOCATION_DECK, 0, u1, u1, nil)
128: Duel.SendtoHand(h3, nil, REASON_RULE)
129: u2:Reset()
130: end
131: h1:SetOperation(h2)
132: Duel.RegisterEffect(h1, 0)
133: end
134: function s["禁格"](u1)
135: local h1
136: s["禁格之数"] = u1
137: --~ 效果
138: h1 = Effect.GlobalEffect()
139: h1:SetCode(EFFECT_USE_EXTRA_MZONE)
140: h1:SetValue(u1)
141: Duel.RegisterEffect(h1, 0)
142: end
143: do
144: s["Debug.ReloadFieldEnd"] = _G.Debug.ReloadFieldEnd
145: --~ 开局洗牌抽牌之数
146: function _G.Debug.ReloadFieldEnd(u1)
147: s["Debug.ReloadFieldEnd"]()
148: if u1 then
149: s["开局洗牌抽牌"](u1)
150: end
151: end
152: end
153: function s.["印牌"](u1, u2, u3)
154: local h1, h2, h3
155: u3 = u3 or u2
156: Debug.ShowHint("点击对方额外牌组可以进行印牌。\n手牌只能印 " .. u2 .. " 张。\n最多可以印 " .. u3 .. " 张")
157: h1 = Effect.CreateEffect(u1)
158: --~ 现之印牌数
159: h2 = 1
160: h1:SetType(EFFECT_TYPE_IGNITION)
161: h1:SetProperty(EFFECT_FLAG_BOTH_SIDE + EFFECT_FLAG_UNCOPYABLE + EFFECT_FLAG_CANNOT_NEGATE + EFFECT_FLAG_CANNOT_DISABLE)
162: h1:SetTarget(s["不被连锁"])
163: h1:SetRange(LOCATION_EXTRA)
164: -- 印牌
165: --~ 调该效果的效果
166: --~ 调该效果的玩家
167: function h3(u4, u5)
168: local h4, h5
169: --~ 印卡之卡编
170: h4 = Duel.AnnounceCard(u5)
171: --~ 卡
172: h5 = Duel.CreateToken(u5, h4)
173: if h2 <= u2 then
174: h2 = h2 + 1
175: Duel.SendtoHand(h5, nil, REASON_RULE)
176: else
177: if h2 <= u3 then
178: h2 = h2 + 1
179: Duel.Remove(h5, POS_FACEUP, REASON_RULE)
180: Duel.SendtoDeck(card, u5, 0, REASON_RULE)
181: else
182: Debug.ShowHint("印牌过多")
183: u4:Reset()
184: end
185: end
186: end
187: h1:SetOperation(h3)
188: u1:RegisterEffect(h1)
189: end
190: function s.["开局之示"]()
191: local h1, h2, h3
192: --~ 此局效牌之数
193: h2 = Duel.GetMatchingGroupCount(s["是否效牌"], 0, s["全区"], s["全区"], nil)
194: --~ 超量材组
195: h3 = Duel.GetOverlayGroup(0, LOCATION_MZONE, LOCATION_MZONE)
196: for u1 in aux.Next(h3) do
197: if s["是否效牌"](u1) then
198: h2 = h2 + 1
199: end
200: end
201: --~ 开局说明
202: h1 = h2 .. "牌 " .. s["则"]
203: if s["伪洗牌"] == 0 then
204: else
205: h1 = h1 .. "伪洗牌 "
206: end
207: if s["战段"] == 0 then
208: h1 = h1 .. "无战段 "
209: end
210: if s["机智"] == 0 then
211: h1 = h1 .. "无机智 "
212: end
213: if s["开局选牌入手之数"] then
214: h1 = h1 .. "选" .. s["开局选牌入手之数"] .. "牌 "
215: end
216: if s["禁格之数"] then
217: h1 = h1 .. "禁" .. s["禁格之数"] .. "格 "
218: end
219: if s["开局洗牌抽牌之数"] then
220: h1 = h1 .. "抽" .. s["开局洗牌抽牌之数"] .. "牌 "
221: end
222: Debug.ShowHint(h1)
223: end
224: do
225: s["aux.BeginPuzzle"] = _G.aux.BeginPuzzle
226: --~ 开局选牌入手之数
227: --~ 禁格之数
228: function _G.aux.BeginPuzzle(u1, u2)
229: s["aux.BeginPuzzle"]()
230: if u1 then
231: s["开局选牌入手"](u1)
232: end
233: if u2 then
234: s["禁格"](u2)
235: end
236: s["开局之示"]()
237: s["通关之邀"]()
238: end
239: end