fix(ai): align NPC final decisions with legacy

This commit is contained in:
2026-07-25 11:23:53 +00:00
parent a83f7a44e3
commit 61159209bf
19 changed files with 1233 additions and 287 deletions
@@ -403,7 +403,11 @@ export class ActionDefinition<
const defenderNation = defenderCity.nationId > 0 ? (nationMap.get(defenderCity.nationId) ?? null) : null;
const defenderGenerals = generals.filter(
(general) => general.cityId === defenderCity.id && general.nationId === defenderCity.nationId
(general) =>
general.cityId === defenderCity.id &&
general.nationId === defenderCity.nationId &&
general.crew > 0 &&
(unitSet.crewTypes?.some((crewType) => crewType.id === general.crewTypeId) ?? false)
);
const battle = resolveWarBattle({