Пример #1
0
        public static double GetRunRate(float burden, int runSkill, float scaling)
        {
            var loadMod = EncumbranceSystem.GetBurdenMod(burden);

            if (runSkill >= 800.0f)     // max run speed?
            {
                return(18.0f / 4.0f);
            }
            else
            {
                return(((loadMod * ((float)runSkill / (runSkill + 200) * 11) + 4) / scaling) / 4.0f);
            }
        }
Пример #2
0
        /// <summary>
        /// Returns a modifier for a player's Run, Jump, Melee Defense, and Missile Defense skills if they are overburdened
        /// </summary>
        public override float GetBurdenMod()
        {
            var strength = Strength.Current;

            var capacity = EncumbranceSystem.EncumbranceCapacity((int)strength, AugmentationIncreasedCarryingCapacity);

            var burden = EncumbranceSystem.GetBurden(capacity, EncumbranceVal ?? 0);

            var burdenMod = EncumbranceSystem.GetBurdenMod(burden);

            //Console.WriteLine($"Burden mod: {burdenMod}");

            return(burdenMod);
        }
Пример #3
0
        public static float GetJumpHeight(float burden, uint jumpSkill, float power, float scaling)
        {
            if (power < 0.0f)
            {
                power = 0.0f;
            }
            if (power > 1.0f)
            {
                power = 1.0f;
            }

            var result = EncumbranceSystem.GetBurdenMod(burden) * (jumpSkill / (jumpSkill + 1300.0f) * 22.2f + 0.05f) * power / scaling;

            if (result < 0.35f)
            {
                result = 0.35f;
            }

            return(result);
        }