Commit 64aa0dad authored by salix5's avatar salix5

aux.exccon

parent 64db4bd6
......@@ -7,7 +7,7 @@ function c14094090.initial_effect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,14094090)
e1:SetCondition(aux.tgrvdlycon)
e1:SetCondition(aux.exccon)
e1:SetCost(c14094090.spcost)
e1:SetTarget(c14094090.sptg)
e1:SetOperation(c14094090.spop)
......
......@@ -6,7 +6,7 @@ function c18803791.initial_effect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCondition(aux.tgrvdlycon)
e1:SetCondition(aux.exccon)
e1:SetCost(c18803791.thcost)
e1:SetTarget(c18803791.thtg)
e1:SetOperation(c18803791.thop)
......
......@@ -16,7 +16,7 @@ function c29795530.initial_effect(c)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,0x1c0)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(aux.tgrvdlycon)
e2:SetCondition(aux.exccon)
e2:SetCost(c29795530.lvcost)
e2:SetTarget(c29795530.lvtg)
e2:SetOperation(c29795530.lvop)
......
......@@ -6,7 +6,7 @@ function c30392583.initial_effect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCondition(aux.tgrvdlycon)
e1:SetCondition(aux.exccon)
e1:SetCost(c30392583.thcost)
e1:SetTarget(c30392583.thtg)
e1:SetOperation(c30392583.thop)
......
......@@ -26,7 +26,7 @@ function c36970611.initial_effect(c)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_GRAVE)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCondition(aux.tgrvdlycon)
e3:SetCondition(aux.exccon)
e3:SetCost(c36970611.thcost)
e3:SetTarget(c36970611.thtg)
e3:SetOperation(c36970611.thop)
......
......@@ -17,7 +17,7 @@ function c46008667.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,46008667)
e2:SetCondition(aux.tgrvdlycon)
e2:SetCondition(aux.exccon)
e2:SetCost(c46008667.spcost)
e2:SetTarget(c46008667.sptg)
e2:SetOperation(c46008667.spop)
......
......@@ -18,7 +18,7 @@ function c5133471.initial_effect(c)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,5133471)
e2:SetCondition(aux.tgrvdlycon)
e2:SetCondition(aux.exccon)
e2:SetCost(c5133471.descost)
e2:SetTarget(c5133471.destg)
e2:SetOperation(c5133471.activate)
......
......@@ -7,15 +7,12 @@ function c62835876.initial_effect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,62835876)
e1:SetCondition(c62835876.thcon)
e1:SetCondition(aux.exccon)
e1:SetCost(c62835876.thcost)
e1:SetTarget(c62835876.thtg)
e1:SetOperation(c62835876.thop)
c:RegisterEffect(e1)
end
function c62835876.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnCount()~=e:GetHandler():GetTurnID() or e:GetHandler():IsReason(REASON_RETURN)
end
function c62835876.cfilter(c)
return c:IsSetCard(0xb1) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost()
end
......
......@@ -18,7 +18,7 @@ function c63227401.initial_effect(c)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCondition(aux.tgrvdlycon)
e2:SetCondition(aux.exccon)
e2:SetCost(c63227401.cost)
e2:SetTarget(c63227401.target)
e2:SetOperation(c63227401.activate)
......
......@@ -52,8 +52,7 @@ function c73694478.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
function c73694478.thcon(e,tp,eg,ep,ev,re,r,rp)
return aux.tgrvdlycon(e) and Duel.GetTurnPlayer()==tp
and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
return aux.exccon(e) and Duel.GetTurnPlayer()==tp and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function c73694478.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
......
......@@ -49,8 +49,7 @@ function c73729209.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
function c73729209.atkcon(e,tp,eg,ep,ev,re,r,rp)
return aux.tgrvdlycon(e) and Duel.GetTurnPlayer()==tp
and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated())
return aux.exccon(e) and Duel.GetTurnPlayer()==tp and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated())
end
function c73729209.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
......
......@@ -16,7 +16,7 @@ function c75214390.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(aux.tgrvdlycon)
e2:SetCondition(aux.exccon)
e2:SetCost(c75214390.atkcost)
e2:SetTarget(c75214390.atktg)
e2:SetOperation(c75214390.atkop)
......
......@@ -52,7 +52,7 @@ function c78474168.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
function c78474168.negcon(e,tp,eg,ep,ev,re,r,rp)
return aux.tgrvdlycon(e) and Duel.GetTurnPlayer()==tp
return aux.exccon(e) and Duel.GetTurnPlayer()==tp
end
function c78474168.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
......
......@@ -17,7 +17,7 @@ function c88204302.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(aux.tgrvdlycon)
e2:SetCondition(aux.exccon)
e2:SetCost(c88204302.thcost)
e2:SetTarget(c88204302.thtg)
e2:SetOperation(c88204302.thop)
......
......@@ -1184,8 +1184,8 @@ end
function Auxiliary.nfbdncon(e)
return not e:GetHandler():IsForbidden()
end
--condition of not during the turn which handler sent to grave (to grave delay condition)
function Auxiliary.tgrvdlycon(e)
--condition of "except the turn this card was sent to the Graveyard"
function Auxiliary.exccon(e)
return Duel.GetTurnCount()~=e:GetHandler():GetTurnID() or e:GetHandler():IsReason(REASON_RETURN)
end
--flag effect for spell counter
......
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