magarena/release/Magarena/scripts/Ray_of_Command.groovy

27 lines
1.1 KiB
Groovy
Raw Normal View History

2013-07-18 02:44:35 -07:00
[
new MagicSpellCardEvent() {
@Override
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
return new MagicEvent(
cardOnStack,
MagicTargetChoice.TARGET_CREATURE_YOUR_OPPONENT_CONTROLS,
MagicExileTargetPicker.create(),
this,
"Gain control of target creature\$ an opponent controls until end of turn. " +
"Untap that creature. It gains haste until end of turn."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetPermanent(game,new MagicPermanentAction() {
public void doAction(final MagicPermanent creature) {
game.doAction(new MagicGainControlAction(event.getPlayer(),creature,MagicStatic.UntilEOT));
game.doAction(new MagicUntapAction(creature));
game.doAction(new MagicSetAbilityAction(creature,MagicAbility.Haste));
}
});
}
}
]