Commit 4f8805dd authored by nekrozar's avatar nekrozar

use aux.bfgcost

parent 8a1ab435
......@@ -13,14 +13,10 @@ function c164710.initial_effect(c)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e2:SetCost(c164710.lvcost)
e2:SetCost(aux.bfgcost)
e2:SetOperation(c164710.lvop)
c:RegisterEffect(e2)
end
function c164710.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 c164710.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local hg=Duel.GetMatchingGroup(Card.IsLevelAbove,tp,LOCATION_HAND,LOCATION_HAND,nil,1)
......
......@@ -7,7 +7,7 @@ function c16516630.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_GRAVE)
e1:SetCondition(c16516630.condition)
e1:SetCost(c16516630.cost)
e1:SetCost(aux.bfgcost)
e1:SetTarget(c16516630.target)
e1:SetOperation(c16516630.operation)
c:RegisterEffect(e1)
......@@ -15,10 +15,6 @@ end
function c16516630.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1
end
function c16516630.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 c16516630.filter(c)
return c:IsFaceup() and c:IsSetCard(0x33)
end
......
......@@ -17,7 +17,7 @@ function c29795530.initial_effect(c)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(aux.exccon)
e2:SetCost(c29795530.lvcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c29795530.lvtg)
e2:SetOperation(c29795530.lvop)
c:RegisterEffect(e2)
......@@ -41,10 +41,6 @@ function c29795530.activate(e,tp,eg,ep,ev,re,r,rp)
tc=g:GetNext()
end
end
function c29795530.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 c29795530.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c29795530.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c29795530.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
......
......@@ -15,15 +15,11 @@ function c31826057.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(c31826057.cost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c31826057.target2)
e2:SetOperation(c31826057.operation)
c:RegisterEffect(e2)
end
function c31826057.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 c31826057.filter(c)
return c:IsFaceup() and c:IsSetCard(0x1066)
end
......
......@@ -7,17 +7,13 @@ function c52913738.initial_effect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCondition(c52913738.regcon)
e1:SetCost(c52913738.regcost)
e1:SetCost(aux.bfgcost)
e1:SetOperation(c52913738.regop)
c:RegisterEffect(e1)
end
function c52913738.regcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1
end
function c52913738.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 c52913738.regop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
......
......@@ -7,15 +7,11 @@ function c60234913.initial_effect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_GRAVE)
e1:SetCost(c60234913.utcost)
e1:SetCost(aux.bfgcost)
e1:SetTarget(c60234913.uttg)
e1:SetOperation(c60234913.utop)
c:RegisterEffect(e1)
end
function c60234913.utcost(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 c60234913.filter(c)
return c:IsFaceup() and c:IsType(TYPE_RITUAL)
end
......
......@@ -7,7 +7,7 @@ function c60741115.initial_effect(c)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_GRAVE)
e1:SetCondition(c60741115.condition)
e1:SetCost(c60741115.cost)
e1:SetCost(aux.bfgcost)
e1:SetOperation(c60741115.operation)
c:RegisterEffect(e1)
end
......@@ -22,10 +22,6 @@ function c60741115.condition(e,tp,eg,ep,ev,re,r,rp)
or Duel.IsPlayerAffectedByEffect(1,EFFECT_REVERSE_RECOVER)
end
end
function c60741115.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 c60741115.operation(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
--damage conversion
......
......@@ -9,7 +9,7 @@ function c60990740.initial_effect(c)
e1:SetCountLimit(1,60990740)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCondition(c60990740.condition)
e1:SetCost(c60990740.cost)
e1:SetCost(aux.bfgcost)
e1:SetTarget(c60990740.target)
e1:SetOperation(c60990740.operation)
c:RegisterEffect(e1)
......@@ -26,10 +26,6 @@ end
function c60990740.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c60990740.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 c60990740.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
......
......@@ -15,7 +15,7 @@ function c6890729.initial_effect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(c6890729.thcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c6890729.thtg)
e2:SetOperation(c6890729.thop)
c:RegisterEffect(e2)
......@@ -69,10 +69,6 @@ function c6890729.activate(e,tp,eg,ep,ev,re,r,rp)
g:GetFirst():CompleteProcedure()
end
end
function c6890729.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 c6890729.thfilter(c)
return c:IsCode(6022371,85066822) and c:IsAbleToHand()
end
......
......@@ -15,15 +15,11 @@ function c68933343.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(c68933343.cost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c68933343.target2)
e2:SetOperation(c68933343.operation)
c:RegisterEffect(e2)
end
function c68933343.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 c68933343.filter(c)
return c:IsFaceup() and c:IsSetCard(0x1066) and c:IsLevelAbove(1)
end
......
......@@ -10,7 +10,7 @@ function c69764158.initial_effect(c)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1)
e1:SetCondition(c69764158.descon)
e1:SetCost(c69764158.descost)
e1:SetCost(aux.bfgcost)
e1:SetTarget(c69764158.destg)
e1:SetOperation(c69764158.desop)
c:RegisterEffect(e1)
......@@ -18,10 +18,6 @@ end
function c69764158.descon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and (bit.band(r,REASON_BATTLE)~=0 or (bit.band(r,REASON_EFFECT)~=0 and rp==1-tp))
end
function c69764158.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 c69764158.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
......
......@@ -19,7 +19,7 @@ function c70238111.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCondition(c70238111.spcon)
e2:SetCost(c70238111.spcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c70238111.sptg)
e2:SetOperation(c70238111.spop)
c:RegisterEffect(e2)
......@@ -62,10 +62,6 @@ end
function c70238111.spcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c70238111.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c70238111.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 c70238111.spfilter2(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x101) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
......
......@@ -17,7 +17,7 @@ function c70628672.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,70628672)
e2:SetCost(c70628672.thcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c70628672.thtg)
e2:SetOperation(c70628672.thop)
c:RegisterEffect(e2)
......@@ -43,10 +43,6 @@ function c70628672.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
end
function c70628672.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 c70628672.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x16) and c:IsAbleToHand()
end
......
......@@ -6,15 +6,11 @@ function c83991690.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCost(c83991690.cost)
e1:SetCost(aux.bfgcost)
e1:SetTarget(c83991690.target)
e1:SetOperation(c83991690.operation)
c:RegisterEffect(e1)
end
function c83991690.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 c83991690.filter(c)
return c:IsFaceup() and c:IsLevelBelow(4) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_FAIRY) and not c:IsType(TYPE_TUNER)
end
......
......@@ -21,7 +21,7 @@ function c84899094.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,84899094)
e2:SetCost(c84899094.spcost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c84899094.sptg)
e2:SetOperation(c84899094.spop)
c:RegisterEffect(e2)
......@@ -51,10 +51,6 @@ function c84899094.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(eg,REASON_EFFECT)
end
end
function c84899094.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 c84899094.spfilter(c,e,tp,zone)
return c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE,tp,zone)
end
......
......@@ -9,7 +9,7 @@ function c88305978.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_GRAVE)
e1:SetCondition(c88305978.condition)
e1:SetCost(c88305978.cost)
e1:SetCost(aux.bfgcost)
e1:SetTarget(c88305978.target)
e1:SetOperation(c88305978.operation)
c:RegisterEffect(e1)
......@@ -18,10 +18,6 @@ function c88305978.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
end
function c88305978.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 c88305978.filter(c,e,tp)
return c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
......
......@@ -6,15 +6,11 @@ function c89252157.initial_effect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,89252157)
e1:SetCost(c89252157.spcost)
e1:SetCost(aux.bfgcost)
e1:SetTarget(c89252157.sptg)
e1:SetOperation(c89252157.spop)
c:RegisterEffect(e1)
end
function c89252157.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 c89252157.spfilter(c,e,tp)
return c:IsRace(RACE_PLANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
......
......@@ -36,7 +36,7 @@ function c9212051.initial_effect(c)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_GRAVE)
e3:SetHintTiming(0,TIMING_END_PHASE)
e3:SetCost(c9212051.spcost)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c9212051.sptg)
e3:SetOperation(c9212051.spop)
c:RegisterEffect(e3)
......@@ -98,10 +98,6 @@ function c9212051.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
function c9212051.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 c9212051.spfilter(c,e,tp)
return c:IsSetCard(0xee) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
......
......@@ -15,15 +15,11 @@ function c94331452.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(c94331452.cost)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c94331452.target2)
e2:SetOperation(c94331452.operation)
c:RegisterEffect(e2)
end
function c94331452.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 c94331452.filter(c)
return c:IsFaceup() and c:IsSetCard(0x1066)
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