magarena/release/Magarena/scripts/Burst_of_Speed.groovy

23 lines
807 B
Groovy

[
new MagicSpellCardEvent() {
@Override
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
return new MagicEvent(
cardOnStack,
this,
"Creatures PN controls gain haste until end of turn."
);
}
@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 MagicSetAbilityAction(creature,MagicAbility.Haste));
}
}
}
]