Menu

Submission for Goblin Mutant

96

Config

name=Goblin Mutant
image=http://magiccards.info/scans/en/med/96.jpg
value=2.500
rarity=U
type=Creature
subtype=Goblin,Mutant
cost={2}{R}{R}
pt=5/3
ability=Trample;\
SN can't block creatures with power 3 or greater.
timing=main
requires_groovy_code
oracle=Trample. Goblin Mutant can't attack if defending player controls an untapped creature with power 3 or greater. Goblin Mutant can't block creatures with power 3 or greater.

Script

def UNTAPPED_CREATURE_WITH_POWER_3_OR_GREATER = new MagicPermanentFilterImpl() {
    public boolean accept(final MagicGame game,final MagicPlayer player,final MagicPermanent target) {
        return target.isCreature() && target.isUntapped() && target.getPower() >= 3;
    } 
};

[
    new MagicStatic(MagicLayer.Ability) {
        @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 game.getDefendingPlayer().controlsPermanent(UNTAPPED_CREATURE_WITH_POWER_3_OR_GREATER);
        }
    }
]
Pushed