@@ -2060,7 +2060,7 @@ function generateLevel() {
20602060 Y = $ . dice ( DL . rooms . length ) - 1
20612061 X = $ . dice ( DL . width ) - 1
20622062 ROOM = DL . rooms [ Y ] [ X ]
2063- } while ( ROOM . type == 'cavern' ) // cannot teleport into a cavern
2063+ } while ( ROOM . type ) // teleport into a chamber only
20642064 DL . moves >>= 1
20652065 return
20662066 }
@@ -2084,8 +2084,7 @@ function generateLevel() {
20842084 rooms : new Array ( maxRow ) ,
20852085 map : '' ,
20862086 moves : 0 ,
2087- spawn : Math . trunc ( deep / 3 + Z / 9 + maxRow / 3 )
2088- + $ . dice ( Math . round ( $ . online . cha / 20 ) + 1 ) + 3 ,
2087+ spawn : $ . int ( deep / 3 + Z / 9 + maxRow / 3 ) + $ . dice ( Math . round ( $ . online . cha / 20 ) + 1 ) + 3 ,
20892088 width : maxCol
20902089 }
20912090
@@ -2494,7 +2493,7 @@ function putMonster(r = -1, c = -1): boolean {
24942493 // check for overcrowding
24952494 let room = DL . rooms [ r ] [ c ]
24962495 let i :number = room . monster . length
2497- const mob = Z < 50 ? 3 : 2
2496+ const mob = ( Z > 9 && Z < 50 ) ? 3 : 2 // how big are these caverns?
24982497 if ( i >= ( ! DL . rooms [ r ] [ c ] . type ? mob - 1 : DL . rooms [ r ] [ c ] . type == 'cavern' ? mob : 1 ) )
24992498 return false
25002499
@@ -2648,7 +2647,7 @@ function putMonster(r = -1, c = -1): boolean {
26482647 }
26492648
26502649 level += $ . dice ( room . monster . length + 2 ) - ( room . monster . length + 1 )
2651- } while ( room . monster . length < 10 && sum < ( Z - 3 - room . monster . length ) )
2650+ } while ( room . monster . length < $ . int ( 3 + mob + deep / 3 ) && sum < ( Z - 3 - room . monster . length ) )
26522651
26532652 return true
26542653}
0 commit comments