magarena/release/Magarena/scripts/Oracle_of_Nectars.groovy

30 lines
940 B
Groovy

[
new MagicPermanentActivation(
[
MagicCondition.CAN_TAP_CONDITION,
MagicConditionFactory.ManaCost("{X}")
],
new MagicActivationHints(MagicTiming.Draw),
"Life+X"
) {
@Override
public MagicEvent[] getCostEvent(final MagicPermanent source) {
return [new MagicPayManaCostTapEvent(source,"{X}")];
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
final int amount=payedCost.getX();
return new MagicEvent(
source,
amount,
this,
"PN gains RN life."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new MagicChangeLifeAction(event.getPlayer(),event.getRefInt()));
}
}
]