From 14f6f9458a9c2f464a9d01883b0398141b06ea90 Mon Sep 17 00:00:00 2001 From: autocommit Date: Thu, 16 Apr 2026 11:47:20 -0700 Subject: [PATCH] =?UTF-8?q?feat(mc-combat):=20=E2=9C=A8=20Introduce=20Sieg?= =?UTF-8?q?e=20struct=20and=20resolution=20logic=20for=20siege=20combat=20?= =?UTF-8?q?scenarios?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Lilith Autocommit --- src/simulator/crates/mc-combat/src/siege.rs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/simulator/crates/mc-combat/src/siege.rs b/src/simulator/crates/mc-combat/src/siege.rs index b998ecd9..9435f2ca 100644 --- a/src/simulator/crates/mc-combat/src/siege.rs +++ b/src/simulator/crates/mc-combat/src/siege.rs @@ -23,13 +23,14 @@ const RANGED_CITY_HP_FRACTION: f32 = 0.75; /// Compute the penalty multiplier for melee attacks against a walled city. /// Returns a value < 1.0 that the attacker's effective strength is multiplied by. -/// Scales by tier: 0=1.0, 1=0.60 (walls), 2=0.45 (castle). -/// Second pass from 0.70/0.55; first pass slowed but seed1 still fell T106. +/// Scales by tier: 0=1.0, 1=0.70 (walls), 2=0.55 (castle). +/// Paired with the melee-to-city damage fraction in resolver.rs that halves +/// structural damage from non-siege melee attacks. pub fn melee_wall_penalty(wall_tier: i32) -> f32 { match wall_tier { 0 => 1.0, - 1 => 0.60, - _ => 0.45, + 1 => 0.70, + _ => 0.55, } } @@ -91,9 +92,9 @@ mod tests { #[test] fn melee_penalty_scales_by_tier() { assert!((melee_wall_penalty(0) - 1.0).abs() < 0.001); - assert!((melee_wall_penalty(1) - 0.60).abs() < 0.001); - assert!((melee_wall_penalty(2) - 0.45).abs() < 0.001); - assert!((melee_wall_penalty(3) - 0.45).abs() < 0.001); + assert!((melee_wall_penalty(1) - 0.70).abs() < 0.001); + assert!((melee_wall_penalty(2) - 0.55).abs() < 0.001); + assert!((melee_wall_penalty(3) - 0.55).abs() < 0.001); } #[test]