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

The player's agent in the managed club's purchase and contract talks: what he asks for and what he says each round. More...

Classes

struct  Demands
 
struct  Reply
 

Functions

std::uint32_t standardAgentFee (ContractKind kind, std::uint32_t transfer_fee, std::uint32_t weekly_wage)
 
std::uint32_t lowestAgentFee (std::uint32_t standard)
 
std::uint32_t agentFeeAsk (const PlayerContext &context, std::uint32_t standard, std::uint8_t round)
 
Demands demands (const PlayerContext &context, std::uint32_t transfer_fee, std::uint8_t round, std::uint8_t years)
 
ContractOffer askedOffer (const Demands &demands, std::uint8_t years)
 
Reply respond (const PlayerContext &context, const ContractOffer &offer, std::uint8_t round, std::uint32_t transfer_fee)
 
const char * openingLine (const PlayerContext &context)
 
const char * purchaseLine (const ClubResponse &response, bool would_join, const PlayerContext &context)
 

Detailed Description

The player's agent in the managed club's purchase and contract talks: what he asks for and what he says each round.

His demands are the player's (TransferNegotiation::contractDemand) put as a package: a base wage with a yearly rise, appearance money and a signing-on fee worth his flat ask, the release clause and playing time the player wants, and his own fee. He opens above the standard agent fee and comes down to it by the last round; less than AGENT_FEE_FLOOR of the standard and he blocks the deal. Every answer comes with a short line in his words (a language key taking the player's name). Pure rules.

Function Documentation

◆ agentFeeAsk()

std::uint32_t PlayerAgent::agentFeeAsk ( const PlayerContext &  context,
std::uint32_t  standard,
std::uint8_t  round 
)

His fee after round rejected proposals.

◆ askedOffer()

ContractOffer PlayerAgent::askedOffer ( const Demands &  demands,
std::uint8_t  years 
)

The package he asks for as an offer of years (no promise).

◆ demands()

Demands PlayerAgent::demands ( const PlayerContext &  context,
std::uint32_t  transfer_fee,
std::uint8_t  round,
std::uint8_t  years 
)

Demands after round rejected proposals, the package priced for a contract of years. transfer_fee is the agreed fee (0 on a free move).

◆ lowestAgentFee()

std::uint32_t PlayerAgent::lowestAgentFee ( std::uint32_t  standard)

The least he accepts for himself.

◆ openingLine()

const char * PlayerAgent::openingLine ( const PlayerContext &  context)

What he says as the contract talks open.

◆ purchaseLine()

const char * PlayerAgent::purchaseLine ( const ClubResponse &  response,
bool  would_join,
const PlayerContext &  context 
)

What he says after the selling club's answer to the managed club's offer (empty when the offer never reached the club); would_join: his client accepts terms with the managed club.

◆ respond()

Reply PlayerAgent::respond ( const PlayerContext &  context,
const ContractOffer &  offer,
std::uint8_t  round,
std::uint32_t  transfer_fee 
)

Answer to offer after round rejected proposals.

◆ standardAgentFee()

std::uint32_t PlayerAgent::standardAgentFee ( ContractKind  kind,
std::uint32_t  transfer_fee,
std::uint32_t  weekly_wage 
)

The usual agent fee: a share of transfer_fee, else weeks of wage.