From 20c60e62809030606ee5ee281ae981842c5a2035 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Fri, 7 Mar 2025 14:38:14 -0500 Subject: [PATCH] v3.0.1: salt cube's regen reduction is now paused in locked floors --- core/src/main/assets/messages/items/items.properties | 4 ++-- .../shatteredpixeldungeon/actors/buffs/Regeneration.java | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/core/src/main/assets/messages/items/items.properties b/core/src/main/assets/messages/items/items.properties index e62e18cbe..c73294e84 100644 --- a/core/src/main/assets/messages/items/items.properties +++ b/core/src/main/assets/messages/items/items.properties @@ -1387,8 +1387,8 @@ items.trinkets.ratskull.stats_desc=At its current level this trinket will make r items.trinkets.saltcube.name=salt cube items.trinkets.saltcube.desc=This large salt crystal was cut into an almost perfect cube shape, and it somehow managed to drain half the water from the alchemy pot instead of dissolving. It seems to be magically dehydrating and preserving the food you eat, extending the satiety you get, but also lessening your health restoration when not starving. -items.trinkets.saltcube.typical_stats_desc=Typically this trinket will increase the amount of time before you grow hungry by _%1$s%%_, but will also reduce your rate of health regeneration by _%2$s%%_. -items.trinkets.saltcube.stats_desc=At its current level this trinket will increase the amount of time before you grow hungry by _%1$s%%_, but will also reduce your rate of health regeneration by _%2$s%%_. +items.trinkets.saltcube.typical_stats_desc=Typically this trinket will increase the amount of time before you grow hungry by _%1$s%%_, but will also reduce your rate of health regeneration by _%2$s%%_ unless the floor is locked. +items.trinkets.saltcube.stats_desc=At its current level this trinket will increase the amount of time before you grow hungry by _%1$s%%_, but will also reduce your rate of health regeneration by _%2$s%%_ unless the floor is locked. items.trinkets.shardofoblivion.name=shard of oblivion items.trinkets.shardofoblivion.desc=After stewing in the alchemy pot, this small shard of cursed metal has changed to be made of... nothing? Light seems to bend around it, and it hovers in place when you aren't holding it. The shard seems to be magically drawing power from your ignorance, so it's probably best to not think about it too much. diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Regeneration.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Regeneration.java index 7f3da7458..3218c0eda 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Regeneration.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Regeneration.java @@ -75,7 +75,11 @@ public class Regeneration extends Buff { delay /= RingOfEnergy.artifactChargeMultiplier(target); } } - delay /= SaltCube.healthRegenMultiplier(); + + //salt cube is turned off while regen is disabled. + if (target.buff(LockedFloor.class) == null) { + delay /= SaltCube.healthRegenMultiplier(); + } partialRegen += 1f / delay;