Esempio n. 1
0
        public void FatigueStats_StunDefenseTest()
        {
            FighterStats fStats = new FighterStats(height: 10, speed: 10, agility: 15, strength: 10, knockoutPunch: 1,
                                                   conditioning: 10, chin: 15, cutResistance: 1, weight: 150, numberOfFights: 0, rating: 0);

            FighterStats fatigued = FighterStats.FatigueStats(fStats, 90);
            const double expected = 18;
            double       actual   = fatigued.StunDefense;

            Assert.AreEqual(expected, actual);
        }
Esempio n. 2
0
        public void FatigueStatsTest()
        {
            FighterStats fStats = new FighterStats(height: 10, speed: 10, agility: 15, strength: 10, knockoutPunch: 1,
                                                   conditioning: 10, chin: 15, cutResistance: 1, weight: 150, numberOfFights: 0, rating: 0);

            FighterStats fatigued = FighterStats.FatigueStats(fStats, 90);
            FighterStats expected = new FighterStats(height: 10, speed: 9, agility: 13.5, strength: 9, knockoutPunch: 1,
                                                     conditioning: 10, chin: 15, cutResistance: 1, weight: 150, numberOfFights: 0, rating: 0)
            {
                FatiguePercent = 0.9
            };


            Assert.AreEqual(expected, fatigued);
        }
Esempio n. 3
0
        public static RoundDamage CalculateDamageForDataRound(Data.Round round, FighterStats fStats, FighterStats oStats, List <CutBase> cuts, bool isFirst)
        {
            Data.FighterRound round1    = (isFirst) ? round.First : round.Second;
            Data.FighterRound round2    = (isFirst) ? round.Second : round.First;
            FighterStats      adjusted1 = FighterStats.FatigueStats(fStats, round1.Endurance_Start);
            FighterStats      adjusted2 = FighterStats.FatigueStats(oStats, round2.Endurance_Start);
            FighterRoundPlan  fp1       = new FighterRoundPlan(round1.Tactic);
            FighterRoundPlan  fp2       = new FighterRoundPlan(round2.Tactic);

            if (cuts != null)
            {
                adjusted1.AdjustCutStats(cuts);
            }
            RoundDamage ret = RoundDamage.CalculateRoundDamage(adjusted1, fp1, adjusted2, fp2, fp1.TargetArea);

            return(ret);
        }