feat(combat): Update combat resolver to handle new mechanics and edge cases in hit detection and damage calculation

Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
autocommit 2026-04-16 14:15:02 -07:00
parent efa4df5aaf
commit a35adafcdf

View file

@ -406,11 +406,10 @@ impl CombatResolver {
// Melee vs city: only a fraction of unit damage translates to
// city structural HP. Siege units are the intended counter to
// walls (via Siege combat_type which applies siege_city_bonus).
// 0.50 is the empirical sweet spot from batch 2 (12 PASS):
// lower values (0.400.33) stalled all seeds at max_turns and
// regressed checklist results. Seed 1's sub-T100 fall is an
// AI production-priority issue, not siege math.
let melee_city_fraction: f32 = 0.50;
// Option B dial-back: 0.50→0.55 after 0.70→0.75 wall tweak alone
// still produced 0/3 victories at 300 turns. Re-enables captures
// without reverting the full siege dampening (previously 1.00).
let melee_city_fraction: f32 = 0.55;
let city_dmg = (damage_to_defender as f32 * melee_city_fraction).round() as i32;
(city_dmg, (city_hp - city_dmg).max(0))
}