v2.4.0: fixed geomancer/sappers placing boulders next to entrance
This commit is contained in:
@@ -806,7 +806,9 @@ public class GnollGeomancer extends Mob {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void affectCell(int cell) {
|
public void affectCell(int cell) {
|
||||||
if (Dungeon.level.map[cell] != Terrain.EMPTY_SP && Random.Int(3) == 0) {
|
if (Dungeon.level.map[cell] != Terrain.EMPTY_SP
|
||||||
|
&& !Dungeon.level.adjacent(cell, Dungeon.level.entrance())
|
||||||
|
&& Random.Int(3) == 0) {
|
||||||
Level.set(cell, Terrain.MINE_BOULDER);
|
Level.set(cell, Terrain.MINE_BOULDER);
|
||||||
GameScene.updateMap(cell);
|
GameScene.updateMap(cell);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -512,7 +512,9 @@ public abstract class Level implements Bundlable {
|
|||||||
for (LevelTransition transition : transitions){
|
for (LevelTransition transition : transitions){
|
||||||
//if we don't specify a type, prefer to return any entrance
|
//if we don't specify a type, prefer to return any entrance
|
||||||
if (type == null &&
|
if (type == null &&
|
||||||
(transition.type == LevelTransition.Type.REGULAR_ENTRANCE || transition.type == LevelTransition.Type.SURFACE)){
|
(transition.type == LevelTransition.Type.REGULAR_ENTRANCE
|
||||||
|
|| transition.type == LevelTransition.Type.BRANCH_ENTRANCE
|
||||||
|
|| transition.type == LevelTransition.Type.SURFACE)){
|
||||||
return transition;
|
return transition;
|
||||||
} else if (transition.type == type){
|
} else if (transition.type == type){
|
||||||
return transition;
|
return transition;
|
||||||
|
|||||||
Reference in New Issue
Block a user