Menu

Submission for Dark Suspicions

40

Config

name=Dark Suspicions
image=http://mtgimage.com/card/dark%20suspicions.jpg
value=2.500
rarity=R
type=Enchantment
cost={2}{B}{B}
timing=enchantment
requires_groovy_code
oracle=At the beginning of each opponent's upkeep, that player loses X life, where X is the number of cards in that player's hand minus the number of cards in your hand.

Script

[
    new MagicAtUpkeepTrigger() {
        @Override
        public MagicEvent executeTrigger(final MagicGame game, final MagicPermanent permanent, final MagicPlayer upkeepPlayer) {
           return permanent.isOpponent(upkeepPlayer) ?
               new MagicEvent(
                    permanent,
                    this,
                    "Opponent loses X life, where X is the number of cards in his or her hand minus the number of cards in your hand."
                ):
                    MagicEvent.NONE;
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            final int amount = event.getPermanent().getOpponent().getHandSize() - 
                               event.getPermanent().getController().getHandSize();
            if (amount > 0) {
            game.doAction(new MagicChangeLifeAction(event.getPermanent().getOpponent(),-amount));
            }
        }
    }
]
Pushed