From 44f7c1954d60169eb0245a7ff269c2bb0e2e98d7 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Wed, 3 May 2023 22:51:08 -0400 Subject: [PATCH] v2.1.0: freezing now properly accounts for resists when applying chill --- .../shatteredpixeldungeon/actors/blobs/Freezing.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 4fcc6d1ff..8c7c46afc 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 @@ -73,7 +73,11 @@ public class Freezing extends Blob { } else { Chill chill = ch.buff(Chill.class); float turnsToAdd = Dungeon.level.water[cell] ? 5f : 3f; - if (chill != null) turnsToAdd = Math.min(turnsToAdd, Chill.DURATION - chill.cooldown()); + if (chill != null){ + float chillToCap = Chill.DURATION - chill.cooldown(); + chillToCap /= ch.resist(Chill.class); //account for resistance to chill + turnsToAdd = Math.min(turnsToAdd, chillToCap); + } if (turnsToAdd > 0f) { Buff.affect(ch, Chill.class, turnsToAdd); }