Skip to content

Commit

Permalink
Fixed bug causing player to take twice as much damage
Browse files Browse the repository at this point in the history
  • Loading branch information
hhaslam11 committed Jul 27, 2016
1 parent 796bb26 commit ce34efd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/com/hotmail/kalebmarc/textfighter/player/Health.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,11 @@ public static void takeDamage(int damage){
damage = (int)(damage - (damage * resist));

Action.cls();
health -= damage;
Ui.println("----------------------------------------------------");
Ui.println("You have been hit by a " + Enemy.get().getName() + "!");
Ui.println("You lost " + damage + " health.");
Ui.println("----------------------------------------------------");
Ui.println("Your health: " + Health.getStr());
Ui.println("Your health: " + (health - damage));
Ui.println("Enemy health: " + Enemy.get().getHeathStr());
Ui.println("----------------------------------------------------");
Action.pause();
Expand Down

0 comments on commit ce34efd

Please sign in to comment.