magarena/release/Magarena/scripts/Goblin_Bushwhacker.groovy

28 lines
1022 B
Groovy

[
new MagicWhenComesIntoPlayTrigger() {
@Override
public MagicEvent executeTrigger(
final MagicGame game,
final MagicPermanent permanent,
final MagicPayedCost payedCost) {
return payedCost.isKicked() ?
new MagicEvent(
permanent,
this,
"Creatures PN controls get +1/+0 and gain haste until end of turn."
):
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
final Collection<MagicPermanent> targets =
game.filterPermanents(event.getPlayer(),MagicTargetFilter.TARGET_CREATURE_YOU_CONTROL);
for (final MagicPermanent creature : targets) {
game.doAction(new MagicChangeTurnPTAction(creature,1,0));
game.doAction(new MagicGainAbilityAction(creature,MagicAbility.Haste));
}
}
}
]