magarena/release/Magarena/scripts/Berserk_Murlodont.groovy

29 lines
953 B
Groovy
Raw Normal View History

2013-04-12 19:58:51 -07:00
[
new MagicWhenBecomesBlockedTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent blocked) {
return blocked.hasSubType(MagicSubType.Beast) ?
new MagicEvent(
permanent,
blocked,
this,
"RN gets +1/+1 until end of turn for each creature blocking it."
):
MagicEvent.NONE;
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
final MagicPermanent blocked = event.getRefPermanent();
final int amount = blocked.getBlockingCreatures().size();
game.doAction(new MagicChangeTurnPTAction(
blocked,
amount,
amount
));
}
}
]