|
Player12
An open source football management simulator
|
Attribute-based suitability of players for set-piece duties. More...
Functions | |
| const char * | dutyKey (SetPieceDuty duty) |
| bool | isLeadership (SetPieceDuty duty) |
| float | score (SetPieceDuty duty, const Player &player) |
| const Player * | best (SetPieceDuty duty, const std::vector< const Player * > &candidates) |
Attribute-based suitability of players for set-piece duties.
The weights mirror the match engine's own choice of taker (shooting for penalties and direct free kicks, delivery for corners), so a manager's pick and the automatic fallback are judged on the same scale.
| const Player * SetPieces::best | ( | SetPieceDuty | duty, |
| const std::vector< const Player * > & | candidates | ||
| ) |
Best candidate for a dead-ball duty among candidates (ties: lower id); nullptr when nobody qualifies. Leadership duties return nullptr.
| const char * SetPieces::dutyKey | ( | SetPieceDuty | duty | ) |
Language key naming duty (e.g. "SET_PIECE_PENALTIES").
| bool SetPieces::isLeadership | ( | SetPieceDuty | duty | ) |
True for the captaincy duties (chosen by standing, not attributes).
| float SetPieces::score | ( | SetPieceDuty | duty, |
| const Player & | player | ||
| ) |
Suitability of player for a dead-ball duty on the 0-100 attribute scale. Goalkeepers score 0 for every kicking or throwing duty, and so does everyone for the leadership duties (the captain comes from the dressing-room hierarchy).