magarena/release/Magarena/scripts/Dingus_Egg.groovy

28 lines
877 B
Groovy

[
new MagicWhenOtherDiesTrigger() {
@Override
public MagicEvent executeTrigger(
final MagicGame game,
final MagicPermanent permanent,
final MagicPermanent otherPermanent) {
return (otherPermanent.isLand()) ?
new MagicEvent(
permanent,
otherPermanent.getController(),
this,
"SN deals 2 damage to PN."
) :
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
final MagicDamage damage = new MagicDamage(
event.getSource(),
event.getPlayer(),
2
);
game.doAction(new MagicDealDamageAction(damage));
}
}
]