Player12
An open source football management simulator
Loading...
Searching...
No Matches
MedicalCentre Namespace Reference

Functions

float staffQuality (const StaffEffects &effects)
 
ReturnWindow returnWindow (std::uint16_t days_left, float staff_quality)
 
RiskBand reinjuryRisk (InjuryType type, std::uint16_t days_left, int age)
 
InjuryRiskAssessment assess (const InjuryRiskInputs &inputs)
 
const char * bandKey (RiskBand band)
 
RiskBand loadBand (float ratio)
 
bool substitutionDue (std::uint8_t flags, int minute)
 

Variables

constexpr int RECURRENCE_WINDOW_DAYS = 60
 
constexpr int LOAD_CHART_DAYS = 28
 
constexpr int MINUTE_LIMIT = 60
 
constexpr float LOAD_ZONE_LOW = 0.8f
 
constexpr float LOAD_ZONE_HIGH = 1.3f
 
constexpr float LOAD_SPIKE = 1.5f
 

Function Documentation

◆ assess()

InjuryRiskAssessment MedicalCentre::assess ( const InjuryRiskInputs &  inputs)

Injury risk from observable factors only, with the multipliers of the injury model: age over 25, four days or less since a match, a recent injury, low condition and an acute:chronic load above 1.3, scaled by the medical staff. Hidden traits are never used.

◆ bandKey()

const char * MedicalCentre::bandKey ( RiskBand  band)

Language key naming band ("MEDICAL_RISK_LOW", ...).

◆ loadBand()

RiskBand MedicalCentre::loadBand ( float  ratio)

Risk zone of an acute:chronic workload ratio: 0.8-1.3 is the low-risk zone, a spike of 1.5 or more is high, and both a ratio between them and an under-loaded player (below 0.8) are moderate.

◆ reinjuryRisk()

RiskBand MedicalCentre::reinjuryRisk ( InjuryType  type,
std::uint16_t  days_left,
int  age 
)

Risk of a recurrence once back: muscle strains and long layoffs recur more often, and so do injuries of players past 30; ACL tears are high.

◆ returnWindow()

ReturnWindow MedicalCentre::returnWindow ( std::uint16_t  days_left,
float  staff_quality 
)

The physio's estimate of the return: the remaining layoff with a margin that is wider for setbacks than for early returns and narrows with a better medical staff (10-30% of the layoff). Always contains the remaining days.

◆ staffQuality()

float MedicalCentre::staffQuality ( const StaffEffects &  effects)

Medical staff quality in [0, 1] from the layoff multiplier the staff achieves (StaffEffects: 1.12 untrained ... 0.85 elite).

◆ substitutionDue()

bool MedicalCentre::substitutionDue ( std::uint8_t  flags,
int  minute 
)

Whether a player with flags should come off at minute.

Variable Documentation

◆ LOAD_CHART_DAYS

constexpr int MedicalCentre::LOAD_CHART_DAYS = 28
inlineconstexpr

Days kept for the load chart.

◆ LOAD_SPIKE

constexpr float MedicalCentre::LOAD_SPIKE = 1.5f
inlineconstexpr

◆ LOAD_ZONE_HIGH

constexpr float MedicalCentre::LOAD_ZONE_HIGH = 1.3f
inlineconstexpr

◆ LOAD_ZONE_LOW

constexpr float MedicalCentre::LOAD_ZONE_LOW = 0.8f
inlineconstexpr

Acute:chronic ratios of the low-risk zone and of a load spike.

◆ MINUTE_LIMIT

constexpr int MedicalCentre::MINUTE_LIMIT = 60
inlineconstexpr

Minute around which a player limited by the medical staff comes off.

◆ RECURRENCE_WINDOW_DAYS

constexpr int MedicalCentre::RECURRENCE_WINDOW_DAYS = 60
inlineconstexpr

Days after an injury during which a recurrence is more likely.