Rabidragon
2016-06-12T10:13:52Z
My card's effect means it destroys itself when its DEF is 0. For whatever reason, this isn't working. If anybody could help that'd be great:

local e5=Effect.CreateEffect(c)
e5:SetType(EfFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetRange(LOCATION_MZONE)
e5:SetCode(EFFECT_SELF_DESTROY)
e5:SetCondition(c148.destroy)
c:RegisterEffect(e5)
end

function c148.destroy(e)
local c=e:GetHandler()
return (c:GetDefense()==0)
end

I copied this from Earthbound Immortal Uru whom's effect is to destroy himself if there's no field spell. I thought I'd just be able to change it so we returned if the card's defense was 0 instead, but as said, it's not working.

EDIT: I have ammended the code, and it works.
Tegardee
2016-06-12T13:56:18Z
change: (c:GetDefense()==0)

to: (c:GetDefence()==0)