v0.9.2: fixed regrowth bombs checking the incorrect terrain
This commit is contained in:
parent
481e93d7d9
commit
fcec39ea96
|
@ -66,7 +66,7 @@ public class RegrowthBomb extends Bomb {
|
||||||
for (int i = 0; i < PathFinder.distance.length; i++) {
|
for (int i = 0; i < PathFinder.distance.length; i++) {
|
||||||
if (PathFinder.distance[i] < Integer.MAX_VALUE) {
|
if (PathFinder.distance[i] < Integer.MAX_VALUE) {
|
||||||
Char ch = Actor.findChar(i);
|
Char ch = Actor.findChar(i);
|
||||||
int t = Dungeon.level.map[cell];
|
int t = Dungeon.level.map[i];
|
||||||
if (ch != null){
|
if (ch != null){
|
||||||
if (ch.alignment == Dungeon.hero.alignment) {
|
if (ch.alignment == Dungeon.hero.alignment) {
|
||||||
//same as a healing potion
|
//same as a healing potion
|
||||||
|
@ -75,7 +75,7 @@ public class RegrowthBomb extends Bomb {
|
||||||
}
|
}
|
||||||
} else if ((t == Terrain.EMPTY || t == Terrain.EMPTY_DECO || t == Terrain.EMBERS
|
} else if ((t == Terrain.EMPTY || t == Terrain.EMPTY_DECO || t == Terrain.EMBERS
|
||||||
|| t == Terrain.GRASS || t == Terrain.FURROWED_GRASS || t == Terrain.HIGH_GRASS)
|
|| t == Terrain.GRASS || t == Terrain.FURROWED_GRASS || t == Terrain.HIGH_GRASS)
|
||||||
&& Dungeon.level.plants.get(cell) == null){
|
&& Dungeon.level.plants.get(i) == null){
|
||||||
plantCandidates.add(i);
|
plantCandidates.add(i);
|
||||||
}
|
}
|
||||||
GameScene.add( Blob.seed( i, 10, Regrowth.class ) );
|
GameScene.add( Blob.seed( i, 10, Regrowth.class ) );
|
||||||
|
|
Loading…
Reference in New Issue
Block a user