magarena/release/Magarena/scripts/Reinforced_Bulwark.groovy

27 lines
806 B
Groovy

[
new MagicPermanentActivation(
[MagicCondition.CAN_TAP_CONDITION],
new MagicActivationHints(MagicTiming.Pump),
"Prevent 1"
) {
@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,
this,
"Prevent the next 1 damage that would be dealt to PN."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new MagicPreventDamageAction(event.getPlayer(),1));
}
}
]