From e9497460258bd0d4b4e660fb2a9bf6cfd7b7758f Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Wed, 3 May 2023 13:08:52 -0400 Subject: [PATCH] v2.1.0: magical fire can now burn heaps and ignores internal/water tiles --- .../levels/rooms/special/MagicalFireRoom.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/MagicalFireRoom.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/MagicalFireRoom.java index 7153e972d..95377723c 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/MagicalFireRoom.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/MagicalFireRoom.java @@ -207,6 +207,13 @@ public class MagicalFireRoom extends SpecialRoom { || cur[cell+1] > 0 || cur[cell-Dungeon.level.width()] > 0 || cur[cell+Dungeon.level.width()] > 0) { + + //ignore cells which are behind the magical fire or water + if (Dungeon.level.map[cell] == Terrain.EMPTY_SP + || Dungeon.level.map[cell] == Terrain.WATER){ + continue; + } + //spread fire to nearby flammable cells if (Dungeon.level.flamable[cell] && (fire == null || fire.volume == 0 || fire.cur[cell] == 0)){ GameScene.add(Blob.seed(cell, 4, Fire.class)); @@ -217,6 +224,11 @@ public class MagicalFireRoom extends SpecialRoom { if (ch != null && !ch.isImmune(getClass())) { Buff.affect(ch, Burning.class).reignite(ch, 4f); } + + //burn adjacent heaps, but only on outside cells + if (Dungeon.level.heaps.get(cell) != null){ + Dungeon.level.heaps.get(cell).burn(); + } } off[cell] = cur[cell];