From d007df8e7816ceb57887ebdef6a972e590e961dd Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Thu, 3 Aug 2023 13:22:03 -0400 Subject: [PATCH] v2.2.0: stacking healing effects is now a bit more generous --- .../shatteredpixeldungeon/actors/buffs/Healing.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Healing.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Healing.java index c1e6ee687..d5d11974a 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Healing.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Healing.java @@ -70,13 +70,12 @@ public class Healing extends Buff { Math.round(healingLeft * percentHealPerTick) + flatHealPerTick, healingLeft); } - + public void setHeal(int amount, float percentPerTick, int flatPerTick){ - if (amount > healingLeft) { - healingLeft = amount; - percentHealPerTick = percentPerTick; - flatHealPerTick = flatPerTick; - } + //multiple sources of healing do not overlap, but do combine the best of their properties + healingLeft = Math.max(healingLeft, amount); + percentHealPerTick = Math.max(percentHealPerTick, percentPerTick); + flatHealPerTick = Math.max(flatHealPerTick, flatPerTick); } public void increaseHeal( int amount ){