From 57727034ec06551357ae7e9fd1278b517d289cf4 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Tue, 12 Apr 2022 16:33:30 -0400 Subject: [PATCH] v1.2.3: fixed up errors in freeze functionality changes in v1.2.0 --- .../shatteredpixeldungeon/actors/blobs/Freezing.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Freezing.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Freezing.java index 0068e04d2..eb2b95565 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Freezing.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Freezing.java @@ -72,8 +72,10 @@ public class Freezing extends Blob { Buff.affect(ch, Frost.class, 2f); } else { Chill chill = ch.buff(Chill.class); - if (chill == null || chill.cooldown() <= Chill.DURATION - 3f) { - Buff.affect(ch, Chill.class, Dungeon.level.water[cell] ? 5f : 3f); + float turnsToAdd = Dungeon.level.water[cell] ? 5f : 3f; + if (chill != null) turnsToAdd = Math.min(turnsToAdd, Chill.DURATION - chill.cooldown()); + if (turnsToAdd > 0f) { + Buff.affect(ch, Chill.class, turnsToAdd); } if (chill != null && chill.cooldown() >= Chill.DURATION &&