Commit fd2da4d8 authored by DailyShana's avatar DailyShana

fix

parent de993ae1
......@@ -14,7 +14,6 @@ function c21250202.initial_effect(c)
e2:SetCode(EVENT_CHAIN_SOLVED)
e2:SetRange(LOCATION_PZONE)
e2:SetOperation(c21250202.regop2)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
......@@ -41,26 +40,30 @@ function c21250202.initial_effect(c)
e4:SetOperation(c21250202.disop)
c:RegisterEffect(e4)
end
function c21250202.regfilter(c)
return c:IsType(TYPE_PENDULUM) and c:IsType(TYPE_MONSTER) and c:IsFaceup() and c:IsSetCard(0x99)
function c21250202.regfilter(c,tp)
return c:IsLocation(LOCATION_MZONE) and c:IsControler(tp)
and c:IsType(TYPE_PENDULUM) and c:IsFaceup() and c:IsSetCard(0x99)
end
function c21250202.regop1(e,tp,eg,ep,ev,re,r,rp)
if rp==tp or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) or eg:GetCount()~=1
or not eg:IsExists(c21250202.regfilter,1,nil) then
e:SetLabelObject(nil)
else e:SetLabelObject(re) end
if rp~=tp and eg:GetCount()==1 and eg:IsExists(c21250202.regfilter,1,nil,tp) then
e:GetHandler():RegisterFlagEffect(21250202,RESET_EVENT+0x1fe0000+RESET_CHAIN,0,1,ev)
end
end
function c21250202.regop2(e,tp,eg,ep,ev,re,r,rp)
local pe=e:GetLabelObject():GetLabelObject()
if pe and pe==re then
e:GetHandler():RegisterFlagEffect(21250202,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
local c=e:GetHandler()
local chain_ct={c:GetFlagEffectLabel(21250202)}
for i=1,#chain_ct do
if chain_ct[i]==ev then
c:RegisterFlagEffect(21250203,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
return
end
end
end
function c21250202.penfilter(c)
return c:IsSetCard(0x99) and c:IsType(TYPE_PENDULUM) and c:IsFaceup() and not c:IsCode(21250202) and not c:IsForbidden()
return c:IsFaceup() and c:IsSetCard(0x99) and c:IsType(TYPE_PENDULUM) and not c:IsCode(21250202) and not c:IsForbidden()
end
function c21250202.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(21250202)~=0
return e:GetHandler():GetFlagEffect(21250203)~=0
end
function c21250202.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......@@ -82,7 +85,7 @@ function c21250202.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c21250202.disfilter(c)
return c:IsFaceup() and c:GetSummonLocation()==LOCATION_EXTRA and not c:IsDisabled()
return aux.disfilter1(c) and c:GetSummonLocation()==LOCATION_EXTRA
end
function c21250202.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c21250202.disfilter(chkc) 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