From dfc9fdcc03bc8ee908bba36e9385676b9a6d753b Mon Sep 17 00:00:00 2001 From: autocommit Date: Mon, 27 Apr 2026 02:35:49 -0700 Subject: [PATCH] =?UTF-8?q?feat(empire):=20=E2=9C=A8=20Introduce=20yield?= =?UTF-8?q?=20multiplier=20for=20gold=20income=20to=20balance=20progressio?= =?UTF-8?q?n/difficulty=20scaling?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Lilith Autocommit --- src/game/engine/src/modules/empire/economy.gd | 11 +++++++++-- .../engine/src/modules/management/turn_processor.gd | 10 ++++++---- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/game/engine/src/modules/empire/economy.gd b/src/game/engine/src/modules/empire/economy.gd index 3eb180b8..7ff786b2 100644 --- a/src/game/engine/src/modules/empire/economy.gd +++ b/src/game/engine/src/modules/empire/economy.gd @@ -43,8 +43,15 @@ static func process_turn(player: RefCounted, game_map: RefCounted) -> void: var params_json: String = _build_params_json(player) var gd_economy: RefCounted = ClassDB.instantiate("GdEconomy") as RefCounted var result: Dictionary = gd_economy.process_turn(cities_json, units_json, params_json) - player.gold_per_turn = int(result.get("net_gold", 0)) - player.gold = int(result.get("new_gold", player.gold)) + var net_gold: int = int(result.get("net_gold", 0)) + # Apply per-yield difficulty multiplier to gold income only (warcouncil + # p1-29 H4, 2026-04-27). Net negative gold (upkeep > income) is NOT + # scaled — handicap should help income, not amplify deficits. + if net_gold > 0: + var gold_mult: float = GameState.get_effective_yield_mult(player, "gold") + net_gold = int(net_gold * gold_mult) + player.gold_per_turn = net_gold + player.gold = int(result.get("new_gold", player.gold)) + (net_gold - int(result.get("net_gold", 0))) var disbanded_count: int = int(result.get("disbanded_units", 0)) if disbanded_count > 0: _disband_cheapest(player, disbanded_count) diff --git a/src/game/engine/src/modules/management/turn_processor.gd b/src/game/engine/src/modules/management/turn_processor.gd index 7a59d7db..bbde5e02 100644 --- a/src/game/engine/src/modules/management/turn_processor.gd +++ b/src/game/engine/src/modules/management/turn_processor.gd @@ -351,12 +351,14 @@ func _process_culture(player: RefCounted, game_map: RefCounted) -> void: var tile_json: String = BuildableHelperScript.build_tile_yields_json(c, game_map) var pre_culture: float = c.get_culture_stored() var can_expand: bool = c.process_culture(tile_json) - # Apply culture_percent and border_growth_percent bonuses to the - # culture gained this turn. process_culture already added raw culture; - # we top up the stockpile by (raw_gain * total_pct) so wonders scale. + # Apply culture_percent + border_growth_percent (building bonuses) + + # per-yield difficulty culture_mult (warcouncil p1-29 H4, 2026-04-27) + # as compounding multipliers on the raw gain. var cult_pct: float = _sum_city_building_effect_float(c, "culture_percent") var border_pct: float = _sum_city_building_effect_float(c, "border_growth_percent") - var total_pct: float = cult_pct + border_pct + var difficulty_cult_mult: float = GameState.get_effective_yield_mult(player, "culture") + # Express the difficulty mult as a "percent" addition: 1.50 → +50%. + var total_pct: float = cult_pct + border_pct + (difficulty_cult_mult - 1.0) if total_pct > 0.0: var post_culture: float = c.get_culture_stored() var gained: float = post_culture - pre_culture