local string = string
local table = table
local Debug = Debug
local Effect = Effect
local Duel = Duel
local Card = Card
local s = {}
s["效牌之类排"] = {
TYPE_SPELL
, TYPE_TRAP
, TYPE_EFFECT
}
s["无效灵摆怪兽之卡编排"] = {
28363749
, 19474136
, 17390179
, 83980492
}
s["全区"] = LOCATION_HAND + LOCATION_MZONE + LOCATION_SZONE + LOCATION_GRAVE + LOCATION_REMOVED + LOCATION_DECK + LOCATION_EXTRA
do
local h1
--~ 则对
h1 = {
[3] = "大师3 "
, [4] = "新大师 "
, [5] = "大师2020 "
}
s["Debug.ReloadFieldBegin"] = _G.Debug.ReloadFieldBegin
--~ 模
--~ 则数
function _G.Debug.ReloadFieldBegin(u1, u2)
s["伪洗牌"] = u1 & DUEL_PSEUDO_SHUFFLE
s["战段"] = u1 & DUEL_ATTACK_FIRST_TURN
s["机智"] = u1 & DUEL_SIMPLE_AI
if u2 then
s["则"] = h1[u2]
else
s["则"] = h1[5]
end
s["Debug.ReloadFieldBegin"](u1, u2)
end
end
function s["开局洗牌抽牌"](u1)
local h1, h2
s["开局洗牌抽牌之数"] = u1
--~ 效果
h1 = Effect.GlobalEffect()
h1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
h1:SetCode(EVENT_ADJUST)
h1:SetCondition(aux.TRUE)
-- 随机抽牌
--~ 调该效果的效果
function h2(u2)
Duel.ShuffleDeck(0)
Duel.Draw(0, u1, REASON_RULE)
u2:Reset()
end
h1:SetOperation(h2)
Duel.RegisterEffect(h1, 0)
end
function s.["不被连锁"]()
Duel.SetChainLimit(aux.FALSE)
return true
end
do
local h1, h2
--~ 原解邀请
h1 = "残局群181175613"
--~ 二解邀请,备用:圣魔术师
h2 = "爆貘团:「你居然二解了,请加群告诉我怎么二解。」"
function s["通关之邀"]()
local h3, h4
--~ 效果
h3 = Effect.GlobalEffect()
h3:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
h3:SetCode(EVENT_DAMAGE)
--~ 通关之邀
function h4()
local h5
--~ 对方之血
h5 = Duel.GetLP(1)
if h5 <= 0 then
if h5 == 0 then
Debug.ShowHint(h1)
else
Debug.ShowHint(h2)
end
else
return false
end
end
h3:SetCondition(h4)
h3:SetOperation(aux.NULL)
Duel.RegisterEffect(h3, 0)
end
end
function s.["是否效牌"](card)
for i = 1, #s["效牌之类排"] do
if Card.IsType(card, s["效牌之类排"][i]) then
return true
end
end
if Card.IsType(card, TYPE_PENDULUM) then
for i = 1, #s["无效灵摆怪兽之卡编排"] do
if Card.IsCode(card, s["无效灵摆怪兽之卡编排"][i]) then
else
return true
end
end
end
end
function s["开局选牌入手"](u1)
local h1, h2
str["开局选牌入手之数"] = u1
--~ 效果
h1 = Effect.GlobalEffect()
h1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
h1:SetCode(EVENT_ADJUST)
h1:SetCondition(aux.TRUE)
--~ 调该效果的效果
--~ 调该效果的玩家
function h2(u2, u3)
local h3
--~ 玩家选定的牌
h3 = Duel.SelectMatchingCard(u3, Card.IsAbleToHand, u3, LOCATION_DECK, 0, u1, u1, nil)
Duel.SendtoHand(h3, nil, REASON_RULE)
u2:Reset()
end
h1:SetOperation(h2)
Duel.RegisterEffect(h1, 0)
end
function s["禁格"](u1)
local h1
s["禁格之数"] = u1
--~ 效果
h1 = Effect.GlobalEffect()
h1:SetCode(EFFECT_USE_EXTRA_MZONE)
h1:SetValue(u1)
Duel.RegisterEffect(h1, 0)
end
do
s["Debug.ReloadFieldEnd"] = _G.Debug.ReloadFieldEnd
--~ 开局洗牌抽牌之数
function _G.Debug.ReloadFieldEnd(u1)
s["Debug.ReloadFieldEnd"]()
if u1 then
s["开局洗牌抽牌"](u1)
end
end
end
function s.["印牌"](u1, u2, u3)
local h1, h2, h3
u3 = u3 or u2
Debug.ShowHint("点击对方额外牌组可以进行印牌。\n手牌只能印 " .. u2 .. " 张。\n最多可以印 " .. u3 .. " 张")
h1 = Effect.CreateEffect(u1)
--~ 现之印牌数
h2 = 1
h1:SetType(EFFECT_TYPE_IGNITION)
h1:SetProperty(EFFECT_FLAG_BOTH_SIDE + EFFECT_FLAG_UNCOPYABLE + EFFECT_FLAG_CANNOT_NEGATE + EFFECT_FLAG_CANNOT_DISABLE)
h1:SetTarget(s["不被连锁"])
h1:SetRange(LOCATION_EXTRA)
-- 印牌
--~ 调该效果的效果
--~ 调该效果的玩家
function h3(u4, u5)
local h4, h5
--~ 印卡之卡编
h4 = Duel.AnnounceCard(u5)
--~ 卡
h5 = Duel.CreateToken(u5, h4)
if h2 <= u2 then
h2 = h2 + 1
Duel.SendtoHand(h5, nil, REASON_RULE)
else
if h2 <= u3 then
h2 = h2 + 1
Duel.Remove(h5, POS_FACEUP, REASON_RULE)
Duel.SendtoDeck(card, u5, 0, REASON_RULE)
else
Debug.ShowHint("印牌过多")
u4:Reset()
end
end
end
h1:SetOperation(h3)
u1:RegisterEffect(h1)
end
function s.["开局之示"]()
local h1, h2, h3
--~ 此局效牌之数
h2 = Duel.GetMatchingGroupCount(s["是否效牌"], 0, s["全区"], s["全区"], nil)
--~ 超量材组
h3 = Duel.GetOverlayGroup(0, LOCATION_MZONE, LOCATION_MZONE)
for u1 in aux.Next(h3) do
if s["是否效牌"](u1) then
h2 = h2 + 1
end
end
--~ 开局说明
h1 = h2 .. "牌 " .. s["则"]
if s["伪洗牌"] == 0 then
else
h1 = h1 .. "伪洗牌 "
end
if s["战段"] == 0 then
h1 = h1 .. "无战段 "
end
if s["机智"] == 0 then
h1 = h1 .. "无机智 "
end
if s["开局选牌入手之数"] then
h1 = h1 .. "选" .. s["开局选牌入手之数"] .. "牌 "
end
if s["禁格之数"] then
h1 = h1 .. "禁" .. s["禁格之数"] .. "格 "
end
if s["开局洗牌抽牌之数"] then
h1 = h1 .. "抽" .. s["开局洗牌抽牌之数"] .. "牌 "
end
Debug.ShowHint(h1)
end
do
s["aux.BeginPuzzle"] = _G.aux.BeginPuzzle
--~ 开局选牌入手之数
--~ 禁格之数
function _G.aux.BeginPuzzle(u1, u2)
s["aux.BeginPuzzle"]()
if u1 then
s["开局选牌入手"](u1)
end
if u2 then
s["禁格"](u2)
end
s["开局之示"]()
s["通关之邀"]()
end
end