Commit 040283cf authored by mercury233's avatar mercury233 Committed by GitHub

fix EFFECT_INDESTRUCTABLE_EFFECT of certain reason effect handler (#1786)

parent 5be864c8
......@@ -53,6 +53,12 @@ function c72427512.desop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c72427512.efilter(e,re,rp)
local race=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_RACE)
return re:IsActiveType(TYPE_MONSTER) and e:GetHandler():IsRace(race)
if not re:IsActiveType(TYPE_MONSTER) then return false end
local rc=re:GetHandler()
if (re:IsActivated() and rc:IsRelateToEffect(re) or not re:IsHasProperty(EFFECT_FLAG_FIELD_ONLY))
and (rc:IsFaceup() or not rc:IsLocation(LOCATION_MZONE)) then
return e:GetHandler():IsRace(rc:GetRace())
else
return e:GetHandler():IsRace(rc:GetOriginalRace())
end
end
......@@ -59,7 +59,14 @@ function c90835938.indes(e,c)
return c:IsAttribute(ATTRIBUTE_DARK)
end
function c90835938.efilter(e,re)
return re:IsActiveType(TYPE_MONSTER) and Duel.GetChainInfo(0,CHAININFO_TRIGGERING_ATTRIBUTE)&ATTRIBUTE_DARK~=0
if not re:IsActiveType(TYPE_MONSTER) then return false end
local rc=re:GetHandler()
if (re:IsActivated() and rc:IsRelateToEffect(re) or not re:IsHasProperty(EFFECT_FLAG_FIELD_ONLY))
and (rc:IsFaceup() or not rc:IsLocation(LOCATION_MZONE)) then
return rc:IsAttribute(ATTRIBUTE_DARK)
else
return rc:GetOriginalAttribute()&ATTRIBUTE_DARK~=0
end
end
function c90835938.rmcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -59,8 +59,14 @@ end
function c92015800.indval1(e,c)
return c:GetBattleTarget():GetAttribute()&c:GetAttribute()~=0
end
function c92015800.indval2(e,te,rp)
return rp==1-e:GetHandlerPlayer() and te:IsActivated() and te:GetHandler():GetAttribute()&e:GetHandler():GetAttribute()~=0
function c92015800.indval2(e,re,rp)
if not (rp==1-e:GetHandlerPlayer() and re:IsActivated() and re:IsActiveType(TYPE_MONSTER)) then return false end
local rc=re:GetHandler()
if rc:IsRelateToEffect(re) and rc:IsControler(rp) and (rc:IsFaceup() or not rc:IsLocation(LOCATION_MZONE)) then
return e:GetHandler():IsAttribute(rc:GetAttribute())
else
return e:GetHandler():IsAttribute(rc:GetOriginalAttribute())
end
end
function c92015800.xyzfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsCanOverlay()
......
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