v0.3.2: added safety check for rockfall traps
This commit is contained in:
parent
b402e9a9cd
commit
79010c0246
|
@ -59,7 +59,7 @@ public class RockfallTrap extends Trap {
|
||||||
if (ch != null){
|
if (ch != null){
|
||||||
int damage = Random.NormalIntRange(5+Dungeon.depth, 10+Dungeon.depth*3);
|
int damage = Random.NormalIntRange(5+Dungeon.depth, 10+Dungeon.depth*3);
|
||||||
damage -= Random.IntRange( 0, ch.dr());
|
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);
|
Buff.prolong( ch, Paralysis.class, Paralysis.duration(ch)*2);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user