magarena/release/Magarena/scripts/Riot_Ringleader.groovy

31 lines
1.0 KiB
Groovy

[
new MagicWhenAttacksTrigger() {
@Override
public MagicEvent executeTrigger(
final MagicGame game,
final MagicPermanent permanent,
final MagicPermanent creature) {
return (permanent == creature) ?
new MagicEvent(
permanent,
this,
"Human creatures PN controls get +1/+0 until end of turn."
):
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
final Collection<MagicPermanent> targets = game.filterPermanents(
event.getPlayer(),
MagicTargetFilter.TARGET_HUMAN_YOU_CONTROL);
for (final MagicPermanent target : targets) {
game.doAction(new MagicChangeTurnPTAction(
target,
1,
0
));
}
}
}
]