Menu

Submission for Hero's Blade

214

Config

name=Hero's Blade
image=http://mtgimage.com/card/hero%27s%20blade.jpg
value=2.500
rarity=U
type=Artifact
subtype=Equipment
cost={2}
ability=Equipped creature gets +3/+2.;\
Equip {4}
timing=equipment
requires_groovy_code
oracle=Equipped creature gets +3/+2. Whenever a legendary creature enters the battlefield under your control, you may attach Hero's Blade to it. Equip {4}

Script

[
    new MagicWhenOtherComesIntoPlayTrigger() {
        @Override
        public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent otherPermanent) {
            return (otherPermanent.isCreature() &&
                    otherPermanent.hasType(MagicType.Legendary) &&
                    otherPermanent.isController(permanent.getController())) ?
                new MagicEvent(
                    permanent,
                    new MagicMayChoice(),
                    otherPermanent,
                    this,
                    "You may\$ attach SN to RN."
                ) :
                MagicEvent.NONE;
        }

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