Ejemplo n.º 1
0
        public void SetPunchAccuracy(FighterRoundStats other)
        {
            int rating = this.AdjustedStats.Rating + other.AdjustedStats.Rating;

            this.PunchLandPercent = PunchStats.GetPercentageNoLuck(this.AdjustedStats.Speed, rating, other.AdjustedStats.Agility, false);
            this.JabLandPercent   = PunchStats.GetPercentageNoLuck(this.AdjustedStats.Speed, rating, other.AdjustedStats.Agility, true);
            double mult = 15 / (this.AdjustedTactics.Defense + other.AdjustedTactics.Defense);

            if (this.Plan.TargetArea == TargetArea.Body || this.Plan.TargetArea == TargetArea.Head)
            {
                mult *= 0.8;
            }
            else if (this.Plan.TargetArea == TargetArea.Cut)
            {
                mult *= 0.9;
            }
            this.PunchLandPercent *= mult;
            this.JabLandPercent   *= mult;
            this.PunchLuckAdjusted = false;
        }