Commit 024ce996 authored by mercury233's avatar mercury233 Committed by GitHub

fix EFFECT_CANNOT_REMOVE (#2953)

parent 8cddc9a2
...@@ -48,7 +48,7 @@ end ...@@ -48,7 +48,7 @@ end
function s.rmlimit(e,c,rp,r,re) function s.rmlimit(e,c,rp,r,re)
local tp=e:GetHandlerPlayer() local tp=e:GetHandlerPlayer()
return c:IsControler(tp) and c:IsOnField() and c:IsCode(13331639) and c:IsFaceup() return c:IsControler(tp) and c:IsOnField() and c:IsCode(13331639) and c:IsFaceup()
and r&REASON_EFFECT~=0 and re:GetOwnerPlayer()~=tp and r&REASON_EFFECT~=0 and r&REASON_REDIRECT==0 and rp==1-tp
end end
function s.penfilter(c) function s.penfilter(c)
return c:IsSetCard(0x10f8) and c:IsType(TYPE_PENDULUM) and not c:IsCode(id) and not c:IsForbidden() return c:IsSetCard(0x10f8) and c:IsType(TYPE_PENDULUM) and not c:IsCode(id) and not c:IsForbidden()
......
...@@ -25,13 +25,6 @@ function s.initial_effect(c) ...@@ -25,13 +25,6 @@ function s.initial_effect(c)
e2:SetTargetRange(1,1) e2:SetTargetRange(1,1)
e2:SetTarget(s.efilter) e2:SetTarget(s.efilter)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(id)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(s.eftg)
c:RegisterEffect(e3)
--remove and tograve --remove and tograve
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_DECKDES) e4:SetCategory(CATEGORY_DECKDES)
...@@ -65,10 +58,9 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -65,10 +58,9 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.efilter(e,c,rp,r,re) function s.efilter(e,c,rp,r,re)
return c:IsHasEffect(id) and r&REASON_EFFECT>0 local tp=e:GetHandlerPlayer()
end return c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0x38) and c:IsFaceup()
function s.eftg(e,c) and r&REASON_EFFECT>0 and r&REASON_REDIRECT==0
return c:IsSetCard(0x38) and c:IsFaceup()
end end
function s.refilter(c) function s.refilter(c)
return c:IsSetCard(0x38) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() return c:IsSetCard(0x38) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
......
...@@ -32,7 +32,7 @@ end ...@@ -32,7 +32,7 @@ end
function s.rmlimit(e,c,rp,r,re) function s.rmlimit(e,c,rp,r,re)
local tp=e:GetHandlerPlayer() local tp=e:GetHandlerPlayer()
return c:IsControler(tp) and c:IsOnField() and c:IsSetCard(0xea) and c:IsFaceup() return c:IsControler(tp) and c:IsOnField() and c:IsSetCard(0xea) and c:IsFaceup()
and r&REASON_EFFECT~=0 and re:GetOwnerPlayer()~=tp and r&REASON_EFFECT~=0 and r&REASON_REDIRECT==0 and rp==1-tp
end end
function s.cfilter(c) function s.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xea) and c:IsType(TYPE_SYNCHRO) return c:IsFaceup() and c:IsSetCard(0xea) and c:IsType(TYPE_SYNCHRO)
......
...@@ -74,7 +74,8 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -74,7 +74,8 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp)
end end
function s.efilter(e,c,rp,r,re) function s.efilter(e,c,rp,r,re)
local tp=e:GetHandlerPlayer() local tp=e:GetHandlerPlayer()
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and re and r&REASON_EFFECT>0 and rp==1-tp return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE)
and r&REASON_EFFECT>0 and r&REASON_REDIRECT==0 and rp==1-tp
end end
function s.rmfilter(c,code) function s.rmfilter(c,code)
return c:IsFaceupEx() and c:IsCode(code) and c:IsAbleToRemove() return c:IsFaceupEx() and c:IsCode(code) and c:IsAbleToRemove()
......
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