Package mage.abilities.dynamicvalue.common

Examples of mage.abilities.dynamicvalue.common.ManacostVariableValue


    public Skyscribing(UUID ownerId) {
        super(ownerId, 57, "Skyscribing", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{X}{U}{U}");
        this.expansionSetCode = "C13";
        this.color.setBlue(true);
        // Each player draws X cards.
        this.getSpellAbility().addEffect(new DrawCardAllEffect(new ManacostVariableValue()));
        // Forecast - {2}{U}, Reveal Skyscribing from your hand: Each player draws a card.
        this.addAbility(new ForecastAbility(new DrawCardAllEffect(1), new ManaCostsImpl("{2}{U}")));
    }
View Full Code Here


        Effect effect = new AddCountersSourceEffect(CounterType.P1P1.createInstance(0), new ManaSpentToCastCount(), true);
        effect.setText("with a number of +1/+1 counters on it equal to the amount of mana spent to cast it");
        this.addAbility(new EntersBattlefieldAbility(effect));

        // {X}, Remove X +1/+1 counters from Marath: Choose one - Put X +1/+1 counters on target creature;
        effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance(0), new ManacostVariableValue());
        effect.setText("Put X +1/+1 counters on target creature");
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{X}"));
        ability.addCost(new MarathWillOfTheWildRemoveCountersCost());
        ability.addTarget(new TargetCreaturePermanent());

        // or Marath deals X damage to target creature or player;
        Mode mode = new Mode();
        mode.getEffects().add(new DamageTargetEffect(new ManacostVariableValue()));
        mode.getTargets().add(new TargetCreatureOrPlayer());
        ability.addMode(mode);

        // or put an X/X green Elemental creature token onto the battlefield.
        mode = new Mode();
View Full Code Here

    @Override
    public boolean apply(Game game, Ability source) {
        Player player = game.getPlayer(source.getControllerId());
        if (player != null) {
            int amount = new ManacostVariableValue().calculate(game, source, this);
            Token token = new MarathWillOfTheWildElementalToken();
            token.getPower().initValue(amount);
            token.getToughness().initValue(amount);
            token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId());
            return true;
View Full Code Here

        return false;
    }

    @Override
    public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana) {
        int amount = new ManacostVariableValue().calculate(game, ability, null);
        Permanent permanent = game.getPermanent(sourceId);
        if (permanent != null && permanent.getCounters().getCount(CounterType.P1P1) >= amount) {
            permanent.removeCounters(CounterType.P1P1.getName(), amount, game);
            this.paid = true;
        }
View Full Code Here

        // Supply
        // Put X 1/1 green Saproling creature tokens onto the battlefield.
        getRightHalfCard().getColor().setWhite(true);
        getRightHalfCard().getColor().setGreen(true);
        getRightHalfCard().getSpellAbility().addEffect(new CreateTokenEffect(new SaprolingToken(), new ManacostVariableValue()));

    }
View Full Code Here

    public DeathGrasp (UUID ownerId) {
        super(ownerId, 95, "Death Grasp", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{X}{W}{B}");
        this.expansionSetCode = "APC";
        this.color.setWhite(true);
        this.color.setBlack(true);
        this.getSpellAbility().addEffect(new DamageTargetEffect(new ManacostVariableValue()));
        this.getSpellAbility().addEffect(new GainLifeEffect(new ManacostVariableValue()));
        this.getSpellAbility().addTarget(new TargetCreatureOrPlayer());
    }
View Full Code Here

    public SandsOfDelirium(UUID ownerId) {
        super(ownerId, 216, "Sands of Delirium", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{3}");
        this.expansionSetCode = "M13";

        // {X}, {tap}: Target player puts the top X cards of his or her library into his or her graveyard.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PutLibraryIntoGraveTargetEffect(new ManacostVariableValue()), new VariableManaCost());
        ability.addCost(new TapSourceCost());
        ability.addTarget(new TargetPlayer());
        this.addAbility(ability);
    }
View Full Code Here

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

        // You gain X life and draw X cards.
        ManacostVariableValue manaX = new ManacostVariableValue();
        this.getSpellAbility().addEffect(new GainLifeEffect(manaX));
        this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(manaX));
    }
View Full Code Here

    public UntamedMight(UUID ownerId) {
        super(ownerId, 131, "Untamed Might", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{X}{G}");
        this.expansionSetCode = "SOM";
        this.color.setGreen(true);
        this.getSpellAbility().addTarget(new TargetCreaturePermanent());
        this.getSpellAbility().addEffect(new BoostTargetEffect(new ManacostVariableValue(), new ManacostVariableValue(), Duration.EndOfTurn));
    }
View Full Code Here

        this.toughness = new MageInt(1);

        // Changeling
        this.addAbility(ChangelingAbility.getInstance());
        // {X}: Creatures you control become X/X and gain all creature types until end of turn.
        DynamicValue variableMana = new ManacostVariableValue();
        Effect effect = new SetPowerToughnessAllEffect(variableMana, variableMana, Duration.EndOfTurn, filter, true);
        effect.setText("Creatures you control become X/X");
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new VariableManaCost());
        effect = new GainAbilityAllEffect(ChangelingAbility.getInstance(), Duration.EndOfTurn, filter);
        effect.setText("and gain all creature types until end of turn");
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.