v0.6.0: reduced the frequency of chasm tunnels

and made them only fill in with chasm if they are at least 4 tiles wide & tall
This commit is contained in:
Evan Debenham 2017-05-26 22:12:42 -04:00
parent 972c94799c
commit ecde6b570d
3 changed files with 11 additions and 7 deletions

View File

@ -32,7 +32,9 @@ public class BridgeRoom extends TunnelRoom {
@Override
public void paint(Level level) {
Painter.fill(level, this, 1, Terrain.CHASM);
if (Math.min(width(), height()) > 3) {
Painter.fill(level, this, 1, Terrain.CHASM);
}
super.paint(level);

View File

@ -71,22 +71,22 @@ public abstract class ConnectionRoom extends Room {
private static float[][] chances = new float[27][];
static {
chances[1] = new float[]{6, 1, 0, 1, 0};
chances[1] = new float[]{10, 1, 0, 1, 0};
chances[4] = chances[3] = chances[2] = chances[1];
chances[5] = new float[]{1, 0, 0, 0, 0};
chances[6] = new float[]{0, 0, 5, 1, 0};
chances[6] = new float[]{0, 0, 10, 2, 0};
chances[10] = chances[9] = chances[8] = chances[7] = chances[6];
chances[11] = new float[]{6, 0, 0, 3, 0};
chances[11] = new float[]{10, 0, 0, 5, 0};
chances[15] = chances[14] = chances[13] = chances[12] = chances[11];
chances[16] = new float[]{0, 1, 6, 1, 0};
chances[16] = new float[]{0, 1, 10, 1, 0};
chances[20] = chances[19] = chances[18] = chances[17] = chances[16];
chances[21] = chances[5];
chances[22] = new float[]{6, 2, 0, 1, 0};
chances[22] = new float[]{10, 3, 0, 2, 0};
chances[26] = chances[25] = chances[24] = chances[23] = chances[22];
}

View File

@ -32,7 +32,9 @@ public class WalkwayRoom extends PerimeterRoom {
@Override
public void paint(Level level) {
Painter.fill(level, this, 1, Terrain.CHASM);
if (Math.min(width(), height()) > 3) {
Painter.fill(level, this, 1, Terrain.CHASM);
}
super.paint(level);