|
Player12
An open source football management simulator
|
Functions | |
| const char * | nameKey (InjuryType type) |
| bool | isMuscle (InjuryType type) |
| InjurySeverity | severity (std::uint16_t days) |
| Injury | draw (WorldRng &rng, InjuryContext context, InjuryType previous, bool recent_previous) |
| float | aggravationMultiplier (InjurySeverity severity) |
| double | aggravationChance (std::uint16_t days_left, int minutes) |
| Injury | aggravate (WorldRng &rng, InjuryType type, std::uint16_t days_left) |
| Injury InjuryModel::aggravate | ( | WorldRng & | rng, |
| InjuryType | type, | ||
| std::uint16_t | days_left | ||
| ) |
The layoff after an aggravation: the same diagnosis is drawn again as a recurrence (33% longer than a first injury), and never ends before the injury that was carried would have healed.
| double InjuryModel::aggravationChance | ( | std::uint16_t | days_left, |
| int | minutes | ||
| ) |
Chance that playing minutes with days_left of an unhealed injury aggravates it: the match injury rate (ECIS) times aggravationMultiplier(). Zero for a fit player.
| float InjuryModel::aggravationMultiplier | ( | InjurySeverity | severity | ) |
How much more likely a player who plays carrying an injury is to break down than a fit player: x2 with a minor knock, x3 with a moderate injury and x4 with a major one (tissue that has not healed fails under match load).
| Injury InjuryModel::draw | ( | WorldRng & | rng, |
| InjuryContext | context, | ||
| InjuryType | previous, | ||
| bool | recent_previous | ||
| ) |
Draws a diagnosis and layoff. Diagnosis frequencies follow Ekstrand et al. (2020) with hamstrings up-weighted to ~24% (Ekstrand 2023); layoffs are lognormal with the published median and P10-P90 range. ACL injuries are twenty times rarer in training. A recent injury of the same type is more likely to recur and lasts 33% longer.
| bool InjuryModel::isMuscle | ( | InjuryType | type | ) |
True for muscle strains (sensitive to congestion and age).
| const char * InjuryModel::nameKey | ( | InjuryType | type | ) |
Language key naming type (e.g. "INJURY_HAMSTRING_STRAIN").
| InjurySeverity InjuryModel::severity | ( | std::uint16_t | days | ) |
Severity band of a layoff.