Menu

Submission for Ensnaring Bridge

300

Config

name=Ensnaring Bridge
image=http://mtgimage.com/card/ensnaring%20bridge.jpg
value=2.500
rarity=R
type=Artifact
cost={3}
timing=artifact
oracle=Creatures with power greater than the number of cards in your hand can't attack.

Script

[
    new MagicStatic(
        MagicLayer.Ability,
        MagicTargetFilterFactory.CREATURE
    ) {
        @Override
        public void modAbilityFlags(
                final MagicPermanent source,
                final MagicPermanent permanent,
                final Set<MagicAbility> flags) {
            permanent.addAbility(MagicAbility.CannotAttack, flags);
        }
        @Override
        public boolean condition(
                final MagicGame game,
                final MagicPermanent source,
                final MagicPermanent target) {
            return target.getPower() > permanent.getController().getHandSize();
        }
    }
]
Pushed