Package mage.abilities.dynamicvalue.common

Examples of mage.abilities.dynamicvalue.common.DevotionCount


    }

    @Override
    public void init(Ability source, Game game) {
        super.init(source, game);
        amount = new DevotionCount(ColoredManaSymbol.W).calculate(game, source, this);
    }
View Full Code Here


        this.toughness = new MageInt(4);

        // Indestructible
        this.addAbility(IndestructibleAbility.getInstance());
        // As long as your devotion to white and black is less than seven, Athreos isn't a creature.
        Effect effect = new LoseCreatureTypeSourceEffect(new DevotionCount(ColoredManaSymbol.W, ColoredManaSymbol.B), 7);
        effect.setText("As long as your devotion to white and black is less than seven, Athreos isn't a creature");
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));       
        // Whenever another creature you own dies, return it to your hand unless target opponent pays 3 life.
        Ability ability = new AthreosDiesCreatureTriggeredAbility(new AthreosGodOfPassageReturnEffect(), false, filter);
        ability.addTarget(new TargetOpponent());
View Full Code Here

        this.expansionSetCode = "BNG";

        this.color.setBlack(true);

        // You draw X cards and you lose X life, where X is your devotion to black.
        DynamicValue blackDevotion = new DevotionCount(ColoredManaSymbol.B);
        Effect effect = new DrawCardSourceControllerEffect(blackDevotion);
        effect.setText("You draw X cards");
        this.getSpellAbility().addEffect(effect);
        effect = new LoseLifeSourceControllerEffect(blackDevotion);
        effect.setText("and you lose X life, where X is your devotion to black");       
View Full Code Here

        this.toughness = new MageInt(5);

        // Indestructible
        this.addAbility(IndestructibleAbility.getInstance());
        // As long as your devotion to red and green is less than seven, Xenagos isn't a creature.
        Effect effect = new LoseCreatureTypeSourceEffect(new DevotionCount(ColoredManaSymbol.R, ColoredManaSymbol.G), 7);
        effect.setText("As long as your devotion to red and green is less than seven, Xenagos isn't a creature");
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));

        // At the beginning of combat on your turn, another target creature you control gains haste and gets +X/+X until end of turn, where X is that creature's power.
        effect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn);
View Full Code Here

    @Override
    public boolean apply(Game game, Ability source, Ability abilityToModify) {
        SpellAbility spellAbility = (SpellAbility)abilityToModify;
        Mana mana = spellAbility.getManaCostsToPay().getMana();
        if (mana.getColorless() > 0) {
            int count = new DevotionCount(ColoredManaSymbol.B).calculate(game, source, this);
            int newCount = mana.getColorless() - count;
            if (newCount < 0) {
                newCount = 0;
            }
            mana.setColorless(newCount);
View Full Code Here

        this.toughness = new MageInt(5);

        // Indestructible
        this.addAbility(IndestructibleAbility.getInstance());
        // As long as your devotion to black and red is less than seven, Mogis isn't a creature.
        Effect effect = new LoseCreatureTypeSourceEffect(new DevotionCount(ColoredManaSymbol.B, ColoredManaSymbol.R), 7);
        effect.setText("As long as your devotion to black and red is less than seven, Mogis isn't a creature");
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));       
       
        // At the beginning of each opponent's upkeep, Mogis deals 2 damage to that player unless he or she sacrifices a creature.       
        effect = new DoUnlessTargetPaysCost(new DamageTargetEffect(2, false, "that player"), new SacrificeTargetCost(new TargetControlledCreaturePermanent()),
View Full Code Here

        this.toughness = new MageInt(6);

        // Indestructible
        this.addAbility(IndestructibleAbility.getInstance());
        // As long as your devotion to white is less than five, Nylea isn't a creature.<i>(Each {G} in the mana costs of permanents you control counts towards your devotion to green.)</i>
        Effect effect = new LoseCreatureTypeSourceEffect(new DevotionCount(ColoredManaSymbol.G), 5);
        effect.setText("As long as your devotion to green is less than five, Nylea isn't a creature.<i>(Each {G} in the mana costs of permanents you control counts towards your devotion to green.)</i>");
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
        // Other creatures you control have trample.
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.WhileOnBattlefield, new FilterCreaturePermanent(), true)));
        // {3}{G}: Target creature gets +2/+2 until end of turn.
View Full Code Here

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

        // {T}: Add an amount of {G} to your mana pool equal to your devotion to green.
        this.addAbility(new DynamicManaAbility(Mana.GreenMana, new DevotionCount(ColoredManaSymbol.G),
                "Add an amount of {G} to your mana pool equal to your devotion to green. (Each {G} in the mana costs of permanents you control counts towards your devotion to green.)"));
    }
View Full Code Here

    @Override
    public void adjustTargets(Ability ability, Game game) {
        if (ability instanceof EntersBattlefieldTriggeredAbility) {
            ability.getTargets().clear();
            int numbTargets = new DevotionCount(ColoredManaSymbol.B).calculate(game, ability, null);
            if (numbTargets > 0) {
                ability.addTarget(new TargetCreaturePermanent(0,numbTargets));
            }
        }
    }
View Full Code Here

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

        // When Reverent Hunter enters the battlefield, put a number of +1/+1 counters on it equal to your devotion to green.
        this.addAbility(new EntersBattlefieldTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(0), new DevotionCount(ColoredManaSymbol.G), true)));

    }
View Full Code Here

TOP

Related Classes of mage.abilities.dynamicvalue.common.DevotionCount

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.