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

Functions

const char * nameKey (SquadStatus status)
 
const char * expectationKey (SquadStatus status)
 
SquadRole toSquadRole (SquadStatus status)
 
SquadStatus expectation (SquadStatus assigned, SquadStatus deserved)
 
SquadStatus deserved (std::size_t rank, int age)
 
float moraleOffset (SquadStatus assigned, SquadStatus deserved, float ambition)
 

Variables

constexpr int PROSPECT_MAX_AGE = 21
 

Function Documentation

◆ deserved()

SquadStatus SquadStatusModel::deserved ( std::size_t  rank,
int  age 
)

Status a player's ability rank in his squad earns (0 = best), as the player himself sees it: top 3 Star, then Important (4-6), Regular (7-11), Rotation (12-16); beyond, young players are prospects and the rest backups.

◆ expectation()

SquadStatus SquadStatusModel::expectation ( SquadStatus  assigned,
SquadStatus  deserved 
)

Status whose minutes a player expects once the manager gave him assigned: the assigned one, but never more than one level below what his ability rank earns in his eyes (deserved). A promotion raises the expectation; a demotion only lowers it a little and is resented on its own (moraleOffset()).

◆ expectationKey()

const char * SquadStatusModel::expectationKey ( SquadStatus  status)

One-line playing-time expectation of status (language key).

◆ moraleOffset()

float SquadStatusModel::moraleOffset ( SquadStatus  assigned,
SquadStatus  deserved,
float  ambition 
)

Weekly morale target offset (negative) when the manager gives a player a status clearly below the one he believes he deserves: nothing within one level, then -4 per extra level, scaled by ambition (clamped to 0.75-1.5, so even modest players resent a clear demotion). A status above his standing costs nothing here but raises the minutes he expects.

◆ nameKey()

const char * SquadStatusModel::nameKey ( SquadStatus  status)

Language key naming status (e.g. "SQUAD_STATUS_STAR").

◆ toSquadRole()

SquadRole SquadStatusModel::toSquadRole ( SquadStatus  status)

Playing-time expectation of a status.

Variable Documentation

◆ PROSPECT_MAX_AGE

constexpr int SquadStatusModel::PROSPECT_MAX_AGE = 21
inlineconstexpr

Age up to which a player may be given (or suggested) Prospect status.