Menu

Submission for Rathi Dragon

210

Config

name=Rathi Dragon
image=http://mtgimage.com/card/rathi%20dragon.jpg
value=2.500
rarity=R
type=Creature
subtype=Dragon
cost={2}{R}{R}
pt=5/5
ability=Flying
timing=main
requires_groovy_code
oracle=Flying. When Rathi Dragon enters the battlefield, sacrifice it unless you sacrifice two Mountains.

Script

[
    new MagicWhenComesIntoPlayTrigger() {
        @Override
        public MagicEvent executeTrigger(final MagicGame game, final MagicPermanent permanent, final MagicPayedCost payedCost) {
            return new MagicEvent(
                permanent,
                new MagicMayChoice("Sacrifice two Mountains?"),
                this,
                "PN may\$ sacrifice two Mountains. If you don't, sacrifice SN."
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            final MagicPermanent perm = event.getPermanent();
            if (event.isYes() && event.getPlayer().getNrOfPermanents(MagicSubType.Mountain) >=2) {
                game.addEvent(new MagicSacrificePermanentEvent(perm,event.getPlayer(),MagicTargetChoice.SACRIFICE_MOUNTAIN));
		game.addEvent(new MagicSacrificePermanentEvent(perm,event.getPlayer(),MagicTargetChoice.SACRIFICE_MOUNTAIN));
            } else {
                game.doAction(new MagicSacrificeAction(perm));
            }
        }
    }
]
Pushed