Menu

Submission for Forsaken Wastes

23

Config

name=Forsaken Wastes
image=http://magiccards.info/scans/en/mr/23.jpg
value=2.500
rarity=R
type=World,Enchantment
cost={2}{B}
timing=main
requires_groovy_code
oracle=Players can't gain life. At the beginning of each player's upkeep, that player loses 1 life. Whenever Forsaken Wastes becomes the target of a spell, that spell's controller loses 5 life.

Script

[
    new MagicIfLifeWouldChangeTrigger() {
        @Override
        public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicChangeLifeAction act) {
            if (act.getLifeChange() > 0) {
                act.setLifeChange(0);
            }
            return MagicEvent.NONE;
        }
    },
    new MagicAtUpkeepTrigger() {
        @Override
        public MagicEvent executeTrigger(final MagicGame game, final MagicPermanent permanent, final MagicPlayer upkeepPlayer) {
            return new MagicEvent(
                permanent,
                upkeepPlayer,
                this,
                "PN loses 1 life."
            );
        }
        @Override
        public void executeEvent(final MagicGame game,final MagicEvent event) {
            game.doAction(new MagicChangeLifeAction(event.getPlayer(),-1));
        }
    },
    new MagicWhenSelfTargetedTrigger() {
        @Override
        public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicItemOnStack target) {
            return permanent.isEnemy(target) ?
                new MagicEvent(
                    permanent,
                    target.getController(),
                    this,
                    "PN loses 5 life."
                ):
                MagicEvent.NONE;
        }

        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            game.doAction(new MagicChangeLifeAction(event.getPlayer(),-5));
        }
    }
]
Pushed