v0.3.2: added safety check for rockfall traps

This commit is contained in:
Evan Debenham 2015-09-30 15:12:47 -04:00
parent b402e9a9cd
commit 79010c0246

View File

@ -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);