Package mage.abilities.condition.common

Examples of mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition


        this.toughness = new MageInt(4);

        // When Sunspire Gatekeepers enter the battlefield, if you control two or more Gates, put a 2/2 white Knight creature token with vigilance onto the battlefield.
        this.addAbility(new ConditionalTriggeredAbility(
                new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new KnightToken())),
                new PermanentsOnTheBattlefieldCondition(filter, PermanentsOnTheBattlefieldCondition.CountType.MORE_THAN, 1),
                "When {this} enter the battlefield, if you control two or more Gates, put a 2/2 white Knight creature token with vigilance onto the battlefield."));
    }
View Full Code Here


    public BlackcleaveCliffs (UUID ownerId) {
        super(ownerId, 224, "Blackcleave Cliffs", Rarity.RARE, new CardType[]{CardType.LAND}, null);
        this.expansionSetCode = "SOM";

        Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter, PermanentsOnTheBattlefieldCondition.CountType.FEWER_THAN, 4));
        String abilityText = "tapped unless you control fewer than 3 lands";
        this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
        this.addAbility(new BlackManaAbility());
        this.addAbility(new RedManaAbility());
    }
View Full Code Here

        // {2}{G}, {T}: Put a 1/1 green Snake creature token onto the battlefield. If you control ten or more creatures, flip Orochi Eggwatcher.
        Ability ability;
        ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new SnakeToken()),new ManaCostsImpl("{2}{G}"));
        ability.addCost(new TapSourceCost());
        ability.addEffect(new ConditionalOneShotEffect(new FlipSourceEffect(new ShidakoBroodmistress()),
                new PermanentsOnTheBattlefieldCondition(new FilterControlledCreaturePermanent(),PermanentsOnTheBattlefieldCondition.CountType.MORE_THAN, 9),"If you control ten or more creatures, flip {this}"));
        this.addAbility(ability);
    }
View Full Code Here

        this.color.setBlack(true);
        this.power = new MageInt(2);
        this.toughness = new MageInt(2);

        // Harbor Bandit gets +1/+1 as long as you control an Island.
        ConditionalContinousEffect effect = new ConditionalContinousEffect(new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), new PermanentsOnTheBattlefieldCondition(filter), rule);
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
       
        // {1}{U}: Harbor Bandit is unblockable this turn.
        this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD,
                new UnblockableSourceEffect(Duration.EndOfTurn),
View Full Code Here

    }

    public OgreJailbreakerEffect() {
        super(AsThoughEffectType.ATTACK, Duration.WhileOnBattlefield, Outcome.Benefit);
        staticText = "{this} can attack as though it didn't have defender as long as you control a Gate";
        gateCondition = new PermanentsOnTheBattlefieldCondition(filter);
    }
View Full Code Here

    public SunpetalGrove(UUID ownerId) {
        super(ownerId, 228, "Sunpetal Grove", Rarity.RARE, new CardType[]{CardType.LAND}, null);
        this.expansionSetCode = "M10";

        Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter, PermanentsOnTheBattlefieldCondition.CountType.MORE_THAN, 0));
        String abilityText = "tap it unless you control a Forest or a Plains";
        this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
        this.addAbility(new GreenManaAbility());
        this.addAbility(new WhiteManaAbility());
    }
View Full Code Here

        this.toughness = new MageInt(2);

        // When Lagonna-Band Elder enters the battlefield, if you control an enchantment, you gain 3 life.
        Ability ability = new ConditionalTriggeredAbility(
                new EntersBattlefieldTriggeredAbility(new GainLifeEffect(3), false),
                new PermanentsOnTheBattlefieldCondition(new FilterEnchantmentPermanent(), PermanentsOnTheBattlefieldCondition.CountType.MORE_THAN, 0),
                "When Lagonna-Band Elder enters the battlefield, if you control an enchantment, you gain 3 life");
        this.addAbility(ability);
    }
View Full Code Here

        this.expansionSetCode = "CMD";

        this.color.setGreen(true);

        // If you control a Forest, rather than pay Invigorate's mana cost, you may have an opponent gain 3 life.
        this.addAbility(new AlternativeCostSourceAbility(new GainLifeOpponentCost(3), new PermanentsOnTheBattlefieldCondition(filter)));   
        // Target creature gets +4/+4 until end of turn.
        this.getSpellAbility().addEffect(new BoostTargetEffect(4,4,Duration.EndOfTurn));
        this.getSpellAbility().addTarget(new TargetCreaturePermanent());
    }
View Full Code Here

    @Override
    public boolean apply(Game game, Ability source) {
        Player controller = game.getPlayer(source.getControllerId());
        if (controller != null) {
            if (new PermanentsOnTheBattlefieldCondition(filter, PermanentsOnTheBattlefieldCondition.CountType.MORE_THAN, 0).apply(game, source)) {
                controller.drawCards(1, game);
            }
            return true;
        }
        return false;
View Full Code Here

        this.toughness = new MageInt(1);

        // As long as you control another multicolored permanent, Bant Sureblade gets +1/+1 and has first strike.
        Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(
                new BoostSourceEffect(1,1, Duration.WhileOnBattlefield),
                new PermanentsOnTheBattlefieldCondition(filter),
                "As long as you control another multicolored permanent, {this} gets +1/+1"));
        ability.addEffect(new ConditionalContinousEffect(
                new GainAbilitySourceEffect(FirstStrikeAbility.getInstance()),
                new PermanentsOnTheBattlefieldCondition(filter),
                "and has first strike"));
        this.addAbility(ability);
    }
View Full Code Here

TOP

Related Classes of mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.