Exemple #1
0
        public static double GetBaseDamage(FighterStats stats, FighterTactics tactics, FighterStats oppStats, FighterTactics oppTactics)
        {
            double ret = tactics.Power * stats.Strength *
                         Math.Sqrt(stats.Speed * tactics.Aggressiveness) /
                         (oppTactics.Defense * oppStats.Agility);

            return(ret);
        }
Exemple #2
0
        public PunchStats(FighterTactics tactics)
        {
            int totalPunches = Convert.ToInt32(Math.Round(tactics.Aggressiveness * 9, 0));

            this.PowerPunchesAttempted = Convert.ToInt32(Math.Round(tactics.Power * 3, 0));
            this.RightsAttempted       = PowerPunchesAttempted;
            if (PowerPunchesAttempted > totalPunches)
            {
                PowerPunchesAttempted = totalPunches;
                RightsAttempted       = 0;
            }
            else if (RightsAttempted + PowerPunchesAttempted > totalPunches)
            {
                RightsAttempted = totalPunches - PowerPunchesAttempted;
            }
            JabsAttempted = totalPunches - RightsAttempted - PowerPunchesAttempted;
        }
Exemple #3
0
        public static double  GetStunDamage(FighterStats stats, FighterTactics tactics, FighterStats oppStats, FighterTactics oppTactics, TargetArea targetArea)
        {
            double ret = (stats.Strength + (stats.KnockoutPunch * 3)) *
                         tactics.Power * Math.Sqrt(stats.Speed * tactics.Aggressiveness) /
                         (oppTactics.Defense * oppStats.StunDefense);

            if (targetArea == TargetArea.Body)
            {
                ret *= 0.8;
            }
            else if (targetArea == TargetArea.Head)
            {
                ret *= 1.2;
            }
            else if (targetArea == TargetArea.Cut)
            {
                ret *= 0.9;
            }
            return(ret);
        }
Exemple #4
0
        public static RoundDamage CalculateRoundDamage(FighterStats stats, FighterTactics tactics, FighterStats oppStats, FighterTactics oppTactics, TargetArea targetArea, double multiplier = 1)
        {
            RoundDamage ret = new RoundDamage();

            ret.BaseDamage      = GetBaseDamage(stats, tactics, oppStats, oppTactics);
            ret.BaseDamage     *= multiplier;
            ret.EnduranceDamage = ret.BaseDamage;
            if (targetArea == TargetArea.Body)
            {
                ret.EnduranceDamage *= 1.2;
            }
            else if (targetArea == TargetArea.Head)
            {
                ret.EnduranceDamage *= 0.8;
            }
            else if (targetArea == TargetArea.Cut)
            {
                ret.EnduranceDamage *= 0.9;
            }
            ret.StunDamage  = GetStunDamage(stats, tactics, oppStats, oppTactics, targetArea);
            ret.StunDamage *= multiplier;
            ret.StunValue   = ret.StunDamage / oppStats.Chin;
            return(ret);
        }
        public static FighterRoundPlan Adjusted(FighterRoundPlan parent, FighterTactics tactics)
        {
            FighterRoundPlan ret = new Model.FighterRoundPlan(tactics.Aggressiveness, tactics.Power, tactics.Defense, parent.Style, parent.TargetArea, parent.Dirty);

            return(ret);
        }
 public FighterRoundPlan(FighterTactics tactics, FighterRoundPlan roundPlan) : this(tactics.Aggressiveness, tactics.Power, tactics.Defense, roundPlan.Style, roundPlan.TargetArea, roundPlan.Dirty)
 {
     this.Rest = roundPlan.Rest;
 }