public static PunchStats GetPunchStats(FighterRoundStats roundStats) { roundStats.AdjustPunchLuck(); PunchStats ret = new PunchStats(roundStats.AdjustedTactics); ret.PowerPunchesLanded = GetLanded(ret.PowerPunchesAttempted, roundStats.PunchLandPercent); ret.RightsLanded = GetLanded(ret.RightsAttempted, roundStats.PunchLandPercent); ret.JabsLanded = GetLanded(ret.JabsAttempted, roundStats.JabLandPercent); return(ret); }
public void AdjustPunchLuck() { if (PunchLuckAdjusted) { return; } this.PunchLandPercent = PunchStats.GetPercentageLuck(this.PunchLandPercent, this.LuckFactor); this.JabLandPercent = PunchStats.GetPercentageLuck(this.JabLandPercent, this.LuckFactor); this.PunchLuckAdjusted = true; }
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; }
public void SetPunches(FighterRoundStats roundStats) { this.PunchStats = PunchStats.GetPunchStats(roundStats); }