Menu

Submission for Jokulmorder

37

Config

name=Jokulmorder
image=http://mtgimage.com/card/jokulmorder.jpg
value=2.500
rarity=R
type=Creature
subtype=Leviathan
cost={4}{U}{U}{U}
pt=12/12
ability=Trample;\
SN enters the battlefield tapped.;\
SN doesn't untap during your untap step.
timing=main
requires_groovy_code
oracle=Trample. Jokulmorder enters the battlefield tapped. When Jokulmorder enters the battlefield, sacrifice it unless you sacrifice five lands. Jokulmorder doesn't untap during your untap step. Whenever you play an Island, you may untap Jokulmorder.

Script

[
    new MagicWhenComesIntoPlayTrigger() {
        @Override
        public MagicEvent executeTrigger(final MagicGame game, final MagicPermanent permanent, final MagicPayedCost payedCost) {
            return new MagicEvent(
                permanent,
                new MagicMayChoice("Sacrifice five lands?"),
                this,
                "PN may\$ sacrifice five lands. If PN doesn't, sacrifice SN."
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            final MagicEvent costEvent = new MagicRepeatedPermanentsEvent(
                event.getSource(),
                MagicTargetChoice.SACRIFICE_LAND,
                5,
                MagicChainEventFactory.Sac
                );  
            if (event.isYes() && costEvent.isSatisfied()) {
                game.addEvent(costEvent);
            } else {
                game.doAction(new MagicSacrificeAction(event.getPermanent()));
            }
        }
    },
    new MagicWhenOtherComesIntoPlayTrigger() {
        @Override
        public MagicEvent executeTrigger(final MagicGame game, final MagicPermanent permanent, final MagicPermanent other) {
            return (other.hasSubType(MagicSubType.Island) &&
                    other.isFriend(permanent)) ?
                new MagicEvent(
                    permanent,
                    this,
                    "Untap SN."
                ) :
                MagicEvent.NONE;
        }

        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            game.doAction(new MagicUntapAction(event.getPermanent()));
        }
    }
]
Pushed