v3.0.1: fixed rare crash caused by spirit form rose

This commit is contained in:
Evan Debenham
2025-03-06 11:20:00 -05:00
parent 4576147103
commit cd2ff07a20

View File

@@ -200,12 +200,13 @@ public class SpiritForm extends ClericSpell {
ArrayList<Integer> 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);
}