From 2b16d3aadb61a3906b303836e1103475f574c969 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Thu, 19 Aug 2021 16:05:35 -0400 Subject: [PATCH] v1.0.1: fixed ankh resurrection not respecting lost inventory debuff --- .../shatteredpixeldungeon/actors/hero/Hero.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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 02957c4ff..e6e1606f3 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 @@ -1611,11 +1611,9 @@ public class Hero extends Char { Ankh ankh = null; //look for ankhs in player inventory, prioritize ones which are blessed. - for (Item item : belongings){ - if (item instanceof Ankh) { - if (ankh == null || ((Ankh) item).isBlessed()) { - ankh = (Ankh) item; - } + for (Ankh i : belongings.getAllItems(Ankh.class)){ + if (ankh == null || i.isBlessed()) { + ankh = i; } }