Package mage.target.common

Examples of mage.target.common.TargetCardInLibrary


  public TerramorphicExpanseAbility() {
    super(Zone.BATTLEFIELD, null);
    addCost(new TapSourceCost());
    addCost(new SacrificeSourceCost());
    TargetCardInLibrary target = new TargetCardInLibrary(new FilterBasicLandCard());
    addEffect(new SearchLibraryPutInPlayEffect(target, true, Outcome.PutLandInPlay));
  }
View Full Code Here


    this.color.setGreen(true);
    this.subtype.add("Human");
    this.subtype.add("Knight");
    this.power = new MageInt(2);
    this.toughness = new MageInt(2);
    TargetCardInLibrary target = new TargetCardInLibrary(new FilterLandCard());
    Costs costs = new CostsImpl();
    costs.add(new TapSourceCost());
    costs.add(new SacrificeTargetCost(new TargetControlledPermanent(1, 1, filter, false)));
    this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new KnightOfTheReliquaryEffect()));
    this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new SearchLibraryPutInPlayEffect(target, false, Outcome.PutLandInPlay), costs));
View Full Code Here

class PrimevalTitanAbility extends TriggeredAbilityImpl<PrimevalTitanAbility> {

  public PrimevalTitanAbility() {
    super(Zone.BATTLEFIELD, null, true);
    TargetCardInLibrary target = new TargetCardInLibrary(2, new FilterLandCard());
    this.addEffect(new SearchLibraryPutInPlayEffect(target, true, Outcome.PutLandInPlay));
  }
View Full Code Here

    public DiabolicTutor(UUID ownerId){
        super(ownerId, 135, "Diabolic Tutor", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT},"{2}{B}{B}");
        this.expansionSetCode = "10E";
        this.color.setBlack(true);
        TargetCardInLibrary target = new TargetCardInLibrary();
        this.getSpellAbility().addEffect(new SearchLibraryPutInHandEffect(target));
    }
View Full Code Here

  public RampantGrowth(UUID ownerId){
    super(ownerId, 201, "Rampant Growth", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{1}{G}");
    this.expansionSetCode = "M10";
    this.color.setGreen(true);
    TargetCardInLibrary target = new TargetCardInLibrary(new FilterBasicLandCard());
    this.getSpellAbility().addTarget(target);
    this.getSpellAbility().addEffect(new SearchLibraryPutInPlayEffect(target, true));
  }
View Full Code Here

  public EvolvingWildsAbility() {
    super(Zone.BATTLEFIELD, null);
    addCost(new TapSourceCost());
    addCost(new SacrificeSourceCost());
    TargetCardInLibrary target = new TargetCardInLibrary(new FilterBasicLandCard());
    addEffect(new SearchLibraryPutInPlayEffect(target, true, Outcome.PutLandInPlay));
  }
View Full Code Here

    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

        this.cost = cost;
        this.text = "Cycling";
    }
   
    public CyclingAbility(Cost cost, FilterCard filter, String text){
        super(Zone.HAND, new SearchLibraryPutInHandEffect(new TargetCardInLibrary(filter), true, true), cost);
        this.addCost(new DiscardSourceCost());
        this.cost = cost;
        this.text = text;
    }
View Full Code Here

    @Override
    public boolean replaceEvent(GameEvent event, Ability source, Game game) {
        Player player = game.getPlayer(event.getPlayerId());
        if (player != null) {
            TargetCardInLibrary target = new TargetCardInLibrary();
            if (player.searchLibrary(target, game)) {
                Card card = game.getCard(target.getFirstTarget());
                if (card != null) {
                    card.moveToZone(Zone.HAND, id, game, false);
                    player.shuffleLibrary(game);
                }
            }
View Full Code Here

        ArrayList<Predicate<MageObject>> subtypePredicates = new ArrayList<>();
        for (String subtype : subtypes) {
            subtypePredicates.add(new SubtypePredicate(subtype));
        }
        filter.add(Predicates.or(subtypePredicates));
        TargetCardInLibrary target = new TargetCardInLibrary(filter);
        addEffect(new SearchLibraryPutInPlayEffect(target, false, true, Outcome.PutLandInPlay));
    }
View Full Code Here

TOP

Related Classes of mage.target.common.TargetCardInLibrary

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.