v0.9.1: fixed various effects rarely placing high grass over plants
This commit is contained in:
parent
52388f2d23
commit
a0d43b00b5
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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 ) );
|
||||
|
|
|
@ -91,12 +91,8 @@ public class WandOfRegrowth extends Wand {
|
|||
for (Iterator<Integer> 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();
|
||||
|
|
|
@ -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 );
|
||||
|
|
Loading…
Reference in New Issue
Block a user