Package mage.abilities.dynamicvalue

Examples of mage.abilities.dynamicvalue.DynamicValue.calculate()


    }

    @Override
    public boolean apply(Game game, Ability source) {
        DynamicValue value = new MultikickerCount();
        int damage = value.calculate(game, source, this) * 2;

        Player player = game.getPlayer(source.getFirstTarget());
        if (player != null) {
            player.damage(damage, id, game, false, true);
            return true;
View Full Code Here


    @Override
    public boolean apply(Game game, Ability source) {
        Player player = game.getPlayer(source.getControllerId());
        DynamicValue value = new CardsInControllerGraveyardCount();
        if (player != null) {
            player.gainLife(value.calculate(game, source, this) * 2, game);
            player.getLibrary().addAll(player.getGraveyard().getCards(game), game);
            player.getGraveyard().clear();
            player.shuffleLibrary(game);
            return true;
        }
View Full Code Here

    }

    @Override
    public boolean apply(Game game, Ability source) {
        DynamicValue value = new PermanentsOnBattlefieldCount(filter);
        int count = value.calculate(game, source, this) * 2;

        Player player = game.getPlayer(source.getFirstTarget());
        if (player != null) {
            player.loseLife(count, game);
        }
View Full Code Here

    @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

    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
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.