magarena/release/Magarena/scripts/Xantid_Swarm.groovy

22 lines
667 B
Groovy

[
new MagicWhenSelfAttacksTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game, final MagicPermanent permanent, final MagicPermanent creature) {
return new MagicEvent(
permanent,
game.getDefendingPlayer(),
this,
"PN can't cast spells this turn."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new MagicChangePlayerStateAction(
event.getPlayer(),
MagicPlayerState.CantCastSpells
));
}
}
]