v0.3.0: improved interactions between plants and fire

This commit is contained in:
Evan Debenham 2015-05-13 21:13:14 -04:00
parent 5c4dc05477
commit 3ae6f88914
2 changed files with 7 additions and 0 deletions

View File

@ -27,6 +27,7 @@ import com.shatteredpixel.shatteredpixeldungeon.effects.particles.FlameParticle;
import com.shatteredpixel.shatteredpixeldungeon.items.Heap;
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
import com.shatteredpixel.shatteredpixeldungeon.plants.Plant;
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
public class Fire extends Blob {
@ -92,6 +93,11 @@ public class Fire extends Blob {
if (heap != null) {
heap.burn();
}
Plant plant = Dungeon.level.plants.get( pos );
if (plant != null){
plant.wither();
}
}
public void seed( int cell, int amount ) {

View File

@ -680,6 +680,7 @@ public abstract class Level implements Bundlable {
map[pos] == Terrain.EMBERS ||
map[pos] == Terrain.EMPTY_DECO) {
map[pos] = Terrain.GRASS;
flamable[pos] = true;
GameScene.updateMap( pos );
}