Examples of FilterCard


Examples of mage.filter.FilterCard

  }

  FilterCard filter2;

  public BraveTheElementsEffect() {
    super(new ProtectionAbility(new FilterCard()), Duration.EndOfTurn, filter1);
    filter2 = (FilterCard)((ProtectionAbility)ability).getFilter();
    filter2.setUseColor(true);
  }
View Full Code Here

Examples of mage.filter.FilterCard

  @Override
  public boolean apply(Game game, Ability source) {
    ChoiceColor choice = (ChoiceColor) source.getChoices().get(0);
    filter2.setColor(choice.getColor());
    filter2.setMessage(choice.getChoice());
    ability = new ProtectionAbility(new FilterCard(filter2));
    return super.apply(game, source);
  }
View Full Code Here

Examples of mage.filter.FilterCard

  public FetchLandActivatedAbility(String[] subTypes) {
    super(Zone.BATTLEFIELD, null);
    addCost(new TapSourceCost());
    addCost(new PayLifeCost(1));
    addCost(new SacrificeSourceCost());
    FilterCard filter = new FilterCard(subTypeNames(subTypes));
    filter.getCardType().add(CardType.LAND);
    for (String subType: subTypes) {
      filter.getSubtype().add(subType);
    }
    filter.setScopeSubtype(ComparisonScope.Any);
    TargetCardInLibrary target = new TargetCardInLibrary(filter);
    addEffect(new SearchLibraryPutInPlayEffect(target, false, Outcome.PutLandInPlay));
  }
View Full Code Here

Examples of mage.filter.FilterCard

    @Override
    public boolean apply(Game game, Ability source) {
        Player player = game.getPlayer(source.getControllerId());
        if (player != null) {
            FilterCard filter = new FilterCard("red instant or sorcery card from your graveyard to play");
            filter.add(new ColorPredicate(ObjectColor.RED));
            filter.add(Predicates.or(
                    new CardTypePredicate(CardType.INSTANT),
                    new CardTypePredicate(CardType.SORCERY)));

            String message = "Play red instant or sorcery card from your graveyard without paying its mana cost?";
            Set<Card> cards = player.getGraveyard().getCards(filter, game);
View Full Code Here

Examples of mage.filter.FilterCard

                            if (!cards.contains(card.getId())) {
                                cards.add(card);
                            }
                        }
                    } else {
                        Target target = new TargetDiscard(numberOfCardsToDiscard, numberOfCardsToDiscard, new FilterCard(), playerId);
                        player.chooseTarget(outcome, target, source, game);
                        cards.addAll(target.getTargets());
                    }
                    cardsToDiscard.put(playerId, cards);
                }
View Full Code Here

Examples of mage.filter.FilterCard

    public DiscardCardCost() {
        this(false);
    }

    public DiscardCardCost(boolean randomDiscard) {
        this(new FilterCard(randomDiscard ?"a card at random":"a card"), randomDiscard);
    }
View Full Code Here

Examples of mage.filter.FilterCard

    }
    private final FilterCard filter2;
    private final ObjectColor chosenColor;

    public GainProtectionFromChosenColorEffect(ObjectColor chosenColor) {
        super(new ProtectionAbility(new FilterCard()), Duration.EndOfTurn, filter1);
        filter2 = (FilterCard) ((ProtectionAbility) getFirstAbility()).getFilter();
        this.chosenColor = chosenColor;
    }
View Full Code Here

Examples of mage.filter.FilterCard

    @Override
    public boolean apply(Game game, Ability source) {
        filter2.add(new ColorPredicate(chosenColor));
        filter2.setMessage(chosenColor.getDescription());
        setAbility(new ProtectionAbility(new FilterCard(filter2)));
        return super.apply(game, source);
    }
View Full Code Here

Examples of mage.filter.FilterCard

    private FilterCard filter;
    private Integer amount;

    public CardsInControllerGraveyardCount() {
        this(new FilterCard(), 1);
    }
View Full Code Here

Examples of mage.filter.FilterCard

public class CardsInAllGraveyardsCount implements DynamicValue {

    private FilterCard filter;

    public CardsInAllGraveyardsCount() {
        this(new FilterCard());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.