Record every match in a football almanac (Modern, M8)
Modern careers keep every match they play: season, date, competition type, league or cup stage, matchday, both clubs by world id with their human managers, result with extra time and shoot-out, referee, attendance, weather, both line-ups and all events (goals with assists and kind, misses, cards, injuries, substitutions, shoot-out kicks). Events come from the group event log the engine keeps for every match, substitutions from the players on the pitch after each minute; nothing draws random numbers (a 60-turn Modern run is unchanged). Player indices reused for a new person get a new stable id. Saves hold finished seasons as immutable history/season-<year>.bin files plus the running season; modern-state@1.1 adds league names and the id counter. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
57d75ab2f5
commit
201eef88e4
14 files changed
+935
-8
No files matched your search
@@ -15,6 +15,7 @@
|
||||
|
||||
#include "game/state.hpp"
|
||||
#include "game/world_layout.hpp"
|
||||
#include "modern/game/almanac.hpp"
|
||||
#include "modern/game/training_camps.hpp"
|
||||
|
||||
namespace bmh::modern {
|
||||
@@ -45,9 +46,12 @@ struct ModernState : GameState {
|
||||
std::vector<std::string> world_club_id, world_club_name, world_club_short; // per team
|
||||
std::vector<std::string> world_player_id, player_first, player_last; // per player
|
||||
std::vector<std::string> player_nation; // nation id per player
|
||||
std::vector<std::string> world_league_id, world_league_name; // per league index
|
||||
// Training camps (M4): Classic data gives the eight original resorts, a Modern world its catalogue.
|
||||
std::vector<CampMap> camp_maps;
|
||||
std::vector<TrainingCamp> training_camps;
|
||||
// The football almanac (docs/new_engine/almanach.md): every match of the career.
|
||||
Almanac almanac;
|
||||
|
||||
ModernState() { season_hooks = &modern::season_hooks(); }
|
||||
// Takes over a state built by shared code (save loading, career setup).
|
||||
|
||||
Reference in new issue
Block a user