Commit d2241b7a authored by DailyShana's avatar DailyShana

update

parent bf7ea1b4
......@@ -35,19 +35,9 @@ function c44508094.condition(e,tp,eg,ep,ev,re,r,rp)
local ex,tg,tc=Duel.GetOperationInfo(ev,CATEGORY_DESTROY)
return ex and tg~=nil and tc+tg:FilterCount(Card.IsOnField,nil)-tg:GetCount()>0
end
function c44508094.cfcost(c)
return c:IsCode(84012625) and c:IsAbleToRemoveAsCost()
end
function c44508094.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=e:GetHandler():IsReleasable()
local b2=Duel.IsExistingMatchingCard(c44508094.cfcost,tp,LOCATION_GRAVE,0,1,nil)
if chk==0 then return b1 or b2 end
if b2 and (not b1 or Duel.SelectYesNo(tp,aux.Stringid(84012625,0))) then
local tg=Duel.GetFirstMatchingCard(c44508094.cfcost,tp,LOCATION_GRAVE,0,nil)
Duel.Remove(tg,POS_FACEUP,REASON_COST)
else
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
end
function c44508094.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
......@@ -41,19 +41,9 @@ end
function c74892653.condition(e,tp,eg,ep,ev,re,r,rp)
return tp~=ep and Duel.GetCurrentChain()==0
end
function c74892653.cfcost(c)
return c:IsCode(84012625) and c:IsAbleToRemoveAsCost()
end
function c74892653.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=e:GetHandler():IsReleasable()
local b2=Duel.IsExistingMatchingCard(c74892653.cfcost,tp,LOCATION_GRAVE,0,1,nil)
if chk==0 then return b1 or b2 end
if b2 and (not b1 or Duel.SelectYesNo(tp,aux.Stringid(84012625,0))) then
local tg=Duel.GetFirstMatchingCard(c74892653.cfcost,tp,LOCATION_GRAVE,0,nil)
Duel.Remove(tg,POS_FACEUP,REASON_COST)
else
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
end
function c74892653.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
......@@ -9,6 +9,15 @@ function c84012625.initial_effect(c)
e1:SetTarget(c84012625.target)
e1:SetOperation(c84012625.activate)
c:RegisterEffect(e1)
--release replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_RELEASE_REPLACE)
e2:SetRange(LOCATION_GRAVE)
e2:SetTarget(c84012625.reptg)
e2:SetValue(c84012625.repval)
e2:SetOperation(c84012625.repop)
c:RegisterEffect(e2)
end
function c84012625.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsAbleToEnterBP() or (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
......@@ -44,3 +53,19 @@ function c84012625.tdop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetBattleTarget()
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
function c84012625.repfilter(c,tp,re)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE)
and c:IsSetCard(0xa3) and c:IsType(TYPE_SYNCHRO) and c:IsReason(REASON_COST)
and c==re:GetHandler() and not c:IsReason(REASON_REPLACE)
end
function c84012625.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c84012625.repfilter,1,nil,tp,re)
and e:GetHandler():IsAbleToRemoveAsCost() end
return Duel.SelectYesNo(tp,aux.Stringid(84012625,0))
end
function c84012625.repval(e,c)
return c84012625.repfilter(c,e:GetHandlerPlayer(),c:GetReasonEffect())
end
function c84012625.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST+REASON_REPLACE)
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