diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Fire.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Fire.java index e1f8d8848..a2d207ddc 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Fire.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Fire.java @@ -41,6 +41,8 @@ public class Fire extends Blob { boolean[] flamable = Dungeon.level.flamable; int cell; int fire; + + Freezing freeze = (Freezing)Dungeon.level.blobs.get( Freezing.class ); boolean observe = false; @@ -48,6 +50,12 @@ public class Fire extends Blob { for (int j = area.top-1; j <= area.bottom; j++) { cell = i + j*Dungeon.level.width(); if (cur[cell] > 0) { + + if (freeze != null && freeze.cur[cell] > 0){ + freeze.clear(cell); + off[cell] = cur[cell] = 0; + continue; + } burn( cell ); @@ -61,7 +69,7 @@ public class Fire extends Blob { } - } else { + } else if (freeze == null || freeze.cur[cell] < 0) { if (flamable[cell] && (cur[cell-1] > 0 @@ -75,6 +83,8 @@ public class Fire extends Blob { fire = 0; } + } else { + fire = 0; } volume += (off[cell] = fire); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Freezing.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Freezing.java index efbb34a2b..56dc365e1 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Freezing.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Freezing.java @@ -49,6 +49,12 @@ public class Freezing extends Blob { cell = i + j*Dungeon.level.width(); if (cur[cell] > 0) { + if (fire != null && fire.cur[cell] > 0){ + fire.clear(cell); + off[cell] = cur[cell] = 0; + continue; + } + Char ch = Actor.findChar( cell ); if (ch != null) { if (ch.buff(Frost.class) != null){ @@ -62,8 +68,6 @@ public class Freezing extends Blob { } } - if (fire != null) fire.clear(cell); - Heap heap = Dungeon.level.heaps.get( cell ); if (heap != null) heap.freeze();