Beispiel #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));
        }
Beispiel #2
0
        public virtual int ScaleMana(Mobile m, int mana)
        {
            double scalar = 1.0;

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

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

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

            lmc += BaseArmor.GetInherentLowerManaCost(m);

            scalar -= (double)lmc / 100;

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

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

            return(total);
        }