Menu

Submission for Orgg

67

Config

name=Orgg
image=http://magiccards.info/scans/en/tsts/67.jpg
value=2.500
rarity=R
type=Creature
subtype=Orgg
cost={3}{R}{R}
pt=6/6
ability=Trample;\
SN can't block creatures with power 3 or greater.
timing=main
requires_groovy_code
oracle=Trample. Orgg can't attack if defending player controls an untapped creature with power 3 or greater. Orgg 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