Package mage.abilities.dynamicvalue

Examples of mage.abilities.dynamicvalue.DynamicValue


        this.color.setBlack(true);
        this.power = new MageInt(1);
        this.toughness = new MageInt(1);

        // Wight of Precinct Six gets +1/+1 for each creature card in your opponents' graveyards.
        DynamicValue boost = new CardsInOpponentGraveyardsCount(filter);
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(boost, boost, Duration.WhileOnBattlefield)));
    }
View Full Code Here


        // Cumulative upkeep {G}
        this.addAbility(new CumulativeUpkeepAbility(new ManaCostsImpl("{G}")));
        // {2}{G}, Pay 3 life for each velocity counter on Tornado: Destroy target permanent and put a velocity counter on Tornado. Activate this ability only once each turn.
        Ability ability = new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{2}{G}"));
        DynamicValue lifeToPayAmount = new MultipliedValue(new CountersCount(CounterType.VELOCITY), 3);
        ability.addCost(new PayLifeCost(lifeToPayAmount, "3 life for each velocity counter on {source}"));
        ability.addTarget(new TargetPermanent());
        Effect effect = new AddCountersSourceEffect(CounterType.VELOCITY.createInstance());
        effect.setText("and put a velocity counter on {source}");
        ability.addEffect(effect);
View Full Code Here

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

        // Target creature gets +X/-X until end of turn, where X is the number of cards in your hand.
        DynamicValue xValue =  new CardsInControllerHandCount();
        this.getSpellAbility().addEffect(new BoostTargetEffect(xValue, new SignInversionDynamicValue(xValue), Duration.EndOfTurn, true));
        this.getSpellAbility().addTarget(new TargetCreaturePermanent());
    }
View Full Code Here

        return new DisruptingShoalCounterTargetEffect(this);
    }

    @Override
    public boolean apply(Game game, Ability source) {
        DynamicValue amount = new ExileFromHandCostCardConvertedMana();
        Spell spell = game.getStack().getSpell(targetPointer.getFirst(game, source));
        if (spell != null && spell.getConvertedManaCost() == amount.calculate(game, source, this)) {
            return game.getStack().counter(source.getFirstTarget(), source.getSourceId(), game);
        }
        return false;
    }
View Full Code Here

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

        // Aurelia's Fury deals X damage divided as you choose among any number of target creatures and/or players.
        // Tap each creature dealt damage this way. Players dealt damage this way can't cast noncreature spells this turn.
        DynamicValue xValue = new ManacostVariableValue();
        this.getSpellAbility().addEffect(new DamageMultiEffect(xValue));
        this.getSpellAbility().addEffect(new AureliasFuryEffect());
        this.getSpellAbility().addTarget(new TargetCreatureOrPlayerAmount(xValue));
        this.addWatcher(new AureliasFuryDamagedByWatcher());
View Full Code Here

        this.getSpellAbility().addEffect(new AttachEffect(Outcome.UnboostCreature));
        Ability ability = new EnchantAbility(auraTarget.getTargetName());
        this.addAbility(ability);

        // Enchanted Creature gets -X/-X, where X is the number of creature cards in it's controller's graveyard.
        DynamicValue unboost = new SignInversionDynamicValue(
                new CardsInEnchantedCreaturesControllerGraveyardCount(new FilterCreatureCard("creature cards in it's controller's graveyard")));
        ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(unboost,unboost, Duration.WhileOnBattlefield));
        this.addAbility(ability);
    }
View Full Code Here

        this.toughness = new MageInt(0);

        // Flying
        this.addAbility(FlyingAbility.getInstance());
        // Cognivore's power and toughness are each equal to the number of instant cards in all graveyards.
        DynamicValue value = (new CardsInAllGraveyardsCount(filter));
        this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(value, Duration.EndOfGame)));
    }
View Full Code Here

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

        // Jarad, Golgari Lich Lord gets +1/+1 for each creature card in your graveyard.
        DynamicValue amount = new CardsInControllerGraveyardCount(new FilterCreatureCard());
        Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(amount, amount, Duration.WhileOnBattlefield));
        this.addAbility(ability);
       
        // {1}{B}{G}, Sacrifice another creature: Each opponent loses life equal to the sacrificed creature's power.
        ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new LoseLifeOpponentsEffect(new SacrificeCostCreaturesPower()),new ManaCostsImpl("{1}{B}{G}"));
View Full Code Here

        super(ownerId, 38, "Bond of Agony", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{X}{B}");
        this.expansionSetCode = "DIS";

        this.color.setBlack(true);

        DynamicValue xValue = new ManacostVariableValue();

        // As an additional cost to cast Bond of Agony, pay X life.
        // magenoxx: here we don't use PayVariableLifeCost as {X} shouldn't actually be announced
        this.getSpellAbility().addCost(new PayLifeCost(xValue, "X life"));
View Full Code Here

        super(effect);
    }

    @Override
    public boolean apply(Game game, Ability source) {
        DynamicValue amount = new CountersCount(CounterType.CHARGE);
        for (UUID playerId : game.getOpponents(source.getControllerId())) {
            Player player = game.getPlayer(playerId);
            if (player != null) {
                player.damage(amount.calculate(game, source, this), source.getSourceId(), game, false, true);
            }
        }
        return true;
    }
View Full Code Here

TOP

Related Classes of mage.abilities.dynamicvalue.DynamicValue

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.