
" 
:map 1 
:tags prestairs  
:size 6 8 
:off 9 1 
:tiles 
222222
233332
211112
211112
211112
211112
222222
333333

:map 2 
:tags stairsdown  
:size 6 18 
:off 10 0 
:tiles 
222222
233332
211112
211112
211112
221122
326623
026620
026620
026620
026620
026620
026620
026620
026620
021120
022220
033330

:map 3
:tags secretbunker 
:scriptA bed 
:scriptB officedesk 
:scriptC officechair drift 
:scriptD bathtoilet -1 movey 
:scriptE stall -1 movey 
:scriptF restsink 
:scriptG cupboard -1 movey 
:size 16 11 
:off 10 0 
:tiles 
0000222222220000
0000233333320000
0000211111120000
0000211111120000
000021A111120000
222221111B122222
233331A11C133332
2DEF11111111G1G2
2111111111111112
2222222222222222
3333333333333333
"
value SECRETBUNKER
SECRETBUNKER $parse-rooms
	
	: secretbunker1 2 for niceweapons .drift next LLammo LLammo ;
	: secretbunker2 2 for cheapweapons .drift next 4 for LLmisc next LLammo 2 3 rnd for grenade .scatter next ;
	: secretbunker3 12 20 rnd dshot 30 40 rnd dbullet 20 30 rnd drifle 3 for cheapweapons .drift next 2 3 rnd for pipebomb .scatter next ;
	: secretbunker4 30 50 rnd dgas 2 5 rnd for molotov .drift next 3 for bottle .scatter next ;

	: secretbunkerloot
		0 3 rnd for skelscat next
		skel drift
		0 stack
			' secretbunker1 shove
			' secretbunker2 shove
			' secretbunker3 shove
			' secretbunker4 shove
		shuffles pops execute drop
	;
	
locdef{
		
	: secretbunkerend
		s random-edge-door "secretbunker" only-with-door
	;
	
	: tostairsdown
		s random-edge-door "stairsdown" only-with-door
		e random-edge-door "stairsdown" only-with-door
		w random-edge-door "stairsdown" only-with-door
		// random-door "stairsdown" only-with-door
	;
		
	: toprestairs
		random-door "prestairs" only-with-door
		random-door "prestairs" only-with-door
	;
		
	location: secretbunker
		max-rooms: 11
		entry-tags: entry
		script: set-theme 
		pre-script: set-theme
		post-script: 10diff %zombs

		room-choice: entry
			room-weight: 1
			room-count: 1
			room-script: ndx
			room-post-script: dhall
			filter-only

		"
		room-choice: bathroom
			room-weight: 1
			room-count: 2
			room-script: nad floor-bath

		room-choice: bedroom
			room-weight: 50
			room-count: 2
			room-script: nad
			room-post-script: beddoor

		room-choice: kitchen
			room-weight: 20
			room-count: 1
			room-script: nad floor-kitchen

		room-choice: living
			room-weight: 100
			room-count: 1
			room-script: nad
			room-post-script: toprestairs
			
		room-choice: hall
			room-weight: 1
			room-count: 1
			room-script: ndx
			room-post-script: toprestairs

		room-choice: prestairs
			room-weight: 1
			room-count: 1
			room-script: nad gcloset-theme
			room-post-script: tostairsdown
			filter-only
			
		room-choice: stairsdown
			room-weight: 1
			room-count: 1
			room-script: nad gcloset-theme
			room-post-script: secretbunkerend
			filter-only
				
		room-choice: secretbunker
			room-weight: 1
			room-count: 1
			room-script: nad gcloset-theme
			room-post-script: secretbunkerloot
			filter-only
		"
		constant secretbunker-base
		secretbunker-base evaluate
		
	location: secretbunker
		max-rooms: 11
		entry-tags: open1
		script: set-theme 
		pre-script: set-theme
		post-script: 10diff %zombs

		room-choice: open1
			room-weight: 1
			room-count: 1
			room-script: ndx
			room-post-script: dhall
			filter-only
			
		secretbunker-base evaluate
}