:: bordel
<<set $here = 'bordel'>>
<<set $ARGS = $location_var[$here]>>
<<if $location_var[$here][0] == 'start' or !$location_var[$here][0]>>
	<<set $location_type = 'event'>>
	<<set $menu_off = 1>>
	<center><b>Brothel</b></center>
	<<image "locations/city/residential/sauna/bordel.jpg">>
	The brothel madam looks you over as you enter.
	<<if $pc.pcs_apprnc < 0>>
		"You look half dead, get yourself treated."
		<<act 'Leave'>>
			<<gt 'city_redlight' 'start'>>
		<</act>>
	<<elseif $pc.pcs_apprnc < 100>>
		"Look at you, no one will pay for such a product, get cleaned up and come back."
		<<act 'Leave'>>
			<<gt 'city_redlight' 'start'>>
		<</act>>
	<<else>>
		"You can work tonight, head to your room and get ready."
		<<act 'Go to your room'>>
			<<gt 'bordel' 'brothel'>>
		<</act>>
	<</if>>
<</if>>
<<if $location_var[$here][0] == 'brothel'>>
	<<set $sexloc = 'bordel'>>
	<<set $loc_arg = $location_var[$here][0]>>
	<<set $loc = 'bordel'>>
	<<set $location_type = 'private'>>
	<<set $menu_loc = 'bordel'>>
	<<set $menu_arg = 'brothel'>>
	<<set $menu_off = 0>>
	<<set $locclass to null>>
	 	<center><b>Your room in a brothel</b></center>
	<<image "locations/city/residential/sauna/borroom.jpg">>
	This is your room in the brothel. In the middle is a huge bed and not much else. There is a small side door to the <<link "bathroom">><<gt 'bordel' 'dysh'>><</link>>.
	<p>In a brothel there is a lot of competition. In order to avoid a massacre, they introduced a rule - no more than two clients per day.</p>
	<<actCLA 'Leave'>>
		<<if $wardrobe.clothingworntype != 'nude'>>
			<<gt 'city_redlight' 'start'>>
		<<else>>
			You can't go outside naked.
			<<act 'Go to the bathroom'>>
				<<gt 'bordel' 'dysh'>>
			<</act>>
		<</if>>
	<</actCLA>>
	<<if setup.func('bordel', 'is_open') == 0>>
		The brothel is closed for the night however, so you won''t be able to work now regardless.
	<<else>>
		<<if getvar("$borsexkol") >= 2>>
			<!-- !! borsexkol is reset in cikl, meaning that it is reset at midnight, not when the brothel-->
			<!-- !! opens or closes. if this is not desired behavior, will need to handle resetting this var-->
			<!-- !! in brothel specific code.-->
			You have already hit this limit, so you won''t be able to work again until midnight.
		<<else>>
			<<actCLA 'Go to the reception room and wait for customers'>>
				<<if ($pc.cumAtLocation(6) == 1 or $pc.cumAtLocation(7) == 1) or $pc.cumAtLocation(11) == 1 or $pc.pcs_makeup < 2 or $pc.legHair > 3 or $pc.pubesLength > 3 or getvar("$sweat") > 25 or $pc.pcs_hairbsh < 1>>
					<p>The brothel madam comes over to you and says, "Our customers expect you to be clean, shaven, made-up and with your hair looking nice. Go and sort yourself out, now!"</p>
					<<act 'Go to the bathroom'>>
						<<gt 'bordel' 'dysh'>>
					<</act>>
				<<elseif $wardrobe.clothingworntype != 'fancy_burlesque' and $wardrobe.PCloStyle != 4 and $wardrobe.clothingworntype != 'nude'>>
					You need to wear an outfit that can be used for prostitution. If you haven''t got anything suitable and you are desperate, you could work naked, but you will get paid less and might get treated badly.
					You can change your clothes in the bathroom.
					<<act 'Go to the bathroom'>>
						<<gt 'bordel' 'dysh'>>
					<</act>>
				<<else>>
					<<gt 'bordel' 'var'>>
				<</if>>
			<</actCLA>>
		<</if>>
	<</if>>
