Examples of AlternativeCostSourceAbility


Examples of mage.abilities.costs.AlternativeCostSourceAbility

        // You may exile a blue card from your hand rather than pay Misdirection's mana cost.
        FilterOwnedCard filterCardInHand = new FilterOwnedCard("a blue card from your hand");
        filterCardInHand.add(new ColorPredicate(ObjectColor.BLUE));
        // the exile cost can never be paid with the card itself
        filterCardInHand.add(Predicates.not(new CardIdPredicate(this.getId())));      
        this.addAbility(new AlternativeCostSourceAbility(new ExileFromHandCost(new TargetCardInHand(filterCardInHand))));

        // Change the target of target spell with a single target.
        this.getSpellAbility().addEffect(new ChooseNewTargetsTargetEffect(true, true));
        this.getSpellAbility().addTarget(new TargetSpell(filter2));
    }
View Full Code Here

Examples of mage.abilities.costs.AlternativeCostSourceAbility

        this.expansionSetCode = "CSP";

        this.color.setBlack(true);

        // You may exile two black cards from your hand rather than pay Soul Spike's mana cost.
        this.addAbility(new AlternativeCostSourceAbility(new ExileFromHandCost(new TargetCardInHand(2, filter))));
        // Soul Spike deals 4 damage to target creature or player and you gain 4 life.
        this.getSpellAbility().addTarget(new TargetCreatureOrPlayer());
        this.getSpellAbility().addEffect(new DamageTargetEffect(4));
        this.getSpellAbility().addEffect(new GainLifeEffect(4));
    }
View Full Code Here

Examples of mage.abilities.costs.AlternativeCostSourceAbility

        this.subtype.add("Trap");

        this.color.setBlack(true);

        // If a white creature is attacking, you may pay {B}{B} rather than pay Nemesis Trap's mana cost.
        this.addAbility(new AlternativeCostSourceAbility(new ManaCostsImpl("{B}{B}"), new PermanentsOnTheBattlefieldCondition(filter, PermanentsOnTheBattlefieldCondition.CountType.MORE_THAN, 0, false)));

        // Exile target attacking creature. Put a token that's a copy of that creature onto the battlefield. Exile it at the beginning of the next end step.
        this.getSpellAbility().addEffect(new NemesisTrapEffect());
        this.getSpellAbility().addTarget(new TargetAttackingCreature());
    }
View Full Code Here

Examples of mage.abilities.costs.AlternativeCostSourceAbility

        this.expansionSetCode = "CSP";

        this.color.setRed(true);

        // You may exile two red cards from your hand rather than pay Fury of the Horde's mana cost.
        this.addAbility(new AlternativeCostSourceAbility(new ExileFromHandCost(new TargetCardInHand(2, filter))));
       
        // Untap all creatures that attacked this turn. After this main phase, there is an additional combat phase followed by an additional main phase.
        this.getSpellAbility().addEffect(new FuryOfTheHordeUntapEffect());
        this.getSpellAbility().addEffect(new FuryOfTheHordeAddPhasesEffect());
        this.addWatcher(new AttackedThisTurnWatcher());
View Full Code Here

Examples of mage.abilities.costs.AlternativeCostSourceAbility

        // You may exile a red card with converted mana cost X from your hand rather than pay Blazing Shoal's mana cost.
        FilterOwnedCard filter = new FilterOwnedCard("a red card with converted mana cost X from your hand");
        filter.add(new ColorPredicate(ObjectColor.RED));
        filter.add(Predicates.not(new CardIdPredicate(this.getId()))); // the exile cost can never be paid with the card itself
        this.addAbility(new AlternativeCostSourceAbility(new ExileFromHandCost(new TargetCardInHand(filter))));

        // Target creature gets +X/+0 until end of turn.
        this.getSpellAbility().addEffect(new BoostTargetEffect(new ExileFromHandCostCardConvertedMana(), new StaticValue(0), Duration.EndOfTurn));
        this.getSpellAbility().addTarget(new TargetCreaturePermanent());
    }
View Full Code Here

Examples of mage.abilities.costs.AlternativeCostSourceAbility

        this.expansionSetCode = "MMQ";

        this.color.setRed(true);

        // You may sacrifice two Mountains rather than pay Pulverize's mana cost.
        this.addAbility(new AlternativeCostSourceAbility(new SacrificeTargetCost(new TargetControlledPermanent(2, 2, filter, true))));
       
        // Destroy all artifacts.
        this.getSpellAbility().addEffect(new DestroyAllEffect(new FilterArtifactPermanent()));
    }
View Full Code Here

Examples of mage.abilities.costs.AlternativeCostSourceAbility

        this.expansionSetCode = "MMQ";

        this.color.setGreen(true);

        // If you have no land cards in hand, you may reveal your hand rather than pay Land Grant's mana cost.
        this.addAbility(new AlternativeCostSourceAbility(new LandGrantReavealCost(), new LandGrantCondition(),
            "If you have no land cards in hand, you may reveal your hand rather than pay {this}'s mana cost."));

        // Search your library for a Forest card, reveal that card, and put it into your hand. Then shuffle your library.
        this.getSpellAbility().addEffect(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(filter), true, true));
    }
View Full Code Here

Examples of mage.abilities.costs.AlternativeCostSourceAbility

        this.expansionSetCode = "MMQ";

        this.color.setRed(true);

        // You may sacrifice a Mountain rather than pay Crash's mana cost.
        this.addAbility(new AlternativeCostSourceAbility(new SacrificeTargetCost(new TargetControlledPermanent(1, 1, alternativeCostFilter, true))));

        // Destroy target artifact.
        this.getSpellAbility().addEffect(new DestroyTargetEffect());
        this.getSpellAbility().addTarget(new TargetPermanent(effectFilter));
    }
View Full Code Here

Examples of mage.abilities.costs.AlternativeCostSourceAbility

        this.expansionSetCode = "MMQ";

        this.color.setBlack(true);

        // You may exile a black card from your hand rather than pay Unmask's mana cost.
        this.addAbility(new AlternativeCostSourceAbility(new ExileFromHandCost(new TargetCardInHand(filter))));    
       
        // Target player reveals his or her hand. You choose a nonland card from it. That player discards that card.
        this.getSpellAbility().addTarget(new TargetPlayer());
        this.getSpellAbility().addEffect(new DiscardCardYouChooseTargetEffect(filterNonLand, TargetController.ANY));
    }
View Full Code Here

Examples of mage.abilities.costs.AlternativeCostSourceAbility

        this.expansionSetCode = "MMQ";

        this.color.setBlack(true);

        // If you control a Swamp, you may pay 4 life rather than pay Snuff Out's mana cost.
        this.addAbility(new AlternativeCostSourceAbility(
                new PayLifeCost(4),
                new PermanentsOnTheBattlefieldCondition(filterSwamp, CountType.MORE_THAN, 0), null));
        //
        // Destroy target nonblack creature. It can't be regenerated.
        this.getSpellAbility().addEffect(new DestroyTargetEffect(true));
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.