25 lines
824 B
Groovy
25 lines
824 B
Groovy
[
|
|
new MagicWhenAttacksUnblockedTrigger() {
|
|
@Override
|
|
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent creature) {
|
|
return (creature == permanent) ?
|
|
new MagicEvent(
|
|
permanent,
|
|
permanent.getOpponent(),
|
|
this,
|
|
"PN loses 1 life for each card in his or her graveyard."
|
|
):
|
|
MagicEvent.NONE;
|
|
}
|
|
|
|
@Override
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
|
final MagicPlayer player = event.getPlayer();
|
|
game.doAction(new MagicChangeLifeAction(
|
|
player,
|
|
-player.getGraveyard().size()
|
|
));
|
|
}
|
|
}
|
|
]
|