magarena/release/Magarena/scripts/Turn_the_Tide.groovy

22 lines
830 B
Groovy
Raw Normal View History

2013-04-01 06:58:27 -07:00
[
new MagicSpellCardEvent() {
2012-06-17 05:19:08 -07:00
@Override
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
return new MagicEvent(
2013-04-01 06:58:27 -07:00
cardOnStack,
this,
"Creatures your opponent controls get -2/-0 until end of turn."
);
2012-06-17 05:19:08 -07:00
}
@Override
2013-06-15 07:01:56 -07:00
public void executeEvent(final MagicGame game, final MagicEvent event) {
2012-09-01 19:59:19 -07:00
final MagicPlayer opponent=event.getPlayer().getOpponent();
final Collection<MagicPermanent> targets=
game.filterPermanents(opponent,MagicTargetFilter.TARGET_CREATURE_YOU_CONTROL);
for (final MagicPermanent target : targets) {
game.doAction(new MagicChangeTurnPTAction(target,-2,0));
2012-06-17 05:19:08 -07:00
}
}
2013-04-01 06:58:27 -07:00
}
]