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

Roles, duties, in-possession shapes and their engine profiles. Pure functions; the tactic data itself lives in Strategy. More...

Functions

RoleFamily familyForSlot (Vector2F anchor)
 
std::span< const TacticalRole > rolesFor (RoleFamily family)
 
bool allows (RoleFamily family, TacticalRole role)
 
bool hasDuty (RoleFamily family)
 
RoleProfile profile (TacticalRole role, RoleDuty duty)
 
const char * familyKey (RoleFamily family)
 
const char * roleKey (TacticalRole role)
 
const char * roleDescriptionKey (TacticalRole role)
 
const char * dutyKey (RoleDuty duty)
 
const char * possessionShapeKey (PossessionShape shape)
 
std::span< const std::string_view > keyAttributes (RoleFamily family, TacticalRole role)
 
float roleFit (const Player &player, RoleFamily family, TacticalRole role)
 
RoleDuty suggestedDuty (const Player &player, RoleFamily family)
 
TacticalRole suggestedRole (const Player &player, RoleFamily family)
 
Vector2F possessionOffset (PossessionShape shape, Vector2F anchor)
 
void assignRolesToFit (Strategy &strategy, const Lineup &lineup)
 

Detailed Description

Roles, duties, in-possession shapes and their engine profiles. Pure functions; the tactic data itself lives in Strategy.

Function Documentation

◆ allows()

bool Tactics::allows ( RoleFamily  family,
TacticalRole  role 
)

Whether role is allowed for family.

◆ assignRolesToFit()

void Tactics::assignRolesToFit ( Strategy &  strategy,
const Lineup &  lineup 
)

Gives every starter of lineup the role and duty that fit him (AI clubs); in-possession offsets are cleared.

◆ dutyKey()

const char * Tactics::dutyKey ( RoleDuty  duty)

◆ familyForSlot()

RoleFamily Tactics::familyForSlot ( Vector2F  anchor)

Position group of a slot from its lineup position.

◆ familyKey()

const char * Tactics::familyKey ( RoleFamily  family)

Language keys.

◆ hasDuty()

bool Tactics::hasDuty ( RoleFamily  family)

Whether the family's slots take a duty (goalkeepers do not).

◆ keyAttributes()

std::span< const std::string_view > Tactics::keyAttributes ( RoleFamily  family,
TacticalRole  role 
)

Attributes that matter most for a role in family (names of the player's stats, e.g. "Pace"; the label key is "STAT_" + name).

◆ possessionOffset()

Vector2F Tactics::possessionOffset ( PossessionShape  shape,
Vector2F  anchor 
)

In-possession shift of a slot for a ready-made shape.

◆ possessionShapeKey()

const char * Tactics::possessionShapeKey ( PossessionShape  shape)

◆ profile()

RoleProfile Tactics::profile ( TacticalRole  role,
RoleDuty  duty 
)

Engine profile of a role played with a duty.

◆ roleDescriptionKey()

const char * Tactics::roleDescriptionKey ( TacticalRole  role)

◆ roleFit()

float Tactics::roleFit ( const Player &  player,
RoleFamily  family,
TacticalRole  role 
)

Suitability of player for a role on the 0-100 attribute scale (the weighted mean of its key attributes).

◆ roleKey()

const char * Tactics::roleKey ( TacticalRole  role)

◆ rolesFor()

std::span< const TacticalRole > Tactics::rolesFor ( RoleFamily  family)

Roles a family can use; Standard is always first.

◆ suggestedDuty()

RoleDuty Tactics::suggestedDuty ( const Player &  player,
RoleFamily  family 
)

Duty that suits the player in a slot of family.

◆ suggestedRole()

TacticalRole Tactics::suggestedRole ( const Player &  player,
RoleFamily  family 
)

Role the player suits best in a slot of family: Standard unless a special role fits clearly better.