Package mage.filter.common

Examples of mage.filter.common.FilterLandPermanent


* @author BetaSteward_at_googlemail.com
*/
public class TargetLandPermanent<T extends TargetLandPermanent<T>> extends TargetPermanent<TargetLandPermanent<T>> {

  public TargetLandPermanent() {
    this(1, 1, new FilterLandPermanent(), false);
  }
View Full Code Here


  public TargetLandPermanent(FilterLandPermanent filter) {
    this(1, 1, filter, false);
  }

  public TargetLandPermanent(int numTargets) {
    this(numTargets, numTargets, new FilterLandPermanent(), false);
  }
View Full Code Here

  public static SwampwalkAbility getInstance() {
    return fINSTANCE;
  }

  private SwampwalkAbility() {
    filter = new FilterLandPermanent("Swamp");
    filter.getSubtype().add("Swamp");
    filter.setScopeSubtype(ComparisonScope.Any);
  }
View Full Code Here

  public static MountainwalkAbility getInstance() {
    return fINSTANCE;
  }

  private MountainwalkAbility() {
    filter = new FilterLandPermanent("Mountain");
    filter.getSubtype().add("Mountain");
    filter.setScopeSubtype(ComparisonScope.Any);
  }
View Full Code Here

  public static ForestwalkAbility getInstance() {
    return fINSTANCE;
  }

  private ForestwalkAbility() {
    filter = new FilterLandPermanent("Forest");
    filter.getSubtype().add("Forest");
    filter.setScopeSubtype(ComparisonScope.Any);
  }
View Full Code Here

  public static IslandwalkAbility getInstance() {
    return fINSTANCE;
  }

  private IslandwalkAbility() {
    filter = new FilterLandPermanent("Island");
    filter.getSubtype().add("Island");
    filter.setScopeSubtype(ComparisonScope.Any);
  }
View Full Code Here

    @Override
    public boolean apply(Game game, Ability source) {
        Player player = game.getPlayer(source.getControllerId());
        if (player != null) {
            for (Permanent land: game.getBattlefield().getAllActivePermanents(new FilterLandPermanent(), player.getId(), game)) {
                land.untap(game);
            }
            return true;
        }
        return false;
View Full Code Here

        this.amount = effect.amount;
    }

    @Override
    public boolean apply(Game game, Ability source) {
        TargetLandPermanent target = new TargetLandPermanent(0, amount, new FilterLandPermanent(), true);
        if (target.canChoose(source.getControllerId(), game)) {
            if (target.choose(Outcome.Untap, source.getControllerId(), source.getSourceId(), game)) {
                for (Object targetId : target.getTargets()) {
                    Permanent p = game.getPermanent((UUID) targetId);
                    if (p.isTapped())
View Full Code Here

        assertLife(playerA, 20);
        assertLife(playerB, 20);
        assertLife(playerC, 20);
        assertLife(playerD, 20);

        FilterPermanent filterPermanent = new FilterLandPermanent();
        filterPermanent.add(new SubtypePredicate("Forest"));
        List<Permanent> forestCards = currentGame.getBattlefield().getAllActivePermanents(filterPermanent, currentGame);
        Assert.assertEquals(4, forestCards.size());
    }
View Full Code Here

        assertGraveyardCount(playerA, "Ephemeral Shields", 1);
        assertPermanentCount(playerA, "Silvercoat Lion", 1); // was indestructible
        assertPermanentCount(playerA, "Oreskos Swiftclaw", 1);

        for (Permanent permanent: currentGame.getBattlefield().getAllActivePermanents(new FilterLandPermanent(), playerA.getId(), currentGame)) {
            Assert.assertTrue(permanent.getName() + " may not be tapped", !permanent.isTapped());
        }
    }
View Full Code Here

TOP

Related Classes of mage.filter.common.FilterLandPermanent

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.