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