I need to create an effect to disable the card's other effects if a certain other card is destroyed.
here is my effect script attempt.
function c00000000.initial_effect(c)
--self Negate
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e7:SetCategory(CATEGORY_NEGATE)
e7:SetRange(LOCATION_REMOVED)
e7:SetCode(EVENT_LEAVE_FIELD)
e7:SetCondition(c00000000.negcon2)
e7:SetOperation(c00000000.negop2)
c:RegisterEffect(e7)
end
function c00000000.negfilter(c,tp)
return c:GetPreviousControler()==tp and c:IsCode(********)
end
function c00000000.negcon2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c00000000.negfilter,1,nil,tp)
end
function c00000000.negop2(e,tp,eg,ep,ev,re,r,rp)
tc=c:IsCode(00000000)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_EFFECT)
tc:RegisterEffect(e3)
end
and yes, this effect should activate while this card is removed from play.
Edited by user
2016-06-06T13:55:51Z
|
Reason: Not specified