You need to sign in or sign up before continuing.
Commit d5d8f046 authored by DailyShana's avatar DailyShana

Update c94432298.lua

If this card is activate at standby phase, one can use its effect that
send monsters to grave
parent 6f7caed3
......@@ -4,6 +4,10 @@ function c94432298.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_STANDBY_PHASE,0)
e1:SetCost(c94432298.cost)
e1:SetTarget(c94432298.target)
e1:SetOperation(c94432298.activate)
c:RegisterEffect(e1)
--tograve
local e2=Effect.CreateEffect(c)
......@@ -25,11 +29,35 @@ function c94432298.initial_effect(c)
e3:SetOperation(c94432298.sdop)
c:RegisterEffect(e3)
end
function c94432298.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_STANDBY and Duel.IsExistingMatchingCard(c94432298.filter,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(94432298,0)) then
e:SetCategory(CATEGORY_TOGRAVE)
e:GetHandler():RegisterFlagEffect(94432298,RESET_PHASE+RESET_STANDBY,0,1)
end
end
function c94432298.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if e:GetHandler():GetFlagEffect(94432298)~=0 then
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
end
function c94432298.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(c94432298.sdfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) then
Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT)
end
if e:GetHandler():GetFlagEffect(94432298)==0 or not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c94432298.filter,tp,LOCATION_DECK,0,1,2,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function c94432298.filter(c)
return c:IsSetCard(0xbb) and c:IsAbleToGrave()
end
function c94432298.tgcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
return Duel.GetTurnPlayer()==tp and e:GetHandler():GetFlagEffect(94432298)==0
end
function c94432298.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c94432298.filter,tp,LOCATION_DECK,0,1,nil) 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