Menu

Submission for Bow of Nylea

153

Comment

Since multitarge has yet to be implemented, its last ability puts only one card to the bottom of owner's library. Other than that its working perfectly.

Config

name=Bow of Nylea
url=http://magiccards.info/query?q=%21bow%20of%20nylea
image=http://mtgimage.com/card/bow%20of%20nylea.jpg
value=3.697
rarity=R
type=Legendary,Enchantment,Artifact
cost={1}{G}{G}
ability={1}{G},{T}:Put a +1/+1 counter on target creature.;\
        {1}{G},{T}:SN deals 2 damage to target creature with flying.;\
        {1}{G},{T}:You gain 3 life.
timing=artifact
requires_groovy_code

Script

[
    new MagicStatic(MagicLayer.Ability,MagicTargetFilter.TARGET_CREATURE_YOU_CONTROL) {
        @Override
        public void modAbilityFlags(final MagicPermanent source,final MagicPermanent permanent,final Set<MagicAbility> flags) {
            if(permanent.isAttacking()) {
               permanent.addAbility(MagicAbility.Deathtouch, flags);
            }
        }
    },
    new MagicPermanentActivation(
        new MagicActivationHints(MagicTiming.Main),
        "Card"
    ){
        @Override
        public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
            return [
                new MagicTapEvent(source), 
                new MagicPayManaCostEvent(source,"{1}{G}")
            ];
        }
        @Override
        public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
            return new MagicEvent(
                source,
                MagicTargetChoice.TARGET_CARD_FROM_GRAVEYARD,
                MagicGraveyardTargetPicker.ExileOpp,
                this,
                "Put target card\$ from your graveyard on the bottom of your library"
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            event.processTargetCard(game, {
                final MagicCard targetCard ->
                game.doAction(new MagicRemoveCardAction(targetCard,MagicLocationType.Graveyard));
                game.doAction(new MagicMoveCardAction(
                    targetCard,
                    MagicLocationType.Graveyard,
                    MagicLocationType.BottomOfOwnersLibrary
                ));
                game.doAction(new MagicDrawAction(event.getPlayer()));
            });
        }
    }
]
Pushed