25 lines
920 B
Groovy
25 lines
920 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));
|
|
}
|
|
}
|
|
}
|
|
]
|