Package mage.abilities.condition.common

Examples of mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition


        this.toughness = new MageInt(3);

        // As long as you control an artifact, Scrapyard Mongrel gets +2/+0 and has trample.
        Effect boostEffect = new ConditionalContinousEffect(
                new BoostSourceEffect(2, 0, Duration.WhileOnBattlefield),
                new PermanentsOnTheBattlefieldCondition(filter),
                "As long as you control an artifact, {this} gets +2/+0");
        Effect gainAbilityEffect = new ConditionalContinousEffect(
                new GainAbilitySourceEffect(TrampleAbility.getInstance(), Duration.WhileOnBattlefield),
                new PermanentsOnTheBattlefieldCondition(filter),
                "and has trample");
        Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, boostEffect);
        ability.addEffect(gainAbilityEffect);
        this.addAbility(ability);
    }
View Full Code Here


        // Counter target spell.  If you control a blue creature, draw a card, then discard a card.
        this.getSpellAbility().addEffect(new CounterTargetEffect());
        this.getSpellAbility().addTarget(new TargetSpell());
        this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
                new DrawDiscardControllerEffect(1,1),
                new PermanentsOnTheBattlefieldCondition(filter, PermanentsOnTheBattlefieldCondition.CountType.MORE_THAN, 0, true),
                "If you control a blue creature, draw a card, then discard a card"));
    }
View Full Code Here

        this.toughness = new MageInt(3);

        this.addAbility(FlyingAbility.getInstance());

        // As long as you control a Human, Angelic Overseer has hexproof and is indestructible.
        ConditionalContinousEffect effect1 = new ConditionalContinousEffect(new GainAbilitySourceEffect(HexproofAbility.getInstance()), new PermanentsOnTheBattlefieldCondition(filter), rule1);
        Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect1);
        ConditionalContinousEffect effect2 = new ConditionalContinousEffect(new GainAbilitySourceEffect(IndestructibleAbility.getInstance()), new PermanentsOnTheBattlefieldCondition(filter), rule2);
        ability.addEffect(effect2);
        this.addAbility(ability);
    }
View Full Code Here

        // {0}: Until end of turn, Haunted Plate Mail becomes a 4/4 Spirit artifact creature that's no longer an Equipment. Activate this ability only if you control no creatures.
        Ability ability = new ConditionalActivatedAbility(
                Zone.BATTLEFIELD,
                new BecomesCreatureSourceEffect(new HauntedPlateMailToken(),"", Duration.EndOfTurn),
                new ManaCostsImpl("{0}"),
                new PermanentsOnTheBattlefieldCondition(new FilterCreaturePermanent(), PermanentsOnTheBattlefieldCondition.CountType.EQUAL_TO, 0),
                "{0}: Until end of turn, Haunted Plate Mail becomes a 4/4 Spirit artifact creature that's no longer an Equipment. Activate this ability only if you control no creatures.");
        this.addAbility(ability);
        // Equip {4}
        this.addAbility(new EquipAbility(Outcome.BoostCreature, new ManaCostsImpl("{4}")));
    }
View Full Code Here

        // As long as Filth is in your graveyard and you control a Swamp, creatures you control have swampwalk.
        ContinuousEffect effect = new GainAbilityControlledEffect(new SwampwalkAbility(),
                Duration.WhileOnBattlefield, new FilterCreaturePermanent());
        ConditionalContinousEffect filthEffect = new ConditionalContinousEffect(effect,
                new PermanentsOnTheBattlefieldCondition(filter), ruleText);
        this.addAbility(new SimpleStaticAbility(Zone.GRAVEYARD, filthEffect));
    }
View Full Code Here

        // As long as Anger is in your graveyard and you control a Mountain, creatures you control have haste
        ContinuousEffect effect = new GainAbilityControlledEffect(HasteAbility.getInstance(),
                Duration.WhileOnBattlefield, new FilterCreaturePermanent());
        ConditionalContinousEffect angerEffect = new ConditionalContinousEffect(effect,
                new PermanentsOnTheBattlefieldCondition(filter), ruleText);
        this.addAbility(new SimpleStaticAbility(Zone.GRAVEYARD, angerEffect));
    }
View Full Code Here

        // As long as Valor is in your graveyard and you control a Plains, creatures you control have first strike
        ContinuousEffect effect = new GainAbilityControlledEffect(FirstStrikeAbility.getInstance(),
                Duration.WhileOnBattlefield, new FilterCreaturePermanent());
        ConditionalContinousEffect valorEffect = new ConditionalContinousEffect(effect,
                new PermanentsOnTheBattlefieldCondition(filter), ruleText);
        this.addAbility(new SimpleStaticAbility(Zone.GRAVEYARD, valorEffect));
    }
View Full Code Here

        // As long as Wonder is in your graveyard and you control an Island, creatures you control have flying.
        ContinuousEffect effect = new GainAbilityControlledEffect(FlyingAbility.getInstance(),
                Duration.WhileOnBattlefield, new FilterCreaturePermanent());
        ConditionalContinousEffect wonderEffect = new ConditionalContinousEffect(effect,
                new PermanentsOnTheBattlefieldCondition(filter), ruleText);
        this.addAbility(new SimpleStaticAbility(Zone.GRAVEYARD, wonderEffect));
    }
View Full Code Here

    public IsolatedChapel(UUID ownerId) {
        super(ownerId, 242, "Isolated Chapel", Rarity.RARE, new CardType[]{CardType.LAND}, null);
        this.expansionSetCode = "ISD";

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

        this.toughness = new MageInt(3);

        // Jorubai Murk Lurker gets +1/+1 as long as you control a Swamp.
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
                new ConditionalContinousEffect(new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield),
                new PermanentsOnTheBattlefieldCondition(filter), rule)));

        // {1}{B}: Target creature gains lifelink until end of turn.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
                new GainAbilityTargetEffect(LifelinkAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{1}{B}"));
        ability.addTarget(new TargetCreaturePermanent());
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.