Package mage.abilities.dynamicvalue.common

Examples of mage.abilities.dynamicvalue.common.ManacostVariableValue


        this.expansionSetCode = "LEA";

        this.color.setGreen(true);

        // Hurricane deals X damage to each creature with flying and each player.
        this.getSpellAbility().addEffect(new DamageEverythingEffect(new ManacostVariableValue(), filter));
    }
View Full Code Here


        this.addAbility(new ColorlessManaAbility());

        // {X}{R}{G}, {T}: Target creature gets +X/+0 and gains trample until end of turn.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{X}{R}{G}"));
        ability.addCost(new TapSourceCost());
        ability.addEffect(new BoostTargetEffect(new ManacostVariableValue(), new StaticValue(0), Duration.EndOfTurn));
        ability.addTarget(new TargetCreaturePermanent());
        this.addAbility(ability);
    }
View Full Code Here

        this.expansionSetCode = "MOR";

        this.color.setRed(true);

        // Titan's Revenge deals X damage to target creature or player. Clash with an opponent. If you win, return Titan's Revenge to its owner's hand.
        this.getSpellAbility().addEffect(new DamageTargetEffect(new ManacostVariableValue()));
        this.getSpellAbility().addTarget(new TargetCreatureOrPlayer());
        this.getSpellAbility().addEffect(ClashWinReturnToHandSpellEffect.getInstance());
    }
View Full Code Here

        super(ownerId, 156, "Profane Command", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{X}{B}{B}");
        this.expansionSetCode = "C14";

        this.color.setBlack(true);

        DynamicValue xValue = new ManacostVariableValue();
        // Choose two -
        this.getSpellAbility().getModes().setMinModes(2);
        this.getSpellAbility().getModes().setMaxModes(2);
        // * Target player loses X life.
        this.getSpellAbility().addEffect(new LoseLifeTargetEffect(xValue));
View Full Code Here

        return new OrcishSettlersEffect(this);
    }

    @Override
    public boolean apply(Game game, Ability source) {
        int amount = new ManacostVariableValue().calculate(game, source, this);
        TargetLandPermanent target = new TargetLandPermanent(amount);

        Player player = game.getPlayer(source.getControllerId());
        if (player == null) {
            return false;
View Full Code Here

        this.color.setGreen(true);
        this.color.setWhite(true);

        // You gain X life if {G} was spent to cast Dawnglow Infusion and X life if {W} was spent to cast it.
        DynamicValue xValue = new ManacostVariableValue();
        this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
                new GainLifeEffect(xValue),
                new ManaWasSpentCondition(ColoredManaSymbol.G), "You gain X life if {G} was spent to cast {this}"));
        this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
                new GainLifeEffect(xValue),
View Full Code Here

        super(ownerId, 107, "Corrosive Gale", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{X}{GP}");
        this.expansionSetCode = "NPH";


        this.color.setGreen(true);
        this.getSpellAbility().addEffect(new DamageAllEffect(new ManacostVariableValue(), filter));
    }
View Full Code Here

        this.color.setWhite(true);
        this.power = new MageInt(2);
        this.toughness = new MageInt(2);

        // {X}, {tap}: You gain X life.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(new ManacostVariableValue()), new ManaCostsImpl("{X}"));
        ability.addCost(new TapSourceCost());
        this.addAbility(ability);
    }
View Full Code Here

        this.toughness = new MageInt(6);

        // Flying
        this.addAbility(FlyingAbility.getInstance());
        // {X}, {tap}: Crimson Hellkite deals X damage to target creature. Spend only red mana this way.
        Effect effect = new DamageTargetEffect(new ManacostVariableValue());
        effect.setText("{this} deals X damage to target creature. Spend only red mana this way");
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{X}"));
        ability.addCost(new TapSourceCost());
        VariableCost variableCost = ability.getManaCostsToPay().getVariableCosts().get(0);
        if (variableCost instanceof VariableManaCost) {
View Full Code Here

        this.expansionSetCode = "LEA";

        this.color.setRed(true);

        // Disintegrate deals X damage to target creature or player. That creature can't be regenerated this turn. If the creature would die this turn, exile it instead.
        this.getSpellAbility().addEffect(new DamageTargetEffect(new ManacostVariableValue()));
        this.getSpellAbility().addEffect(new CantRegenerateTargetEffect(Duration.EndOfTurn, "That creature"));
        Effect effect = new DealtDamageToCreatureBySourceDies(this, Duration.EndOfTurn);
        effect.setText("If the creature would die this turn, exile it instead");
        this.getSpellAbility().addEffect(effect);
        this.getSpellAbility().addTarget(new TargetCreatureOrPlayer());
View Full Code Here

TOP

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

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.