Package mage.abilities.dynamicvalue.common

Examples of mage.abilities.dynamicvalue.common.GetXValue


        // As an additional cost to cast Hatred, pay X life.
        this.getSpellAbility().addCost(new PayVariableLifeCost(true));

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


    @Override
    public void adjustTargets(Ability ability, Game game) {
        if (ability instanceof SimpleActivatedAbility) {
            for (Effect effect : ability.getEffects()) {
                if (effect instanceof ReturnFromGraveyardToBattlefieldTargetEffect) {
                    int xValue = new GetXValue().calculate(game, ability, null);
                    ability.getTargets().clear();
                    ability.addTarget(new TargetCardInYourGraveyard(xValue,xValue, new FilterCreatureCard("creature cards from your graveyard")));
                }
            }
        }
View Full Code Here

        // As an additional cost to cast Harvest Pyre, exile X cards from your graveyard.
        this.getSpellAbility().addCost(new ExileXFromYourGraveCost(new FilterCard("cards from your graveyard")));

        // Harvest Pyre deals X damage to target creature.
        this.getSpellAbility().addTarget(new TargetCreaturePermanent());
        this.getSpellAbility().addEffect(new DamageTargetEffect(new GetXValue()));
    }
View Full Code Here

        super(card);
    }

    @Override
    public void adjustTargets(Ability ability, Game game) {
        int xValue = new GetXValue().calculate(game, ability, null);
        if (xValue > 0) {
            Target target = new TargetCreatureOrPlayer(xValue);
            ability.addTarget(target);
        }
    }
View Full Code Here

    }

    @Override
    public boolean apply(Game game, Ability source) {
        Player you = game.getPlayer(source.getControllerId());
        int amount = (new GetXValue()).calculate(game, source, this);
        if (you != null) {
            if (source.getTargets().size() > 0) {
                for (UUID targetId : this.getTargetPointer().getTargets(game, source)) {
                    Permanent creature = game.getPermanent(targetId);
                    if (creature != null) {
View Full Code Here

        return new BurnAtTheStakeEffect(this);
    }

    @Override
    public boolean apply(Game game, Ability source) {
        int amount = (new GetXValue()).calculate(game, source, this) * 3;

        Permanent permanent = game.getPermanent(targetPointer.getFirst(game, source));
        if (permanent != null) {
            permanent.damage(amount, source.getSourceId(), game, false, true);
            return true;
View Full Code Here

    @Override
    public boolean apply(Game game, Ability source) {
        ElementalToken token = new ElementalToken();
       
        token.getPower().initValue(new GetXValue().calculate(game, source, this));
        token.getToughness().initValue(new GetXValue().calculate(game, source, this));
       
        token.putOntoBattlefield(2, game, source.getSourceId(), source.getControllerId());
       
        return true;
    }
View Full Code Here

        super(ownerId, 85, "Retribution of the Ancients", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{B}");
        this.expansionSetCode = "KTK";

        this.color.setBlack(true);

        DynamicValue xValue = new SignInversionDynamicValue(new GetXValue());
        // {B}, Remove X +1/+1 counters from among creatures you control: Target creature gets -X/-X until end of turn.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(xValue,xValue,Duration.EndOfTurn, true), new ManaCostsImpl("{B}"));
        ability.addCost(new RemoveVariableCountersTargetCost(filter, CounterType.P1P1, "X", 0));
        ability.addTarget(new TargetCreaturePermanent());
        this.addAbility(ability);
View Full Code Here

        super(card);
    }

    @Override
    public void adjustTargets(Ability ability, Game game) {
        int xValue = new GetXValue().calculate(game, ability, null);
//        if (xValue > 0) {
            Target target = new TargetCardInYourGraveyard(xValue, new FilterCard("card from your graveyard"));
            ability.addTarget(target);
//        }
    }
View Full Code Here

    @Override
    public boolean apply(Game game, Ability source) {
        Player you = game.getPlayer(source.getControllerId());
        ChoiceColor choice = (ChoiceColor) source.getChoices().get(0);
        if (you != null && choice != null) {
            int count = new GetXValue().calculate(game, source, this);
            if (choice.getColor().isBlack()) {
                you.getManaPool().addMana(new Mana(0, 0, 0, 0, count, 0, 0), game, source);
            } else if (choice.getColor().isBlue()) {
                you.getManaPool().addMana(new Mana(0, 0, count, 0, 0, 0, 0), game, source);
            } else if (choice.getColor().isRed()) {
View Full Code Here

TOP

Related Classes of mage.abilities.dynamicvalue.common.GetXValue

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.