Commit 8737e30b authored by EerieCode's avatar EerieCode Committed by mercury233

add shortcut for self-banish cost (#878)

parent 39dc7ef0
......@@ -19,17 +19,13 @@ function c12385638.initial_effect(c)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_GRAVE)
e3:SetCost(c12385638.cost)
e3:SetCost(aux.bfgcost)
e3:SetOperation(c12385638.operation)
c:RegisterEffect(e3)
end
function c12385638.tdtg(e,c)
return c:IsSetCard(0xd2)
end
function c12385638.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c12385638.operation(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
......
......@@ -8,15 +8,11 @@ function c128454.initial_effect(c)
e1:SetRange(LOCATION_GRAVE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,128454)
e1:SetCost(c128454.thcost)
e1:SetCost(aux.bfgcost)
e1:SetTarget(c128454.thtg)
e1:SetOperation(c128454.thop)
c:RegisterEffect(e1)
end
function c128454.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c128454.thfilter(c)
return ((c:IsLocation(LOCATION_PZONE) and (c:IsSetCard(0x9f) or c:IsSetCard(0x98)))
or (c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsType(TYPE_PENDULUM))) and c:IsAbleToHand()
......
......@@ -16,7 +16,7 @@ function c13521194.initial_effect(c)
e2:SetDescription(aux.Stringid(13521194,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(c13521194.spcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c13521194.sptarget)
e2:SetOperation(c13521194.spoperation)
c:RegisterEffect(e2)
......@@ -36,10 +36,6 @@ function c13521194.damoperation(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
function c13521194.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c13521194.filter(c,e,tp)
local atk=c:GetAttack()
return atk>=0 and atk<=2000 and c:IsRace(RACE_FIEND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
......@@ -19,7 +19,7 @@ function c14816688.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,14816688)
e2:SetCost(c14816688.tdcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c14816688.tdtg)
e2:SetOperation(c14816688.tdop)
c:RegisterEffect(e2)
......@@ -78,10 +78,6 @@ end
function c14816688.rmop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetLabelObject(),POS_FACEUP,REASON_EFFECT)
end
function c14816688.tdcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c14816688.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and chkc:IsAbleToHand() end
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
......
......@@ -16,7 +16,7 @@ function c15155568.initial_effect(c)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c15155568.discon)
e2:SetCost(c15155568.discost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c15155568.distg)
e2:SetOperation(c15155568.disop)
c:RegisterEffect(e2)
......@@ -44,10 +44,6 @@ function c15155568.discon(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return tg and tg:IsExists(c15155568.tgfilter,1,nil,tp) and Duel.IsChainDisablable(ev)
end
function c15155568.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c15155568.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
......
......@@ -16,7 +16,7 @@ function c15981690.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,15981690)
e2:SetCost(c15981690.spcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c15981690.sptg)
e2:SetOperation(c15981690.spop)
c:RegisterEffect(e2)
......@@ -37,10 +37,6 @@ function c15981690.upop(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e1)
end
end
function c15981690.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c15981690.spfilter(c,e,tp)
return c:IsType(TYPE_NORMAL) and c:IsLevelBelow(7) and c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
......
......@@ -17,7 +17,7 @@ function c17328157.initial_effect(c)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,17328157)
e2:SetCondition(aux.exccon)
e2:SetCost(c17328157.tgcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c17328157.tgtg)
e2:SetOperation(c17328157.tgop)
c:RegisterEffect(e2)
......@@ -38,10 +38,6 @@ function c17328157.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c17328157.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c17328157.tgfilter(c)
return c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
......
......@@ -8,7 +8,7 @@ function c17502671.initial_effect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCondition(c17502671.spcon)
e1:SetCost(c17502671.spcost)
e1:SetCost(aux.bfgcost)
e1:SetTarget(c17502671.sptg)
e1:SetOperation(c17502671.spop)
c:RegisterEffect(e1)
......@@ -16,10 +16,6 @@ end
function c17502671.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0
end
function c17502671.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c17502671.filter(c,e,tp)
return c:IsSetCard(0xb) and c:IsLevelBelow(3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
......
......@@ -18,7 +18,7 @@ function c18563744.initial_effect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(c18563744.thcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c18563744.thtg)
e2:SetOperation(c18563744.thop)
c:RegisterEffect(e2)
......@@ -62,10 +62,6 @@ end
function c18563744.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
function c18563744.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c18563744.thfilter(c)
return c:IsSetCard(0xe7) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
......
......@@ -7,15 +7,11 @@ function c18803791.initial_effect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCondition(aux.exccon)
e1:SetCost(c18803791.thcost)
e1:SetCost(aux.bfgcost)
e1:SetTarget(c18803791.thtg)
e1:SetOperation(c18803791.thop)
c:RegisterEffect(e1)
end
function c18803791.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c18803791.thfilter(c)
return c:IsSetCard(0x3b) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
......
......@@ -6,14 +6,10 @@ function c18988391.initial_effect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,18988391)
e1:SetCost(c18988391.cost)
e1:SetCost(aux.bfgcost)
e1:SetOperation(c18988391.operation)
c:RegisterEffect(e1)
end
function c18988391.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c18988391.operation(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
......
......@@ -7,17 +7,13 @@ function c19113101.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_GRAVE)
e1:SetCondition(c19113101.condition)
e1:SetCost(c19113101.cost)
e1:SetCost(aux.bfgcost)
e1:SetOperation(c19113101.operation)
c:RegisterEffect(e1)
end
function c19113101.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c19113101.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c19113101.operation(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
......
......@@ -21,7 +21,7 @@ function c19254117.initial_effect(c)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(c19254117.tgcon)
e2:SetCost(c19254117.tgcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c19254117.tgtg)
e2:SetOperation(c19254117.tgop)
c:RegisterEffect(e2)
......@@ -72,10 +72,6 @@ function c19254117.tgcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
and (Duel.IsAbleToEnterBP() or (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE))
end
function c19254117.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c19254117.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,0,1,nil) end
......
......@@ -7,15 +7,11 @@ function c19310321.initial_effect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,19310321)
e1:SetCost(c19310321.cost)
e1:SetCost(aux.bfgcost)
e1:SetTarget(c19310321.target)
e1:SetOperation(c19310321.activate)
c:RegisterEffect(e1)
end
function c19310321.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c19310321.filter1(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:GetOverlayCount()==0
end
......
......@@ -50,8 +50,8 @@ function c20849090.spcon(e,tp,eg,ep,ev,re,r,rp)
return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT)
end
function c20849090.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() and e:GetHandler():IsLocation(LOCATION_GRAVE) end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
if chk==0 then return aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,0) and e:GetHandler():IsLocation(LOCATION_GRAVE) end
aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,1)
end
function c20849090.spfilter(c,e,tp)
return c:IsSetCard(0xd2) and c:IsLevelBelow(6) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......@@ -68,4 +68,4 @@ function c20849090.spop(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
\ No newline at end of file
......@@ -16,7 +16,7 @@ function c21076084.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(c21076084.spcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c21076084.sptg)
e2:SetOperation(c21076084.spop)
c:RegisterEffect(e2)
......@@ -38,10 +38,6 @@ function c21076084.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
end
function c21076084.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c21076084.spfilter(c,e,tp)
return c:IsSetCard(0xfb) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
......
......@@ -12,7 +12,7 @@ function c21648584.initial_effect(c)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCondition(c21648584.damcon)
e2:SetCost(c21648584.damcost)
e2:SetCost(aux.bfgcost)
e2:SetOperation(c21648584.damop)
c:RegisterEffect(e2)
end
......@@ -35,10 +35,6 @@ end
function c21648584.damcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c21648584.cfilter,tp,LOCATION_GRAVE,0,1,nil)
end
function c21648584.damcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c21648584.damop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
......
......@@ -5,7 +5,7 @@ function c21767650.initial_effect(c)
e1:SetDescription(aux.Stringid(21767650,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCost(c21767650.lvcost)
e1:SetCost(aux.bfgcost)
e1:SetTarget(c21767650.lvtg)
e1:SetOperation(c21767650.lvop)
c:RegisterEffect(e1)
......@@ -13,10 +13,6 @@ end
function c21767650.filter(c)
return c:IsFaceup() and c:IsSetCard(0x74) and not c:IsType(TYPE_XYZ)
end
function c21767650.lvcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c21767650.lvtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c21767650.filter,tp,LOCATION_MZONE,0,1,nil) end
local opt=Duel.SelectOption(tp,aux.Stringid(21767650,1),aux.Stringid(21767650,2))
......
......@@ -18,7 +18,7 @@ function c22842126.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,22842126)
e2:SetCost(c22842126.thcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c22842126.thtg)
e2:SetOperation(c22842126.thop)
c:RegisterEffect(e2)
......@@ -40,10 +40,6 @@ function c22842126.activate(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function c22842126.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c22842126.thfilter(c)
return c:IsSetCard(0xbe) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
......
......@@ -32,7 +32,7 @@ function c23160024.initial_effect(c)
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_GRAVE)
e5:SetCost(c23160024.spcost)
e5:SetCost(aux.bfgcost)
e5:SetTarget(c23160024.sptg)
e5:SetOperation(c23160024.spop)
c:RegisterEffect(e5)
......@@ -47,10 +47,6 @@ function c23160024.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,e:GetHandler():GetCode())
Duel.Draw(tp,1,REASON_EFFECT)
end
function c23160024.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c23160024.spfilter(c,e,tp,m,ft)
if not c:IsCode(98287529) or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
local mg=m:Filter(Card.IsCanBeRitualMaterial,c,c)
......
......@@ -8,15 +8,11 @@ function c23536866.initial_effect(c)
e1:SetRange(LOCATION_GRAVE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,23536866)
e1:SetCost(c23536866.cost)
e1:SetCost(aux.bfgcost)
e1:SetTarget(c23536866.target)
e1:SetOperation(c23536866.operation)
c:RegisterEffect(e1)
end
function c23536866.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c23536866.filter(c,e,tp)
return c:GetLevel()==5 and c:IsAttribute(ATTRIBUTE_WATER) and not c:IsCode(23536866)
and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
......@@ -15,7 +15,7 @@ function c23740893.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(c23740893.sumcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c23740893.sumtg)
e2:SetOperation(c23740893.sumop)
c:RegisterEffect(e2)
......@@ -40,10 +40,6 @@ function c23740893.activate(e,tp,eg,ep,ev,re,r,rp)
tc:AddCounter(0x33,3)
end
end
function c23740893.sumcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c23740893.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanSummon(tp) end
end
......
......@@ -14,9 +14,9 @@ function c23857661.cfilter(c)
return c:IsSetCard(0x88) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost()
end
function c23857661.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost()
if chk==0 then return aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,0)
and Duel.IsExistingMatchingCard(c23857661.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,1)
Duel.DiscardHand(tp,c23857661.cfilter,1,1,REASON_COST)
end
function c23857661.operation(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -18,7 +18,7 @@ function c23893227.initial_effect(c)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,23893227)
e2:SetCondition(c23893227.spcon)
e2:SetCost(c23893227.spcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c23893227.sptg)
e2:SetOperation(c23893227.spop)
c:RegisterEffect(e2)
......@@ -49,10 +49,6 @@ end
function c23893227.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
end
function c23893227.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c23893227.spfilter(c,e,tp)
return c:IsSetCard(0x1093) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
......
......@@ -27,7 +27,7 @@ function c24382602.initial_effect(c)
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetCost(c24382602.thcost)
e4:SetCost(aux.bfgcost)
e4:SetTarget(c24382602.thtg)
e4:SetOperation(c24382602.thop)
c:RegisterEffect(e4)
......@@ -69,10 +69,6 @@ function c24382602.atkop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
function c24382602.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c24382602.thfilter(c)
return c:IsCode(17655904) and c:IsAbleToHand()
end
......
......@@ -54,7 +54,7 @@ function c25542642.initial_effect(c)
e7:SetCode(EVENT_FREE_CHAIN)
e7:SetRange(LOCATION_GRAVE)
e7:SetCountLimit(1,25542642)
e7:SetCost(c25542642.spcost)
e7:SetCost(aux.bfgcost)
e7:SetTarget(c25542642.sptg)
e7:SetOperation(c25542642.spop)
c:RegisterEffect(e7)
......@@ -91,10 +91,6 @@ end
function c25542642.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
function c25542642.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c25542642.spfilter(c,e,tp)
return c:IsSetCard(0x10db) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
......
......@@ -18,7 +18,7 @@ function c25669282.initial_effect(c)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c25669282.spcon)
e2:SetCost(c25669282.spcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c25669282.sptg)
e2:SetOperation(c25669282.spop)
c:RegisterEffect(e2)
......@@ -61,10 +61,6 @@ function c25669282.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil
and aux.exccon(e,tp,eg,ep,ev,re,r,rp)
end
function c25669282.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c25669282.spfilter3(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_DUAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
......
......@@ -38,7 +38,7 @@ function c26268488.initial_effect(c)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCost(c26268488.spcost)
e4:SetCost(aux.bfgcost)
e4:SetTarget(c26268488.sptg)
e4:SetOperation(c26268488.spop)
c:RegisterEffect(e4)
......@@ -66,10 +66,6 @@ function c26268488.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(g,REASON_EFFECT)
end
end
function c26268488.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c26268488.spfilter(c,e,tp)
return c:IsSetCard(0xa3) and c:IsLevelBelow(8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
......
......@@ -65,8 +65,8 @@ function c27107590.thop(e,tp,eg,ep,ev,re,r,rp)
end
function c27107590.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 and c:IsAbleToRemoveAsCost() end
Duel.Remove(c,POS_FACEUP,REASON_COST)
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 and aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,0) end
aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
......
......@@ -87,8 +87,8 @@ function c27383110.thcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler()==e:GetHandler()
end
function c27383110.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsAbleToRemove() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
if chk==0 then return e:GetHandler():IsLocation(LOCATION_GRAVE) and aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,0) end
aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,1)
end
function c27383110.thfilter(c,e,tp)
return c:IsLocation(LOCATION_GRAVE) and c:IsControler(tp) and c:IsAbleToHand() and c:IsCanBeEffectTarget(e)
......@@ -117,4 +117,4 @@ function c27383110.evop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.RaiseEvent(tc,EVENT_CUSTOM+27383110,e,0,tp,tp,0)
e:SetLabelObject(nil)
end
end
\ No newline at end of file
......@@ -25,7 +25,7 @@ function c27642961.initial_effect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCost(c27642961.spcost)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c27642961.sptg)
e3:SetOperation(c27642961.spop)
c:RegisterEffect(e3)
......@@ -83,10 +83,6 @@ function c27642961.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function c27642961.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c27642961.spfilter(c,e,tp)
return c:IsSetCard(0xee) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
......
......@@ -8,17 +8,13 @@ function c27660735.initial_effect(c)
e1:SetHintTiming(0,TIMING_ATTACK)
e1:SetRange(LOCATION_GRAVE)
e1:SetCondition(c27660735.condition)
e1:SetCost(c27660735.cost)
e1:SetCost(aux.bfgcost)
e1:SetOperation(c27660735.operation)
c:RegisterEffect(e1)
end
function c27660735.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and (Duel.IsAbleToEnterBP() or (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE))
end
function c27660735.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c27660735.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetAttacker() then Duel.NegateAttack()
else
......
......@@ -21,7 +21,7 @@ function c27978707.initial_effect(c)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,27978708)
e2:SetCondition(c27978707.negcon)
e2:SetCost(c27978707.negcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c27978707.negtg)
e2:SetOperation(c27978707.negop)
c:RegisterEffect(e2)
......@@ -54,10 +54,6 @@ function c27978707.negcon(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return g and g:IsExists(c27978707.negfilter,1,nil,tp) and Duel.IsChainNegatable(ev)
end
function c27978707.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c27978707.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
......
......@@ -18,7 +18,7 @@ function c28039390.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(aux.exccon)
e2:SetCost(c28039390.tgcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c28039390.tgtg)
e2:SetOperation(c28039390.tgop)
c:RegisterEffect(e2)
......@@ -40,10 +40,6 @@ function c28039390.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function c28039390.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c28039390.tgfilter(c)
return c:IsFaceup() and (c:IsSetCard(0xa9) or c:IsSetCard(0xad)) and c:IsType(TYPE_MONSTER)
end
......
......@@ -26,7 +26,7 @@ function c28369508.initial_effect(c)
e3:SetRange(LOCATION_GRAVE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetHintTiming(TIMING_BATTLE_PHASE,0x1e0+TIMING_BATTLE_PHASE)
e3:SetCost(c28369508.poscost)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c28369508.postg)
e3:SetOperation(c28369508.posop)
c:RegisterEffect(e3)
......@@ -78,10 +78,6 @@ function c28369508.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g)
end
end
function c28369508.poscost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c28369508.filter(c)
return c:IsFaceup() and c:IsSetCard(0xed) and c:IsCanTurnSet()
end
......
......@@ -41,8 +41,8 @@ function c29491334.spcon(e,tp,eg,ep,ev,re,r,rp)
return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT)
end
function c29491334.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() and e:GetHandler():IsLocation(LOCATION_GRAVE) end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
if chk==0 then return aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,0) and e:GetHandler():IsLocation(LOCATION_GRAVE) end
aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,1)
end
function c29491334.spfilter(c,e,tp)
return c:IsSetCard(0xd2) and c:IsLevelBelow(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......@@ -59,4 +59,4 @@ function c29491334.spop(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
\ No newline at end of file
......@@ -18,7 +18,7 @@ function c29838323.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,29838323)
e2:SetCost(c29838323.thcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c29838323.thtg)
e2:SetOperation(c29838323.thop)
c:RegisterEffect(e2)
......@@ -67,10 +67,6 @@ end
function c29838323.splimit(e,c)
return not (c:IsRace(RACE_MACHINE) and c:IsType(TYPE_SYNCHRO)) and c:IsLocation(LOCATION_EXTRA)
end
function c29838323.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c29838323.thfilter(c)
return c:IsSetCard(0xea) and c:IsType(TYPE_MONSTER) and not c:IsCode(29838323) and c:IsAbleToHand()
end
......
......@@ -7,15 +7,11 @@ function c30392583.initial_effect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCondition(aux.exccon)
e1:SetCost(c30392583.thcost)
e1:SetCost(aux.bfgcost)
e1:SetTarget(c30392583.thtg)
e1:SetOperation(c30392583.thop)
c:RegisterEffect(e1)
end
function c30392583.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c30392583.thfilter(c)
return c:IsSetCard(0xcc) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
......
......@@ -19,7 +19,7 @@ function c30500113.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,30500113)
e2:SetCondition(c30500113.thcon)
e2:SetCost(c30500113.thcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c30500113.thtg)
e2:SetOperation(c30500113.thop)
c:RegisterEffect(e2)
......@@ -54,10 +54,6 @@ function c30500113.thcon(e,tp,eg,ep,ev,re,r,rp)
if eg:IsContains(e:GetHandler()) then return false end
return eg:IsExists(c30500113.cfilter2,1,nil,tp)
end
function c30500113.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c30500113.thfilter(c)
return c:IsSetCard(0xba) and c:IsAbleToHand()
end
......
......@@ -19,7 +19,7 @@ function c3064425.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c3064425.negcon)
e2:SetCost(c3064425.negcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c3064425.negtg)
e2:SetOperation(c3064425.negop)
c:RegisterEffect(e2)
......@@ -68,10 +68,6 @@ function c3064425.negcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and Duel.IsChainNegatable(ev) and ph>PHASE_MAIN1 and ph<PHASE_MAIN2
and Duel.IsExistingMatchingCard(c3064425.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c3064425.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c3064425.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
......
......@@ -17,7 +17,7 @@ function c30786387.initial_effect(c)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,30786387)
e2:SetCondition(aux.exccon)
e2:SetCost(c30786387.thcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c30786387.thtg)
e2:SetOperation(c30786387.thop)
c:RegisterEffect(e2)
......@@ -52,10 +52,6 @@ function c30786387.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SortDecktop(tp,tp,3)
end
end
function c30786387.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c30786387.thfilter(c)
return c:IsSetCard(0xe6) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
......
......@@ -16,7 +16,7 @@ function c32104431.initial_effect(c)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,0x1c0)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(c32104431.fusioncost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c32104431.fusiontg)
e2:SetOperation(c32104431.fusionop)
c:RegisterEffect(e2)
......@@ -44,10 +44,6 @@ function c32104431.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c32104431.fusioncost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c32104431.filter0(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove()
end
......
......@@ -16,7 +16,7 @@ function c3298689.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(c3298689.matcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c3298689.mattg)
e2:SetOperation(c3298689.matop)
c:RegisterEffect(e2)
......@@ -65,10 +65,6 @@ function c3298689.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
end
function c3298689.matcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c3298689.xyzfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_XYZ)
end
......
......@@ -16,7 +16,7 @@ function c33280639.initial_effect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(c33280639.immcost)
e2:SetCost(aux.bfgcost)
e2:SetOperation(c33280639.immop)
c:RegisterEffect(e2)
end
......@@ -77,10 +77,6 @@ function c33280639.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.Destroy(tc,REASON_EFFECT)
end
function c33280639.immcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c33280639.immop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
......
......@@ -17,7 +17,7 @@ function c33327029.initial_effect(c)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCondition(aux.exccon)
e2:SetCost(c33327029.thcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c33327029.thtg)
e2:SetOperation(c33327029.thop)
c:RegisterEffect(e2)
......@@ -64,10 +64,6 @@ function c33327029.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c33327029.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c33327029.thfilter(c)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsSetCard(0xe1) and c:IsAbleToHand()
end
......
......@@ -25,7 +25,7 @@ function c34302287.initial_effect(c)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_GRAVE)
e3:SetCost(c34302287.eqcost)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c34302287.eqtg)
e3:SetOperation(c34302287.eqop)
c:RegisterEffect(e3)
......@@ -57,10 +57,6 @@ function c34302287.handcon(e)
return Duel.IsExistingMatchingCard(c34302287.filter,e:GetHandlerPlayer(),LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
or Duel.IsEnvironment(22702055)
end
function c34302287.eqcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c34302287.efilter(c,tp)
return c:IsFaceup() and c:IsType(TYPE_NORMAL)
and Duel.IsExistingMatchingCard(c34302287.eqfilter,tp,LOCATION_SZONE,0,1,nil,c)
......
......@@ -18,7 +18,7 @@ function c34325937.initial_effect(c)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetCondition(c34325937.spcon)
e2:SetCost(c34325937.spcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c34325937.sptg)
e2:SetOperation(c34325937.spop)
c:RegisterEffect(e2)
......@@ -88,10 +88,6 @@ end
function c34325937.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c34325937.cfilter,1,nil)
end
function c34325937.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c34325937.spfilter(c,e,tp)
return c:IsSetCard(0xe3) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
......
......@@ -8,17 +8,13 @@ function c34710660.initial_effect(c)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,34710660+EFFECT_COUNT_CODE_DUEL)
e1:SetCondition(c34710660.condition)
e1:SetCost(c34710660.cost)
e1:SetCost(aux.bfgcost)
e1:SetOperation(c34710660.operation)
c:RegisterEffect(e1)
end
function c34710660.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
end
function c34710660.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c34710660.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE,1)
end
......@@ -7,15 +7,11 @@ function c34834619.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCost(c34834619.spcost)
e1:SetCost(aux.bfgcost)
e1:SetTarget(c34834619.sptg)
e1:SetOperation(c34834619.spop)
c:RegisterEffect(e1)
end
function c34834619.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c34834619.mtfilter(c,e)
return c:GetLevel()>0 and c:IsAbleToRemove() and not c:IsImmuneToEffect(e)
end
......
......@@ -19,7 +19,7 @@ function c3580032.initial_effect(c)
e2:SetRange(LOCATION_GRAVE)
e2:SetHintTiming(0,TIMING_END_PHASE+0x1c0)
e2:SetCountLimit(1,3580033)
e2:SetCost(c3580032.cost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c3580032.sctg)
e2:SetOperation(c3580032.scop)
c:RegisterEffect(e2)
......@@ -32,7 +32,7 @@ function c3580032.initial_effect(c)
e3:SetRange(LOCATION_GRAVE)
e3:SetHintTiming(0,TIMING_END_PHASE+0x1c0)
e3:SetCountLimit(1,3580034)
e3:SetCost(c3580032.cost)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c3580032.xyztg)
e3:SetOperation(c3580032.xyzop)
c:RegisterEffect(e3)
......@@ -72,10 +72,6 @@ function c3580032.spop(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c3580032.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c3580032.scfilter(c)
return c:IsSetCard(0x107a) and c:IsSynchroSummonable(nil)
......
......@@ -17,7 +17,7 @@ function c36426778.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,36426779)
e2:SetCost(c36426778.thcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c36426778.thtg)
e2:SetOperation(c36426778.thop)
c:RegisterEffect(e2)
......@@ -30,10 +30,6 @@ function c36426778.spcon(e,c)
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c36426778.filter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end
function c36426778.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c36426778.thfilter(c)
return c:IsSetCard(0xdb) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
......
......@@ -47,9 +47,9 @@ function c36704180.drcfilter(c)
return (c:IsSetCard(0x10db) or (c:IsSetCard(0xdb) and c:IsType(TYPE_SPELL+TYPE_TRAP))) and c:IsAbleToGraveAsCost()
end
function c36704180.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost()
if chk==0 then return aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,0)
and Duel.IsExistingMatchingCard(c36704180.drcfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,1)
Duel.DiscardHand(tp,c36704180.drcfilter,1,1,REASON_COST,nil)
end
function c36704180.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -19,7 +19,7 @@ function c36736723.initial_effect(c)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,36736724)
e2:SetCost(c36736723.thcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c36736723.thtg)
e2:SetOperation(c36736723.thop)
c:RegisterEffect(e2)
......@@ -46,10 +46,6 @@ function c36736723.atkop(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e1)
end
end
function c36736723.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c36736723.filter(c)
return c:IsSetCard(0x1017) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
......
......@@ -27,7 +27,7 @@ function c36970611.initial_effect(c)
e3:SetRange(LOCATION_GRAVE)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCondition(aux.exccon)
e3:SetCost(c36970611.thcost)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c36970611.thtg)
e3:SetOperation(c36970611.thop)
c:RegisterEffect(e3)
......@@ -71,10 +71,6 @@ function c36970611.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT)
end
end
function c36970611.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c36970611.thfilter(c)
return c:IsSetCard(0xc1) and not c:IsCode(36970611) and c:IsAbleToHand()
end
......
......@@ -63,9 +63,8 @@ function c37679169.spcon(e,tp,eg,ep,ev,re,r,rp)
return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT)
end
function c37679169.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToRemoveAsCost() and c:IsLocation(LOCATION_GRAVE) end
Duel.Remove(c,POS_FACEUP,REASON_COST)
if chk==0 then return aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,0) and e:GetHandler():IsLocation(LOCATION_GRAVE) end
aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,1)
end
function c37679169.spfilter(c,e,tp)
return c:IsSetCard(0xd2) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
......@@ -19,7 +19,7 @@ function c37780349.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCost(c37780349.atkcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c37780349.atktg)
e2:SetOperation(c37780349.atkop)
c:RegisterEffect(e2)
......@@ -49,10 +49,6 @@ end
function c37780349.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(tp,0)
end
function c37780349.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c37780349.filter(c)
return c:IsFaceup() and c:IsSetCard(0xc008)
end
......
......@@ -15,7 +15,7 @@ function c37984162.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCost(c37984162.discost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c37984162.distg)
e2:SetOperation(c37984162.disop)
c:RegisterEffect(e2)
......@@ -35,10 +35,6 @@ function c37984162.operation(e,tp,eg,ep,ev,re,r,rp)
rc:RegisterEffect(e1)
end
end
function c37984162.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c37984162.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_SZONE) and chkc:IsFacedown() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFacedown,tp,0,LOCATION_SZONE,1,nil) end
......
......@@ -22,7 +22,7 @@ function c39229392.initial_effect(c)
e3:SetRange(LOCATION_GRAVE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCondition(c39229392.atkcon)
e3:SetCost(c39229392.atkcost)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c39229392.atktg)
e3:SetOperation(c39229392.atkop)
c:RegisterEffect(e3)
......@@ -43,10 +43,6 @@ end
function c39229392.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c39229392.filter,tp,LOCATION_MZONE,0,1,nil)
end
function c39229392.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c39229392.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
......
......@@ -19,7 +19,7 @@ function c39778366.initial_effect(c)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(aux.exccon)
e2:SetCost(c39778366.thcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c39778366.thtg)
e2:SetOperation(c39778366.thop)
c:RegisterEffect(e2)
......@@ -53,10 +53,6 @@ function c39778366.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(g,REASON_RULE)
end
end
function c39778366.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c39778366.thfilter(c)
return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_LIGHT)
and c:IsType(TYPE_NORMAL+TYPE_UNION) and c:IsAbleToHand()
......
......@@ -18,7 +18,7 @@ function c4081665.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCountLimit(1,4081665)
e2:SetCondition(c4081665.damcon)
e2:SetCost(c4081665.damcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c4081665.damtg)
e2:SetOperation(c4081665.damop)
c:RegisterEffect(e2)
......@@ -47,10 +47,6 @@ end
function c4081665.damcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c4081665.cfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) and aux.damcon1(e,1-tp,eg,ep,ev,re,r,rp)
end
function c4081665.damcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c4081665.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
......
......@@ -61,7 +61,7 @@ function c41201386.cfilter(c)
return c:IsSetCard(0xba) and c:IsAbleToRemoveAsCost()
end
function c41201386.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost()
if chk==0 then return aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,0)
and Duel.IsExistingMatchingCard(c41201386.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c41201386.cfilter,tp,LOCATION_HAND,0,1,1,nil)
......
......@@ -8,7 +8,7 @@ function c42551040.initial_effect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCondition(c42551040.poscon)
e1:SetCost(c42551040.poscost)
e1:SetCost(aux.bfgcost)
e1:SetTarget(c42551040.postg)
e1:SetOperation(c42551040.posop)
c:RegisterEffect(e1)
......@@ -19,10 +19,6 @@ end
function c42551040.poscon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c42551040.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c42551040.poscost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c42551040.filter(c)
return c:IsPosition(POS_FACEUP_ATTACK)
end
......
......@@ -20,7 +20,7 @@ function c44052074.initial_effect(c)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,44052074)
e2:SetCost(c44052074.tkcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c44052074.tktg)
e2:SetOperation(c44052074.tkop)
c:RegisterEffect(e2)
......@@ -52,10 +52,6 @@ function c44052074.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
function c44052074.tkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c44052074.tktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(e:GetLabel()) and chkc:IsControler(tp) and chkc:IsFaceup() end
if chk==0 then
......
......@@ -19,7 +19,7 @@ function c44612603.initial_effect(c)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetHintTiming(0,0x1e0)
e2:SetCost(c44612603.descost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c44612603.destg)
e2:SetOperation(c44612603.desop)
c:RegisterEffect(e2)
......@@ -89,10 +89,6 @@ function c44612603.desop2(e,tp,eg,ep,ev,re,r,rp)
local tg=g:Filter(c44612603.desfilter2,nil,e:GetLabel())
Duel.Destroy(tg,REASON_EFFECT)
end
function c44612603.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c44612603.cfilter(c)
return c:IsFaceup() and c:IsRace(RACE_DINOSAUR)
end
......
......@@ -17,7 +17,7 @@ function c44771289.initial_effect(c)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(aux.exccon)
e2:SetCost(c44771289.atkcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c44771289.atktg)
e2:SetOperation(c44771289.atkop)
c:RegisterEffect(e2)
......@@ -80,10 +80,6 @@ function c44771289.activate(e,tp,eg,ep,ev,re,r,rp)
tc:CompleteProcedure()
end
end
function c44771289.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
end
function c44771289.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0xb1)
end
......
......@@ -22,7 +22,7 @@ function c44891812.initial_effect(c)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(c44891812.spcon)
e2:SetCost(c44891812.spcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c44891812.sptg)
e2:SetOperation(c44891812.spop)
c:RegisterEffect(e2)
......@@ -66,10 +66,6 @@ function c44891812.spcon(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttacker()
return at:GetControler()~=tp and Duel.GetAttackTarget()==nil
end
function c44891812.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c44891812.spfilter(c,e,tp)
return c:IsSetCard(0x9a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
......
......@@ -17,7 +17,7 @@ function c44968459.initial_effect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(c44968459.thcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c44968459.thtg)
e2:SetOperation(c44968459.thop)
c:RegisterEffect(e2)
......@@ -50,10 +50,6 @@ function c44968459.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(1-tp,ct2,REASON_EFFECT)
end
end
function c44968459.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c44968459.thfilter(c)
return c:IsSetCard(0xe8) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
......
......@@ -9,7 +9,7 @@ function c45118716.initial_effect(c)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetRange(LOCATION_GRAVE)
e1:SetCondition(c45118716.condition)
e1:SetCost(c45118716.cost)
e1:SetCost(aux.bfgcost)
e1:SetTarget(c45118716.target)
e1:SetOperation(c45118716.operation)
c:RegisterEffect(e1)
......@@ -17,10 +17,6 @@ end
function c45118716.condition(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp
end
function c45118716.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c45118716.filter(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToDeck()
end
......
......@@ -8,7 +8,7 @@ function c45184165.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,45184165)
e1:SetCondition(c45184165.thcon)
e1:SetCost(c45184165.thcost)
e1:SetCost(aux.bfgcost)
e1:SetTarget(c45184165.thtg)
e1:SetOperation(c45184165.thop)
c:RegisterEffect(e1)
......@@ -25,10 +25,6 @@ function c45184165.thcon(e,tp,eg,ep,ev,re,r,rp)
return c:IsReason(REASON_COST) and re:IsHasType(0x7e0) and re:IsActiveType(TYPE_MONSTER)
and c:IsPreviousLocation(LOCATION_OVERLAY)
end
function c45184165.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c45184165.thfilter(c)
return c:IsSetCard(0xba) and c:IsAbleToHand()
end
......
......@@ -15,7 +15,7 @@ function c45206713.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,45206714)
e2:SetCost(c45206713.spcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c45206713.sptg)
e2:SetOperation(c45206713.spop)
c:RegisterEffect(e2)
......@@ -82,10 +82,6 @@ function c45206713.operation(e,tp,eg,ep,ev,re,r,rp)
tc:CompleteProcedure()
end
end
function c45206713.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c45206713.spfilter(c,e,tp)
return c:IsSetCard(0xaf) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
......
......@@ -8,15 +8,11 @@ function c45705025.initial_effect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,45705025)
e1:SetCost(c45705025.cost)
e1:SetCost(aux.bfgcost)
e1:SetTarget(c45705025.target)
e1:SetOperation(c45705025.operation)
c:RegisterEffect(e1)
end
function c45705025.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c45705025.filter(c,e,tp)
return c:IsRace(RACE_PSYCHO) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
......
......@@ -18,7 +18,7 @@ function c46008667.initial_effect(c)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,46008667)
e2:SetCondition(aux.exccon)
e2:SetCost(c46008667.spcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c46008667.sptg)
e2:SetOperation(c46008667.spop)
c:RegisterEffect(e2)
......@@ -57,10 +57,6 @@ function c46008667.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Equip(tp,c,tc)
end
end
function c46008667.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c46008667.filter1(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0x107a)
and Duel.IsExistingMatchingCard(c46008667.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetCode())
......
......@@ -22,7 +22,7 @@ function c46613515.initial_effect(c)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,46613515)
e2:SetCondition(c46613515.drcon)
e2:SetCost(c46613515.drcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c46613515.drtg)
e2:SetOperation(c46613515.drop)
c:RegisterEffect(e2)
......@@ -45,10 +45,6 @@ end
function c46613515.drcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil
end
function c46613515.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c46613515.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
......
......@@ -11,7 +11,7 @@ function c47435107.initial_effect(c)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1)
e1:SetCondition(c47435107.spcon)
e1:SetCost(c47435107.spcost)
e1:SetCost(aux.bfgcost)
e1:SetTarget(c47435107.sptg)
e1:SetOperation(c47435107.spop)
c:RegisterEffect(e1)
......@@ -19,10 +19,6 @@ end
function c47435107.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c47435107.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c47435107.spfilter(c,e,tp,turn)
return c:IsType(TYPE_RITUAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetTurnID()==turn
end
......
......@@ -16,7 +16,7 @@ function c48427163.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,48427163)
e2:SetCost(c48427163.spcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c48427163.sptg)
e2:SetOperation(c48427163.spop)
c:RegisterEffect(e2)
......@@ -48,10 +48,6 @@ end
function c48427163.spfilter(c,e,tp)
return c:IsSetCard(0xdf) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c48427163.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c48427163.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c48427163.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
......
......@@ -39,9 +39,8 @@ function c48444114.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
function c48444114.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
if chk==0 then return aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,0) and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,1)
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c48444114.filter2(c)
......
......@@ -8,17 +8,13 @@ function c4906301.initial_effect(c)
e1:SetHintTiming(0,TIMING_ATTACK)
e1:SetRange(LOCATION_GRAVE)
e1:SetCondition(c4906301.condition)
e1:SetCost(c4906301.cost)
e1:SetCost(aux.bfgcost)
e1:SetOperation(c4906301.operation)
c:RegisterEffect(e1)
end
function c4906301.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and (Duel.IsAbleToEnterBP() or (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE))
end
function c4906301.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c4906301.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetAttacker() then Duel.NegateAttack()
else
......
......@@ -27,7 +27,7 @@ function c49919798.initial_effect(c)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCost(c49919798.spcost)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c49919798.sptg)
e3:SetOperation(c49919798.spop)
c:RegisterEffect(e3)
......@@ -75,10 +75,6 @@ function c49919798.cpop(e,tp,eg,ep,ev,re,r,rp)
c:CopyEffect(code,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,1)
end
end
function c49919798.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c49919798.spfilter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x1066) and not c:IsCode(49919798) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
......
......@@ -22,7 +22,7 @@ function c50903514.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(c50903514.spcon)
e2:SetCost(c50903514.spcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c50903514.sptg)
e2:SetOperation(c50903514.spop)
c:RegisterEffect(e2)
......@@ -64,10 +64,6 @@ function c50903514.spcon(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp and c:IsReason(REASON_DESTROY)
and c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetPreviousControler()==tp
end
function c50903514.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c50903514.spfilter(c,e,tp)
return c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
......
......@@ -19,7 +19,7 @@ function c5133471.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,5133471)
e2:SetCondition(aux.exccon)
e2:SetCost(c5133471.descost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c5133471.destg)
e2:SetOperation(c5133471.activate)
c:RegisterEffect(e2)
......@@ -40,10 +40,6 @@ function c5133471.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(tc,REASON_EFFECT)
end
end
function c5133471.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c5133471.filter2(c)
return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
......
......@@ -6,15 +6,11 @@ function c51554871.initial_effect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCost(c51554871.cost)
e1:SetCost(aux.bfgcost)
e1:SetTarget(c51554871.target)
e1:SetOperation(c51554871.operation)
c:RegisterEffect(e1)
end
function c51554871.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c51554871.filter(c)
return c:IsFaceup() and c:IsSetCard(0x39)
end
......
......@@ -18,7 +18,7 @@ function c51606429.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c51606429.negcon)
e2:SetCost(c51606429.negcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c51606429.negtg)
e2:SetOperation(c51606429.negop)
c:RegisterEffect(e2)
......@@ -49,10 +49,6 @@ end
function c51606429.negcon(e,tp,eg,ep,ev,re,r,rp)
return aux.exccon(e) and Duel.GetTurnPlayer()==tp
end
function c51606429.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c51606429.negfilter(c)
return c:IsFaceup() and c:IsType(TYPE_TRAP) and not c:IsDisabled()
end
......
......@@ -25,7 +25,7 @@ function c51858200.initial_effect(c)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_GRAVE)
e3:SetCost(c51858200.spcost)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c51858200.sptg)
e3:SetOperation(c51858200.spop)
c:RegisterEffect(e3)
......@@ -52,10 +52,6 @@ function c51858200.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g)
end
end
function c51858200.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c51858200.spfilter1(c,e)
return c:IsSetCard(0x10f3) and not c:IsImmuneToEffect(e)
end
......
......@@ -8,15 +8,11 @@ function c52158283.initial_effect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,52158283)
e1:SetCost(c52158283.cost)
e1:SetCost(aux.bfgcost)
e1:SetTarget(c52158283.target)
e1:SetOperation(c52158283.operation)
c:RegisterEffect(e1)
end
function c52158283.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c52158283.filter(c)
return c:IsAttackPos() and c:IsLevelAbove(3)
end
......
......@@ -17,7 +17,7 @@ function c52176579.initial_effect(c)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,52176579)
e2:SetCondition(aux.exccon)
e2:SetCost(c52176579.lvcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c52176579.lvtg)
e2:SetOperation(c52176579.lvop)
c:RegisterEffect(e2)
......@@ -52,10 +52,6 @@ end
function c52176579.tgfilter(c,lv)
return c:IsSetCard(0xea) and c:GetLevel()~=lv and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function c52176579.lvcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c52176579.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c52176579.lvfilter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c52176579.lvfilter,tp,LOCATION_MZONE,0,1,nil,tp) end
......
......@@ -39,7 +39,7 @@ function c52198054.initial_effect(c)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_GRAVE)
e4:SetCondition(c52198054.condition)
e4:SetCost(c52198054.tgcost)
e4:SetCost(aux.bfgcost)
e4:SetTarget(c52198054.tgtg)
e4:SetOperation(c52198054.tgop)
e4:SetHintTiming(0,TIMING_MAIN_END)
......@@ -86,10 +86,6 @@ function c52198054.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,1,REASON_EFFECT)
end
end
function c52198054.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c52198054.tgfilter(c)
return c:IsSetCard(0x32) and c:IsAbleToGrave()
end
......
......@@ -15,7 +15,7 @@ function c52589809.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(aux.exccon)
e2:SetCost(c52589809.thcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c52589809.thtg)
e2:SetOperation(c52589809.thop)
c:RegisterEffect(e2)
......@@ -42,10 +42,6 @@ end
function c52589809.splimit(e,c)
return not c:IsType(TYPE_SYNCHRO) and c:IsLocation(LOCATION_EXTRA)
end
function c52589809.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c52589809.thfilter(c)
return c:IsAttackBelow(1500) and c:IsRace(RACE_FIEND) and c:IsType(TYPE_TUNER) and c:IsAbleToHand()
end
......
......@@ -16,7 +16,7 @@ function c55326322.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,55326322)
e2:SetCost(c55326322.tkcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c55326322.tktg)
e2:SetOperation(c55326322.tkop)
c:RegisterEffect(e2)
......@@ -65,10 +65,6 @@ end
function c55326322.splimit(e,c)
return not (c:IsRace(RACE_MACHINE) and c:IsType(TYPE_SYNCHRO)) and c:IsLocation(LOCATION_EXTRA)
end
function c55326322.tkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c55326322.tktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,55326323,0xea,0x4011,0,0,1,RACE_MACHINE,ATTRIBUTE_WATER) end
......
......@@ -29,7 +29,7 @@ function c55885348.initial_effect(c)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCondition(c55885348.spcon)
e4:SetCost(c55885348.spcost)
e4:SetCost(aux.bfgcost)
e4:SetTarget(c55885348.sptg)
e4:SetOperation(c55885348.spop)
c:RegisterEffect(e4)
......@@ -51,10 +51,6 @@ function c55885348.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT)
end
function c55885348.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() and e:GetHandler():IsLocation(LOCATION_GRAVE) end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c55885348.spfilter(c,e,tp)
return c:IsSetCard(0xd2) and c:IsLevelBelow(7) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
......
......@@ -18,7 +18,7 @@ function c56049970.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,56049970)
e2:SetCost(c56049970.spcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c56049970.sptg2)
e2:SetOperation(c56049970.spop2)
c:RegisterEffect(e2)
......@@ -67,10 +67,6 @@ end
function c56049970.splimit(e,c)
return not (c:IsRace(RACE_MACHINE) and c:IsType(TYPE_SYNCHRO)) and c:IsLocation(LOCATION_EXTRA)
end
function c56049970.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c56049970.spfilter2(c,e,tp)
return c:IsSetCard(0xea) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
......
......@@ -20,7 +20,7 @@ function c56532353.initial_effect(c)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCondition(c56532353.condition)
e2:SetCost(c56532353.cost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c56532353.target)
e2:SetOperation(c56532353.operation)
c:RegisterEffect(e2)
......@@ -52,10 +52,6 @@ function c56532353.condition(e,tp,eg,ep,ev,re,r,rp)
return g and g:IsExists(c56532353.filter,1,nil,tp)
and Duel.IsChainNegatable(ev)
end
function c56532353.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c56532353.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
......
......@@ -11,7 +11,7 @@ function c56574543.initial_effect(c)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,56574543)
e1:SetCondition(c56574543.atkcon)
e1:SetCost(c56574543.atkcost)
e1:SetCost(aux.bfgcost)
e1:SetOperation(c56574543.atkop)
c:RegisterEffect(e1)
end
......@@ -23,10 +23,6 @@ function c56574543.atkcon(e,tp,eg,ep,ev,re,r,rp)
if c:IsControler(1-tp) then c=Duel.GetAttacker() end
return c and c:IsSetCard(0x88) and c:IsRace(RACE_BEASTWARRIOR) and c:IsRelateToBattle()
end
function c56574543.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c56574543.atkop(e,tp,eg,ep,ev,re,r,rp,chk)
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
......
......@@ -33,7 +33,7 @@ function c57288708.initial_effect(c)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,57288709)
e3:SetCondition(aux.exccon)
e3:SetCost(c57288708.thcost)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c57288708.thtg)
e3:SetOperation(c57288708.thop)
c:RegisterEffect(e3)
......@@ -80,10 +80,6 @@ function c57288708.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c57288708.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c57288708.thfilter(c)
return c:IsSetCard(0xfe) and c:IsAbleToHand()
end
......
......@@ -16,7 +16,7 @@ function c5795980.initial_effect(c)
e2:SetDescription(aux.Stringid(5795980,0))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(c5795980.atcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c5795980.attg)
e2:SetOperation(c5795980.atop)
c:RegisterEffect(e2)
......@@ -94,10 +94,6 @@ function c5795980.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,1,REASON_EFFECT)
end
end
function c5795980.atcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c5795980.attg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,562)
......
......@@ -8,7 +8,7 @@ function c5818294.initial_effect(c)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_GRAVE)
e1:SetCondition(c5818294.negcon)
e1:SetCost(c5818294.negcost)
e1:SetCost(aux.bfgcost)
e1:SetTarget(c5818294.negtg)
e1:SetOperation(c5818294.negop)
c:RegisterEffect(e1)
......@@ -21,10 +21,6 @@ function c5818294.negcon(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return g and g:IsExists(c5818294.tfilter,1,nil,tp) and Duel.IsChainDisablable(ev)
end
function c5818294.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c5818294.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
......
......@@ -8,15 +8,11 @@ function c59251766.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,59251766)
e1:SetCost(c59251766.cost)
e1:SetCost(aux.bfgcost)
e1:SetTarget(c59251766.target)
e1:SetOperation(c59251766.operation)
c:RegisterEffect(e1)
end
function c59251766.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c59251766.filter(c)
return c:IsFaceup() and c:IsSetCard(0x88) and c:IsRace(RACE_BEASTWARRIOR)
end
......
......@@ -18,7 +18,7 @@ function c59463312.initial_effect(c)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,59463312)
e3:SetCost(c59463312.cost)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c59463312.target)
e3:SetOperation(c59463312.operation)
c:RegisterEffect(e3)
......@@ -37,10 +37,6 @@ function c59463312.sumop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e2,tp)
Duel.RegisterFlagEffect(tp,59463312,RESET_PHASE+PHASE_END,0,1)
end
function c59463312.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c59463312.filter(c,e,tp)
return c:GetAttack()==800 and c:GetDefense()==1000 and not c:IsCode(59463312) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
......
......@@ -56,8 +56,8 @@ function c59496924.spcon(e,tp,eg,ep,ev,re,r,rp)
return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT)
end
function c59496924.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() and e:GetHandler():IsLocation(LOCATION_GRAVE) end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
if chk==0 then return aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,0) and e:GetHandler():IsLocation(LOCATION_GRAVE) end
aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,1)
end
function c59496924.spfilter(c,e,tp)
return c:IsSetCard(0xd2) and c:IsLevelBelow(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......@@ -74,4 +74,4 @@ function c59496924.spop(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
\ No newline at end of file
......@@ -6,15 +6,11 @@ function c59640711.initial_effect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,59640711)
e1:SetCost(c59640711.spcost)
e1:SetCost(aux.bfgcost)
e1:SetTarget(c59640711.sptg)
e1:SetOperation(c59640711.spop)
c:RegisterEffect(e1)
end
function c59640711.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c59640711.spfilter(c,e,tp)
return c:IsSetCard(0x2016) and c:IsType(TYPE_TUNER) and not c:IsCode(59640711) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
......
......@@ -20,7 +20,7 @@ function c59650656.initial_effect(c)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(c59650656.spcon)
e2:SetCost(c59650656.spcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c59650656.sptg)
e2:SetOperation(c59650656.spop)
c:RegisterEffect(e2)
......@@ -52,10 +52,6 @@ function c59650656.spcon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0
and Duel.GetDrawCount(tp)>0
end
function c59650656.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c59650656.spfilter(c,e,tp)
return c:IsSetCard(0x7b) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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