Player and monster attacks follow the dungeon slayer rules

This commit is contained in:
2024-01-06 13:02:31 +01:00
parent 0431d872e4
commit cad08bd300
6 changed files with 59 additions and 25 deletions

View File

@@ -72,7 +72,7 @@ impl Artifact for Potion {
// only consume potion of the player can gain at least one health point
if !player.is_healthy() {
let old = player.get_life();
player.change_life(self.health.try_into().unwrap());
player.increase_life(self.health.try_into().unwrap());
let new = player.get_life();
messages.insert(0, format!("picked up potion and gained {} hp.", new - old).to_string());
self.health = 0;