magarena/release/Magarena/scripts/Rage_Thrower.groovy

26 lines
1.0 KiB
Groovy

[
new MagicWhenOtherPutIntoGraveyardFromPlayTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent otherPermanent) {
return (permanent != otherPermanent &&
otherPermanent.isCreature()) ?
new MagicEvent(
permanent,
MagicTargetChoice.NEG_TARGET_PLAYER,
this,
"SN deals 2 damage to target player\$."
):
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetPlayer(game,new MagicPlayerAction() {
public void doAction(final MagicPlayer player) {
final MagicDamage damage = new MagicDamage(event.getSource(),player,2);
game.doAction(new MagicDealDamageAction(damage));
}
});
}
}
]