magarena/release/Magarena/scripts/Vedalken_Mastermind.groovy

34 lines
1.2 KiB
Groovy

[
new MagicPermanentActivation(
[
MagicCondition.CAN_TAP_CONDITION,
MagicConditionFactory.ManaCost("{U}")
],
new MagicActivationHints(MagicTiming.Removal),
"Return"
) {
@Override
public MagicEvent[] getCostEvent(final MagicPermanent source) {
return [new MagicPayManaCostTapEvent(source,"{U}")];
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
return new MagicEvent(
source,
MagicTargetChoice.TARGET_PERMANENT_YOU_CONTROL,
MagicBounceTargetPicker.getInstance(),
this,
"Return target permanent you control\$ to its owner's hand."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetPermanent(game,new MagicPermanentAction() {
public void doAction(final MagicPermanent creature) {
game.doAction(new MagicRemoveFromPlayAction(creature,MagicLocationType.OwnersHand));
}
});
}
}
]