Menu

Submission for Angry Mob

1

Config

name=Angry Mob
image=http://mtgimage.com/card/angry%20mob.jpg
value=2.500
rarity=U
type=Creature
subtype=Human
cost={2}{W}{W}
pt=2+*/2+*
ability=Trample
timing=main
requires_groovy_code
oracle=Trample. As long as it's your turn, Angry Mob's power and toughness are each equal to 2 plus the number of Swamps your opponents control. As long as it's not your turn, Angry Mob's power and toughness are each 2.

Script

[
    new MagicStatic(MagicLayer.SetPT) {
        @Override
        public void modPowerToughness(final MagicPermanent source,final MagicPermanent permanent,final MagicPowerToughness pt) {
            pt.set(2,2);
        }
        @Override
        public boolean condition(final MagicGame game,final MagicPermanent source,final MagicPermanent target) {
            return MagicCondition.NOT_YOUR_TURN_CONDITION.accept(source);
        }
    }, 
    new MagicStatic(MagicLayer.SetPT) {
        @Override
        public void modPowerToughness(final MagicPermanent source,final MagicPermanent permanent,final MagicPowerToughness pt) {
            final int amount = source.getOpponent().getNrOfPermanents(MagicSubType.Swamp) + 2;
            pt.set(amount,amount);
        }
        @Override
        public boolean condition(final MagicGame game,final MagicPermanent source,final MagicPermanent target) {
            return MagicCondition.YOUR_TURN_CONDITION.accept(source);
        }
    } 
]
Pushed