v1.1.0: improved logic for inferno gas

This commit is contained in:
Evan Debenham 2021-10-28 19:01:52 -04:00 committed by Evan Debenham
parent 623c3776fd
commit 59a9e786bb

View File

@ -57,16 +57,23 @@ public class Inferno extends Blob {
Fire.burn(cell); Fire.burn(cell);
if (Dungeon.level.flamable[cell]){
Dungeon.level.destroy( cell );
observe = true;
GameScene.updateMap( cell );
}
} else if (Dungeon.level.flamable[cell] } else if (Dungeon.level.flamable[cell]
&& (cur[cell-1] > 0 && (cur[cell-1] > 0
|| cur[cell+1] > 0 || cur[cell+1] > 0
|| cur[cell-Dungeon.level.width()] > 0 || cur[cell-Dungeon.level.width()] > 0
|| cur[cell+Dungeon.level.width()] > 0)) { || cur[cell+Dungeon.level.width()] > 0)) {
Fire.burn(cell);
Dungeon.level.destroy( cell );
observe = true; if (fire == null || fire.cur[cell] == 0) {
GameScene.updateMap( cell ); GameScene.add(Fire.seed(cell, 4, Fire.class));
}
} }
} }
} }