From faca0cb1185e600e45dbbddbefe79808ef611154 Mon Sep 17 00:00:00 2001 From: Rendo Date: Thu, 30 Apr 2026 22:04:32 +0500 Subject: [PATCH] Fixed max hp not being cap for health --- src/health.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/health.rs b/src/health.rs index 847112a..b2f64f6 100644 --- a/src/health.rs +++ b/src/health.rs @@ -29,8 +29,8 @@ impl Add for Health { type Output = u32; fn add(self, rhs: u32) -> Self::Output { - if u32::MAX - self.health < rhs { - u32::MAX + if self.max_health - self.health < rhs { + self.max_health } else { self.health + rhs