Debug completed.

This commit is contained in:
2026-05-15 16:51:02 +03:30
parent 50aa4c31a2
commit 7522e875bb
9 changed files with 3 additions and 2 deletions
@@ -238,7 +238,7 @@ public class Main {
System.out.printf("❤️ %s: %d/%d HP | 💙 Mana: %d/%d%n",
player.getName(), player.getHp(), player.getMaxHP(),
player.getMp(), player.getMaxMP());
System.out.printf("👹 %s: %d/%d HP%n",
System.out.printf("👾 %s: %d/%d HP%n",
enemy.getName(enemy), enemy.getHp(), enemy.getMaxHP());
System.out.println("".repeat(45));
}
@@ -121,6 +121,6 @@ public abstract class Enemy implements Entity {
}
public boolean isAlive() {
return (getHp() != 0);
return (getHp() > 0);
}
}
@@ -12,6 +12,7 @@ public class Goblin extends Enemy {
public Goblin() {
super("Goblin", 30, 20, new ToothedHook());
this.random = new Random();
}
@Override