magarena/release/Magarena/scripts/Nagao__Bound_by_Honor.groovy

23 lines
887 B
Groovy

[
new MagicWhenAttacksTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent creature) {
return (permanent == creature) ?
new MagicEvent(
permanent,
this,
"Samurai creatures PN controls get +1/+1 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_SAMURAI_YOU_CONTROL);
for (final MagicPermanent creature : targets) {
game.doAction(new MagicChangeTurnPTAction(creature,1,1));
}
}
}
]