v0.6.0: Various fixes and tweaks:
- Fixed pit room logic - Fixed builders adding rooms on failure - Fixed sewer boss signpost appearing inside walls - Adjusted size range and accepted connections for sewer boss entrance - Removed special logic to make laboratory rooms more common - Adjusted some default parameters within line builder
This commit is contained in:
parent
bb4d798a6b
commit
8dc3856686
|
@ -79,7 +79,7 @@ public abstract class RegularLevel extends Level {
|
|||
r.neigbours.clear();
|
||||
r.connected.clear();
|
||||
}
|
||||
rooms = builder.build(initRooms);
|
||||
rooms = builder.build((ArrayList<Room>)initRooms.clone());
|
||||
} while (rooms == null);
|
||||
|
||||
return painter().paint(this, rooms);
|
||||
|
@ -382,6 +382,7 @@ public abstract class RegularLevel extends Level {
|
|||
} while (traps.get(result) != null
|
||||
|| findMob(result) != null
|
||||
|| heaps.get(result) != null);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -71,6 +71,18 @@ public class SewerBossLevel extends SewerLevel {
|
|||
return super.builder();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void placeSign() {
|
||||
while (true) {
|
||||
int pos = pointToCell(roomEntrance.random());
|
||||
if (map[pos] != Terrain.LOCKED_EXIT
|
||||
&& map[pos] != Terrain.WALL_DECO) {
|
||||
map[pos] = Terrain.SIGN;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected float waterFill(){
|
||||
return 0.50f;
|
||||
|
|
|
@ -41,9 +41,9 @@ public class LineBuilder extends Builder {
|
|||
}
|
||||
|
||||
//path length is the percentage of pathable rooms that are on the path
|
||||
private float pathLength = 0.2f;
|
||||
private float pathLength = 0.1f;
|
||||
//The chance weights for extra rooms to be added to the path
|
||||
private float[] pathLenJitterChances = new float[]{1, 1};
|
||||
private float[] pathLenJitterChances = new float[]{0, 2, 1};
|
||||
|
||||
public LineBuilder setPathLength( float len, float[] jitter ){
|
||||
pathLength = len;
|
||||
|
@ -51,8 +51,8 @@ public class LineBuilder extends Builder {
|
|||
return this;
|
||||
}
|
||||
|
||||
private float[] pathTunnelChances = new float[]{1, 2, 1};
|
||||
private float[] branchTunnelChances = new float[]{2, 1, 1};
|
||||
private float[] pathTunnelChances = new float[]{2, 3, 1};
|
||||
private float[] branchTunnelChances = new float[]{3, 2, 1};
|
||||
|
||||
public LineBuilder setTunnelLength( float[] path, float[] branch){
|
||||
pathTunnelChances = path;
|
||||
|
@ -106,7 +106,7 @@ public class LineBuilder extends Builder {
|
|||
placeRoom(rooms, entrance, shop, direction + 180f);
|
||||
}
|
||||
|
||||
int roomsOnPath = Math.round(multiConnections.size()*pathLength + Random.chances(pathLenJitterChances));
|
||||
int roomsOnPath = (int)(multiConnections.size()*pathLength) + Random.chances(pathLenJitterChances);
|
||||
roomsOnPath = Math.min(roomsOnPath, multiConnections.size());
|
||||
|
||||
Room curr = entrance;
|
||||
|
|
|
@ -120,12 +120,6 @@ public class SpecialRoom extends Room {
|
|||
floorSpecials.remove( WeakFloorRoom.class );
|
||||
|
||||
return new PitRoom();
|
||||
|
||||
//TODO should laboratory rooms be more common like this?
|
||||
} else if (Dungeon.depth % 5 == 2 && floorSpecials.contains( LaboratoryRoom.class )) {
|
||||
|
||||
useType(LaboratoryRoom.class);
|
||||
return new LaboratoryRoom();
|
||||
|
||||
} else if (Dungeon.depth >= guaranteedWellDepth) {
|
||||
useType( MagicWellRoom.class );
|
||||
|
|
|
@ -31,30 +31,31 @@ public class SewerBossEntranceRoom extends EntranceRoom {
|
|||
|
||||
@Override
|
||||
public int minWidth() {
|
||||
return 11;
|
||||
return 9;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int maxWidth() {
|
||||
return 11;
|
||||
return 9;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int minHeight() {
|
||||
return 5;
|
||||
return 6;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int maxHeight() {
|
||||
return 8;
|
||||
return 10;
|
||||
}
|
||||
|
||||
//TODO perhaps I just want to deny all top-side connections
|
||||
@Override
|
||||
public boolean canConnect(Point p) {
|
||||
//refuses connections on the center 3 tiles on the top side
|
||||
//refuses connections on the center 3 tiles on the top side, and the top tile along left/right
|
||||
return super.canConnect(p)
|
||||
&& !(p.y == top && p.x >= (left + (width()/2 - 1)) && p.x <= (left + (width()/2 + 1)));
|
||||
&& !(p.y == top && p.x >= (left + (width()/2 - 1)) && p.x <= (left + (width()/2 + 1)))
|
||||
&& p.y != top+1;
|
||||
}
|
||||
|
||||
public void paint(Level level ) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user