Commit f601767d authored by DailyShana's avatar DailyShana

refine #307

parent 931738bb
......@@ -6,7 +6,6 @@ function c28265983.initial_effect(c)
e0:SetDescription(aux.Stringid(28265983,0))
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetTarget(c28265983.target)
c:RegisterEffect(e0)
--activate(destroy)
local e1=Effect.CreateEffect(c)
......@@ -28,28 +27,18 @@ function c28265983.initial_effect(c)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(28265983,2))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetType(EFFECT_TYPE_ACTIVATE)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,28265984)
e3:SetCondition(c28265983.descon2)
e3:SetCost(c28265983.descost2)
e3:SetTarget(c28265983.destg2)
e3:SetOperation(c28265983.desop2)
c:RegisterEffect(e3)
end
function c28265983.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local b=c28265983.descon2(e,tp,eg,ep,ev,re,r,rp) and c28265983.descost2(e,tp,eg,ep,ev,re,r,rp,0) and c28265983.destg2(e,tp,eg,ep,ev,re,r,rp,0)
if b and Duel.SelectYesNo(tp,94) then
e:SetCategory(CATEGORY_DESTROY)
e:SetOperation(c28265983.desop2)
c28265983.descost2(e,tp,eg,ep,ev,re,r,rp,1)
c28265983.destg2(e,tp,eg,ep,ev,re,r,rp,1)
else
e:SetCategory(0)
e:SetOperation(nil)
end
local e4=e3:Clone()
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetRange(LOCATION_SZONE)
c:RegisterEffect(e4)
end
function c28265983.descon1(e,tp,eg,ep,ev,re,r,rp)
return ep==tp
......
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