magarena/release/Magarena/scripts/Oracle_of_Nectars.groovy

26 lines
856 B
Groovy

[
new MagicPermanentActivation(
new MagicActivationHints(MagicTiming.Draw),
"Life+X"
) {
@Override
public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
return [new MagicTapEvent(source), new MagicPayManaCostEvent(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()));
}
}
]