Menu

Submission for Bulwark

178

Config

name=Bulwark
image=http://mtgimage.com/card/bulwark.jpg
value=2.500
rarity=R
type=Enchantment
cost={3}{R}{R}
timing=enchantment
requires_groovy_code
oracle=At the beginning of your upkeep, Bulwark deals X damage to target opponent, where X is the number of cards in your hand minus the number of cards in that player's hand.

Script

[
    new MagicAtYourUpkeepTrigger() {
        @Override
        public MagicEvent executeTrigger(final MagicGame game, final MagicPermanent permanent, final MagicPlayer upkeepPlayer) {
                new MagicEvent(
                    permanent,
                    MagicTargetChoice.TARGET_OPPONENT,
                    this,
                    "SN deals X damage to RN, where X is the number of cards in PN's hand minus the number of cards in RN's hand."
                );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            event.processTargetPlayer(game, {
            final int amount = event.getPlayer().getHandSize() - it.getHandSize();
            game.doAction(new MagicDealDamageAction(event.getPermanent(),it,amount));
            });
        }
    }
]
Pushed