Menu

Submission for Orchard Warden

131

Config

name=Orchard Warden
image=http://mtgimage.com/card/orchard%20warden.jpg
value=2.500
rarity=U
type=Creature
subtype=Treefolk,Shaman
cost={4}{G}{G}
pt=4/6
timing=main
requires_groovy_code
oracle=Whenever another Treefolk creature enters the battlefield under your control, you may gain life equal to that creature's toughness.

Script

[
    new MagicWhenOtherComesIntoPlayTrigger() {
        @Override
        public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent otherPermanent) {
            return otherPermanent != permanent &&
                   otherPermanent.isCreature() &&
                   otherPermanent.hasSubType(MagicSubType.Treefolk) &&
                   otherPermanent.isFriend(permanent) ?
                new MagicEvent(
                    permanent,
                    new MagicMayChoice("gain life?"),
                    otherPermanent,
                    this,
                    "PN may gain life equal to RN's toughness." 
                ):
                MagicEvent.NONE;
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            if (event.isYes()) {
                game.doAction(new MagicChangeLifeAction(event.getPlayer(),event.getRefPermanent().getToughness()));
            }
        }
    }
]
Pushed