Beispiel #1
0
        public void AdjustClinchTest()
        {
            FighterStats fst = GetFighterStats();

            fst.Strength = 18;
            FighterStats other = GetFighterStats();

            FighterRoundStats frs = new FighterRoundStats(fst,
                                                          new FighterRoundPlan(4, 8, 8));
            FighterRoundStats otherRs =
                new FighterRoundStats(other,
                                      new FighterRoundPlan(4, 8, 8));

            frs.AdjustClinch(otherRs);

            FighterStats expected = fst.Copy();


            expected.Agility = 16;
            Assert.AreEqual(expected, frs.AdjustedStats);
            FighterTactics tactics = frs.Plan.Copy();

            tactics.Aggressiveness = 3.4;
            tactics.Rest           = 0.6;
            Assert.AreEqual(tactics, frs.AdjustedTactics);
        }
Beispiel #2
0
        public void AdjustCounter_NegativeTest()
        {
            FighterStats f1 = GetFighterStats();

            FighterStats f2 = GetFighterStats();

            f2.Height = 15;
            f2.Speed  = 15;
            FighterRoundStats frs1 = GetFighterRoundStats(f1, FightingStyle.Counter);
            FighterRoundStats frs2 = GetFighterRoundStats(f2, FightingStyle.Counter);

            FighterStats expected = f1.Copy();

            expected.Strength++;
            expected.Agility -= 2;
            frs1.AdjustCounter(frs2);
            Assert.AreEqual(expected, frs1.AdjustedStats);

            FighterTactics tactics = frs1.Plan.Copy();

            tactics.Aggressiveness = 3.4;
            Assert.AreEqual(tactics, frs1.AdjustedTactics);
            expected         = f2.Copy();
            expected.Agility = 14;
            Assert.AreEqual(expected, frs2.AdjustedStats);
        }
Beispiel #3
0
        public void AdjustRingTest()
        {
            FighterStats f1 = GetFighterStats();

            f1.Agility = 18;
            FighterStats      f2   = GetFighterStats();
            FighterRoundStats frs1 = GetFighterRoundStats(f1, FightingStyle.Ring);
            FighterRoundStats frs2 = GetFighterRoundStats(f2, FightingStyle.None);

            frs1.AdjustRing(frs2);


            FighterStats expected = f1.Copy();

            expected.Agility = 22;
            Assert.AreEqual(expected, frs1.AdjustedStats);
            Assert.AreEqual(1, frs1.AdditionalFatigue);
        }
Beispiel #4
0
        public void AdjustInsideTest()
        {
            FighterStats f1 = GetFighterStats();

            f1.Strength = 20;
            FighterStats      f2   = GetFighterStats();
            FighterRoundStats frs1 = GetFighterRoundStats(f1, FightingStyle.Inside);
            FighterRoundStats frs2 = GetFighterRoundStats(f2, FightingStyle.None);

            frs1.AdjustInside(frs2);


            FighterStats expected = f1.Copy();

            expected.Strength = 25;
            Assert.AreEqual(expected, frs1.AdjustedStats);
            Assert.AreEqual(1.1, frs2.DamageAdjustment);
        }
Beispiel #5
0
        public void AdjustFeintTest()
        {
            FighterStats f1 = GetFighterStats();

            f1.Speed = 20;
            FighterStats      f2   = GetFighterStats();
            FighterRoundStats frs1 = GetFighterRoundStats(f1, FightingStyle.Feint);
            FighterRoundStats frs2 = GetFighterRoundStats(f2, FightingStyle.None);

            frs1.AdjustFeint(frs2);


            FighterStats expected = f1.Copy();

            expected.Speed = 25;
            Assert.AreEqual(expected, frs1.AdjustedStats);
            Assert.AreEqual(1, frs1.AdditionalFatigue);
        }
Beispiel #6
0
        public void AdjustRopesBelow8Test()
        {
            FighterStats f1 = GetFighterStats();

            f1.Agility = 24;

            FighterStats f2 = GetFighterStats();

            FighterRoundStats frs1 = GetFighterRoundStats(f1, FightingStyle.Ropes);
            FighterRoundStats frs2 = GetFighterRoundStats(f2, FightingStyle.Ropes);

            FighterStats expected = f1.Copy();

            expected.Agility = 23;
            frs1.AdjustRopes(frs2);
            Assert.AreEqual(expected, frs1.AdjustedStats);

            expected         = f2.Copy();
            expected.Agility = 8;
            Assert.AreEqual(expected, frs2.AdjustedStats);
        }
Beispiel #7
0
        public void AdjustOutsideTest()
        {
            FighterStats f1 = GetFighterStats();

            f1.Height = 18;
            FighterStats      f2   = GetFighterStats();
            FighterRoundStats frs1 = GetFighterRoundStats(f1, FightingStyle.Outside);
            FighterRoundStats frs2 = GetFighterRoundStats(f2, FightingStyle.None);

            frs1.AdjustOutside(frs2);


            FighterStats expected = f1.Copy();

            expected.Agility = 12.5;
            expected.Speed   = 12.5;
            expected.Height  = 21;
            Assert.AreEqual(expected, frs1.AdjustedStats);
            FighterTactics tactics = frs1.Plan.Copy();

            tactics.Power = 6.8;

            Assert.AreEqual(tactics, frs1.AdjustedTactics);
        }