Commit 64db4bd6 authored by salix5's avatar salix5

Merge pull request #1557 from Tianchenglipu/patch-5

aux.tgrvdlycon
parents 4d7f6285 bb97e1e6
...@@ -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(c14094090.spcon) e1:SetCondition(aux.tgrvdlycon)
e1:SetCost(c14094090.spcost) e1:SetCost(c14094090.spcost)
e1:SetTarget(c14094090.sptg) e1:SetTarget(c14094090.sptg)
e1:SetOperation(c14094090.spop) e1:SetOperation(c14094090.spop)
...@@ -19,9 +19,6 @@ end ...@@ -19,9 +19,6 @@ end
function c14094090.cfilter(c,att) function c14094090.cfilter(c,att)
return c:IsAttribute(att) and c:IsAbleToRemoveAsCost() return c:IsAttribute(att) and c:IsAbleToRemoveAsCost()
end end
function c14094090.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetTurnID()~=Duel.GetTurnCount() or e:GetHandler():IsReason(REASON_RETURN)
end
function c14094090.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c14094090.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c14094090.cfilter,tp,LOCATION_GRAVE,0,1,nil,ATTRIBUTE_LIGHT) and Duel.IsExistingMatchingCard(c14094090.cfilter,tp,LOCATION_GRAVE,0,1,nil,ATTRIBUTE_LIGHT)
......
...@@ -6,15 +6,12 @@ function c18803791.initial_effect(c) ...@@ -6,15 +6,12 @@ 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(c18803791.thcon) e1:SetCondition(aux.tgrvdlycon)
e1:SetCost(c18803791.thcost) e1:SetCost(c18803791.thcost)
e1:SetTarget(c18803791.thtg) e1:SetTarget(c18803791.thtg)
e1:SetOperation(c18803791.thop) e1:SetOperation(c18803791.thop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c18803791.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetTurnID()~=Duel.GetTurnCount() or e:GetHandler():IsReason(REASON_RETURN)
end
function c18803791.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function c18803791.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
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
......
...@@ -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(c29795530.lvcon) e2:SetCondition(aux.tgrvdlycon)
e2:SetCost(c29795530.lvcost) e2:SetCost(c29795530.lvcost)
e2:SetTarget(c29795530.lvtg) e2:SetTarget(c29795530.lvtg)
e2:SetOperation(c29795530.lvop) e2:SetOperation(c29795530.lvop)
...@@ -41,9 +41,6 @@ function c29795530.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -41,9 +41,6 @@ function c29795530.activate(e,tp,eg,ep,ev,re,r,rp)
tc=g:GetNext() tc=g:GetNext()
end end
end end
function c29795530.lvcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetTurnID()~=Duel.GetTurnCount() or e:GetHandler():IsReason(REASON_RETURN)
end
function c29795530.lvcost(e,tp,eg,ep,ev,re,r,rp,chk) function c29795530.lvcost(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
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
......
...@@ -6,15 +6,12 @@ function c30392583.initial_effect(c) ...@@ -6,15 +6,12 @@ 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(c30392583.thcon) e1:SetCondition(aux.tgrvdlycon)
e1:SetCost(c30392583.thcost) e1:SetCost(c30392583.thcost)
e1:SetTarget(c30392583.thtg) e1:SetTarget(c30392583.thtg)
e1:SetOperation(c30392583.thop) e1:SetOperation(c30392583.thop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c30392583.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetTurnID()~=Duel.GetTurnCount() or e:GetHandler():IsReason(REASON_RETURN)
end
function c30392583.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function c30392583.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
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
......
...@@ -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(c36970611.thcon) e3:SetCondition(aux.tgrvdlycon)
e3:SetCost(c36970611.thcost) e3:SetCost(c36970611.thcost)
e3:SetTarget(c36970611.thtg) e3:SetTarget(c36970611.thtg)
e3:SetOperation(c36970611.thop) e3:SetOperation(c36970611.thop)
...@@ -71,9 +71,6 @@ function c36970611.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -71,9 +71,6 @@ function c36970611.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT) Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT)
end end
end end
function c36970611.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetTurnID()~=Duel.GetTurnCount() or e:GetHandler():IsReason(REASON_RETURN)
end
function c36970611.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function c36970611.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
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
......
...@@ -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(c46008667.spcon) e2:SetCondition(aux.tgrvdlycon)
e2:SetCost(c46008667.spcost) e2:SetCost(c46008667.spcost)
e2:SetTarget(c46008667.sptg) e2:SetTarget(c46008667.sptg)
e2:SetOperation(c46008667.spop) e2:SetOperation(c46008667.spop)
...@@ -56,9 +56,6 @@ function c46008667.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,9 +56,6 @@ function c46008667.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Equip(tp,c,tc) Duel.Equip(tp,c,tc)
end end
end end
function c46008667.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetTurnID()~=Duel.GetTurnCount() or e:GetHandler():IsReason(REASON_RETURN)
end
function c46008667.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c46008667.spcost(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
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
......
...@@ -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(c5133471.descon) e2:SetCondition(aux.tgrvdlycon)
e2:SetCost(c5133471.descost) e2:SetCost(c5133471.descost)
e2:SetTarget(c5133471.destg) e2:SetTarget(c5133471.destg)
e2:SetOperation(c5133471.activate) e2:SetOperation(c5133471.activate)
...@@ -40,9 +40,6 @@ function c5133471.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -40,9 +40,6 @@ function c5133471.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(tc,REASON_EFFECT) Duel.Destroy(tc,REASON_EFFECT)
end end
end end
function c5133471.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnCount()~=e:GetHandler():GetTurnID()
end
function c5133471.descost(e,tp,eg,ep,ev,re,r,rp,chk) function c5133471.descost(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
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
......
...@@ -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(c63227401.condition) e2:SetCondition(aux.tgrvdlycon)
e2:SetCost(c63227401.cost) e2:SetCost(c63227401.cost)
e2:SetTarget(c63227401.target) e2:SetTarget(c63227401.target)
e2:SetOperation(c63227401.activate) e2:SetOperation(c63227401.activate)
...@@ -54,9 +54,6 @@ end ...@@ -54,9 +54,6 @@ end
function c63227401.disop(e,tp,eg,ep,ev,re,r,rp) function c63227401.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev) Duel.NegateEffect(ev)
end end
function c63227401.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetTurnID()~=Duel.GetTurnCount() or e:GetHandler():IsReason(REASON_RETURN)
end
function c63227401.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c63227401.cost(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
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
......
...@@ -52,8 +52,8 @@ function c73694478.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -52,8 +52,8 @@ 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 (e:GetHandler():GetTurnID()~=Duel.GetTurnCount() or e:GetHandler():IsReason(REASON_RETURN)) return aux.tgrvdlycon(e) and Duel.GetTurnPlayer()==tp
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,7 +49,7 @@ function c73729209.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -49,7 +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 Duel.GetTurnPlayer()==tp and (e:GetHandler():GetTurnID()~=Duel.GetTurnCount() or e:GetHandler():IsReason(REASON_RETURN)) return aux.tgrvdlycon(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)
......
...@@ -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(c75214390.atkcon) e2:SetCondition(aux.tgrvdlycon)
e2:SetCost(c75214390.atkcost) e2:SetCost(c75214390.atkcost)
e2:SetTarget(c75214390.atktg) e2:SetTarget(c75214390.atktg)
e2:SetOperation(c75214390.atkop) e2:SetOperation(c75214390.atkop)
...@@ -31,9 +31,6 @@ function c75214390.spcon(e,c) ...@@ -31,9 +31,6 @@ function c75214390.spcon(e,c)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c75214390.cfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(c75214390.cfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function c75214390.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetTurnID()~=Duel.GetTurnCount() or e:GetHandler():IsReason(REASON_RETURN)
end
function c75214390.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) function c75214390.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
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
......
...@@ -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 Duel.GetTurnPlayer()==tp and (e:GetHandler():GetTurnID()~=Duel.GetTurnCount() or e:GetHandler():IsReason(REASON_RETURN)) return aux.tgrvdlycon(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(c88204302.thcon) e2:SetCondition(aux.tgrvdlycon)
e2:SetCost(c88204302.thcost) e2:SetCost(c88204302.thcost)
e2:SetTarget(c88204302.thtg) e2:SetTarget(c88204302.thtg)
e2:SetOperation(c88204302.thop) e2:SetOperation(c88204302.thop)
...@@ -40,9 +40,6 @@ function c88204302.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -40,9 +40,6 @@ function c88204302.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end end
end end
function c88204302.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetTurnID()~=Duel.GetTurnCount() or e:GetHandler():IsReason(REASON_RETURN)
end
function c88204302.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function c88204302.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
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
......
...@@ -1184,6 +1184,10 @@ end ...@@ -1184,6 +1184,10 @@ 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)
function Auxiliary.tgrvdlycon(e)
return Duel.GetTurnCount()~=e:GetHandler():GetTurnID() or e:GetHandler():IsReason(REASON_RETURN)
end
--flag effect for spell counter --flag effect for spell counter
function Auxiliary.chainreg(e,tp,eg,ep,ev,re,r,rp) function Auxiliary.chainreg(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():GetFlagEffect(1)==0 then if e:GetHandler():GetFlagEffect(1)==0 then
......
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