magarena/release/Magarena/scripts/To_Arms_.groovy

23 lines
842 B
Groovy

[
new MagicSpellCardEvent() {
@Override
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
return new MagicEvent(
cardOnStack,
this,
"Untap all creatures you control. Draw a card."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
final MagicPlayer player=event.getPlayer();
final Collection<MagicPermanent> targets=
game.filterPermanents(player,MagicTargetFilter.TARGET_CREATURE_YOU_CONTROL);
for (final MagicPermanent target : targets) {
game.doAction(new MagicUntapAction(target));
}
game.doAction(new MagicDrawAction(player,1));
}
}
]