Modern: national teams play with squads of their nationality (M9)

A Modern layout gives every national team after no_team 24 squad slots.
On each national team day, after the German nomination, the strongest fit
players of each nationality (quotas 3/5/7/5, the German strength measure)
fill its squad and get a computer line-up; a nation without a goalkeeper
or with fewer than 14 nominees keeps its drawn rating. The shared match
core asks fields_players() instead of 'league club or no_team', which is
the same set in Classic. National squads get no cards or injuries, their
players develop after the match like Germany's, and the almanac records
their line-ups.

Diamond data 1.5: 24 of 61 nations play with players. Classic regression
(game 1 and two-player) unchanged, Classic-data season identical, save
round trip identical, ctest passes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ClaudeandClaude Opus 5.5 committed 2026-10-25 15:02:50 +01:00
1 parent 96e88c9579
commit 0f36b507d4
17 files changed
+154 -22

No files matched your search

+11 -3
View File
@@ -38,14 +38,22 @@ struct WorldLayout {
uint32_t pool_end = 0xC00; // end of the pools = first slot of no_team
uint32_t no_team_slots = 24; // the national team / no-club squad
uint32_t total_slots = 3150; // including the reserve behind no_team
// Modern: squads of the national teams after no_team (national_slots each, from slot
// national_start: team no_team() + n at national_start + (n - 1) * national_slots). Classic: none,
// the national teams play without players.
uint32_t national_start = 0, national_slots = 0;
int first_amateur() const { return league_teams; }
int first_foreign_cup() const { return league_teams + amateur_teams; }
int no_team() const { return first_foreign_cup() + foreign_cup_teams; }
int total_teams() const { return no_team() + national_teams; }
bool has_squad(int team) const { return (team >= 0 && team < league_teams) || team == no_team(); }
// The team whose squad holds `slot`: a league club, no_team() for the no-club squad, -1 for
// the pools and the reserve.
// A national team other than no_team with squad slots of its own (Modern).
bool national_squad(int team) const { return national_slots != 0 && team > no_team() && team < total_teams(); }
bool has_squad(int team) const {
return (team >= 0 && team < league_teams) || team == no_team() || national_squad(team);
}
// The team whose squad holds `slot`: a league club, no_team() for the no-club squad, a
// national team for its squad, -1 for the pools and the reserve.
int team_of_slot(int slot) const;
};