Menu

Submission for Chittering Rats

39

Config

name=Chittering Rats
image=http://mtgimage.com/card/chittering%20rats.jpg
value=2.500
rarity=C
type=Creature
subtype=Rat
cost={1}{B}{B}
pt=2/2
timing=main
requires_groovy_code
oracle=When Chittering Rats enters the battlefield, target opponent puts a card from his or her hand on top of his or her library.

Script

[
    new MagicWhenComesIntoPlayTrigger() {
        @Override
       public MagicEvent executeTrigger(final MagicGame game, final MagicPermanent permanent, final MagicPayedCost payedCost) {
            return new MagicEvent(
                permanent,
                MagicTargetChoice.TARGET_OPPONENT,
                this,
                "Target opponent\$ puts a card from his or her hand on top of his or her library."
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
        if (event.getPermanent().getOpponent().getHandSize() >=1) {
        event.processTargetPlayer(game, {
            game.addEvent(new MagicReturnCardEvent(event.getSource(), it));
            });
            }
        }
    }
]
Pushed