magarena/release/Magarena/scripts/Rootborn_Defenses.groovy

31 lines
1.1 KiB
Groovy
Raw Normal View History

2013-02-19 05:41:57 -08:00
[
new MagicSpellCardEvent() {
@Override
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
return new MagicEvent(
cardOnStack,
this,
"Populate. Creatures you control are indestructible this turn."
);
}
@Override
public void executeEvent(
final MagicGame game,
2013-03-22 22:00:53 -07:00
final MagicEvent event) {
2013-02-19 05:41:57 -08:00
game.addEvent(new MagicPopulateEvent(event.getSource()));
game.doAction(new MagicAddStaticAction(new MagicStatic(
MagicLayer.Ability,
MagicTargetFilter.TARGET_CREATURE_YOU_CONTROL,
MagicStatic.UntilEOT) {
@Override
public void modAbilityFlags(
final MagicPermanent source,
final MagicPermanent permanent,
final Set<MagicAbility> flags) {
flags.add(MagicAbility.Indestructible);
}
}));
}
}
]