Examples of AlternativeCostSourceAbility


Examples of mage.abilities.costs.AlternativeCostSourceAbility

        // You may exile a black card with converted mana cost X from your hand rather than pay Sickening Shoal's mana cost.
        FilterOwnedCard filter = new FilterOwnedCard("a black card with converted mana cost X from your hand");
        filter.add(new ColorPredicate(ObjectColor.BLACK));
        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/-X until end of turn.
        DynamicValue x = new SignInversionDynamicValue(new ExileFromHandCostCardConvertedMana());
        this.getSpellAbility().addEffect(new BoostTargetEffect(x, x, Duration.EndOfTurn, true));
        this.getSpellAbility().addTarget(new TargetCreaturePermanent());
View Full Code Here

Examples of mage.abilities.costs.AlternativeCostSourceAbility

        // You may exile a red card from your hand rather than pay Pyrokinesis's mana cost.
        FilterOwnedCard filter = new FilterOwnedCard("a red card 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))));
       
        // Pyrokinesis deals 4 damage divided as you choose among any number of target creatures.
        this.getSpellAbility().addEffect(new DamageMultiEffect(4));
        this.getSpellAbility().addTarget(new TargetCreaturePermanentAmount(4));
    }
View Full Code Here

Examples of mage.abilities.costs.AlternativeCostSourceAbility

        FilterOwnedCard filter = new FilterOwnedCard("black card from your hand");
        filter.add(new ColorPredicate(ObjectColor.BLACK));
        filter.add(Predicates.not(new CardIdPredicate(this.getId()))); // the exile cost can never be paid with the card itself
       
        // You may pay 1 life and exile a black card from your hand rather than pay Contagion's mana cost.
        AlternativeCostSourceAbility ability = new AlternativeCostSourceAbility(new PayLifeCost(1));
        ability.addCost(new ExileFromHandCost(new TargetCardInHand(filter)));
        this.addAbility(ability)
       
        // Distribute two -2/-1 counters among one or two target creatures.
        this.getSpellAbility().addTarget(new TargetCreaturePermanentAmount(2));
        this.getSpellAbility().addEffect(new DistributeCountersEffect());
View Full Code Here

Examples of mage.abilities.costs.AlternativeCostSourceAbility

        // You may exile a green card with converted mana cost X from your hand rather than pay Nourishing Shoal's mana cost.
        FilterOwnedCard filter = new FilterOwnedCard("a green card with converted mana cost X from your hand");
        filter.add(new ColorPredicate(ObjectColor.GREEN));
        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))));

        // You gain X life.
        this.getSpellAbility().addEffect(new GainLifeEffect(new ExileFromHandCostCardConvertedMana()));

    }
View Full Code Here

Examples of mage.abilities.costs.AlternativeCostSourceAbility

        // You may exile a blue card with converted mana cost X from your hand rather than pay Disrupting Shoal's mana cost.
        FilterOwnedCard filter = new FilterOwnedCard("a blue card with converted mana cost X from your hand");
        filter.add(new ColorPredicate(ObjectColor.BLUE));
        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))));

        // 2/1/2005: Disrupting Shoal can target any spell, but does nothing unless that spell's converted mana cost is X.
        // Counter target spell if its converted mana cost is X.
        this.getSpellAbility().addEffect(new DisruptingShoalCounterTargetEffect());
        this.getSpellAbility().addTarget(new TargetSpell());
View Full Code Here

Examples of mage.abilities.costs.AlternativeCostSourceAbility

        this.power = new MageInt(7);
        this.toughness = new MageInt(7);

        // You may sacrifice four Eldrazi Spawn rather than pay Hand of Emrakul's mana cost.
        this.addAbility(new AlternativeCostSourceAbility(new SacrificeTargetCost(new TargetControlledPermanent(4, 4, filter, true))));
        // Annihilator 1
        this.addAbility(new AnnihilatorAbility(1));
    }
View Full Code Here

Examples of mage.abilities.costs.AlternativeCostSourceAbility

        this.expansionSetCode = "NMS";

        this.color.setBlue(true);

        // You may return an Island you control to its owner's hand rather than pay Daze's mana cost.
        this.addAbility(new AlternativeCostSourceAbility(new ReturnToHandTargetCost(new TargetControlledPermanent(filter))));

        // Counter target spell unless its controller pays {1}.
        this.getSpellAbility().addTarget(new TargetSpell());
        this.getSpellAbility().addEffect(new CounterUnlessPaysEffect(new GenericManaCost(1)));
    }
View Full Code Here

Examples of mage.abilities.costs.AlternativeCostSourceAbility

        this.expansionSetCode = "FUT";

        this.color.setWhite(true);

        // If you've cast another white spell this turn, you may cast Patrician's Scorn without paying its mana cost.
        this.addAbility(new AlternativeCostSourceAbility(new CastWhiteSpellThisTurnCondition()));
        this.addWatcher(new PatriciansScornWatcher());
        // Destroy all enchantments.
        this.getSpellAbility().addEffect(new DestroyAllEffect(new FilterEnchantmentPermanent()));
    }
View Full Code Here

Examples of mage.abilities.costs.AlternativeCostSourceAbility

        // You may exile a blue card from your hand rather than pay Snapback's mana cost.
        FilterOwnedCard filterCardInHand = new FilterOwnedCard("a blue card from your hand");
        filterCardInHand.add(new ColorPredicate(ObjectColor.BLUE));
        filterCardInHand.add(Predicates.not(new CardIdPredicate(this.getId())));      
        this.addAbility(new AlternativeCostSourceAbility(new ExileFromHandCost(new TargetCardInHand(filterCardInHand))));
       
        // Return target creature to its owner's hand.
        this.getSpellAbility().addTarget(new TargetCreaturePermanent());
        this.getSpellAbility().addEffect(new ReturnToHandTargetEffect());
    }
View Full Code Here

Examples of mage.abilities.costs.AlternativeCostSourceAbility

        this.color.setBlack(true);
        this.power = new MageInt(9);
        this.toughness = new MageInt(9);
       
        // You may pay 6 life and sacrifice three black creatures rather than pay Demon of Death's Gate's mana cost
        AlternativeCostSourceAbility alternateCosts = new AlternativeCostSourceAbility(new PayLifeCost(6));
        alternateCosts.addCost(new SacrificeTargetCost(new TargetControlledPermanent(3, 3, filter, false)));
        this.addAbility(alternateCosts);

        this.addAbility(FlyingAbility.getInstance());
        this.addAbility(TrampleAbility.getInstance());
    }
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.