magarena/release/Magarena/scripts/Lowland_Basilisk.groovy

23 lines
811 B
Groovy

[
new MagicWhenDamageIsDealtTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicDamage damage) {
return (damage.getSource() == permanent &&
damage.getTarget().isCreature()) ?
new MagicEvent(
permanent,
damage.getTarget(),
this,
"Destroy RN at end of combat."
):
MagicEvent.NONE;
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
game.doAction(new MagicChangeStateAction(event.getRefPermanent(),MagicPermanentState.DestroyAtEndOfCombat,true));
}
}
]