v0.9.4: improved behaviour of electricity blobs

This commit is contained in:
Evan Debenham 2021-07-05 20:30:27 -04:00
parent dfddf0fd94
commit 001c40f15e

View File

@ -70,7 +70,9 @@ public class Electricity extends Blob {
if (cur[cell] > 0) {
Char ch = Actor.findChar( cell );
if (ch != null && !ch.isImmune(this.getClass())) {
Buff.prolong( ch, Paralysis.class, 1f);
if (ch.buff(Paralysis.class) == null){
Buff.prolong( ch, Paralysis.class, cur[cell]);
}
if (cur[cell] % 2 == 1) {
ch.damage(Math.round(Random.Float(2 + Dungeon.depth / 5f)), this);
if (!ch.isAlive() && ch == Dungeon.hero){