From 4156a6ac93363904dbabe175e4986be0ec32b80c Mon Sep 17 00:00:00 2001 From: Kacpherek Date: Tue, 27 Oct 2026 22:16:25 +0100 Subject: [PATCH] Aim a mob's crossbow by the world difficulty RangedAttackMob.rangedAttackUncertainty is 14 - 4 * difficulty; Horizon always used the Normal value 6. --- crates/horizon-client/src/mobs/illager.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/horizon-client/src/mobs/illager.rs b/crates/horizon-client/src/mobs/illager.rs index f4cb18af8..e99010cbc 100644 --- a/crates/horizon-client/src/mobs/illager.rs +++ b/crates/horizon-client/src/mobs/illager.rs @@ -542,12 +542,12 @@ fn shoot_crossbow(m: &mut Mob, who: Who, cx: &mut Cx) { Some(Who::Mob(m.id)), ); p.set_bonus(super::gear::arrow_bonus(m)); - // rangedAttackUncertainty at normal difficulty: 14 - 2 * 4. + // rangedAttackUncertainty: 14 - 4 * difficulty. p.shoot( &mut crate::projectiles::own_random(m), [dx, dy, dz], 1.6, - 6.0, + (14 - i32::from(cx.w.difficulty.id) * 4) as f32, ); cx.events.push(MobEvent::Projectile(p)); let pitch = 1.0 / (m.random.next_float() * 0.5 + 1.8) + 0.53;