fix: align scenario 2400 monthly parity

This commit is contained in:
2026-08-05 13:25:39 +00:00
parent f731f1f38e
commit 5d6923f11a
26 changed files with 564 additions and 89 deletions
+5 -1
View File
@@ -494,7 +494,11 @@ export const resolveWarAftermath = <TriggerState extends GeneralTriggerState = G
const defenderNation = input.defenderNation;
const cityKilled = cityReport?.killed ?? 0;
if ((cityReport?.dead ?? 0) > 0) {
// Ref branches on WarUnitCity::getPhase(), not accumulated city
// casualties. A city can retain dead casualties from earlier battles
// while being conquered before its wall receives a phase.
const cityPhase = cityReport?.phase ?? ((cityReport?.dead ?? 0) > 0 ? 1 : 0);
if (cityPhase > 0) {
const crewTypeIndex = buildCrewTypeIndex(input.unitSet);
const crewType = crewTypeIndex.get(input.config.castleCrewTypeId);
const riceCoef = crewType?.rice ?? 1;