Commit 64aa0dad authored by salix5's avatar salix5

aux.exccon

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