Package mage.abilities.condition.common

Examples of mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition


        // Flying
        this.addAbility(FlyingAbility.getInstance());

        // Landfall - Whenever a land enters the battlefield under your control, you may gain control of target creature for as long as you control Roil Elemental.
        ConditionalContinousEffect effect = new ConditionalContinousEffect(new GainControlTargetEffect(Duration.Custom), new PermanentsOnTheBattlefieldCondition(filter), rule);
        Ability ability = new LandfallAbility(Zone.BATTLEFIELD, effect, true);
        ability.addTarget(new TargetCreaturePermanent());
        this.addAbility(ability);
    }
View Full Code Here


        this.color.setWhite(true);

        // At the beginning of your upkeep, if there are no Reflection tokens on the battlefield, put a 2/2 white Reflection creature token onto the battlefield.
        this.addAbility(new ConditionalTriggeredAbility(
                new BeginningOfUpkeepTriggeredAbility(new CreateTokenEffect(new ReflectionToken()), TargetController.YOU, false),
                new PermanentsOnTheBattlefieldCondition(filter, PermanentsOnTheBattlefieldCondition.CountType.EQUAL_TO, 0, false),
                "At the beginning of your upkeep, if there are no Reflection tokens on the battlefield, put a 2/2 white Reflection creature token onto the battlefield"));

        // {0}: Destroy target Reflection.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new GenericManaCost(0));
        ability.addTarget(new TargetPermanent(filter));
View Full Code Here

    private final int power;
    private final int toughness;
    private final String filterDescription;

    public BoostSourceWhileControlsEffect(FilterPermanent filter, int power, int toughness) {
        super(Duration.WhileOnBattlefield, Layer.PTChangingEffects_7, SubLayer.ModifyPT_7c, new PermanentsOnTheBattlefieldCondition(filter), Outcome.BoostCreature);
        this.power = power;
        this.toughness = toughness;
        this.filterDescription = filter.getMessage();
        staticText = "{this} gets "
                + String.format("%1$+d/%2$+d", power, toughness)
View Full Code Here

        // When Sarcomancy enters the battlefield, put a 2/2 black Zombie creature token onto the battlefield.
        this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new ZombieToken(), 1), false));
        // At the beginning of your upkeep, if there are no Zombies on the battlefield, Sarcomancy deals 1 damage to you.
        this.addAbility(new ConditionalTriggeredAbility(
                new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new DamageControllerEffect(1), TargetController.YOU, false),
                new PermanentsOnTheBattlefieldCondition(new FilterPermanent("Zombie", "Zombies"), PermanentsOnTheBattlefieldCondition.CountType.EQUAL_TO, 0, false),
                "At the beginning of your upkeep, if there are no Zombies on the battlefield, {this} deals 1 damage to you."));       
    }
View Full Code Here

        // When Festering Newt dies, target creature an opponent controls gets -1/-1 until end of turn. That creature gets -4/-4 instead if you control a creature named Bogbrew Witch.
        Effect effect = new ConditionalContinousEffect(
                new BoostTargetEffect(-4,-4, Duration.EndOfTurn),
                new BoostTargetEffect(-1,-1, Duration.EndOfTurn),
                new LockedInCondition(new PermanentsOnTheBattlefieldCondition(filterBogbrewWitch)),
                "target creature an opponent controls gets -1/-1 until end of turn. That creature gets -4/-4 instead if you control a creature named Bogbrew Witch");
        Ability ability = new DiesTriggeredAbility(effect);
        ability.addTarget(new TargetCreaturePermanent(filterCreature));
        this.addAbility(ability);
    }
View Full Code Here

        // At the beginning of your upkeep, if you control twenty or more artifacts, you win the game.
        TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new WinGameSourceControllerEffect(), TargetController.YOU, false);
        this.addAbility(new ConditionalTriggeredAbility(
                ability,
                new PermanentsOnTheBattlefieldCondition(new FilterArtifactPermanent(), PermanentsOnTheBattlefieldCondition.CountType.MORE_THAN,19),
                "At the beginning of your upkeep, if you control twenty or more artifacts, you win the game."));

    }
View Full Code Here

    public DarkslickShores (UUID ownerId) {
        super(ownerId, 226, "Darkslick Shores", Rarity.RARE, new CardType[]{CardType.LAND}, null);
        this.expansionSetCode = "SOM";

        // Darkslick Shores enters the battlefield tapped unless you control two or fewer other lands.
        Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter, PermanentsOnTheBattlefieldCondition.CountType.FEWER_THAN, 3));
        String abilityText = "tapped unless you control two or fewer other lands";
        this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
       
        this.addAbility(new BlueManaAbility());
        this.addAbility(new BlackManaAbility());
View Full Code Here

        // As long as you control a Demon, Villainous Ogre has "{B}: Regenerate Villainous Ogre.
        this.addAbility(new ConditionalGainActivatedAbility(
                Zone.BATTLEFIELD,
                new RegenerateSourceEffect(),
                new ColoredManaCost(ColoredManaSymbol.B),
                new PermanentsOnTheBattlefieldCondition(filter),
                rule));       
    }
View Full Code Here

        // Target creature gets -1/-1 until end of turn. If you control a Faerie, draw a card.
        this.getSpellAbility().addEffect(new BoostTargetEffect(-1,-1,Duration.EndOfTurn));
        this.getSpellAbility().addTarget(new TargetCreaturePermanent());
        this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new DrawCardSourceControllerEffect(1),
                new PermanentsOnTheBattlefieldCondition(filter, PermanentsOnTheBattlefieldCondition.CountType.MORE_THAN, 0),
                "If you control a Faerie, draw a card"));
    }
View Full Code Here

        this.color.setBlack(true);


        // If you control a Swamp, destroy target nonblack creature.
        this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new DestroyTargetEffect(),
                new PermanentsOnTheBattlefieldCondition(filterCondition),"If you control a Swamp, destroy target nonblack creature"));
        this.getSpellAbility().addTarget(new TargetCreaturePermanent(filterTarget) );

        // Splice onto Arcane-Exile four cards from your graveyard.
        this.addAbility(new SpliceOntoArcaneAbility(new ExileFromGraveCost(new TargetCardInYourGraveyard(4,4, new FilterCard("cards")))));
       
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.