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)
......
......@@ -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)
......
......@@ -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)
......
......@@ -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)
......@@ -73,10 +73,6 @@ function c3580032.spop(e,tp,eg,ep,ev,re,r,rp)
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)
end
......
......@@ -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)
......
......@@ -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
......
......@@ -17,7 +17,7 @@ function c60832978.initial_effect(c)
e3:SetRange(LOCATION_GRAVE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,60832978)
e3:SetCost(c60832978.cost)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c60832978.target2)
e3:SetOperation(c60832978.operation2)
c:RegisterEffect(e3)
......@@ -43,10 +43,6 @@ function c60832978.operation1(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e1)
end
end
function c60832978.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 c60832978.filter2(c)
return c60832978.filter1(c) and c:IsRace(RACE_FIEND)
end
......
......@@ -25,7 +25,7 @@ function c61397885.initial_effect(c)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_GRAVE)
e3:SetCost(c61397885.eqcost)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c61397885.eqtg)
e3:SetOperation(c61397885.eqop)
c:RegisterEffect(e3)
......@@ -82,10 +82,6 @@ function c61397885.handcon(e)
return Duel.IsExistingMatchingCard(c61397885.filter,e:GetHandlerPlayer(),LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
or Duel.IsEnvironment(22702055)
end
function c61397885.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 c61397885.efilter(c,tp)
return c:IsFaceup() and c:IsType(TYPE_NORMAL)
and Duel.IsExistingMatchingCard(c61397885.eqfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,c)
......
......@@ -55,7 +55,7 @@ function c61936647.initial_effect(c)
e6:SetCode(EVENT_FREE_CHAIN)
e6:SetRange(LOCATION_GRAVE)
e6:SetCountLimit(1,61936647)
e6:SetCost(c61936647.spcost)
e6:SetCost(aux.bfgcost)
e6:SetTarget(c61936647.sptg)
e6:SetOperation(c61936647.spop)
c:RegisterEffect(e6)
......@@ -105,10 +105,6 @@ end
function c61936647.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
function c61936647.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 c61936647.spfilter(c,e,tp)
return c:IsSetCard(0x10db) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
......
......@@ -16,7 +16,7 @@ function c62017867.initial_effect(c)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c62017867.atkcon)
e2:SetCost(c62017867.atkcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c62017867.atktg)
e2:SetOperation(c62017867.atkop)
c:RegisterEffect(e2)
......@@ -34,10 +34,6 @@ end
function c62017867.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil
end
function c62017867.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 c62017867.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) end
end
......
......@@ -17,9 +17,9 @@ function c62835876.cfilter(c)
return c:IsSetCard(0xb1) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost()
end
function c62835876.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(c62835876.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,c62835876.cfilter,1,1,REASON_COST,nil)
end
function c62835876.filter(c)
......
......@@ -19,7 +19,7 @@ function c63227401.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCondition(aux.exccon)
e2:SetCost(c63227401.cost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c63227401.target)
e2:SetOperation(c63227401.activate)
c:RegisterEffect(e2)
......@@ -55,7 +55,3 @@ end
function c63227401.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
function c63227401.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
......@@ -14,7 +14,7 @@ function c63821877.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,63821877)
e2:SetCost(c63821877.tgcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c63821877.tgtg)
e2:SetOperation(c63821877.tgop)
c:RegisterEffect(e2)
......@@ -61,10 +61,6 @@ function c63821877.atkop(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e1)
end
end
function c63821877.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 c63821877.tgfilter(c)
return (c:IsSetCard(0x10db) or (c:IsSetCard(0xdb) and c:IsType(TYPE_SPELL+TYPE_TRAP))) and c:IsAbleToGrave()
end
......
......@@ -62,8 +62,8 @@ function c64063868.thcon(e,tp,eg,ep,ev,re,r,rp)
return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT)
end
function c64063868.thcost(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 c64063868.thfilter(c)
return c:IsSetCard(0xd2) and c:IsLevelBelow(8) and c:IsAbleToHand()
......
......@@ -31,7 +31,7 @@ function c64753157.initial_effect(c)
e3:SetCode(EVENT_BATTLE_DESTROYED)
e3:SetRange(LOCATION_GRAVE)
e3:SetCondition(c64753157.thcon)
e3:SetCost(c64753157.thcost)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c64753157.thtg)
e3:SetOperation(c64753157.thop)
c:RegisterEffect(e3)
......@@ -88,10 +88,6 @@ end
function c64753157.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c64753157.cfilter,1,nil,tp)
end
function c64753157.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 c64753157.thfilter(c)
return c:IsCode(41091257) and c:IsAbleToHand()
end
......
......@@ -32,7 +32,7 @@ function c65338781.initial_effect(c)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCost(c65338781.ctcost)
e4:SetCost(aux.bfgcost)
e4:SetTarget(c65338781.cttg)
e4:SetOperation(c65338781.ctop)
c:RegisterEffect(e4)
......@@ -62,10 +62,6 @@ function c65338781.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c65338781.ctcost(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 c65338781.ctfilter(c)
return c:IsFaceup() and c:IsCanAddCounter(0x1,1)
end
......
......@@ -23,7 +23,7 @@ function c66141736.initial_effect(c)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(aux.exccon)
e2:SetCost(c66141736.spcost2)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c66141736.sptg2)
e2:SetOperation(c66141736.spop2)
c:RegisterEffect(e2)
......@@ -66,10 +66,6 @@ function c66141736.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function c66141736.spcost2(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 c66141736.spfilter2(c,e,tp)
return c:IsSetCard(0x57) and c:GetLevel()==1 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
......
......@@ -81,9 +81,9 @@ function c66171432.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
function c66171432.spcost(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.CheckReleaseGroup(tp,nil,1,nil) end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,1)
local g=Duel.SelectReleaseGroup(tp,nil,1,1,nil)
Duel.Release(g,REASON_COST)
end
......
......@@ -9,7 +9,7 @@ function c67300516.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCondition(c67300516.spcon)
e1:SetCost(c67300516.spcost)
e1:SetCost(aux.bfgcost)
e1:SetTarget(c67300516.sptg)
e1:SetOperation(c67300516.spop)
c:RegisterEffect(e1)
......@@ -17,10 +17,6 @@ end
function c67300516.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and Duel.GetActivityCount(tp,ACTIVITY_NORMALSUMMON)==0
end
function c67300516.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 c67300516.filter(c,e,tp)
return c:IsSetCard(0x3b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
......
......@@ -14,7 +14,7 @@ function c67381587.initial_effect(c)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCost(c67381587.poscost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c67381587.postg)
e2:SetOperation(c67381587.posop)
c:RegisterEffect(e2)
......@@ -26,10 +26,6 @@ end
function c67381587.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE,1)
end
function c67381587.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 c67381587.posfilter1(c)
return c:IsFaceup() and c:IsSetCard(0xcc) and c:IsCanTurnSet()
and Duel.IsExistingTarget(c67381587.posfilter2,0,LOCATION_MZONE,LOCATION_MZONE,1,c)
......
......@@ -19,7 +19,7 @@ function c67489919.initial_effect(c)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCondition(c67489919.spcon)
e3:SetCost(c67489919.spcost)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c67489919.sptg)
e3:SetOperation(c67489919.spop)
c:RegisterEffect(e3)
......@@ -45,10 +45,6 @@ function c67489919.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
end
function c67489919.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_EFFECT)
end
function c67489919.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,31533705,0x101b,0x4011,0,0,3,RACE_MACHINE,ATTRIBUTE_WIND) end
......
......@@ -18,7 +18,7 @@ function c68077936.initial_effect(c)
e2:SetCode(EVENT_DESTROYED)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c68077936.descon)
e2:SetCost(c68077936.cost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c68077936.target)
e2:SetOperation(c68077936.activate)
c:RegisterEffect(e2)
......@@ -45,7 +45,3 @@ end
function c68077936.descon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c68077936.cfilter,1,nil,tp) and re and re:IsActiveType(TYPE_SPELL) and aux.exccon(e)
end
function c68077936.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
......@@ -29,7 +29,7 @@ function c68819554.initial_effect(c)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,68819554)
e3:SetCost(c68819554.thcost)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c68819554.thtg)
e3:SetOperation(c68819554.thop)
c:RegisterEffect(e3)
......@@ -74,10 +74,6 @@ function c68819554.damval(e,re,val,r,rp,rc)
Duel.ResetFlagEffect(tp,68819554)
return 0
end
function c68819554.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 c68819554.thfilter(c)
return c:IsSetCard(0xc6) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and not c:IsCode(68819554)
end
......
......@@ -9,7 +9,7 @@ function c69723159.initial_effect(c)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,69723159)
e1:SetCondition(c69723159.descon)
e1:SetCost(c69723159.descost)
e1:SetCost(aux.bfgcost)
e1:SetTarget(c69723159.destg)
e1:SetOperation(c69723159.desop)
c:RegisterEffect(e1)
......@@ -20,10 +20,6 @@ end
function c69723159.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c69723159.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c69723159.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 c69723159.filter(c)
return c:IsFaceup()
end
......
......@@ -25,7 +25,7 @@ function c70043345.initial_effect(c)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_GRAVE)
e3:SetCost(c70043345.thcost)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c70043345.thtg)
e3:SetOperation(c70043345.thop)
c:RegisterEffect(e3)
......@@ -88,10 +88,6 @@ function c70043345.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(tc)
end
end
function c70043345.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_EFFECT)
end
function c70043345.thfilter(c)
return c:IsSetCard(0xb2) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
......
......@@ -22,7 +22,7 @@ function c70124586.initial_effect(c)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCost(c70124586.cost)
e4:SetCost(aux.bfgcost)
e4:SetTarget(c70124586.target)
e4:SetOperation(c70124586.operation)
c:RegisterEffect(e4)
......@@ -36,10 +36,6 @@ function c70124586.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_SZONE,LOCATION_SZONE,nil)
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
function c70124586.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 c70124586.target(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
......
......@@ -15,7 +15,7 @@ function c71039903.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,71039903)
e2:SetCost(c71039903.cost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c71039903.target)
e2:SetOperation(c71039903.operation)
c:RegisterEffect(e2)
......@@ -50,10 +50,6 @@ function c71039903.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c71039903.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 c71039903.filter(c)
return c:IsSetCard(0xdd) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
......
......@@ -22,7 +22,7 @@ function c71069715.initial_effect(c)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_GRAVE)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCost(c71069715.tdcost)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c71069715.tdtg)
e3:SetOperation(c71069715.tdop)
c:RegisterEffect(e3)
......@@ -33,10 +33,6 @@ end
function c71069715.indval(e,re,rp)
return rp~=e:GetHandlerPlayer()
end
function c71069715.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 c71069715.tdfilter(c)
return c:IsFaceup() and c:IsSetCard(0xaf) and c:IsAbleToDeck()
end
......
......@@ -9,7 +9,7 @@ function c7161742.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_GRAVE)
e1:SetCondition(c7161742.spcon)
e1:SetCost(c7161742.spcost)
e1:SetCost(aux.bfgcost)
e1:SetTarget(c7161742.sptg)
e1:SetOperation(c7161742.spop)
c:RegisterEffect(e1)
......@@ -17,10 +17,6 @@ end
function c7161742.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c7161742.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 c7161742.filter(c,e,tp)
return c:IsLevelBelow(4) and c:IsSetCard(0x10f3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
......
......@@ -18,7 +18,7 @@ function c72291078.initial_effect(c)
e3:SetCategory(CATEGORY_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCost(c72291078.cost)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c72291078.target)
e3:SetOperation(c72291078.operation)
c:RegisterEffect(e3)
......@@ -37,10 +37,6 @@ end
function c72291078.indcon(e)
return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,TYPE_TOKEN)
end
function c72291078.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 c72291078.filter(c)
return c:IsSetCard(0x101b) and c:IsSummonable(true,nil)
end
......
......@@ -8,7 +8,7 @@ function c72413000.initial_effect(c)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,72413000)
e1:SetCondition(c72413000.condition)
e1:SetCost(c72413000.cost)
e1:SetCost(aux.bfgcost)
e1:SetTarget(c72413000.target)
e1:SetOperation(c72413000.operation)
c:RegisterEffect(e1)
......@@ -19,10 +19,6 @@ end
function c72413000.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c72413000.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c72413000.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 c72413000.filter(c)
return c:IsSetCard(0xa9) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
end
......
......@@ -19,7 +19,7 @@ function c73694478.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCondition(c73694478.thcon)
e2:SetCost(c73694478.thcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c73694478.thtg)
e2:SetOperation(c73694478.thop)
c:RegisterEffect(e2)
......@@ -54,10 +54,6 @@ end
function c73694478.thcon(e,tp,eg,ep,ev,re,r,rp)
return aux.exccon(e) and Duel.GetTurnPlayer()==tp and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function c73694478.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c73694478.thfilter(c)
return c:IsSetCard(0x10cf) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
......
......@@ -22,7 +22,7 @@ function c73729209.initial_effect(c)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(TIMING_DAMAGE_STEP)
e2:SetCondition(c73729209.atkcon)
e2:SetCost(c73729209.atkcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c73729209.target)
e2:SetOperation(c73729209.activate)
e2:SetLabel(800)
......@@ -51,7 +51,3 @@ end
function c73729209.atkcon(e,tp,eg,ep,ev,re,r,rp)
return aux.exccon(e) and Duel.GetTurnPlayer()==tp and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated())
end
function c73729209.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
......@@ -17,7 +17,7 @@ function c73881652.initial_effect(c)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCondition(aux.exccon)
e2:SetCost(c73881652.drcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c73881652.drtg)
e2:SetOperation(c73881652.drop)
c:RegisterEffect(e2)
......@@ -45,10 +45,6 @@ function c73881652.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
end
function c73881652.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 c73881652.drfilter(c,e)
return c:IsSetCard(0xf1) and c:IsAbleToDeck() and c:IsCanBeEffectTarget(e)
end
......
......@@ -16,7 +16,7 @@ function c74335036.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(c74335036.tdcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c74335036.tdtg)
e2:SetOperation(c74335036.tdop)
c:RegisterEffect(e2)
......@@ -82,10 +82,6 @@ end
function c74335036.tdfilter(c)
return c:IsType(TYPE_FUSION) and c:IsAbleToExtra()
end
function c74335036.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 c74335036.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c74335036.tdfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c74335036.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end
......
......@@ -17,7 +17,7 @@ function c75214390.initial_effect(c)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(aux.exccon)
e2:SetCost(c75214390.atkcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c75214390.atktg)
e2:SetOperation(c75214390.atkop)
c:RegisterEffect(e2)
......@@ -31,10 +31,6 @@ function c75214390.spcon(e,c)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c75214390.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c75214390.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 c75214390.filter(c)
return c:IsFaceup() and c:GetOverlayCount()>0
end
......
......@@ -17,7 +17,7 @@ function c76647978.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCost(c76647978.spcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c76647978.sptg)
e2:SetOperation(c76647978.spop)
c:RegisterEffect(e2)
......@@ -69,10 +69,6 @@ function c76647978.activate(e,tp,eg,ep,ev,re,r,rp)
tc:CompleteProcedure()
e:GetLabelObject():SetLabelObject(tc)
end
function c76647978.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 c76647978.mgfilter(c,e,tp,fusc,mg)
return c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE)
and bit.band(c:GetReason(),0x40008)==0x40008 and c:GetReasonCard()==fusc
......
......@@ -17,7 +17,7 @@ function c77133792.initial_effect(c)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(aux.exccon)
e2:SetCost(c77133792.spcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c77133792.sptg)
e2:SetOperation(c77133792.spop)
c:RegisterEffect(e2)
......@@ -37,10 +37,6 @@ function c77133792.operation(e,tp,eg,ep,ev,re,r,rp)
local sg=g:Filter(Card.IsRelateToEffect,nil,e)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
end
function c77133792.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 c77133792.spfilter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x2066) and c:IsLevelBelow(4)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
......@@ -21,7 +21,7 @@ function c78355370.initial_effect(c)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c78355370.spcon2)
e2:SetCost(c78355370.spcost2)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c78355370.sptg2)
e2:SetOperation(c78355370.spop2)
c:RegisterEffect(e2)
......@@ -51,10 +51,6 @@ end
function c78355370.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():GetControler()~=tp
end
function c78355370.spcost2(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 c78355370.spfilter2(c,e,tp)
return c:IsSetCard(0xa4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsType(TYPE_MONSTER)
end
......
......@@ -19,7 +19,7 @@ function c78474168.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCondition(c78474168.negcon)
e2:SetCost(c78474168.negcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c78474168.target)
e2:SetOperation(c78474168.activate2)
c:RegisterEffect(e2)
......@@ -54,10 +54,6 @@ end
function c78474168.negcon(e,tp,eg,ep,ev,re,r,rp)
return aux.exccon(e) and Duel.GetTurnPlayer()==tp
end
function c78474168.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c78474168.activate2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
......
......@@ -26,7 +26,7 @@ function c78625592.initial_effect(c)
e3:SetHintTiming(0,TIMING_ATTACK)
e3:SetRange(LOCATION_GRAVE)
e3:SetCondition(c78625592.grcondition)
e3:SetCost(c78625592.grcost)
e3:SetCost(aux.bfgcost)
e3:SetOperation(c78625592.groperation)
c:RegisterEffect(e3)
end
......@@ -55,10 +55,6 @@ end
function c78625592.grcondition(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 c78625592.grcost(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 c78625592.groperation(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
......
......@@ -18,7 +18,7 @@ function c7922915.initial_effect(c)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,0x1c0)
e2:SetCondition(c7922915.negcon)
e2:SetCost(c7922915.negcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c7922915.negtg)
e2:SetOperation(c7922915.negop)
c:RegisterEffect(e2)
......@@ -57,10 +57,6 @@ end
function c7922915.negcon(e,tp,eg,ep,ev,re,r,rp)
return aux.exccon(e) and Duel.IsExistingMatchingCard(c7922915.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c7922915.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 c7922915.negfilter(c)
return aux.disfilter1(c) and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
......
......@@ -15,7 +15,7 @@ function c79234734.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,79234735)
e2:SetCost(c79234734.thcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c79234734.thtg)
e2:SetOperation(c79234734.thop)
c:RegisterEffect(e2)
......@@ -44,10 +44,6 @@ function c79234734.atkop(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e2)
end
end
function c79234734.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 c79234734.thfilter(c)
return c:IsCode(6628343,32013448) and c:IsAbleToHand()
end
......
......@@ -5,15 +5,11 @@ function c81816475.initial_effect(c)
e1:SetDescription(aux.Stringid(81816475,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCost(c81816475.cost)
e1:SetCost(aux.bfgcost)
e1:SetTarget(c81816475.target)
e1:SetOperation(c81816475.operation)
c:RegisterEffect(e1)
end
function c81816475.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 c81816475.filter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ)
end
......
......@@ -14,7 +14,7 @@ function c81994591.initial_effect(c)
e2:SetDescription(aux.Stringid(81994591,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(c81994591.indcost)
e2:SetCost(aux.bfgcost)
e2:SetOperation(c81994591.indop)
c:RegisterEffect(e2)
end
......@@ -33,10 +33,6 @@ function c81994591.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g)
end
end
function c81994591.indcost(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 c81994591.indop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
......
......@@ -9,17 +9,13 @@ function c82593786.initial_effect(c)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,82593786+EFFECT_COUNT_CODE_DUEL)
e1:SetCondition(c82593786.condition)
e1:SetCost(c82593786.cost)
e1:SetCost(aux.bfgcost)
e1:SetOperation(c82593786.operation)
c:RegisterEffect(e1)
end
function c82593786.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker()~=nil
end
function c82593786.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 c82593786.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateAttack()
end
......@@ -20,7 +20,7 @@ function c82744076.initial_effect(c)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCondition(c82744076.negcon)
e2:SetCost(c82744076.negcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c82744076.negtg)
e2:SetOperation(c82744076.negop)
c:RegisterEffect(e2)
......@@ -75,10 +75,6 @@ function c82744076.negcon(e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst()
return c82744076.cfilter(tc,tp) and Duel.IsChainNegatable(ev)
end
function c82744076.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 c82744076.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)
......
......@@ -43,7 +43,7 @@ function c82821760.initial_effect(c)
e6:SetCategory(CATEGORY_TODECK)
e6:SetType(EFFECT_TYPE_IGNITION)
e6:SetRange(LOCATION_GRAVE)
e6:SetCost(c82821760.tdcost)
e6:SetCost(aux.bfgcost)
e6:SetTarget(c82821760.tdtg)
e6:SetOperation(c82821760.tdop)
c:RegisterEffect(e6)
......@@ -80,10 +80,6 @@ function c82821760.rctop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
function c82821760.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 c82821760.tdfilter(c)
return c:IsSetCard(0x15) and c:IsAbleToDeck()
end
......
......@@ -18,7 +18,7 @@ function c83443619.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,83443619)
e2:SetCost(c83443619.thcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c83443619.thtg)
e2:SetOperation(c83443619.thop)
c:RegisterEffect(e2)
......@@ -67,10 +67,6 @@ end
function c83443619.splimit(e,c)
return not (c:IsRace(RACE_MACHINE) and c:IsType(TYPE_SYNCHRO)) and c:IsLocation(LOCATION_EXTRA)
end
function c83443619.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 c83443619.thfilter(c)
return c:IsSetCard(0xea) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
......
......@@ -18,7 +18,7 @@ function c84650463.initial_effect(c)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,84650463)
e2:SetCondition(c84650463.spcon)
e2:SetCost(c84650463.spcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c84650463.sptg)
e2:SetOperation(c84650463.spop)
c:RegisterEffect(e2)
......@@ -43,10 +43,6 @@ end
function c84650463.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetMatchingGroupCount(c84650463.cfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)==3
end
function c84650463.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 c84650463.filter(c,e,tp)
return c:IsLevelAbove(5) and c:IsRace(RACE_SEASERPENT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
......
......@@ -15,7 +15,7 @@ function c84869738.initial_effect(c)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(c84869738.matcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c84869738.mattg)
e2:SetOperation(c84869738.matop)
c:RegisterEffect(e2)
......@@ -87,10 +87,6 @@ function c84869738.activate(e,tp,eg,ep,ev,re,r,rp)
end
Duel.SpecialSummonComplete()
end
function c84869738.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 c84869738.xyzfilter(c)
return c:IsFaceup() and c:IsSetCard(0x20f8) and c:IsType(TYPE_XYZ)
end
......
......@@ -16,7 +16,7 @@ function c85704698.initial_effect(c)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,0x1c0)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(c85704698.syncost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c85704698.syntg)
e2:SetOperation(c85704698.synop)
c:RegisterEffect(e2)
......@@ -57,10 +57,6 @@ function c85704698.spop(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e3)
end
end
function c85704698.syncost(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 c85704698.mfilter(c)
return c:IsSetCard(0x2016) and c:IsType(TYPE_TUNER)
end
......
......@@ -93,8 +93,8 @@ function c85991529.thcon(e,tp,eg,ep,ev,re,r,rp)
return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT)
end
function c85991529.thcost(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 c85991529.thfilter(c)
return c:IsSetCard(0xd2) and c:IsLevelBelow(9) and c:IsAbleToHand()
......
......@@ -17,7 +17,7 @@ function c87917187.initial_effect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(c87917187.thcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c87917187.thtg)
e2:SetOperation(c87917187.thop)
c:RegisterEffect(e2)
......@@ -48,10 +48,6 @@ function c87917187.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
end
end
function c87917187.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 c87917187.thfilter(c)
return c:IsCode(6007213,32491822,69890967) and c:IsAbleToHand()
end
......
......@@ -18,7 +18,7 @@ function c88204302.initial_effect(c)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(aux.exccon)
e2:SetCost(c88204302.thcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c88204302.thtg)
e2:SetOperation(c88204302.thop)
c:RegisterEffect(e2)
......@@ -40,10 +40,6 @@ function c88204302.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function c88204302.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 c88204302.thfilter(c)
return c:IsSetCard(0x2016) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
......
......@@ -18,7 +18,7 @@ function c88482761.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCondition(c88482761.atkcon)
e2:SetCost(c88482761.atkcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c88482761.atktg)
e2:SetOperation(c88482761.atkop)
c:RegisterEffect(e2)
......@@ -66,10 +66,6 @@ end
function c88482761.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and Duel.GetCurrentPhase()==PHASE_BATTLE_STEP
end
function c88482761.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 c88482761.atkfilter(c)
return c:IsType(TYPE_SYNCHRO) and c:IsPosition(POS_FACEUP_ATTACK)
end
......
......@@ -16,7 +16,7 @@ function c88728507.initial_effect(c)
e2:SetDescription(aux.Stringid(88728507,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(c88728507.sumcost)
e2:SetCost(aux.bfgcost)
e2:SetOperation(c88728507.sumop)
c:RegisterEffect(e2)
end
......@@ -38,10 +38,6 @@ function c88728507.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g)
end
end
function c88728507.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 c88728507.sumop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,88728507)==0 then
local e1=Effect.CreateEffect(e:GetHandler())
......
......@@ -32,7 +32,7 @@ function c88901771.initial_effect(c)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCost(c88901771.ctcost)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c88901771.cttg)
e3:SetOperation(c88901771.ctop)
c:RegisterEffect(e3)
......@@ -62,10 +62,6 @@ function c88901771.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c88901771.ctcost(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 c88901771.ctfilter(c)
return c:IsFaceup() and c:IsCanAddCounter(0x1,1)
end
......
......@@ -9,7 +9,7 @@ function c88940154.initial_effect(c)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,88940154)
e1:SetCondition(c88940154.descon)
e1:SetCost(c88940154.descost)
e1:SetCost(aux.bfgcost)
e1:SetTarget(c88940154.destg)
e1:SetOperation(c88940154.desop)
c:RegisterEffect(e1)
......@@ -20,10 +20,6 @@ end
function c88940154.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c88940154.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c88940154.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 c88940154.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
......
......@@ -19,7 +19,7 @@ function c90432163.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,90432164)
e2:SetCost(c90432163.thcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c90432163.thtg)
e2:SetOperation(c90432163.thop)
c:RegisterEffect(e2)
......@@ -52,10 +52,6 @@ function c90432163.operation(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e2)
end
end
function c90432163.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 c90432163.thfilter(c)
return c:IsSetCard(0x10db) and not c:IsCode(90432163) and c:IsAbleToHand()
end
......
......@@ -16,7 +16,7 @@ function c91231901.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(aux.exccon)
e2:SetCost(c91231901.thcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c91231901.thtg)
e2:SetOperation(c91231901.thop)
c:RegisterEffect(e2)
......@@ -46,10 +46,6 @@ function c91231901.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
end
function c91231901.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 c91231901.thfilter(c)
return c:IsSetCard(0xc) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
......
......@@ -50,8 +50,8 @@ function c92609670.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c92609670.lvcost(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 c92609670.lvfilter(c)
return c:IsFaceup() and c:IsSetCard(0x106f) and c:GetLevel()>1
......
......@@ -7,15 +7,11 @@ function c92826944.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCost(c92826944.cost)
e1:SetCost(aux.bfgcost)
e1:SetTarget(c92826944.target)
e1:SetOperation(c92826944.operation)
c:RegisterEffect(e1)
end
function c92826944.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 c92826944.filter(c,e,tp)
return c:IsRace(RACE_ZOMBIE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
......
......@@ -9,7 +9,7 @@ function c93830681.initial_effect(c)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,93830681)
e1:SetCondition(c93830681.condition)
e1:SetCost(c93830681.cost)
e1:SetCost(aux.bfgcost)
e1:SetTarget(c93830681.target)
e1:SetOperation(c93830681.operation)
c:RegisterEffect(e1)
......@@ -18,10 +18,6 @@ function c93830681.condition(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttackTarget()
return at and at:IsControler(tp) and at:IsFaceup() and at:IsRace(RACE_FISH+RACE_SEASERPENT+RACE_AQUA)
end
function c93830681.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 c93830681.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tg=Duel.GetAttacker()
if chkc then return chkc==tg end
......
......@@ -8,15 +8,11 @@ function c94081496.initial_effect(c)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_GRAVE)
e1:SetCost(c94081496.cost)
e1:SetCost(aux.bfgcost)
e1:SetTarget(c94081496.target)
e1:SetOperation(c94081496.operation)
c:RegisterEffect(e1)
end
function c94081496.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 c94081496.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tc=eg:GetFirst()
if chkc then return chkc==tc end
......
......@@ -6,15 +6,11 @@ function c9411399.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCost(c9411399.cost)
e1:SetCost(aux.bfgcost)
e1:SetTarget(c9411399.target)
e1:SetOperation(c9411399.operation)
c:RegisterEffect(e1)
end
function c9411399.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 c9411399.filter(c,e,sp)
return c:IsCode(9411399) and c:IsCanBeSpecialSummoned(e,0,sp,false,false)
end
......
......@@ -47,8 +47,8 @@ function c94454495.spcon(e,tp,eg,ep,ev,re,r,rp)
return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT)
end
function c94454495.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 c94454495.spfilter(c,e,tp)
return c:IsSetCard(0xd2) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
......@@ -20,12 +20,11 @@ function c94919024.initial_effect(c)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCondition(c94919024.condition)
e2:SetCost(c94919024.cost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c94919024.target)
e2:SetOperation(c94919024.operation)
c:RegisterEffect(e2)
end
function c94919024.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT)
end
......@@ -55,10 +54,6 @@ function c94919024.condition(e,tp,eg,ep,ev,re,r,rp)
return g and g:IsExists(c94919024.filter,1,nil,tp)
and Duel.IsChainNegatable(ev)
end
function c94919024.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 c94919024.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)
......
......@@ -7,7 +7,7 @@ function c95360850.initial_effect(c)
e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e1:SetRange(LOCATION_GRAVE)
e1:SetCondition(c95360850.atkcon)
e1:SetCost(c95360850.atkcost)
e1:SetCost(aux.bfgcost)
e1:SetOperation(c95360850.atkop)
c:RegisterEffect(e1)
end
......@@ -17,10 +17,6 @@ function c95360850.atkcon(e,tp,eg,ep,ev,re,r,rp)
e:SetLabelObject(tc)
return tc and tc:IsControler(tp)
end
function c95360850.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 c95360850.atkop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:IsRelateToBattle() then
......
......@@ -11,7 +11,7 @@ function c95448692.initial_effect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(c95448692.cost2)
e2:SetCost(aux.bfgcost)
e2:SetOperation(c95448692.activate2)
c:RegisterEffect(e2)
end
......@@ -30,10 +30,6 @@ function c95448692.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,95448692,RESET_PHASE+PHASE_END,0,1)
end
function c95448692.cost2(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 c95448692.activate2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,95448692)~=0 then return end
c95448692[tp]=0
......
......@@ -7,15 +7,11 @@ function c96146814.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCost(c96146814.cost)
e1:SetCost(aux.bfgcost)
e1:SetTarget(c96146814.target)
e1:SetOperation(c96146814.operation)
c:RegisterEffect(e1)
end
function c96146814.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 c96146814.filter(c)
return not c:IsType(TYPE_LINK)
end
......
......@@ -16,7 +16,7 @@ function c96345188.initial_effect(c)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,96345188)
e2:SetCondition(c96345188.thcon)
e2:SetCost(c96345188.thcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c96345188.thtg)
e2:SetOperation(c96345188.thop)
c:RegisterEffect(e2)
......@@ -61,10 +61,6 @@ end
function c96345188.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetTurnID()==Duel.GetTurnCount() and not e:GetHandler():IsReason(REASON_RETURN)
end
function c96345188.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 c96345188.thfilter(c)
return c:IsSetCard(0xba) and not c:IsCode(96345188) and c:IsAbleToHand()
end
......
......@@ -8,7 +8,7 @@ function c96427353.initial_effect(c)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetRange(LOCATION_GRAVE)
e1:SetCondition(c96427353.condition)
e1:SetCost(c96427353.cost)
e1:SetCost(aux.bfgcost)
e1:SetTarget(c96427353.target)
e1:SetOperation(c96427353.operation)
c:RegisterEffect(e1)
......@@ -20,10 +20,6 @@ function c96427353.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and Duel.GetAttackTarget()==nil
and Duel.IsExistingMatchingCard(c96427353.cfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler())
end
function c96427353.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 c96427353.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tg=Duel.GetAttacker()
if chkc then return chkc==tg end
......
......@@ -21,7 +21,7 @@ function c9659580.initial_effect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCost(c9659580.thcost)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c9659580.thtg)
e3:SetOperation(c9659580.thop)
c:RegisterEffect(e3)
......@@ -79,10 +79,6 @@ function c9659580.lpop(e,tp,eg,ep,ev,re,r,rp)
Duel.SetLP(1-tp,math.ceil(Duel.GetLP(1-tp)/2))
end
end
function c9659580.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 c9659580.thfilter(c)
return c:IsSetCard(0xe3) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
......
......@@ -20,7 +20,7 @@ function c98431356.initial_effect(c)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,98431356)
e2:SetCost(c98431356.spcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c98431356.sptg)
e2:SetOperation(c98431356.spop)
c:RegisterEffect(e2)
......@@ -58,10 +58,6 @@ end
function c98431356.valcon(e,re,r,rp)
return bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0
end
function c98431356.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 c98431356.spfilter(c,e,tp)
return c:IsSetCard(0x10db) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
......
......@@ -21,7 +21,7 @@ function c98918572.initial_effect(c)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_GRAVE)
e3:SetCost(c98918572.xyzcost)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c98918572.xyztg)
e3:SetOperation(c98918572.xyzop)
c:RegisterEffect(e3)
......@@ -42,10 +42,6 @@ function c98918572.rop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.SelectMatchingCard(tp,c98918572.rfilter,tp,LOCATION_MZONE,0,1,1,rc,ct)
tg:GetFirst():RemoveOverlayCard(tp,ct,ct,REASON_COST)
end
function c98918572.xyzcost(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 c98918572.xyzfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0xf1)
end
......
......@@ -17,7 +17,7 @@ function c99274184.initial_effect(c)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c99274184.discon)
e2:SetCost(c99274184.discost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c99274184.distg)
e2:SetOperation(c99274184.disop)
c:RegisterEffect(e2)
......@@ -60,10 +60,6 @@ function c99274184.discon(e,tp,eg,ep,ev,re,r,rp)
return tg and tg:IsExists(c99274184.tgfilter,1,nil,tp) and Duel.IsChainDisablable(ev)
and aux.exccon(e,tp,eg,ep,ev,re,r,rp)
end
function c99274184.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 c99274184.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)
......
......@@ -18,7 +18,7 @@ function c99315585.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,99315586)
e2:SetCost(c99315585.regcost)
e2:SetCost(aux.bfgcost)
e2:SetOperation(c99315585.regop)
c:RegisterEffect(e2)
end
......@@ -40,10 +40,6 @@ function c99315585.atkop(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e1)
end
end
function c99315585.regcost(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 c99315585.regop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
......
......@@ -17,7 +17,7 @@ function c99330325.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(aux.exccon)
e2:SetCost(c99330325.thcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c99330325.thtg)
e2:SetOperation(c99330325.thop)
c:RegisterEffect(e2)
......@@ -79,10 +79,6 @@ function c99330325.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummonComplete()
end
end
function c99330325.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 c99330325.thfilter(c)
return c:IsSetCard(0xd3) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
......
......@@ -1364,3 +1364,8 @@ function Auxiliary.NecroValleyFilter(f)
return f(target,...) and not (target:IsHasEffect(EFFECT_NECRO_VALLEY) and Duel.IsChainDisablable(0))
end
end
--shortcut for self-banish costs
function Auxiliary.bfgcost(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
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