magarena/release/Magarena/scripts/Explore.groovy

30 lines
1.1 KiB
Groovy

[
new MagicSpellCardEvent() {
@Override
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
return new MagicEvent(
cardOnStack,
this,
"PN may play an additional land this turn."
);
}
@Override
public void executeEvent(final MagicGame outerGame, final MagicEvent event) {
outerGame.doAction(new MagicAddStaticAction(
new MagicStatic(MagicLayer.Game, MagicStatic.UntilEOT) {
@Override
public void modGame(final MagicPermanent source, final MagicGame game) {
game.incMaxLand();
}
@Override
public boolean condition(final MagicGame game,final MagicPermanent source,final MagicPermanent target) {
return game.getTurnPlayer().getId() == event.getPlayer().getId();
}
}
));
outerGame.doAction(new MagicDrawAction(event.getPlayer(),1));
}
}
]