magarena/release/Magarena/scripts/Abuna_Acolyte.groovy

34 lines
1.1 KiB
Groovy
Raw Normal View History

2013-05-25 23:01:34 -07:00
[
new MagicPermanentActivation(
[MagicCondition.CAN_TAP_CONDITION],
new MagicActivationHints(MagicTiming.Pump),
"Prevent 2"
) {
@Override
public MagicEvent[] getCostEvent(final MagicPermanent source) {
return [new MagicTapEvent(source)];
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
return new MagicEvent(
source,
MagicTargetChoice.POS_TARGET_ARTIFACT_CREATURE,
MagicPreventTargetPicker.getInstance(),
this,
"Prevent the next 2 damage that would be dealt to target artifact creature\$ this turn"
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTarget(game,new MagicTargetAction() {
public void doAction(final MagicTarget target) {
game.doAction(new MagicPreventDamageAction(target,2));
}
});
}
}
]