public void ParseTest()
        {
            string           toParse  = "4H/10!/5 (allout)";
            FighterRoundPlan expected = new FighterRoundPlan(4, 10, 5, FightingStyle.AllOut, TargetArea.Head, true);

            FighterRoundPlan actual = FighterRoundPlan.Parse(toParse);

            Assert.AreEqual(expected, actual);
        }
Example #2
0
        public static FighterRoundPlan GetTactics(Match match)
        {
            FighterRoundPlan ret = new FighterRoundPlan(match.GroupAsDouble("agg"),
                                                        match.GroupAsDouble("pow"),
                                                        match.GroupAsDouble("def"),
                                                        FightingStyle.None,
                                                        TargetArea.Opportunistic, false);

            ret.Rest = match.GroupAsDouble("rest");
            return(ret);
        }
Example #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);
        }