Menu

Submission for Vulshok War Boar

72

Config

name=Vulshok War Boar
image=http://mtgimage.com/card/vulshok%20war%20boar.jpg
value=2.500
rarity=U
type=Creature
subtype=Boar,Beast
cost={2}{R}{R}
pt=5/5
timing=main
requires_groovy_code
oracle=When Vulshok War Boar enters the battlefield, sacrifice it unless you sacrifice an artifact.

Script

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