magarena/release/Magarena/scripts/Goblin_Bushwhacker.groovy

28 lines
1022 B
Groovy
Raw Normal View History

2013-05-18 19:27:52 -07:00
[
new MagicWhenComesIntoPlayTrigger() {
@Override
public MagicEvent executeTrigger(
final MagicGame game,
final MagicPermanent permanent,
2013-06-23 18:29:26 -07:00
final MagicPayedCost payedCost) {
2013-06-19 07:23:35 -07:00
return payedCost.isKicked() ?
new MagicEvent(
permanent,
this,
2012-09-21 19:29:54 -07:00
"Creatures PN controls get +1/+0 and gain haste until end of turn."
):
MagicEvent.NONE;
}
2013-06-23 18:29:26 -07:00
2011-08-11 07:06:56 -07:00
@Override
2013-05-18 19:27:52 -07:00
public void executeEvent(final MagicGame game, final MagicEvent event) {
2013-06-23 18:29:26 -07:00
final Collection<MagicPermanent> targets =
game.filterPermanents(event.getPlayer(),MagicTargetFilter.TARGET_CREATURE_YOU_CONTROL);
for (final MagicPermanent creature : targets) {
2012-06-17 05:19:08 -07:00
game.doAction(new MagicChangeTurnPTAction(creature,1,0));
game.doAction(new MagicGainAbilityAction(creature,MagicAbility.Haste));
2013-06-23 18:29:26 -07:00
}
2012-06-17 05:19:08 -07:00
}
2013-05-18 19:27:52 -07:00
}
]