pub fn take_damage(&mut self, dmg: u32) {
        self.hp = if let Some(hp) = self.hp.checked_sub(dmg) {
            hp
        } else {
            0
        };
    }
/// Reduce the HP by a damage value
Reduce the HP by a damage value
Reduce the HP by a damage value
pub fn take_damage(&mut self, dmg: u32) {
        self.hp = if let Some(hp) = self.hp.checked_sub(dmg) {
            hp
        } else {
            0
        };
    }
pub fn take_damage ( & mut self , dmg : u32 ) { self . hp = if let Some ( hp ) = self . hp . checked_sub ( dmg ) { hp } else { 0 } ; }
Reduce the HP by a damage value
Reduce the HP by a damage value
&mut self
dmg
u32
&mut self
dmg
u32