diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java index 20522edf8..7ea9a8c0d 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java @@ -594,17 +594,6 @@ public abstract class Char extends Actor { if (alignment != Alignment.ALLY && this.buff(DeathMark.DeathMarkTracker.class) != null){ dmg *= 1.25f; } - Endure.EndureTracker endure = buff(Endure.EndureTracker.class); - if (!(src instanceof Char)){ - //reduce damage here if it isn't coming from a character (if it is we already reduced it) - if (endure != null){ - dmg = endure.adjustDamageTaken(dmg); - } - //the same also applies to challenge scroll damage reduction - if (buff(ScrollOfChallenge.ChallengeArena.class) != null){ - dmg *= 0.67f; - } - } Class srcClass = src.getClass(); if (isImmune( srcClass )) { @@ -623,6 +612,7 @@ public abstract class Char extends Actor { buff( Paralysis.class ).processDamage(dmg); } + Endure.EndureTracker endure = buff(Endure.EndureTracker.class); if (endure != null){ dmg = endure.enforceDamagetakenLimit(dmg); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java index 670d99303..356a1344b 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java @@ -101,6 +101,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfMight; import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfTenacity; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.Scroll; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfMagicMapping; +import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic.ScrollOfChallenge; import com.shatteredpixel.shatteredpixeldungeon.items.wands.Wand; import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfLivingEarth; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.SpiritBow; @@ -1194,6 +1195,18 @@ public class Hero extends Char { GLog.w( Messages.get(this, "pain_resist") ); } + Endure.EndureTracker endure = buff(Endure.EndureTracker.class); + if (!(src instanceof Char)){ + //reduce damage here if it isn't coming from a character (if it is we already reduced it) + if (endure != null){ + dmg = endure.adjustDamageTaken(dmg); + } + //the same also applies to challenge scroll damage reduction + if (buff(ScrollOfChallenge.ChallengeArena.class) != null){ + dmg *= 0.67f; + } + } + CapeOfThorns.Thorns thorns = buff( CapeOfThorns.Thorns.class ); if (thorns != null) { dmg = thorns.proc(dmg, (src instanceof Char ? (Char)src : null), this);