feat(city-specific): Refactor city data structures and generation logic for improved layout rules and optimizations

Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
autocommit 2026-04-16 13:07:13 -07:00
parent 8f18eb57eb
commit 8f042e4a65

View file

@ -106,10 +106,12 @@ impl TileYield {
/// with two decent food tiles. Target: median p0_pop_peak ≥ 7 at T150.
pub const FOOD_PER_POP: f64 = 1.2;
/// Base city HP before population scaling. Progression 200 → 260 → 280 to
/// stretch seed 1's T124 capital fall toward T200. Paired with 23 HP/turn
/// regen and the 0.40 melee-to-city damage fraction in resolver.rs.
pub const BASE_CITY_HP: u32 = 280;
/// Base city HP before population scaling. Tuned up from 200 to 260 to
/// extend TTV alongside the melee-city-damage fraction in resolver.rs. The
/// combination (HP boost + 0.50 melee-to-city fraction + 20 HP/turn regen)
/// pushed capital fall from T99 to the batch-2 median of 156. Further bumps
/// (280, 300) regressed results — 260 is the empirical peak.
pub const BASE_CITY_HP: u32 = 260;
/// HP gained per population point.
pub const HP_PER_POP: u32 = 10;
@ -513,12 +515,13 @@ impl City {
self.hp = (self.hp + amount).min(self.max_hp);
}
/// Heal the city by the standard per-turn amount (23 HP).
/// Progression: 10 → 20 → 23. +15% bump to extend seed 1 fall from T124
/// toward T200 while still letting strong sieges resolve.
/// Heal the city by the standard per-turn amount (20 HP, was 10).
/// Raised with the melee-city-damage fraction in resolver.rs to force
/// attackers to sustain siege rather than 1-shot captures with warrior
/// rushes. Further bumps to 23/26 regressed results.
/// Skips destroyed cities (HP == 0).
pub fn heal_per_turn(&mut self) {
const HEAL_PER_TURN: u32 = 23;
const HEAL_PER_TURN: u32 = 20;
if self.hp > 0 && self.hp < self.max_hp {
self.heal(HEAL_PER_TURN);
}