コード例 #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
            };


        }
コード例 #2
0
ファイル: Calculator.cs プロジェクト: Frannsoft/FrannHammer
        /// <summary>
        /// Returns the knockback as if in training mode.
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        public double TrainingModeKnockback(TrainingModeKnockbackProblemData data)
        {
            var result = (((data.VictimPercent + data.BaseDamage) / 10 + (data.VictimPercent + data.BaseDamage) * data.BaseDamage / 20) * (200 / (data.TargetWeight + 100)) * 1.4 + 18) * (data.KnockbackGrowth / 100)
                            + data.BaseKnockbackSetKnockback * data.StanceModifier;

            return result;
        }