magarena/release/Magarena/scripts/Stream_of_Life.groovy

22 lines
732 B
Groovy

[
new MagicSpellCardEvent() {
@Override
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
return new MagicEvent(
cardOnStack,
MagicTargetChoice.POS_TARGET_PLAYER,
payedCost.getX(),
this,
"Target player\$ gains RN life."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetPlayer(game, {
final MagicPlayer player ->
game.doAction(new MagicChangeLifeAction(player, event.getRefInt()));
} as MagicPlayerAction);
}
}
]