magarena/release/Magarena/scripts/Rafiq_of_the_Many.groovy

26 lines
938 B
Groovy

[
new MagicWhenAttacksTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent creature) {
return (permanent.isFriend(creature) && game.getAttackingPlayer().getNrOfAttackers()==1) ?
new MagicEvent(
permanent,
creature,
this,
"RN gains double strike until end of turn."
):
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processRefPermanent(game, {
final MagicPermanent permanent ->
game.doAction(new MagicGainAbilityAction(
permanent,
MagicAbility.DoubleStrike
));
} as MagicPermanentAction);
}
}
]