v0.4.1: fixed a bug where cursed rings of might would let the player have more health than their total

This commit is contained in:
Evan Debenham 2016-07-06 02:45:43 -04:00 committed by Evan Debenham
parent 7084a25b6a
commit 686ac91c4b

View File

@ -30,6 +30,7 @@ public class RingOfMight extends Ring {
public boolean doEquip(Hero hero) {
if (super.doEquip(hero)){
hero.HT += level()*5;
hero.HP = Math.min(hero.HP, hero.HT);
return true;
} else {
return false;