Skip to content

Commit

Permalink
ensure 0 max blood counts as no blood
Browse files Browse the repository at this point in the history
  • Loading branch information
Cheaterpaul committed Feb 25, 2024
1 parent 9d7c31d commit 5a1251b
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,10 @@ public int getMaxBlood() {
* Set's maximum blood and current blood
*/
private void setMaxBlood(int blood) {
maxBlood = blood;
if (this.maxBlood <= 0) {
blood = -1;
}
this.maxBlood = blood;
this.blood = blood;
}

Expand Down

0 comments on commit 5a1251b

Please sign in to comment.