|
Player12
An open source football management simulator
|
Selection rules of the league honours. More...
Functions | |
| float | playerScore (const AwardPlayerTally &tally, bool goalkeeper) |
| std::optional< std::size_t > | bestPlayer (std::span< const AwardCandidate > candidates, std::uint16_t min_minutes, int max_age) |
| std::optional< std::size_t > | goldenBoot (std::span< const AwardCandidate > candidates) |
| std::optional< std::size_t > | goldenGlove (std::span< const AwardCandidate > candidates, std::uint16_t min_minutes) |
| std::array< std::optional< std::size_t >, TEAM_OF_SEASON_SIZE > | teamOfSeason (std::span< const AwardCandidate > candidates, std::uint16_t min_minutes) |
| const char * | slotKey (std::uint8_t slot) |
| std::optional< std::size_t > | bestManager (std::span< const AwardClubTally > clubs, std::uint16_t min_matches) |
| std::uint16_t | seasonMinMinutes (std::span< const AwardCandidate > candidates) |
| float | goalScore (std::uint8_t minute, int own_before, int other_before, bool decisive, int reputation_gap, bool assisted) |
| float | valueMultiplier (std::span< const AwardRecord > honours, const GameDateValue &today) |
Variables | |
| constexpr std::uint16_t | MONTH_MIN_MINUTES = 270 |
| constexpr float | SEASON_MIN_SHARE = 0.5f |
| constexpr int | YOUNG_MAX_AGE = 21 |
| constexpr std::uint16_t | MONTH_MIN_MATCHES = 3 |
| constexpr std::uint16_t | SEASON_MIN_MATCHES = 10 |
| constexpr std::uint8_t | CLEAN_SHEET_MINUTES = 60 |
| constexpr std::size_t | TEAM_OF_SEASON_SIZE = 11 |
| constexpr float | MAX_VALUE_PREMIUM = 0.25f |
Selection rules of the league honours.
Player awards rank by average match rating plus a small bonus for goals, assists and (goalkeepers) clean sheets per appearance, among players with enough minutes; ties go to the lower player id so the result never depends on iteration order. Manager awards compare league points with the points expected from both line-ups (BoardModel::expectedPoints).
| std::optional< std::size_t > Awards::bestManager | ( | std::span< const AwardClubTally > | clubs, |
| std::uint16_t | min_matches | ||
| ) |
Largest points-over-expectation with enough matches; ties: points, lower team id.
| std::optional< std::size_t > Awards::bestPlayer | ( | std::span< const AwardCandidate > | candidates, |
| std::uint16_t | min_minutes, | ||
| int | max_age = 0 |
||
| ) |
Best candidate with enough minutes and at most max_age (0 = any).
| float Awards::goalScore | ( | std::uint8_t | minute, |
| int | own_before, | ||
| int | other_before, | ||
| bool | decisive, | ||
| int | reputation_gap, | ||
| bool | assisted | ||
| ) |
Importance of a goal for the Goal of the Month panel (no shot data is stored): late goals, winners and equalisers, goals against stronger opponents and goals without an assist score higher.
| own_before,other_before | Score of the scorer's side before it. |
| decisive | The game-winning goal (the winner's goal after which the opponent never drew level again). |
| reputation_gap | Opponent reputation minus the scorer's club's. |
| std::optional< std::size_t > Awards::goldenBoot | ( | std::span< const AwardCandidate > | candidates | ) |
Most goals; ties: fewer minutes, more assists, lower id.
| std::optional< std::size_t > Awards::goldenGlove | ( | std::span< const AwardCandidate > | candidates, |
| std::uint16_t | min_minutes | ||
| ) |
Goalkeeper with most clean sheets and enough minutes; ties: fewer minutes per clean sheet, lower id.
| float Awards::playerScore | ( | const AwardPlayerTally & | tally, |
| bool | goalkeeper | ||
| ) |
Rating plus contribution bonus of a tally.
| std::uint16_t Awards::seasonMinMinutes | ( | std::span< const AwardCandidate > | candidates | ) |
Minimum minutes for season awards among candidates.
| const char * Awards::slotKey | ( | std::uint8_t | slot | ) |
Language key of a Team of the Season slot (e.g. "AWARD_SLOT_GK").
| std::array< std::optional< std::size_t >, TEAM_OF_SEASON_SIZE > Awards::teamOfSeason | ( | std::span< const AwardCandidate > | candidates, |
| std::uint16_t | min_minutes | ||
| ) |
Best XI in a 4-3-3: GK, RB, CB, CB, LB, three midfielders, RW, ST, LW. Slots are filled from natural positions first, then from neighbouring ones; a slot stays empty when nobody qualifies.
| float Awards::valueMultiplier | ( | std::span< const AwardRecord > | honours, |
| const GameDateValue & | today | ||
| ) |
Market value multiplier from recent honours: +3% per monthly player award of the last 12 months (at most three), +8% per individual season award and +4% for the Team of the Season of the current or previous season, capped at +25%.
|
inlineconstexpr |
A clean sheet needs this many minutes from the start without conceding.
|
inlineconstexpr |
Market value premium caps (see valueMultiplier).
|
inlineconstexpr |
|
inlineconstexpr |
Three full matches in the month.
|
inlineconstexpr |
|
inlineconstexpr |
Share of the league's most-used player's minutes for season awards.
|
inlineconstexpr |
|
inlineconstexpr |