diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java index 59718f725..7826f05c8 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java @@ -241,7 +241,7 @@ public abstract class Char extends Actor { public void damage( int dmg, Object src ) { - if (HP <= 0) { + if (HP <= 0 || dmg < 0) { return; } if (this.buff(Frost.class) != null){ diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/SpearTrap.java b/src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/SpearTrap.java index a64df8733..1c775bdf4 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/SpearTrap.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/SpearTrap.java @@ -60,7 +60,7 @@ public class SpearTrap extends Trap { if (ch != null){ int damage = Random.NormalIntRange(Dungeon.depth, Dungeon.depth*2); damage -= Random.IntRange( 0, ch.dr()); - ch.damage( damage , this); + ch.damage( Math.max(damage, 0) , this); if (!ch.isAlive() && ch == Dungeon.hero){ Dungeon.fail(Utils.format(ResultDescriptions.TRAP, name)); GLog.n("You were skewered by the spear trap...");