Menu

Submission for Honden of Infinite Rage

134

Config

name=Honden of Infinite Rage
url=http://magiccards.info/query?q=%21honden%20of%20infinite%20rage
image=http://mtgimage.com/card/honden%20of%20infinite%20rage.jpg
value=3.959
rarity=U
type=Legendary,Enchantment
subtype=shrine
cost={2}{R}
timing=main
requires_groovy_code

Script

def SHRINES_YOU_CONTROL = new MagicPermanentFilterImpl() {
        public boolean accept(final MagicGame game,final MagicPlayer player,final MagicPermanent target) {
            return target.isController(player) &&
                   target.hasSubType(MagicSubType.Shrine);
        }
    };

[
    new MagicAtUpkeepTrigger() {
        @Override
        public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent, final MagicPlayer upkeepPlayer) {
            return (permanent.getController() == upkeepPlayer) ? new MagicEvent(
                permanent,
                permanent.getController(),
                MagicTargetChoice.NEG_TARGET_CREATURE_OR_PLAYER,
                new MagicDamageTargetPicker(game.filterPermanents(permanent.getController(),SHRINES_YOU_CONTROL).size()),
                this,
                "SN deals damage to target creature or player\$ equal to the number of Shrines PN controls."
            ):
            MagicEvent.NONE
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            final int size = game.filterPermanents(event.getPlayer(),SHRINES_YOU_CONTROL).size();
            event.processTarget(game, {
                final MagicTarget target ->
                final MagicDamage damage=new MagicDamage(event.getSource(),target,size);
                game.doAction(new MagicDealDamageAction(damage));
            });
        }
    }
]
Pushed