diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Talent.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Talent.java index 44f860849..3b2909e43 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Talent.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Talent.java @@ -249,11 +249,10 @@ public enum Talent { grassCells.remove(0); } for (int cell : grassCells){ - if (Dungeon.level.map[cell] == Terrain.EMPTY || - Dungeon.level.map[cell] == Terrain.EMBERS || - Dungeon.level.map[cell] == Terrain.EMPTY_DECO || - Dungeon.level.map[cell] == Terrain.GRASS || - Dungeon.level.map[cell] == Terrain.FURROWED_GRASS){ + int t = Dungeon.level.map[cell]; + if ((t == Terrain.EMPTY || t == Terrain.EMPTY_DECO || t == Terrain.EMBERS + || t == Terrain.GRASS || t == Terrain.FURROWED_GRASS) + && Dungeon.level.plants.get(cell) == null){ Level.set(cell, Terrain.HIGH_GRASS); GameScene.updateMap(cell); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/bombs/RegrowthBomb.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/bombs/RegrowthBomb.java index 9e59e5774..b4ad49744 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/bombs/RegrowthBomb.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/bombs/RegrowthBomb.java @@ -67,19 +67,16 @@ public class RegrowthBomb extends Bomb { for (int i = 0; i < PathFinder.distance.length; i++) { if (PathFinder.distance[i] < Integer.MAX_VALUE) { Char ch = Actor.findChar(i); + int t = Dungeon.level.map[cell]; if (ch != null){ if (ch.alignment == Dungeon.hero.alignment) { //same as a healing potion PotionOfHealing.cure(ch); PotionOfHealing.heal(ch); } - } else if ( Dungeon.level.map[i] == Terrain.EMPTY || - Dungeon.level.map[i] == Terrain.EMBERS || - Dungeon.level.map[i] == Terrain.EMPTY_DECO || - Dungeon.level.map[i] == Terrain.GRASS || - Dungeon.level.map[i] == Terrain.HIGH_GRASS || - Dungeon.level.map[i] == Terrain.FURROWED_GRASS){ - + } else if ((t == Terrain.EMPTY || t == Terrain.EMPTY_DECO || t == Terrain.EMBERS + || t == Terrain.GRASS || t == Terrain.FURROWED_GRASS || t == Terrain.HIGH_GRASS) + && Dungeon.level.plants.get(cell) == null){ plantCandidates.add(i); } GameScene.add( Blob.seed( i, 10, Regrowth.class ) ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfRegrowth.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfRegrowth.java index 790b9863b..8dff9b037 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfRegrowth.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfRegrowth.java @@ -91,12 +91,8 @@ public class WandOfRegrowth extends Wand { for (Iterator i = cells.iterator(); i.hasNext();) { int cell = i.next(); int terr = Dungeon.level.map[cell]; - if (!(terr == Terrain.EMPTY || - terr == Terrain.EMBERS || - terr == Terrain.EMPTY_DECO || - terr == Terrain.GRASS || - terr == Terrain.HIGH_GRASS || - terr == Terrain.FURROWED_GRASS)) { + if (!(terr == Terrain.EMPTY || terr == Terrain.EMBERS || terr == Terrain.EMPTY_DECO || + terr == Terrain.GRASS || terr == Terrain.HIGH_GRASS || terr == Terrain.FURROWED_GRASS)) { i.remove(); } else if (Char.hasProp(Actor.findChar(cell), Char.Property.IMMOVABLE)) { i.remove(); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Blooming.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Blooming.java index 6b3b036ee..a81e724a8 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Blooming.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Blooming.java @@ -73,9 +73,10 @@ public class Blooming extends Weapon.Enchantment { } private boolean plantGrass(int cell){ - int c = Dungeon.level.map[cell]; - if ( c == Terrain.EMPTY || c == Terrain.EMPTY_DECO - || c == Terrain.EMBERS || c == Terrain.GRASS){ + int t = Dungeon.level.map[cell]; + if ((t == Terrain.EMPTY || t == Terrain.EMPTY_DECO || t == Terrain.EMBERS + || t == Terrain.GRASS || t == Terrain.FURROWED_GRASS) + && Dungeon.level.plants.get(cell) == null){ Level.set(cell, Terrain.HIGH_GRASS); GameScene.updateMap(cell); CellEmitter.get( cell ).burst( LeafParticle.LEVEL_SPECIFIC, 4 );