magarena/release/Magarena/scripts/Thresher_Beast.groovy

27 lines
934 B
Groovy
Raw Normal View History

2013-05-18 00:08:32 -07:00
[
new MagicWhenBecomesBlockedTrigger() {
2013-04-12 19:32:25 -07:00
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent blocked) {
return (permanent == blocked) ?
new MagicEvent(
permanent,
permanent.getOpponent(),
this,
"PN sacrifices a land."
):
MagicEvent.NONE;
}
@Override
2013-05-18 00:08:32 -07:00
public void executeEvent(final MagicGame game, final MagicEvent event) {
2013-04-12 19:32:25 -07:00
final MagicPlayer opponent = event.getPlayer();
if (opponent.controlsPermanent(MagicType.Land)) {
2013-04-12 19:32:25 -07:00
game.addEvent(new MagicSacrificePermanentEvent(
event.getPermanent(),
opponent,
MagicTargetChoice.SACRIFICE_LAND
));
}
}
2013-05-18 00:08:32 -07:00
}
]