Example #1
0
        public void SetUp()
        {
            _calculator = new Calculator();
            _trainingModeKnockbackData = new TrainingModeKnockbackProblemData
            {
                VictimPercent = 100,
                BaseDamage = 20,
                TargetWeight = 80,
                KnockbackGrowth = 10,
                BaseKnockbackSetKnockback = 31,
                StanceModifier = 1
            };

            _versusModeKnockbackData = new VersusModeKnockbackProblemData
            {
                VictimPercent = 100,
                BaseDamage = 20,
                TargetWeight = 80,
                KnockbackGrowth = 10,
                BaseKnockbackSetKnockback = 31,
                StanceModifier = 1,
                StaleMoveMultiplier = 0
            };


        }
Example #2
0
        /// <summary>
        /// Returns the knockback as if in versus mode.
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        public double VersusModeKnockback(VersusModeKnockbackProblemData data)
        {
            var result = ((((data.VictimPercent + data.BaseDamage * data.StaleMoveMultiplier) / 10 +
                               (data.VictimPercent + data.BaseDamage * data.StaleMoveMultiplier) * data.BaseDamage *
                               (1 - (1 - data.StaleMoveMultiplier) * 0.3) / 20)
                              * 1.4 * (200 / (data.TargetWeight + 100)) + 18) * (data.KnockbackGrowth / 100) + data.BaseKnockbackSetKnockback) *
                            data.StanceModifier * Rage(new RageProblemData { AttackerPercent = data.AttackerPercent });

            return result;
        }