feat(combat): ✨ Add bridge occupation multiplier and capture marking logic for combat resolution and turn processing
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
parent
5a9af4191e
commit
a10639669d
2 changed files with 6 additions and 1 deletions
|
|
@ -117,6 +117,8 @@ static func capture_city(
|
|||
|
||||
city.owner = attacker.owner
|
||||
city.is_capital = false
|
||||
if city._bridge.is_available():
|
||||
city._bridge._gd_city.call("mark_captured", GameState.turn_number)
|
||||
|
||||
for tile_pos: Vector2i in city.owned_tiles:
|
||||
var layer: Dictionary = GameState.get_primary_layer()
|
||||
|
|
|
|||
|
|
@ -77,8 +77,11 @@ func _process_production(player: RefCounted) -> void: # Player
|
|||
if tile != null and tile.biome_id == "hills":
|
||||
building_prod += prod_hills
|
||||
var prod_pct: float = _sum_city_building_effect_float(c, "production_percent")
|
||||
var occupation_mult: float = 1.0
|
||||
if c._bridge.is_available():
|
||||
occupation_mult = c._bridge._gd_city.call("get_occupation_production_mult", GameState.turn_number)
|
||||
var prod: int = int(
|
||||
(yields.get("production", 1) + building_prod) * (1.0 + prod_pct) * prod_modifier
|
||||
(yields.get("production", 1) + building_prod) * (1.0 + prod_pct) * prod_modifier * occupation_mult
|
||||
)
|
||||
# Capture current item before apply_production pops it on completion.
|
||||
var current: Dictionary = (
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue