Ejemplo n.º 1
0
        internal void ScaleNPC(double mult = 1)
        {
            double buffPercent =
                //level/(double)baseLevel* 2
                Exponential.CreatureScale(baseLevel, level)
                * mult;

            //Stats
            stats.maxhealth = NumbersM.CeilParse <long>(stats.maxhealth * (1 + buffPercent * 5));
            stats.stamina   = NumbersM.CeilParse <int>(stats.stamina * (1 + buffPercent * 2));
            health          = Health();
            stamina         = Stamina();
            for (int i = 0; i < DmgType.Length; i++)
            {
                if (stats.damage[i] > 0)
                {
                    stats.damage[i] = NumbersM.CeilParse <long>(stats.damage[i] * (1 + buffPercent / 3));
                }
                if (stats.resistance[i] > 0)
                {
                    stats.resistance[i] = NumbersM.CeilParse <int>(stats.resistance[i] * (1 + (buffPercent / 5)));
                }
            }

            //Extra Drops
            if (Program.rng.Next(101) <= 1)
            {
                Item tempSchem = SkaviDrops.DropSchematic(race);
                if (tempSchem != null)
                {
                    AddItemToInv(tempSchem);
                }
            }
        }