Player12
An open source football management simulator
Loading...
Searching...
No Matches
player_agent.h
Go to the documentation of this file.
1// -----------------------------------------------------------------------------
2// Football Management Project
3// Copyright (c) 2025 - 2026 Flavio Milinanni. All Rights Reserved.
4//
5// This file is part of the Football Management Project.
6// See the LICENSE file in the project root.
7// -----------------------------------------------------------------------------
8
9#pragma once
10
11#include <cstdint>
12
14
28namespace PlayerAgent
29{
36
38struct Demands
39{
40 std::uint32_t flat_wage = 0;
41 std::uint32_t asking_wage = 0;
42 std::uint8_t yearly_rise = 0;
43 std::uint32_t appearance_bonus = 0;
44 std::uint32_t signing_bonus = 0;
45 std::uint32_t agent_fee = 0;
46 std::uint32_t standard_agent_fee = 0;
48 std::uint32_t max_release_clause = 0;
50 bool wants_promise = false;
51};
52
54std::uint32_t standardAgentFee(ContractKind kind, std::uint32_t transfer_fee,
55 std::uint32_t weekly_wage);
57std::uint32_t lowestAgentFee(std::uint32_t standard);
59std::uint32_t agentFeeAsk(const PlayerContext& context, std::uint32_t standard,
60 std::uint8_t round);
61
67Demands demands(const PlayerContext& context, std::uint32_t transfer_fee,
68 std::uint8_t round, std::uint8_t years);
69
71ContractOffer askedOffer(const Demands& demands, std::uint8_t years);
72
74struct Reply
75{
77 const char* line_key = "";
78};
79
81Reply respond(const PlayerContext& context, const ContractOffer& offer,
82 std::uint8_t round, std::uint32_t transfer_fee);
83
85const char* openingLine(const PlayerContext& context);
86
92const char* purchaseLine(const ClubResponse& response, bool would_join,
93 const PlayerContext& context);
94
95} // namespace PlayerAgent
The player's agent in the managed club's purchase and contract talks: what he asks for and what he sa...
Definition player_agent.cpp:20
const char * openingLine(const PlayerContext &context)
Definition player_agent.cpp:206
std::uint32_t lowestAgentFee(std::uint32_t standard)
Definition player_agent.cpp:94
std::uint32_t standardAgentFee(ContractKind kind, std::uint32_t transfer_fee, std::uint32_t weekly_wage)
Definition player_agent.cpp:84
const char * purchaseLine(const ClubResponse &response, bool would_join, const PlayerContext &context)
Definition player_agent.cpp:224
std::uint32_t agentFeeAsk(const PlayerContext &context, std::uint32_t standard, std::uint8_t round)
Definition player_agent.cpp:102
Demands demands(const PlayerContext &context, std::uint32_t transfer_fee, std::uint8_t round, std::uint8_t years)
Definition player_agent.cpp:116
Reply respond(const PlayerContext &context, const ContractOffer &offer, std::uint8_t round, std::uint32_t transfer_fee)
Definition player_agent.cpp:176
ContractOffer askedOffer(const Demands &demands, std::uint8_t years)
Definition player_agent.cpp:162
ContractKind
Definition transfer_negotiation.h:193
Definition player_agent.h:39
std::uint8_t yearly_rise
Definition player_agent.h:42
std::uint32_t max_release_clause
Definition player_agent.h:48
std::uint32_t asking_wage
Definition player_agent.h:41
bool wants_release_clause
Definition player_agent.h:47
std::uint32_t agent_fee
Definition player_agent.h:45
std::uint32_t appearance_bonus
Definition player_agent.h:43
bool wants_promise
Definition player_agent.h:50
std::uint32_t standard_agent_fee
Definition player_agent.h:46
SquadRole desired_role
Definition player_agent.h:49
std::uint32_t flat_wage
Definition player_agent.h:40
std::uint32_t signing_bonus
Definition player_agent.h:44
Definition player_agent.h:75
const char * line_key
Definition player_agent.h:77
ContractResponse response
Definition player_agent.h:76
Definition transfer_negotiation.h:167
Definition transfer_negotiation.h:245
Definition transfer_negotiation.h:202
Definition transfer_negotiation.h:273
Definition transfer_negotiation.h:226
SquadRole
Playing-time expectation derived from ability rank in the squad.
Definition world_simulation.h:70