magarena/release/Magarena/scripts/Enchantress_s_Presence.groovy

20 lines
677 B
Groovy

[
new MagicWhenOtherSpellIsCastTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicCardOnStack spell) {
return (permanent.isFriend(spell) &&
spell.getCardDefinition().isEnchantment()) ?
new MagicEvent(
permanent,
this,
"PN draw a card."
):
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new MagicDrawAction(event.getPlayer()));
}
}
]