Umbra Mystic

Trying to implement Umbra Mystic, not entirely sure how to approach it.
If I make a TRIGGERED_ABILITY, is there a way to check whether a creature has been enchanted?
pseudocode of what I'd like to do:
If I make a TRIGGERED_ABILITY, is there a way to check whether a creature has been enchanted?
pseudocode of what I'd like to do:
- Code: Select all
<TRIGGER value="DESTROYED">
if (TriggerObject():GetController() == EffectController()) then
if (TriggerObject():IsEnchanted()) then
if (TriggerObject():GetChild():GetSubType() == ENCHANTMENT_TYPE_AURA) then
override = true
return true
else
return false
else
return false
else
return false
</TRIGGER>