示例#1
0
        public virtual int ScaleMana(int mana)
        {
            double scalar = 1.0;

            if (ManaPhasingOrb.IsInManaPhase(Caster))
            {
                ManaPhasingOrb.RemoveFromTable(Caster);
                return(0);
            }

            if (!MindRotSpell.GetMindRotScalar(Caster, ref scalar))
            {
                scalar = 1.0;
            }

            if (Mysticism.PurgeMagicSpell.IsUnderCurseEffects(Caster))
            {
                scalar += .5;
            }

            // Lower Mana Cost = 40%
            int lmc = AosAttributes.GetValue(m_Caster, AosAttribute.LowerManaCost);

            if (lmc > 40)
            {
                lmc = 40;
            }

            lmc += BaseArmor.GetInherentLowerManaCost(m_Caster);

            scalar -= (double)lmc / 100;

            return((int)(mana * scalar));
        }
示例#2
0
        public virtual int ScaleMana(int mana)
        {
            double scalar = 1.0;

            if (ManaPhasingOrb.IsInManaPhase(Caster))
            {
                ManaPhasingOrb.RemoveFromTable(Caster);
                return(0);
            }

            if (!MindRotSpell.GetMindRotScalar(Caster, ref scalar))
            {
                scalar = 1.0;
            }

            // Lower Mana Cost = 40%
            int lmc = AosAttributes.GetValue(m_Caster, AosAttribute.LowerManaCost);

            if (lmc > 40)
            {
                lmc = 40;
            }

            scalar -= (double)lmc / 100;

            return((int)(mana * scalar));
        }
示例#3
0
        public virtual void SpellManaCost(int mana)
        {
            double scalar = 1.0;

            MindRotSpell.GetMindRotScalar(Caster, ref scalar);

            if (scalar < 1.0)
            {
                scalar = 1.0;
            }

            Caster.Mana -= (int)(mana * scalar);
        }
示例#4
0
        public virtual int ScaleMana(int mana)
        {
            double scalar = 1.0;

            if (!MindRotSpell.GetMindRotScalar(Caster, ref scalar))
            {
                scalar = 1.0;
            }

            // Lower Mana Cost = 40%
            int lmc = AosAttributes.GetValue(m_Caster, AosAttribute.LowerManaCost);

            if (lmc > 40)
            {
                lmc = 40;
            }

            scalar -= (double)lmc / 100;

            return((int)(mana * scalar));
        }
示例#5
0
        public virtual int ScaleMana(Mobile m, int mana)
        {
            var scalar = 1.0;

            if (!MindRotSpell.GetMindRotScalar(m, ref scalar))
            {
                scalar = 1.0;
            }

            // Lower Mana Cost = 40%
            var lmc = Math.Min(AosAttributes.GetValue(m, AosAttribute.LowerManaCost), 40);

            scalar -= (double)lmc / 100;

            var total = (int)(mana * scalar);

            if (m.Skills[MoveSkill].Value < 50.0 && GetContext(m) != null)
            {
                total *= 2;
            }

            return(total);
        }