From 8ab193b125b75418cedf6c826d90dd4310ce461b Mon Sep 17 00:00:00 2001 From: EmperorPinguin <99119424+EmperorPinguin@users.noreply.github.com> Date: Wed, 13 Nov 2024 14:51:02 +0100 Subject: [PATCH] Update Automation.kt (#12441) * Update Automation.kt * Update Automation.kt * Update Automation.kt --- core/src/com/unciv/logic/automation/Automation.kt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/core/src/com/unciv/logic/automation/Automation.kt b/core/src/com/unciv/logic/automation/Automation.kt index f945dcda05..e9e85f2072 100644 --- a/core/src/com/unciv/logic/automation/Automation.kt +++ b/core/src/com/unciv/logic/automation/Automation.kt @@ -105,11 +105,12 @@ object Automation { yieldStats.food += growthFood * (foodBaseWeight / 4) } else { // NoFocus or Food/Growth Focus. - // When Happy, EmperorPenguin has run sims comparing weights - // 1.5f is preferred, - // but 2 provides more protection against badly configured personalities - // If unhappy, see above - val growthFoodScaling = if (city.civ.getHappiness() >= 0) foodBaseWeight * 2 else foodBaseWeight / 4 + // When Happy, 2 production is better than 1 growth, + // but setting such by default worsens AI civ citizen assignment, + // probably due to badly configured personalities not properly weighing food vs non-food yields + val growthFoodScaling = if (city.civ.getHappiness() > 0) foodBaseWeight * 2 + else if (city.civ.getHappiness() < 8) foodBaseWeight * 0 + else foodBaseWeight / 4 yieldStats.food += growthFood * growthFoodScaling }