# bordel

if $ARGS[0] = 'start' or $ARGS[0] = '':
    $location_type = 'event'
	menu_off = 1
	gs 'stat'
	'<center><b>Brothel</b></center>'
	'<center><img <<$set_imgh>> src="images/locations/city/residential/sauna/bordel.jpg"></center>'

	'The brothel madam looks you over as you enter.'

	if pcs_apprnc < 0:
		'"You look half dead, get yourself treated."'

		act 'Leave':gt 'city_redlight', 'start'
	elseif 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'
	else
		'"You can work tonight, head to your room and get ready."'

		act 'Go to your room':gt 'bordel', 'brothel'
	end
end

if $ARGS[0] = 'brothel':
	$sexloc = 'bordel'
	$loc_arg = $ARGS[0]
	$loc = 'bordel'
    $location_type = 'private'
	$menu_loc = 'bordel'
	$menu_arg = 'brothel'
	menu_off = 0
	killvar '$locclass'
	cla
	*clr
	gs 'stat'
	'<center><b>Your room in a brothel</b></center>'
	'<center><img <<$set_imgh>> src="images/locations/city/residential/sauna/borroom.jpg"></center>'
	'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 <a href="exec:gt ''bordel'', ''dysh''">bathroom</a>.'
	*nl
	'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.'

	act 'Leave':
		if $clothingworntype ! 'nude':
			gt 'city_redlight', 'start'
		else
			cla
			'You can''t go outside naked.'

			act 'Go to the bathroom':gt 'bordel', 'dysh'
		end
	end

	if 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 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
			act 'Go to the reception room and wait for customers':

				if (cumloc[6] = 1 or cumloc[7] = 1) or cumloc[11] = 1 or pcs_makeup < 2 or pcs_leghair > 3 or pcs_pubes > 3 or sweat > 25 or pcs_hairbsh = 0:
					cla
					'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!"'

					act 'Go to the bathroom':gt 'bordel', 'dysh'
				elseif $clothingworntype ! 'fancy_burlesque' and PCloStyle ! 4 and $clothingworntype ! 'nude':
					cla
					'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'
				else
					gt 'bordel', 'var'
				end
			end
		end
	end
end

if $ARGS[0] = 'dysh':
	$loc_arg = $ARGS[0]
	$loc = 'bordel'
	$locM_arg = 'dysh'
	$locM = 'bordel'
    $location_type = 'bathroom'
	$locclass = 'restroom'
	$menu_loc = 'bordel'
	$menu_arg = 'dysh'
	menu_off = 0
	cla
	*clr
	gs 'stat'

	'<center><img <<$set_imgh>> src="images/locations/city/residential/sauna/bordysh.jpg"></center>'
	'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.'
	*nl
	
	act 'Return to your room':gt 'bordel', 'brothel'

	act 'Bathroom functions': gt 'vann', 'start'

	act 'Mirror': gt 'mirror', 'start'

	act 'Change your clothes': gt 'wardrobe', 'start'
end

