Package mage.abilities.dynamicvalue.common

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


        Permanent permanent = game.getPermanent(source.getSourceId());
        if (permanent != null) {
            Object obj = getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY);
            if (obj != null && obj instanceof SpellAbility) {
                CardsInAllGraveyardsCount instantsAndSorceries = new CardsInAllGraveyardsCount(new FilterInstantOrSorceryCard("instant or sorcery cards"));
                int instantsAndSorceriesCount = instantsAndSorceries.calculate(game, source, this);
                if (instantsAndSorceriesCount > 0) {
                    permanent.addCounters(CounterType.P1P1.createInstance(instantsAndSorceriesCount), 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.