v0.3.2: fully implemented elemental embers quest

This commit is contained in:
Evan Debenham
2015-10-17 22:59:31 -04:00
parent 43327a5f4e
commit f8749368a4
9 changed files with 153 additions and 10 deletions
@@ -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 );
}