diff --git a/src/simulator/api-gdext/src/lib.rs b/src/simulator/api-gdext/src/lib.rs index a26561c2..479c8c06 100644 --- a/src/simulator/api-gdext/src/lib.rs +++ b/src/simulator/api-gdext/src/lib.rs @@ -1546,6 +1546,20 @@ impl GdCity { fn mark_attacked(&mut self, turn: i64) { self.inner.mark_attacked(turn.max(0) as u32); } + + /// Mark the city as captured on `turn`. Enables the occupation production + /// penalty for the next OCCUPATION_TURNS turns. + #[func] + fn mark_captured(&mut self, turn: i64) { + self.inner.mark_captured(turn.max(0) as u32); + } + + /// Returns the production multiplier for `current_turn`. + /// 0.5 while the city is under occupation (first 5 turns post-capture), 1.0 otherwise. + #[func] + fn get_occupation_production_mult(&self, current_turn: i64) -> f64 { + self.inner.occupation_production_mult(current_turn.max(0) as u32) + } } // ── Private helpers for GdCity ──────────────────────────────────────────