Commit 73dd108a authored by VanillaSalt's avatar VanillaSalt

fix

parent 227e0ec0
......@@ -37,7 +37,7 @@ function c2295831.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1
end
function c2295831.cost(e,tp,eg,ep,ev,re,r,rp,chk)
return e:GetHandler():GetFlagEffect(2295831)~=0
if chk==0 then return e:GetHandler():GetFlagEffect(2295831)~=0 end
end
function c2295831.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_DECK,0,1,nil) end
......
......@@ -37,7 +37,7 @@ function c57734012.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 and not Duel.CheckPhaseActivity()
end
function c57734012.cost(e,tp,eg,ep,ev,re,r,rp,chk)
return e:GetHandler():GetFlagEffect(57734012)~=0
if chk==0 then return e:GetHandler():GetFlagEffect(57734012)~=0 end
end
function c57734012.filter1(c,e,tp)
local m=_G["c"..c:GetCode()]
......
......@@ -6,26 +6,20 @@ function c69764158.initial_effect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_DAMAGE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_CVAL_CHECK)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1)
e1:SetCondition(c69764158.descon)
e1:SetCost(c69764158.descost)
e1:SetTarget(c69764158.destg)
e1:SetOperation(c69764158.desop)
e1:SetValue(c69764158.valcheck)
c:RegisterEffect(e1)
end
function c69764158.descon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and (bit.band(r,REASON_BATTLE)~=0 or (bit.band(r,REASON_EFFECT)~=0 and rp~=tp))
end
function c69764158.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if Duel.GetFlagEffect(tp,69764158)==0 then
Duel.RegisterFlagEffect(tp,69764158,RESET_CHAIN,0,1)
c69764158[0]=e:GetHandler():IsAbleToRemoveAsCost()
end
return c69764158[0]
end
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c69764158.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......@@ -41,6 +35,3 @@ function c69764158.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(tc,REASON_EFFECT)
end
end
function c69764158.valcheck(e)
c69764158[0]=false
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