v0.3.5: various logic fixes to accommodate chars that are 0 hp, but not dead.
This commit is contained in:
@@ -274,7 +274,10 @@ public abstract class Char extends Actor {
|
||||
CharSprite.NEGATIVE,
|
||||
Integer.toString( dmg ) );
|
||||
}
|
||||
if (HP <= 0) {
|
||||
|
||||
if (HP < 0) HP = 0;
|
||||
|
||||
if (!isAlive()) {
|
||||
die( src );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ public class Regeneration extends Buff {
|
||||
|
||||
if (target.HP < target.HT && !((Hero)target).isStarving()) {
|
||||
LockedFloor lock = target.buff(LockedFloor.class);
|
||||
if (lock == null || lock.regenOn()) {
|
||||
if (target.HP > 0 && (lock == null || lock.regenOn())) {
|
||||
target.HP += 1;
|
||||
if (target.HP == target.HT) {
|
||||
((Hero) target).resting = false;
|
||||
|
||||
Reference in New Issue
Block a user