Menu

Submission for Reef Pirates

116

Config

name=Reef Pirates
image=http://mtgimage.com/card/reef%20pirates.jpg
value=2.500
rarity=C
type=Creature
subtype=Zombie,Pirate
cost={1}{U}{U}
pt=2/2
timing=main
requires_groovy_code
oracle=Whenever Reef Pirates deals damage to an opponent, that player puts the top card of his or her library into his or her graveyard.

Script

[
    new MagicWhenDamageIsDealtTrigger() {
        @Override
        public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicDamage damage) {
            return (permanent == damage.getSource() &&
                    permanent.isOpponent(damage.getTarget())) ?
                new MagicEvent(
                    permanent,
                    this,
                    "Opponent puts the top card of his or her library into his or her graveyard."
                ) :
                MagicEvent.NONE;
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            game.doAction(new MagicMillLibraryAction(event.getPlayer().getOpponent(),1));
        }
    }
]
Pushed