Commit 4083c1a5 authored by wyykak's avatar wyykak

fix 21123

Signed-off-by: wyykak's avatarwyykak <wyy_1414@126.com>
parent 2b9b6af3
Pipeline #39520 passed with stage
in 21 seconds
--不死「徐福时空」
function c21123.initial_effect(c)
local s, id = GetID()
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
......@@ -35,8 +34,8 @@ function c21123.initial_effect(c)
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
e5:SetRange(LOCATION_SZONE)
e5:SetCountLimit(1)
e5:SetCondition(s.thcon)
e5:SetOperation(s.thop)
e5:SetCondition(c21123.thcon)
e5:SetOperation(c21123.thop)
c:RegisterEffect(e5)
-- Quick Spell/Normal Trap
......@@ -44,23 +43,23 @@ function c21123.initial_effect(c)
e4:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetRange(LOCATION_SZONE)
e4:SetCondition(s.drcon)
e4:SetOperation(s.drop)
e4:SetCondition(c21123.drcon)
e4:SetOperation(c21123.drop)
c:RegisterEffect(e4)
end
function s.thfilter(c)
function c21123.thfilter(c)
return c:IsSetCard(0x137) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function s.thcon(e, tp, eg, ep, ev, re, r, rp)
function c21123.thcon(e, tp, eg, ep, ev, re, r, rp)
return re and eg:IsExists(Card.IsSetCard, 1, nil, 0x137)
and (re:GetActiveType() == TYPE_SPELL or re:IsActiveType(TYPE_MONSTER))
and Duel.IsExistingMatchingCard(s.thfilter, tp, LOCATION_DECK, 0, 1, nil)
and Duel.IsExistingMatchingCard(c21123.thfilter, tp, LOCATION_DECK, 0, 1, nil)
end
function s.thop(e, tp, eg, ep, ev, re, r, rp)
Duel.Hint(HINT_CARD, 0, id)
function c21123.thop(e, tp, eg, ep, ev, re, r, rp)
Duel.Hint(HINT_CARD, 0, 21123)
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_ATOHAND)
local g = Duel.SelectMatchingCard(tp, thfilter, tp, LOCATION_DECK, 0, 1, 1, nil)
if #g > 0 then
......@@ -69,13 +68,13 @@ function s.thop(e, tp, eg, ep, ev, re, r, rp)
end
end
function s.drcon(e, tp, eg, ep, ev, re, r, rp)
function c21123.drcon(e, tp, eg, ep, ev, re, r, rp)
return re and eg:IsExists(Card.IsSetCard, 1, nil, 0x137)
and (re:GetActiveType() == TYPE_QUICK_SPELL or re:GetActiveType() == TYPE_TRAP)
end
function s.drop(e, tp, eg, ep, ev, re, r, rp)
Duel.Hint(HINT_CARD, 0, id)
function c21123.drop(e, tp, eg, ep, ev, re, r, rp)
Duel.Hint(HINT_CARD, 0, 21123)
Duel.Draw(tp, 1, REASON_EFFECT)
Duel.Recover(tp, 500, REASON_EFFECT)
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment