Commit 1c6f84c7 authored by Chen Bill's avatar Chen Bill Committed by GitHub

update EVENT_REMOVE (#2401)

parent eeac7bfe
......@@ -47,13 +47,8 @@ function s.initial_effect(c)
Duel.RegisterEffect(ge1,0)
end
end
function s.checkfilter(c)
return not c:IsType(TYPE_TOKEN)
end
function s.checkop(e,tp,eg,ep,ev,re,r,rp)
if eg:IsExists(s.checkfilter,1,nil) then
Duel.RegisterFlagEffect(0,id,RESET_PHASE+PHASE_END,0,1)
end
Duel.RegisterFlagEffect(0,id,RESET_PHASE+PHASE_END,0,1)
end
function s.rmcon(e)
return Duel.GetFlagEffect(0,id)>0
......
......@@ -28,7 +28,7 @@ function s.initial_effect(c)
c:RegisterEffect(e2)
end
function s.cfilter(c)
return not c:IsType(TYPE_TOKEN) and c:IsFaceup() and c:IsRace(RACE_FISH)
return c:IsFaceup() and c:IsRace(RACE_FISH)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter,1,nil)
......
......@@ -20,7 +20,6 @@ function s.initial_effect(c)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_CUSTOM+id)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e2:SetCondition(s.mtcon)
e2:SetOperation(s.mtop)
c:RegisterEffect(e2)
aux.RegisterMergedDelayedEvent(c,id,EVENT_REMOVE)
......@@ -53,13 +52,6 @@ function s.xyzop(e,tp,chk)
or Duel.GetCustomActivityCount(id,1-tp,ACTIVITY_CHAIN)>0) end
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function s.remfilter(c)
return not c:IsType(TYPE_TOKEN)
end
function s.mtcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return eg:IsExists(s.remfilter,1,nil)
end
function s.mtop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not (c:IsRelateToChain() and c:IsType(TYPE_XYZ)) then return end
......
......@@ -44,13 +44,8 @@ function s.initial_effect(c)
Duel.RegisterEffect(ge1,0)
end
end
function s.checkfilter(c)
return not c:IsType(TYPE_TOKEN)
end
function s.checkop(e,tp,eg,ep,ev,re,r,rp)
if eg:IsExists(s.checkfilter,1,nil) then
Duel.RegisterFlagEffect(0,id,RESET_PHASE+PHASE_END,0,1)
end
Duel.RegisterFlagEffect(0,id,RESET_PHASE+PHASE_END,0,1)
end
function s.rmcon(e)
return Duel.GetFlagEffect(0,id)>0
......
......@@ -12,20 +12,13 @@ function c68073522.initial_effect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_REMOVE)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c68073522.condition)
e2:SetTarget(c68073522.target)
e2:SetOperation(c68073522.operation)
c:RegisterEffect(e2)
end
function c68073522.filter(c)
return not c:IsType(TYPE_TOKEN)
end
function c68073522.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c68073522.filter,1,nil)
end
function c68073522.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local ct=eg:FilterCount(c68073522.filter,nil)
local ct=#eg
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ct*500)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,0,0,tp,ct*500)
......
......@@ -69,7 +69,7 @@ function s.matchk(e,c)
ef:SetCountLimit(ct)
end
function s.sfilter(c,e,tp)
return not c:IsType(TYPE_TOKEN) and c:IsType(TYPE_MONSTER) and c:IsFaceup() and c:IsCanBeEffectTarget(e)
return c:IsType(TYPE_MONSTER) and c:IsFaceup() and c:IsCanBeEffectTarget(e)
and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
......@@ -42,7 +42,6 @@ function c96633955.initial_effect(c)
e6:SetRange(LOCATION_MZONE)
e6:SetCode(EVENT_REMOVE)
e6:SetCountLimit(1,96633955)
e6:SetCondition(c96633955.remcon)
e6:SetTarget(c96633955.remtg)
e6:SetOperation(c96633955.remop)
c:RegisterEffect(e6)
......@@ -64,12 +63,6 @@ function c96633955.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
return true
else return false end
end
function c96633955.remfilter(c)
return not c:IsType(TYPE_TOKEN)
end
function c96633955.remcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c96633955.remfilter,1,nil)
end
function c96633955.remtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil)
and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end
......
......@@ -14,7 +14,6 @@ function c99137266.initial_effect(c)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_REMOVE)
e2:SetCountLimit(1,99137266)
e2:SetCondition(c99137266.remcon)
e2:SetTarget(c99137266.remtg)
e2:SetOperation(c99137266.remop)
c:RegisterEffect(e2)
......@@ -30,12 +29,6 @@ function c99137266.initial_effect(c)
e3:SetOperation(c99137266.spop)
c:RegisterEffect(e3)
end
function c99137266.remfilter(c)
return not c:IsType(TYPE_TOKEN)
end
function c99137266.remcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c99137266.remfilter,1,nil)
end
function c99137266.rmfilter(c)
return (c:IsType(TYPE_SYNCHRO) and c:IsRace(RACE_WYRM) or c:IsSetCard(0x16b))
and c:IsAbleToRemove() and (c:IsFaceup() or not c:IsOnField())
......
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