Debug completed.
This commit is contained in:
@@ -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
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user