magarena/release/Magarena/scripts/Bountiful_Harvest.groovy

23 lines
734 B
Groovy

[
new MagicSpellCardEvent() {
@Override
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
return new MagicEvent(
cardOnStack,
this,
"PN gains 1 life for each land you control."
);
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
final MagicPlayer player = event.getPlayer();
final int amount = player.getNrOfPermanentsWithType(MagicType.Land);
if (amount > 0) {
game.doAction(new MagicChangeLifeAction(player,amount));
}
}
}
]