magarena/release/Magarena/scripts/Wrap_in_Vigor.groovy

22 lines
743 B
Groovy
Raw Normal View History

2013-03-31 22:38:46 -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-03-31 22:38:46 -07:00
cardOnStack,
this,
"Regenerate each creature you control."
);
2012-06-17 05:19:08 -07:00
}
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) {
final Collection<MagicPermanent> targets =
game.filterPermanents(event.getPlayer(),MagicTargetFilter.TARGET_CREATURE_YOU_CONTROL);
for (final MagicPermanent creature : targets) {
2012-09-15 07:00:22 -07:00
game.doAction(new MagicRegenerateAction(creature));
2012-06-17 05:19:08 -07:00
}
}
2013-03-31 22:38:46 -07:00
}
]