magarena/release/Magarena/scripts/Shriekgeist.groovy

27 lines
944 B
Groovy
Raw Normal View History

2013-05-17 23:01:07 -07:00
[
new MagicWhenDamageIsDealtTrigger() {
2013-04-12 19:32:25 -07:00
@Override
public MagicEvent executeTrigger(
final MagicGame game,
final MagicPermanent permanent,
final MagicDamage damage) {
final MagicTarget target = damage.getTarget();
return (permanent == damage.getSource() &&
target.isPlayer() &&
damage.isCombat()) ?
new MagicEvent(
permanent,
damage.getTargetPlayer(),
this,
"PN puts the top two cards of " +
"his or her library into his or her graveyard."
):
MagicEvent.NONE;
}
@Override
2013-05-17 23:01:07 -07:00
public void executeEvent(final MagicGame game, final MagicEvent event) {
2013-04-12 19:32:25 -07:00
game.doAction(new MagicMillLibraryAction(event.getPlayer(),2));
}
2013-05-17 23:01:07 -07:00
}
]