Package mage.filter.common

Examples of mage.filter.common.FilterLandCard


        returnLandToHand.addTarget(targetLandYouControl);
        this.addAbility(returnLandToHand);

        // {1}, Discard a land card: Draw a card.
        Ability drawACard = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new GenericManaCost(1));
        drawACard.addCost(new DiscardTargetCost(new TargetCardInHand(new FilterLandCard("a land card"))));
        this.addAbility(drawACard);
    }
View Full Code Here


                    land.sacrifice(source.getSourceId(), game);
                    amount++;
                }
            }
        }
        TargetCardInLibrary target = new TargetCardInLibrary(amount, new FilterLandCard("lands"));
        if (player.searchLibrary(target, game)) {
            if (target.getTargets().size() > 0) {
                for (UUID cardId: (List<UUID>)target.getTargets()) {
                    Card card = player.getLibrary().getCard(cardId, game);
                    if (card != null) {
View Full Code Here

        //Destroy target land;
        this.getSpellAbility().addEffect(new DestroyTargetEffect());
        this.getSpellAbility().addTarget(new TargetLandPermanent());
        //or search your library for a land card, put that card onto the battlefield, then shuffle your library.
        Mode mode = new Mode();
        mode.getEffects().add(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(new FilterLandCard())));
        this.getSpellAbility().getModes().addMode(mode);

        // Entwine {1}{G}
        this.addAbility(new EntwineAbility("{1}{G}"));
    }
View Full Code Here

}

class RealmsUnchartedTarget extends TargetCardInLibrary {

    public RealmsUnchartedTarget() {
        super(0, 4, new FilterLandCard("land cards with different names"));
    }
View Full Code Here

        this.toughness = new MageInt(1);

        // {W}, {tap}: Search your library for a land card, reveal it, and put it into your hand. Then shuffle your library. Activate this ability only if an opponent controls more lands than you.
        Ability ability = new ActivateIfConditionActivatedAbility(
                Zone.BATTLEFIELD,
                new SearchLibraryPutInHandEffect(new TargetCardInLibrary(new FilterLandCard()), true, true),
                new ManaCostsImpl("{W}"),
                new OpponentControllsMoreCondition(new FilterLandPermanent("lands")));
        ability.addCost(new TapSourceCost());
        this.addAbility(ability);
    }
View Full Code Here

        this.getSpellAbility().addEffect(effect);
        this.getSpellAbility().addTarget(new TargetCreatureOrPlayer());
        // Discard a land card: Put two charge counters on Lightning Storm. You may choose a new target for it. Any player may activate this ability but only if Lightning Storm is on the stack.
        SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.STACK,
                new LightningStormAddCounterEffect() ,
                new DiscardTargetCost(new TargetCardInHand(new FilterLandCard())));
        ability.setMayActivate(TargetController.ANY);
        ability.addEffect(new EmptyEffect("Any player may activate this ability but only if {this} is on the stack"));
        this.addAbility(ability);
    }
View Full Code Here

        this.subtype.add("Construct");
        this.power = new MageInt(1);
        this.toughness = new MageInt(1);
        // {tap}: You may put a land card from your hand onto the battlefield.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PutLandFromHandOntoBattlefieldEffect(), new TapSourceCost());
        ability.addTarget(new TargetCardInHand(new FilterLandCard()));
        this.addAbility(ability);
    }
View Full Code Here

class LandGrantCondition implements Condition {
    @Override
    public boolean apply(Game game, Ability source) {  
        Player player = game.getPlayer(source.getControllerId());
        if (player != null && player.getHand().count(new FilterLandCard(), game) == 0) {
            return true;
        }
        return false;
    }
View Full Code Here

        Player player = game.getPlayer(source.getControllerId());
        if (player == null || !player.chooseUse(Outcome.PutLandInPlay, choiceText, game)) {
            return false;
        }

        TargetCardInHand target = new TargetCardInHand(new FilterLandCard());
        if (player.choose(Outcome.PutLandInPlay, target, source.getSourceId(), game)) {
            Card card = game.getCard(target.getFirstTarget());
            if (card != null) {
                card.putOntoBattlefield(game, Zone.HAND, source.getSourceId(), source.getControllerId());
                Permanent permanent = game.getPermanent(card.getId());
View Full Code Here

    @Override
    public boolean replaceEvent(GameEvent event, Ability source, Game game) {       
        Player player = game.getPlayer(source.getControllerId());       
        if (player != null){
            TargetCardInHand target = new TargetCardInHand(new FilterLandCard());
            Cost cost = new DiscardTargetCost(target);
            if (cost.canPay(source, source.getSourceId(), source.getControllerId(), game) &&
                    player.chooseUse(outcome, "Discard land? (Otherwise Mox Diamond goes to graveyard)", game) &&
                    player.chooseTarget(Outcome.Discard, target, source, game)){
                player.discard(game.getCard(target.getFirstTarget()), source, game);
View Full Code Here

TOP

Related Classes of mage.filter.common.FilterLandCard

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.