From 79010c02462c2c6590dd67f40c78cc0507644962 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Wed, 30 Sep 2015 15:12:47 -0400 Subject: [PATCH] v0.3.2: added safety check for rockfall traps --- .../shatteredpixeldungeon/levels/traps/RockfallTrap.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/RockfallTrap.java b/src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/RockfallTrap.java index 073eb6dbd..9fb8e01e2 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/RockfallTrap.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/RockfallTrap.java @@ -59,7 +59,7 @@ public class RockfallTrap extends Trap { if (ch != null){ int damage = Random.NormalIntRange(5+Dungeon.depth, 10+Dungeon.depth*3); damage -= Random.IntRange( 0, ch.dr()); - ch.damage(damage, this); + ch.damage( Math.max(damage, 0) , this); Buff.prolong( ch, Paralysis.class, Paralysis.duration(ch)*2);