Package mage.abilities.dynamicvalue.common

Examples of mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount.calculate()


    public boolean apply(Game game, Ability source) {
        Player player = game.getPlayer(source.getControllerId());
        Permanent permanent = game.getPermanent(source.getSourceId());
        if (player != null && permanent != null) {
            PermanentsOnBattlefieldCount amount = new PermanentsOnBattlefieldCount(filter, 1);
            int count = amount.calculate(game, source, this);
            if (count == 0) {
                return true;
            }
            if (player.chooseUse(Outcome.Benefit, "Pay " + count + "?", game)) {
                GenericManaCost cost = new GenericManaCost(count);
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

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.