v0.4.2: fire now has a chance to burn down terrain every turn

This commit is contained in:
Evan Debenham 2016-09-07 23:11:14 -04:00
parent dc74a041ee
commit 98b5fe0394

View File

@ -32,6 +32,7 @@ import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.plants.Plant; import com.shatteredpixel.shatteredpixeldungeon.plants.Plant;
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
import com.watabou.utils.Random;
public class Fire extends Blob { public class Fire extends Blob {
@ -52,7 +53,7 @@ public class Fire extends Blob {
burn( cell ); burn( cell );
fire = cur[cell] - 1; fire = cur[cell] - 1;
if (fire <= 0 && flamable[cell]) { if (flamable[cell] && Random.Int(fire+1) == 0) {
int oldTile = Dungeon.level.map[cell]; int oldTile = Dungeon.level.map[cell];
Dungeon.level.destroy( cell ); Dungeon.level.destroy( cell );