From cd2ff07a206f572fa5efe2af7bd07a59d88b7985 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Thu, 6 Mar 2025 11:20:00 -0500 Subject: [PATCH] v3.0.1: fixed rare crash caused by spirit form rose --- .../shatteredpixeldungeon/actors/hero/spells/SpiritForm.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/spells/SpiritForm.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/spells/SpiritForm.java index daa725b91..2f618baf8 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/spells/SpiritForm.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/spells/SpiritForm.java @@ -200,12 +200,13 @@ public class SpiritForm extends ClericSpell { ArrayList spawnPoints = new ArrayList<>(); for (int i = 0; i < PathFinder.NEIGHBOURS8.length; i++) { int p = Dungeon.hero.pos + PathFinder.NEIGHBOURS8[i]; - if (Actor.findChar(p) == null && (Dungeon.level.passable[p] || Dungeon.level.avoid[p])) { + if (Actor.findChar(p) == null && !Dungeon.level.solid[p]) { spawnPoints.add(p); } } - if (spawnPoints.size() > 0) { + if (!spawnPoints.isEmpty()) { Wraith w = Wraith.spawnAt(Random.element(spawnPoints), Wraith.class); + w.HP = w.HT = 20 + 8*artifactLevel(); Buff.affect(w, Corruption.class); }