27 lines
942 B
Groovy
27 lines
942 B
Groovy
|
[
|
||
|
new MagicWhenBecomesBlockedTrigger() {
|
||
|
@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
|
||
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
||
|
final MagicPlayer opponent = event.getPlayer();
|
||
|
if (opponent.controlsPermanentWithType(MagicType.Land)) {
|
||
|
game.addEvent(new MagicSacrificePermanentEvent(
|
||
|
event.getPermanent(),
|
||
|
opponent,
|
||
|
MagicTargetChoice.SACRIFICE_LAND
|
||
|
));
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
]
|