26 lines
991 B
Groovy
26 lines
991 B
Groovy
[
|
|
new MagicWhenAttacksTrigger() {
|
|
@Override
|
|
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent creature) {
|
|
return (permanent == creature) ?
|
|
new MagicEvent(
|
|
permanent,
|
|
MagicTargetChoice.TARGET_CREATURE_YOU_CONTROL,
|
|
MagicFlyingTargetPicker.create(),
|
|
this,
|
|
"Target creature\$ you control gains flying until end of turn."
|
|
):
|
|
MagicEvent.NONE;
|
|
}
|
|
|
|
@Override
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
|
event.processTargetPermanent(game,new MagicPermanentAction() {
|
|
public void doAction(final MagicPermanent creature) {
|
|
game.doAction(new MagicSetAbilityAction(creature,MagicAbility.Flying));
|
|
}
|
|
});
|
|
}
|
|
}
|
|
]
|