Package mage.filter

Examples of mage.filter.FilterPermanent


  protected Ability ability;
  protected boolean excludeSource;
  protected FilterPermanent filter;

  public GainAbilityControlledEffect(Ability ability, Duration duration) {
    this(ability, duration, new FilterPermanent());
  }
View Full Code Here


public class TargetPermanent<T extends TargetPermanent<T>> extends TargetObject<TargetPermanent<T>> {

  protected FilterPermanent filter;

  public TargetPermanent() {
    this(1, 1, new FilterPermanent(), false);
  }
View Full Code Here

    effects1.add(new GainLifeEffect(3));
    LoyaltyAbility ability2 = new LoyaltyAbility(effects1, -2);
    ability2.addTarget(new TargetCreatureOrPlayer());
    this.addAbility(ability2);

    FilterPermanent filter = new FilterPermanent("lands");
    filter.getCardType().add(CardType.LAND);
    LoyaltyAbility ability3 = new LoyaltyAbility(new DestroyAllControlledTargetEffect(filter), -7);
    ability3.addTarget(new TargetPlayer());
    this.addAbility(ability3);

View Full Code Here

    this.toughness = new MageInt(5);

    this.addAbility(FlyingAbility.getInstance());
    this.addAbility(FirstStrikeAbility.getInstance());
    this.addAbility(LifelinkAbility.getInstance());
    FilterPermanent filter1 = new FilterCreaturePermanent("Demon");
    filter1.getSubtype().add("Demon");
    this.addAbility(new ProtectionAbility(filter1));
    FilterPermanent filter2 = new FilterCreaturePermanent("Dragon");
    filter2.getSubtype().add("Dragon");
    this.addAbility(new ProtectionAbility(filter2));
  }
View Full Code Here

    return new OranRiefTheVastwoodEffect(this);
  }

  @Override
  public boolean apply(Game game, Ability source) {
    FilterPermanent filter = new FilterPermanent();
    filter.getCardType().add(CardType.CREATURE);
    filter.getColor().setGreen(true);
    for (Permanent permanent: game.getBattlefield().getActivePermanents(filter, source.getControllerId(), game)) {
      if (permanent.getTurnsOnBattlefield() == 0) {
        permanent.addCounters(new PlusOneCounter());
      }
    }
View Full Code Here

        this.minNumberOfTargets = minNumTargets;
        this.maxNumberOfTargets = maxNumTargets;
        this.zone = Zone.ALL;
        this.filter = new FilterSpellOrPermanent();
        this.targetName = filter.getMessage();
        this.filterPermanent = new FilterPermanent();
    }
View Full Code Here

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

        FilterPermanent filter = new FilterPermanent("Kabira Evangel or another Ally");
        filter.add(Predicates.or(
        new CardIdPredicate(this.getId()),
        new SubtypePredicate("Ally")));

        // Whenever Kabira Evangel or another Ally enters the battlefield under your control, you may choose a color. If you do, Allies you control gain protection from the chosen color until end of turn.
        this.addAbility(new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, new ChooseColorEffect(), filter, true));
View Full Code Here

    private FilterPermanent filter;
    private Integer multiplier;

    public PermanentsOnBattlefieldCount() {
        this(new FilterPermanent(), 1);
    }
View Full Code Here

        this("player or permanent");
    }

    public FilterPermanentOrPlayer(String name) {
        super(name);
        permanentFilter = new FilterPermanent();
        playerFilter = new FilterPlayer();
    }
View Full Code Here

        this.power = new MageInt(3);
        this.toughness = new MageInt(2);

        String rule = "you may gain control of target creature for as long as you control Roil Elemental";

        FilterPermanent filter = new FilterPermanent();
        filter.add(new ControllerPredicate(TargetController.YOU));
        filter.add(new CardIdPredicate(this.getId()));

        // 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.
View Full Code Here

TOP

Related Classes of mage.filter.FilterPermanent

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.