Commit ab378ba2 authored by salix5's avatar salix5

negate effect

They will not affect normal monsters.
parent 799b9e26
...@@ -44,7 +44,7 @@ function c24224830.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -44,7 +44,7 @@ function c24224830.activate(e,tp,eg,ep,ev,re,r,rp)
end end
function c24224830.distg(e,c) function c24224830.distg(e,c)
local tc=e:GetLabelObject() local tc=e:GetLabelObject()
return c:IsOriginalCodeRule(tc:GetOriginalCodeRule()) return c:IsOriginalCodeRule(tc:GetOriginalCodeRule()) and (c:IsType(TYPE_EFFECT) or c:GetOriginalType()&TYPE_EFFECT~=0)
end end
function c24224830.discon(e,tp,eg,ep,ev,re,r,rp) function c24224830.discon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject() local tc=e:GetLabelObject()
......
...@@ -51,7 +51,7 @@ function c41578483.initial_effect(c) ...@@ -51,7 +51,7 @@ function c41578483.initial_effect(c)
e5:SetCode(EFFECT_CANNOT_ATTACK) e5:SetCode(EFFECT_CANNOT_ATTACK)
e5:SetRange(LOCATION_MZONE) e5:SetRange(LOCATION_MZONE)
e5:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e5:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e5:SetTarget(c41578483.distg) e5:SetTarget(c41578483.atktg)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
function c41578483.can_equip_monster(c) function c41578483.can_equip_monster(c)
...@@ -121,9 +121,8 @@ function c41578483.disfilter(c) ...@@ -121,9 +121,8 @@ function c41578483.disfilter(c)
return c:IsFaceup() and c:GetFlagEffect(41578483)~=0 return c:IsFaceup() and c:GetFlagEffect(41578483)~=0
end end
function c41578483.distg(e,c) function c41578483.distg(e,c)
if c:IsFacedown() then return false end
local g=e:GetHandler():GetEquipGroup():Filter(c41578483.disfilter,nil) local g=e:GetHandler():GetEquipGroup():Filter(c41578483.disfilter,nil)
return g:IsExists(Card.IsCode,1,nil,c:GetCode()) return g:IsExists(Card.IsCode,1,nil,c:GetCode()) and (c:IsType(TYPE_EFFECT) or c:GetOriginalType()&TYPE_EFFECT~=0)
end end
function c41578483.discon(e,tp,eg,ep,ev,re,r,rp) function c41578483.discon(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetHandler():GetEquipGroup():Filter(c41578483.disfilter,nil) local g=e:GetHandler():GetEquipGroup():Filter(c41578483.disfilter,nil)
...@@ -133,3 +132,7 @@ end ...@@ -133,3 +132,7 @@ end
function c41578483.disop(e,tp,eg,ep,ev,re,r,rp) function c41578483.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev) Duel.NegateEffect(ev)
end end
function c41578483.atktg(e,c)
local g=e:GetHandler():GetEquipGroup():Filter(c41578483.disfilter,nil)
return g:IsExists(Card.IsCode,1,nil,c:GetCode())
end
...@@ -53,7 +53,7 @@ function c65681983.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -53,7 +53,7 @@ function c65681983.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE) e1:SetCode(EFFECT_DISABLE)
e1:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD) e1:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e1:SetTarget(c65681983.distg) e1:SetTarget(c65681983.distg1)
e1:SetLabelObject(tc) e1:SetLabelObject(tc)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
...@@ -69,13 +69,21 @@ function c65681983.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -69,13 +69,21 @@ function c65681983.activate(e,tp,eg,ep,ev,re,r,rp)
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetTarget(c65681983.distg) e3:SetTarget(c65681983.distg2)
e3:SetLabelObject(tc) e3:SetLabelObject(tc)
e3:SetReset(RESET_PHASE+PHASE_END) e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp) Duel.RegisterEffect(e3,tp)
end end
end end
function c65681983.distg(e,c) function c65681983.distg1(e,c)
local tc=e:GetLabelObject()
if c:IsType(TYPE_SPELL+TYPE_TRAP) then
return c:IsOriginalCodeRule(tc:GetOriginalCodeRule())
else
return c:IsOriginalCodeRule(tc:GetOriginalCodeRule()) and (c:IsType(TYPE_EFFECT) or c:GetOriginalType()&TYPE_EFFECT~=0)
end
end
function c65681983.distg2(e,c)
local tc=e:GetLabelObject() local tc=e:GetLabelObject()
return c:IsOriginalCodeRule(tc:GetOriginalCodeRule()) return c:IsOriginalCodeRule(tc:GetOriginalCodeRule())
end end
......
...@@ -16,7 +16,7 @@ function c82732705.initial_effect(c) ...@@ -16,7 +16,7 @@ function c82732705.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c82732705.disable(e,c) function c82732705.disable(e,c)
return c:IsType(TYPE_EFFECT) or bit.band(c:GetOriginalType(),TYPE_EFFECT)==TYPE_EFFECT return c:IsType(TYPE_EFFECT) or c:GetOriginalType()&TYPE_EFFECT~=0
end end
function c82732705.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c82732705.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end if chk==0 then return Duel.CheckLPCost(tp,1000) 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