Skip to content
Snippets Groups Projects
Commit 55e87c9a authored by Charlie Darques's avatar Charlie Darques
Browse files

affichage dégats en int

parent 7cfa322a
Branches
No related tags found
No related merge requests found
......@@ -67,7 +67,7 @@ public class Level{
System.out.println("The ennemy attacks before you can !");
player.setCurrentHealth(player.getCurrentHealth() - attack.getDamage() * this.ennemy.getAttackMultiplier()); //Récupère une attaque aléatoire dans l'enum
ennemy.exhaust(attack.getEnergyCost());
System.out.println(attack.getName() + "!! You receive " + (int) attack.getDamage() * this.ennemy.getAttackMultiplier() + " damage!");
System.out.println(attack.getName() + "!! You receive " + (int) (attack.getDamage() * this.ennemy.getAttackMultiplier()) + " damage!");
System.out.println(this.player.getName() + "'s life' : " + this.displayPlayerHealth());
Display.goToUserInput();
}
......@@ -91,6 +91,8 @@ public class Level{
System.out.print(" ");
System.err.println(this.player.getCurrentEnergy() + "/" + this.player.getMaxEnergy());
}
public String displayPlayerHealth(){
return (int )this.ennemy.getCurrentHealth() +" / " + (int) this.ennemy.getMaxHealth();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment