v0.3.2: fully implemented elemental embers quest
This commit is contained in:
@@ -171,7 +171,7 @@ public abstract class RegularLevel extends Level {
|
||||
protected void placeSign(){
|
||||
while (true) {
|
||||
int pos = roomEntrance.random();
|
||||
if (pos != entrance && traps.get(pos) == null) {
|
||||
if (pos != entrance && traps.get(pos) == null && findMob(pos) == null) {
|
||||
map[pos] = Terrain.SIGN;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -34,8 +34,10 @@ public class EntrancePainter extends Painter {
|
||||
for (Room.Door door : room.connected.values()) {
|
||||
door.set( Room.Door.Type.REGULAR );
|
||||
}
|
||||
|
||||
level.entrance = room.random( 1 );
|
||||
|
||||
do {
|
||||
level.entrance = room.random(1);
|
||||
} while (level.findMob(level.entrance) != null);
|
||||
set( level, level.entrance, Terrain.ENTRANCE );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user