<</if>>
<<if $location_var[$here][0] == 'dysh'>>
	<<set $loc_arg = $location_var[$here][0]>>
	<<set $loc = 'bordel'>>
	<<set $locM_arg = 'dysh'>>
	<<set $locM = 'bordel'>>
	<<set $location_type = 'bathroom'>>
	<<set $locclass = 'restroom'>>
	<<set $menu_loc = 'bordel'>>
	<<set $menu_arg = 'dysh'>>
	<<set $menu_off = 0>>
	 	<<image "locations/city/residential/sauna/bordysh.jpg">>
	The bathroom is well fitted and clean as customers can access it and hygiene is very important in a brothel.
	Your room is so dedicated to its purpose that your clothes are stored in here.
	<<act 'Return to your room'>>
		<<gt 'bordel' 'brothel'>>
	<</act>>
	<<act 'Bathroom functions'>>
		<<gt 'vann' 'start'>>
	<</act>>
	<<act 'Mirror'>>
		<<gt 'mirror' 'start'>>
	<</act>>
	<<act 'Change your clothes'>>
		<<gt 'wardrobe' 'start'>>
	<</act>>
<</if>>
<<if $location_var[$here][0] == 'var'>>
	<<set $location_type = 'event'>>
	<<set $menu_off = 1>>
	<<if $wardrobe.clothingworntype == 'nude'>>
		<<set $bordelpay = 8>>
	<<else>>
		<<set $bordelpay = 10>>
	<</if>>
	<<gs 'npcgeneratec' 0 'Client' `rand(18,40)`>>
	
	<<set $time.minutes += 30>>
	<<set $borrand = rand(0, 10)>>
	<<if getvar("$borrand") == 0>>
		<<set $bordelpay += 100>>
		<p>A customer orders you (bordelpay <b>₽</b>).</p>
		<<actCLA 'Refuse' undefined `{willpower:['sex','resist']}`>>
				
				
				<<gt 'bordel' 'brothel'>>
			<</actCLA>>
		
		<<actCLA 'Agree'>>
			<<set $borsexkol += 1>>
			<<set $finances.cash += $bordelpay>>
			<<set $slutty += 1>>
			<<set $bordelslutty += 1>>
			<<set $time.minutes += 10>>
			<<set $zpprand = rand(0, 100)>>
			<<if getvar("$zpprand") >= 70>>
				<<gs 'dinSex' 'std_trigger'>>

			<</if>>
			<<set $picrand = rand(0,40)>>
			<<gt 'sex' 'start'>>
		<</actCLA>>
	<<elseif getvar("$borrand") == 1>>
		<<set $bordelpay += 100>>
		<p>A customer orders you and another girl (bordelpay <b>₽</b>).</p>
		<<gs 'willpower' 'sex' 'resist' 'hard'>>
		<<if $will_cost <= $pc.pcs_willpwr>>
			<<actCLA 'Refuse (will_cost Willpower)'>>
				<<gs 'willpower' 'sex' 'resist' 'hard'>>
				<<gs 'willpower' 'pay' 'resist'>>
				<<gt 'bordel' 'brothel'>>
			<</actCLA>>
		
		<<actCLA 'Agree'>>
			<<set $borsexkol += 1>>
			<<set $finances.cash += $bordelpay>>
			<<set $slutty += 1>>
			<<set $bordelslutty += 1>>
			<<set $time.minutes += 10>>
			<<set $zpprand = rand(0, 100)>>
			<<if getvar("$zpprand") >= 70>>
				<<gs 'dinSex' 'std_trigger'>>

			<</if>>
			<<gt 'podrsex' 'start'>>
		<</actCLA>>
	<<elseif getvar("$borrand") == 2>>
		<<set $bordelpay += 150>>
		<p>Two clients book you (bordelpay <b>₽</b>).</p>
		<<gs 'willpower' 'sex' 'resist' 'hard'>>
		<<if $will_cost <= $pc.pcs_willpwr>>
			<<actCLA 'Refuse (will_cost Willpower)'>>
				<<gs 'willpower' 'sex' 'resist' 'hard'>>
				<<gs 'willpower' 'pay' 'resist'>>
				<<gt 'bordel' 'brothel'>>
			<</actCLA>>
		
		<<actCLA 'Agree'>>
			<<set $borsexkol += 1>>
			<<set $finances.cash += $bordelpay>>
			<<set $slutty += 1>>
			<<set $bordelslutty += 1>>
			<<set $time.minutes += 10>>
			<<set $zpprand = rand(0, 100)>>
			<<if getvar("$zpprand") >= 70>>
				<<gs 'dinSex' 'std_trigger'>>

			<</if>>
			<<gs 'npcgeneratec' 0 'Client' `rand(18,40)`>>
			<<gs 'boyStat' $npclastgenerated '1'>>
			<<gt 'sexdvoe' 'start'>>
		<</actCLA>>
	<<elseif getvar("$borrand") == 3>>
		<<set $bordelpay += 150>>
		<p>Two clients book you and another girl (bordelpay <b>₽</b>).</p>
		<<actCLA 'Refuse' undefined `{willpower:['sex','resist']}`>>
				
				
				<<gt 'bordel' 'brothel'>>
			<</actCLA>>
		
		<<actCLA 'Agree'>>
			<<set $borsexkol += 1>>
			<<set $finances.cash += $bordelpay>>
			<<set $slutty += 1>>
			<<set $bordelslutty += 1>>
			<<set $time.minutes += 10>>
			<<set $zpprand = rand(0, 100)>>
			<<if getvar("$zpprand") >= 70>>
				<<gs 'dinSex' 'std_trigger'>>

			<</if>>
			<<gs 'npcgeneratec' 0 'Client' `rand(18,40)`>>
			<<gs 'boyStat' $npclastgenerated '1'>>
			<<gt 'sexdvanadva' 'start'>>
		<</actCLA>>
	<<elseif getvar("$borrand") == 4>>
		<<set $bordelpay += 200>>
		<p>A group of customers order you (bordelpay <b>₽</b>).</p>
		<<gs 'willpower' 'sex' 'resist' 'hard'>>
		<<if $will_cost <= $pc.pcs_willpwr>>
			<<actCLA 'Refuse (will_cost Willpower)'>>
				<<gs 'willpower' 'sex' 'resist' 'hard'>>
				<<gs 'willpower' 'pay' 'resist'>>
				<<gt 'bordel' 'brothel'>>
			<</actCLA>>
		
		<<actCLA 'Agree'>>
			<<set $borsexkol += 1>>
			<<set $finances.cash += $bordelpay>>
			<<set $slutty += 1>>
			<<set $bordelslutty += 1>>
			<<set $time.minutes += 10>>
			<<set $zpprand = rand(0, 100)>>
			<<if getvar("$zpprand") >= 70>>
				<<gs 'dinSex' 'std_trigger'>>

			<</if>>
			<<set $guy += 3>>
			<<set $sex.npcId to null>>
			<<gs 'npcgeneratec' 0 'Bordel Client' `rand(18,40)`>>
			
			<<gs 'npcgeneratec' 0 'Bordel Client' `rand(18,40)`>>
			<<gs 'boyStat' $npclastgenerated '1'>>
			<<gs 'npcgeneratec' 0 'Bordel Client' `rand(18,40)`>>
			<<gs 'boyStat' $npclastgenerated '2'>>
			<<gt 'paysex' 'start'>>
		<</actCLA>>
	<<else>>
		<<act 'Go to your room'>>
			<<gt 'bordel' 'brothel'>>
		<</act>>
		<<if setup.func('bordel', 'is_open')>>
			You are not chosen.
			<<act 'Wait for another'>>
				<<gt 'bordel' 'var'>>
			<</act>>
		<<else>>
			You are not chosen, and the brothel is now closed.
		<</if>>
	<</if>>
	<<if getvar("$borrand") <= 4 and setup.func('bordel', 'is_open') == 0>>
		The brothel is closing now, so this is your last chance to work today.
	<</if>>
<</if>>
<<if $location_var[$here][0] == 'is_open'>>
	<<set $result = hour >= setup.func('bordel', 'open_hour') or hour <= setup.func('bordel', 'close_hour')>>
<</if>>
<<if $location_var[$here][0] == 'open_hour'>>
	<<set $result = 20>>
<</if>>
<<if $location_var[$here][0] == 'close_hour'>>
	<<set $result = 3>>
<</if>>