if $ARGS[0] = 'var':
    $location_type = 'event'
	menu_off = 1
	if $clothingworntype = 'nude':
		bordelpay = 8
	else
		bordelpay = 10
	end
	gs 'npcgeneratec', 0, 'Client', rand(18,40)
	gs 'boyStat', $npclastgenerated
	minut += 30
	gs 'stat'
	borrand = rand(0, 10)

	if borrand = 0:
		bordelpay *= 100
		'A customer orders you (<<bordelpay>> <b>₽</b>).'
		
		gs 'willpower', 'sex', 'resist'
		if will_cost <= pcs_willpwr:
			act 'Refuse (<<will_cost>> Willpower)':
				gs 'willpower', 'sex', 'resist'
				gs 'willpower', 'pay', 'resist'
				gs 'stat'
				gt 'bordel', 'brothel'
			end
		else
			act 'Refuse (<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You don''t have enough willpower to use this action.</font>'
		end

		act 'Agree':
			borsexkol += 1
			money += bordelpay
			slutty += 1
			bordelslutty += 1
			minut += 10
			zpprand = rand(0, 100)

			if zpprand >= 70:gs 'dinSex', 'std_trigger'

			picrand = rand(0,40)
			gt 'sex', 'start'
		end
	elseif borrand = 1:
		bordelpay *= 100
		'A customer orders you and another girl (<<bordelpay>> <b>₽</b>).'

		gs 'willpower', 'sex', 'resist', 'hard'
		if will_cost <= pcs_willpwr:
			act 'Refuse (<<will_cost>> Willpower)':
				gs 'willpower', 'sex', 'resist', 'hard'
				gs 'willpower', 'pay', 'resist'
				gs 'stat'
				gt 'bordel', 'brothel'
			end
		else
			act 'Refuse (<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You don''t have enough willpower to use this action.</font>'
		end

		act 'Agree':
			borsexkol += 1
			money += bordelpay
			slutty += 1
			bordelslutty += 1
			minut += 10
			zpprand = rand(0, 100)

			if zpprand >= 70:gs 'dinSex', 'std_trigger'

			gt 'podrsex', 'start'
		end
	elseif borrand = 2:
		bordelpay *= 150
		'Two clients book you (<<bordelpay>> <b>₽</b>).'

		gs 'willpower', 'sex', 'resist', 'hard'
		if will_cost <= pcs_willpwr:
			act 'Refuse (<<will_cost>> Willpower)':
				gs 'willpower', 'sex', 'resist', 'hard'
				gs 'willpower', 'pay', 'resist'
				gs 'stat'
				gt 'bordel', 'brothel'
			end
		else
			act 'Refuse (<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You don''t have enough willpower to use this action.</font>'
		end

		act 'Agree':
			borsexkol += 1
			money += bordelpay
			slutty += 1
			bordelslutty += 1
			minut += 10
			zpprand = rand(0, 100)

			if zpprand >= 70:gs 'dinSex', 'std_trigger'

			gs 'npcgeneratec', 0, 'Client', rand(18,40)
			gs 'boyStat', $npclastgenerated,'1'
			gt 'sexdvoe', 'start'
		end
	elseif borrand = 3:
		bordelpay *= 150
		'Two clients book you and another girl (<<bordelpay>> <b>₽</b>).'

		gs 'willpower', 'sex', 'resist'
		if will_cost <= pcs_willpwr:
			act 'Refuse (<<will_cost>> Willpower)':
				gs 'willpower', 'sex', 'resist'
				gs 'willpower', 'pay', 'resist'
				gs 'stat'
				gt 'bordel', 'brothel'
			end
		else
			act 'Refuse (<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You don''t have enough willpower to use this action.</font>'
		end

		act 'Agree':
			borsexkol += 1
			money += bordelpay
			slutty += 1
			bordelslutty += 1
			minut += 10
			zpprand = rand(0, 100)

			if zpprand >= 70:gs 'dinSex', 'std_trigger'

			gs 'npcgeneratec', 0, 'Client', rand(18,40)
			gs 'boyStat', $npclastgenerated,'1'
			gt 'sexdvanadva', 'start'
		end
	elseif borrand = 4:
		bordelpay *= 200
		'A group of customers order you (<<bordelpay>> <b>₽</b>).'

		gs 'willpower', 'sex', 'resist', 'hard'
		if will_cost <= pcs_willpwr:
			act 'Refuse (<<will_cost>> Willpower)':
				gs 'willpower', 'sex', 'resist', 'hard'
				gs 'willpower', 'pay', 'resist'
				gs 'stat'
				gt 'bordel', 'brothel'
			end
		else
			act 'Refuse (<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You don''t have enough willpower to use this action.</font>'
		end

		act 'Agree':
			borsexkol += 1
			money += bordelpay
			slutty += 1
			bordelslutty += 1
			minut += 10
			zpprand = rand(0, 100)

			if zpprand >= 70:gs 'dinSex', 'std_trigger'

			guy += 3
			killvar '$boy'
			gs 'npcgeneratec', 0, 'Bordel Client', rand(18,40)
			gs 'boyStat', $npclastgenerated
			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'
		end
	else
		act 'Go to your room':gt 'bordel', 'brothel'
		if func('bordel', 'is_open'):
			'You are not chosen.'
			act 'Wait for another':gt 'bordel', 'var'
		else
			'You are not chosen, and the brothel is now closed.'
		end
	end

	if borrand <= 4 and func('bordel', 'is_open') = 0:
		'The brothel is closing now, so this is your last chance to work today.'
	end
end

if $ARGS[0] = 'is_open':
	RESULT = hour >= func('bordel', 'open_hour') or hour <= func('bordel', 'close_hour')
end

if $ARGS[0] = 'open_hour':
	RESULT = 20
end

if $ARGS[0] = 'close_hour':
	RESULT = 3
end

--- bordel ---------------------------------

