v2.1.0: fixed errors with new magic fire logic and adjusted it slightly

This commit is contained in:
Evan Debenham
2023-05-18 16:51:06 -04:00
parent ac34e3b4d4
commit 33a47b3172

View File

@@ -208,12 +208,6 @@ public class MagicalFireRoom extends SpecialRoom {
|| cur[cell-Dungeon.level.width()] > 0 || cur[cell-Dungeon.level.width()] > 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 //spread fire to nearby flammable cells
if (Dungeon.level.flamable[cell] && (fire == null || fire.volume == 0 || fire.cur[cell] == 0)){ if (Dungeon.level.flamable[cell] && (fire == null || fire.volume == 0 || fire.cur[cell] == 0)){
GameScene.add(Blob.seed(cell, 4, Fire.class)); GameScene.add(Blob.seed(cell, 4, Fire.class));
@@ -226,7 +220,8 @@ public class MagicalFireRoom extends SpecialRoom {
} }
//burn adjacent heaps, but only on outside cells //burn adjacent heaps, but only on outside cells
if (Dungeon.level.heaps.get(cell) != null){ if (Dungeon.level.heaps.get(cell) != null
&& Dungeon.level.map[cell] != Terrain.EMPTY_SP){
Dungeon.level.heaps.get(cell).burn(); Dungeon.level.heaps.get(cell).burn();
} }
} }