Offer only the tactics the match engine reads; suggest a change after an own injury

In a live match the tactics board shows the attitude and the commitment
with what they do; the play-pattern items have no effect on a match and
are not offered there. When an own starter is injured the match stops and
the strongest bench player of his position is offered as the change.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
MichaelandClaude Fable 5.2 committed 2026-11-14 12:01:17 +01:00
1 parent 1732a2477b
commit bd20960f90
3 files changed
+42 -1

No files matched your search

+2
View File
@@ -128,6 +128,7 @@ Json engine_live_fixture(const Json &recording, const Json &bundle) {
const auto &p = *at->second;
rows.push_back({{"id", id}, {"name", p.at("player").at("name")}, {"slot", rows.size()},
{"strength", metric(p, "strength")}, {"condition", metric(p, "condition")},
{"position", p.at("player").value("positions", Json::array()).empty() ? Json() : p.at("player").at("positions").front()},
{"caps", nullptr}, {"international_goals", nullptr}});
};
for (const auto &id : order) add(id);
@@ -260,6 +261,7 @@ Json engine_live_roster(const Json &bundle) {
const auto &p = *at->second;
rows.push_back({{"id", id}, {"name", p.at("player").at("name")}, {"slot", rows.size()},
{"strength", metric(p, "strength")}, {"condition", metric(p, "condition")},
{"position", p.at("player").value("positions", Json::array()).empty() ? Json() : p.at("player").at("positions").front()},
{"caps", nullptr}, {"international_goals", nullptr}});
};
for (const auto &id : order) add(id);