magarena/release/Magarena/scripts/Havoc_Demon.groovy

24 lines
777 B
Groovy

[
new MagicWhenDiesTrigger() {
@Override
public MagicEvent getEvent(final MagicPermanent permanent) {
return new MagicEvent(
permanent,
permanent.getController(),
this,
"All creatures get -5/-5 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);
for (final MagicPermanent target : targets) {
game.doAction(new MagicChangeTurnPTAction(target,-5,-5));
}
}
}
]