# mirror

if $ARGS[0] = 'start':
	menu_off = 1
	*clr & cla
	$mirrorloc = 'mirror'
	gs 'stat' &! It should be here, because some of the strigs have to be initialized
	!! first of all we have to check whether we can use the mirror
	if mirror_steam = hour and ($loc = 'vanrPar' or $loc = 'vanr' or $loc_arg = 'ybathroom' or $loc = 'city_house_res_bathr'):
		gt 'mirror', 'steam'
	else
		mirror_steam = 100
	end

	$makeupLight =   '<center><img <<$set_imgh>> src="images/pc/activities/routine/2.jpg"></center>&nbsp;<br>You subtly apply some neutral tones, with a light application of makeup to bring out your natural beauty.'
	$makeupNatural = '<center><img <<$set_imgh>> src="images/pc/activities/routine/2.jpg"></center>&nbsp;<br>You apply some mildly vibrant tones and colors of makeup to cover your minor imperfections and enhance your best features.'
	$makeupHeavy =   '<center><img <<$set_imgh>> src="images/pc/activities/routine/2.jpg"></center>&nbsp;<br>You apply some deeper, richer shades of makeup, thick enough to cover most imperfections, while drawing attention to your eyes and lips.'
	$makeupBimbo =   '<center><img <<$set_imgh>> src="images/pc/activities/routine/2.jpg"></center>&nbsp;<br>You apply a lot of everything nice and thick, mostly in pink and make yourself look like a bimbo.'

	if newstylemirror = 1:
		!########### buttons and desc ###########

		! ----- avatar

		if player_avatar = 1:
			$serv['avatar']='<center><img <<$set_imgh>> src="images/avatar.jpg"></center>'
		else
			$serv['avatar']='<center><img <<$set_imgh>> src="<<FUNC(''$face_image'')>>"></center>'
		end
		! ----- hair

		if autohairbrush = 1 and pcs_hairbsh = 0 : xgt 'mirror', 'brush'

		!!!!!!!! Maruda Hair Mod
		if mc_inventory['scrunchies'] < 1:hscrunchw = 0
		if mc_inventory['kirbygrips'] < 1:hpingripw = 0
		if mc_inventory['scrunchies'] < 2:hpigtail = 0

		if pcs_hairbsh < 1: $serv['hairbrush']='<a href="exec: xgt ''mirror'', ''brush''"><img src="images/system/icons/action/hairbrush.png"></a>'
		if pcs_hairlng > 80 and mc_inventory['scrunchies'] >= 1 and hbraids = 0:
			if hscrunchw = 0 and hpingripw = 0:
				$serv['ponytail']='<a href="exec:hscrunchw = 1 & gs ''mirror'', ''start''"><img src="images/system/icons/action/scrunchy.png"></a>'
				$serv['ponytail desc']='As you have a scrunchy, you can arrange your hair into a <a href="exec:hscrunchw = 1 & gs ''mirror'', ''start''">ponytail</a>. You have <b><<mc_inventory[''scrunchies'']>></b> scrunchies left.'
			end
			if hscrunchw = 1:
				$serv['ponytail']='<a href="exec:hscrunchw = 0 & gs ''mirror'', ''start''"><img src="images/system/icons/action/ponytail.png"></a>'
				$serv['ponytail desc']='Remove the <a href="exec:hscrunchw = 0 & gs ''mirror'', ''start''">scrunchie</a> to get rid of the ponytail.'
			end
		end
		if pcs_hairlng > 80 and pcs_hairlng <= 400 and mc_inventory['kirbygrips'] >= 1 and hbraids = 0:
			if hscrunchw = 0 and hpingripw = 0:
				$serv['bun']='<a href="exec:hpingripw = 1 & gs ''mirror'', ''start''"><img src="images/system/icons/action/clips_pins_grips.png"></a>'
				$serv['bun desc']='You have several clips, pins and grips for you hair. Hence, you can <a href="exec:hpingripw = 1 & gs ''mirror'', ''start''">updo your hair</a>. You have <b><<mc_inventory[''kirbygrips'']>></b> hair accessories at your disposal.'
			end
			if hpingripw = 1:
				$serv['bun']='<a href="exec:hpingripw = 0 & gs ''mirror'', ''start''"><img src="images/system/icons/action/bun.png"></a>'
				$serv['bun desc']='Let your hair <a href="exec:hpingripw = 0 & gs ''mirror'', ''start''">flow free</a>.'
			end
		end
		if pcs_hairlng > 80 and pcs_hairlng <= 800 and mc_inventory['scrunchies'] >= 2 and hbraids = 0:
			if hscrunchw = 0 and hpingripw = 0:
				$serv['pigtails']='<a href="exec:hpigtail = 1 & hscrunchw = 2 & gs ''mirror'', ''start''"><img src="images/system/icons/action/hair_ties.png"></a>'
				$serv['pigtails desc']='You can use two hair ties to make yourself some <a href="exec:hpigtail = 1 & hscrunchw = 2 & gs ''mirror'', ''start''">pigtails</a>.'
			end
			if hscrunchw = 2:
				$serv['pigtails']='<a href="exec:hpigtail = 0 & hscrunchw = 0 & gs ''mirror'', ''start''"><img src="images/system/icons/action/pigtails.png"></a>'
				$serv['pigtails desc']='<a href="exec:hpigtail = 0 & hscrunchw = 0 & gs ''mirror'', ''start''">Remove</a> your scrunchies and let your hair flow free again.'
			end
		end
		if canBraidHair = 1 and mc_inventory['scrunchies'] >= 1 and hBraids = 0 and (pcs_hairlng > 80 and pcs_hairlng <= 800) and hscrunchw = 0 and hpingripw = 0 and hpigtail = 0:
			$serv['braid']='<a href="exec:minut += pcs_hairlng/10 & hbraids = 15 & gs ''mirror'', ''start''"><img src="images/system/icons/action/braiding.png"></a>'
			$serv['braid desc']='You can spend <<pcs_hairlng/10>> minutes <a href="exec:minut += pcs_hairlng/10 & hbraids = 15 & gs ''mirror'', ''start''">braiding</a> your hair, just the way your sister taught you.'
		elseif hbraids > 0:
			$serv['braid']='<a href="exec:minut += hbraids*2+pcs_hairlng/50 & hbraids = 0 & gs ''mirror'', ''start''"><img src="images/system/icons/action/braid.png"></a>'
			$serv['braid desc']='Take <<hbraids*2+pcs_hairlng/50>> minutes removing your <a href="exec:minut += hbraids*2+pcs_hairlng/50 & hbraids = 0 & gs ''mirror'', ''start''">braid</a>.'
		end
		! ----- actions
		$serv['back']='<a href="exec: gt ''mirror'',''fin''"><img src="images/system/icons/action/back.png"></a>'
		! ----- lip balm and false lashes
		if mc_inventory['lipbalm']  > 0 and pcs_lipbalm <= 0:
			$serv['lipbalm']='<a href="exec: cla & gs ''mirror'',''applyLipbalm'' & act ''View results'':gt ''mirror'', ''start''"><img src="images/system/icons/action/lipbalm.png"></a>'
		end
		if mc_inventory['eyelash_fake'] > 0 and pcs_lashes < 3 and lashextensionstyle <= 0:
			$serv['falselashes']='<a href="exec: cla & gs ''mirror'',''applyLashesplain'' & act ''View results'':gt ''mirror'', ''start''"><img src="images/system/icons/action/falselashes.png"></a>'
		end
		if mc_inventory['eyelash_mink'] > 0 and pcs_lashes < 4 and lashextensionstyle <= 0:
			$serv['minklashes']='<a href="exec: cla & gs ''mirror'',''applyLashesmink'' & act ''View results'':gt ''mirror'', ''start''"><img src="images/system/icons/action/minklashes.png"></a>'
		end
		! ----- make up
		if pcs_makeup = makeup['base'] and mc_inventory['cosmetics'] > 0:
			$serv4="
				*clr & cla
				'<center><img <<$set_imgh>> src=""images/pc/activities/routine/1.jpg""></center>'
				'You consider for a moment which look you want to go for.'
				*nl
				act 'Change your mind': gt 'mirror', 'start'

				if pcs_makeup < 2 and mc_inventory['cosmetics'] > 0:
					act 'Light make-up':
						*clr & cla
						minut += 3
						gs 'exp_gain', 'makupskl', rand(1,3)
						mc_inventory['cosmetics'] -= 1
						pcs_makeup = 2
						'<<$makeupLight>>'
						act 'Continue': gt 'mirror', 'start'
					end
				end

				if pcs_makeup < 3 and mc_inventory['cosmetics'] > 1:
					act 'Vibrant make-up':
						*clr & cla
						minut += 5
						gs 'exp_gain', 'makupskl', rand(1,3)
						mc_inventory['cosmetics'] -= 2
						pcs_makeup = 3
						'<<$makeupNatural>>'
						act 'Continue': gt 'mirror', 'start'
					end
				end

				if mc_inventory['cosmetics'] > 2:
					if pcs_makeup < 4:
						act 'Thick make-up':
							*clr & cla
							minut += 10
							gs 'exp_gain', 'makupskl', rand(1,3)
							mc_inventory['cosmetics'] -= 3
							vidageday -= 1
							pcs_makeup = 4
							'<<$makeupHeavy>>'
							act 'Continue': gt 'mirror', 'start'
						end
					end

					if pcs_makeup < 6:
						act 'Bimbo make-up':
							*clr & cla
							minut += 10
							gs 'exp_gain', 'makupskl', rand(1,3)
							mc_inventory['cosmetics'] -= 3
							vidageday -= 1
							pcs_makeup = 6
							'<<$makeupBimbo>>'
							act 'Continue': gt 'mirror', 'start'
						end
					end
				end
			"
			$serv['makeup']='<a href="exec: dynamic $serv4"><img src="images/system/icons/action/makeup.png"></a>'
		end

		'<center><table align=center cellspacing=0 cellpadding=0><tr><td align=center colspan=15><<$serv["avatar"]>></td></tr><tr><td colspan=15><hr></td></tr><tr><td align=center><<$serv["falselashes"]>></td>	<td align=center><<$serv["minklashes"]>></td><td align=center><<$serv["lipbalm"]>></td><td align=center><<$serv["makeup"]>></td><td align=center><<$serv["ponytail"]>></td><td align=center><<$serv["bun"]>></td><td align=center><<$serv["pigtails"]>></td><td align=center><<$serv["braid"]>></td><td align=center><<$serv["hairbrush"]>></td><td align=center><<$serv["back"]>></td></tr></table></center>'


		!########## main desc ##########
		if $start_type[1] = 'tg':
			if daystart < 10:
				'In the mirror, you see a strange woman''s face looking back at you that exactly copies all your actions. You can hardly accept the idea that this is now you.'
			elseif daystart < 30:
				'In the mirror you see a woman''s face to which you have become accustomed to. But sometimes, you get the feel that this is not your face.'
			end
		end
		'<<$pcs_apprnc>>'
		'<<$hair>>'
		'<<$pcs_makeup>>. Your ' + iif(pcs_eyesize > 1, '<<$pc_desc[''eye size'']>> ', '') + 'eyes are <<$pc_desc[''eye colour'']>> <<$pcs_lashes>>.'
		if glass > 0: 'You are wearing <<$pc_descWordy[''vision'']>>.'
		if pcs_missing_teeth = 1:
			'You have <<$pcs_lipbalm>> <<$pc_desc[''lip size'']>> lips. You have lost <<pcs_missing_teeth>> <a href="exec:gs ''obj_din'', ''show_missing_teeth''">tooth</a>.'
		elseif pcs_missing_teeth >= 2:
			'You have <<$pcs_lipbalm>> <<$pc_desc[''lip size'']>> lips. You have lost <<pcs_missing_teeth>>  <a href="exec:gs ''obj_din'', ''show_missing_teeth''">teeth</a>.'
		end
		if pcs_brace = 1:
			'You have <<$pcs_lipbalm>> <<$pc_desc[''lip size'']>> lips. You are wearing a brace on your <a href="exec:gs ''obj_din'', ''show_teeth''">teeth</a> .'
		elseif pcs_teeth = -1:
			'You have <<$pcs_lipbalm>> <<$pc_desc[''lip size'']>> lips. You have a perfect white <a href="exec:gs ''obj_din'', ''show_teeth''">smile</a>.'
		elseif pcs_teeth > 0:
			'You have <<$pcs_lipbalm>> <<$pc_desc[''lip size'']>> lips. Your <a href="exec:gs ''obj_din'', ''show_teeth''">teeth</a> are not straight at all. It might be a good idea to see a dentist to straighten them.'
		else
			'You have <<$pcs_lipbalm>> <<$pc_desc[''lip size'']>> lips. Your <a href="exec:gs ''obj_din'', ''show_teeth''">teeth</a> are miscoloured. It might be a good idea to see a dentist to get them cleaned up.'
		end
		'<<$skin>>'

		!########## hair additional desc ##########
		if curly > 0 and defcurly = 0: $serv['hhair']='Your curly hair will last for another <b><<curly>></b> days.'
		if straight > 0 and defcurly = 1: $serv['hhair']='Your straightened hair will last for another <b><<straight>></b> days.'
		if hbraids > 0: $serv['hbraids']='Your braided hair will last for another <b><<hbraids>></b> days.'
		if pcs_haircol ! nathcol:
			if dyefade > 0 and dyefade < 7: $serv['hdye']='Your hair dye is beginning to fade and your roots are showing.'
			if dyefade = 0: $serv['hdye']='Your hair dye has faded and looks terrible.'
		end
		if $serv['hhair'] ! ''			: '<<$serv["hhair"]>>'
		if $serv['hbraids'] ! ''		: '<<$serv["hbraids"]>>'
		if $serv['hdye'] ! ''			: '<<$serv["hdye"]>>'
		if $serv['ponytail desc'] ! ''	: '<<$serv["ponytail desc"]>>'
		if $serv['bun desc'] ! ''		: '<<$serv["bun desc"]>>'
		if $serv['pigtails desc'] ! ''	: '<<$serv["pigtails desc"]>>'
		if $serv['braid desc'] ! ''		: '<<$serv["braid desc"]>>'
	else
		if player_avatar = 1:
			'<center><img <<$set_imgh>> src="images/avatar.jpg"></center>'
		else
			'<center><img <<$set_imgh>> src="<<FUNC(''$face_image'')>>"></center>'
		end
		*nl
		if $start_type[1] = 'tg':
			if daystart < 10:
				'In the mirror, you see a strange woman''s face looking back at you that exactly copies all your actions. You can hardly accept the idea that this is now you.'
			elseif daystart < 30:
				'In the mirror you see a woman''s face to which you have become accustomed to. But sometimes, you get the feel that this is not your face.'
			end
		end
		'<<$pcs_apprnc>>'
		'<<$hair>>'
		'<<$pcs_makeup>>. Your ' + iif(pcs_eyesize > 1, '<<$pc_desc[''eye size'']>> ', '') + 'eyes are <<$pc_desc[''eye colour'']>> <<$pcs_lashes>>.'
		if glass > 0: 'You are wearing <<$pc_descWordy[''vision'']>>.'
		if pcs_missing_teeth = 1:
			'You have <<$pcs_lipbalm>> <<$pc_desc[''lip size'']>> lips. You have lost <<pcs_missing_teeth>> <a href="exec:gs ''obj_din'', ''show_missing_teeth''">tooth</a>.'
		elseif pcs_missing_teeth >= 2:
			'You have <<$pcs_lipbalm>> <<$pc_desc[''lip size'']>> lips. You have lost <<pcs_missing_teeth>>  <a href="exec:gs ''obj_din'', ''show_missing_teeth''">teeth</a>.'
		end
		if pcs_brace = 1:
			'You have <<$pcs_lipbalm>> <<$pc_desc[''lip size'']>> lips. You are wearing a brace on your <a href="exec:gs ''obj_din'', ''show_teeth''">teeth</a> .'
		elseif pcs_teeth = -1:
			'You have <<$pcs_lipbalm>> <<$pc_desc[''lip size'']>> lips. You have a perfect white <a href="exec:gs ''obj_din'', ''show_teeth''">smile</a>.'
		elseif pcs_teeth > 0:
			'You have <<$pcs_lipbalm>> <<$pc_desc[''lip size'']>> lips. Your <a href="exec:gs ''obj_din'', ''show_teeth''">teeth</a> are not straight at all. It might be a good idea to see a dentist to straighten them.'
		else
			'You have <<$pcs_lipbalm>> <<$pc_desc[''lip size'']>> lips. Your <a href="exec:gs ''obj_din'', ''show_teeth''">teeth</a> are miscoloured. It might be a good idea to see a dentist to get them cleaned up.'
		end
		'<<$skin>>'

		if curly > 0 and defcurly = 0: '<br>Your curly hair will last for another <<curly>> days.'
		if straight > 0 and defcurly = 1: '<br>Your straightened hair will last for another <<straight>> days.'
		if hbraids > 0: '<br>Your braided hair will last for another <<hbraids>> days.'
		if pcs_haircol ! nathcol:
			if dyefade > 0 and dyefade < 7: '<br>Your hair dye is beginning to fade and your roots are showing.'
			if dyefade = 0: '<br>Your hair dye has faded and looks terrible.'
		end

		if autohairbrush = 1 and pcs_hairbsh = 0 : xgt 'mirror', 'brush'

		!!!!!!!! Maruda Hair Mod
		if mc_inventory['scrunchies'] < 1:hscrunchw = 0
		if mc_inventory['kirbygrips'] < 1:hpingripw = 0
		if mc_inventory['scrunchies'] < 2:hpigtail = 0

		if pcs_hairlng > 80 and mc_inventory['scrunchies'] >= 1 and hbraids = 0:
			*nl
			if hscrunchw = 0 and hpingripw = 0: 'As you have a scrunchy, you can arrange your hair into a <a href="exec:hscrunchw = 1 & gs ''mirror'', ''start''">ponytail</a>. You have <<mc_inventory[''scrunchies'']>> scrunchies left.'
			if hscrunchw = 1: 'Remove the <a href="exec:hscrunchw = 0 & gs ''mirror'', ''start''">scrunchie</a> to get rid of the ponytail.'
		end

		if pcs_hairlng > 80 and mc_inventory['kirbygrips'] >= 1 and hbraids = 0:
			if hscrunchw = 0 and hpingripw = 0: 'You have several clips, pins and grips for you hair. Hence, you can <a href="exec:hpingripw = 1 & gs ''mirror'', ''start''">updo your hair</a>. You have <<mc_inventory[''kirbygrips'']>> hair accessories at your disposal.'
			if hpingripw = 1: 'Let your hair <a href="exec:hpingripw = 0 & gs ''mirror'', ''start''">flow free</a>.'
		end

		if pcs_hairlng > 80 and mc_inventory['scrunchies'] >= 2 and hbraids = 0:
			if hscrunchw = 0 and hpingripw = 0: 'You can use two hair ties to make yourself some <a href="exec:hpigtail = 1 & hscrunchw = 2 & gs ''mirror'', ''start''">pigtails</a>.'
			if hscrunchw = 2: '<a href="exec:hpigtail = 0 & hscrunchw = 0 & gs ''mirror'', ''start''">Remove</a> your scrunchies and let your hair flow free again.'
		end

		if canBraidHair = 1 and mc_inventory['scrunchies'] >= 1 and hBraids = 0 and (pcs_hairlng > 80 and pcs_hairlng <= 800) and hscrunchw = 0 and hpingripw = 0 and hpigtail = 0:
			'You can spend <<pcs_hairlng/10>> minutes <a href="exec:minut += pcs_hairlng/10 & hbraids = 15 & gs ''mirror'', ''start''">braiding</a> your hair, just the way your sister taught you.'
		end

		if hbraids > 0: 'Take <<hbraids*2+pcs_hairlng/50>> minutes removing your <a href="exec:minut += hbraids*2+pcs_hairlng/50 & hbraids = 0 & gs ''mirror'', ''start''">braid</a>.'
	end

	if mc_inventory['cosmetics'] > 0: *nl 'Cosmetics: <<mc_inventory[''cosmetics'']>>' else *nl 'You have no cosmetics.'
	if mc_inventory['lipbalm'] > 0: *pl ' | Lip gloss: <<mc_inventory[''lipbalm'']>>' else *pl ' You have no lip gloss left.'
	if mc_inventory['eyelash_fake'] > 0: *nl 'False lashes: <<mc_inventory[''eyelash_fake'']>>' else *nl 'You have no false lashes left.'
	if mc_inventory['eyelash_mink'] > 0: *pl ' | Mink lashes: <<mc_inventory[''eyelash_mink'']>>' else *pl ' You have no mink lashes left.'

	if mc_inventory['umbrella'] = 0: *nl 'WARNING: Makeup will get ruined by the rain unless you buy an umbrella.'

	act 'Move away from the mirror': gt 'mirror','fin'

	if pcs_hairbsh < 1: act 'Brush your hair': xgt 'mirror', 'brush'

	if pcs_makeup = makeup['base'] and mc_inventory['cosmetics'] > 0:
		act 'Apply makeup':
			*clr & cla
			'<center><img <<$set_imgh>> src="images/pc/activities/routine/1.jpg"></center>'
			'You consider for a moment which look you want to go for.'
			*nl
			act 'Change your mind': gt 'mirror', 'start'

			if pcs_makeup < 2 and mc_inventory['cosmetics'] > 0:
				act 'Light make-up':
					*clr & cla
					minut += 3
					gs 'exp_gain', 'makupskl', rand(1,3)
					mc_inventory['cosmetics'] -= 1
					pcs_makeup = 2
					'<<$makeupLight>>'
					act 'Continue': gt 'mirror', 'start'
				end
			end

			if pcs_makeup < 3 and mc_inventory['cosmetics'] > 1:
				act 'Vibrant make-up':
					*clr & cla
					minut += 5
					gs 'exp_gain', 'makupskl', rand(1,3)
					mc_inventory['cosmetics'] -= 2
					pcs_makeup = 3
					'<<$makeupNatural>>'
					act 'Continue': gt 'mirror', 'start'
				end
			end

			if mc_inventory['cosmetics'] > 2:
				if pcs_makeup < 4:
					act 'Thick make-up':
						*clr & cla
						minut += 10
						gs 'exp_gain', 'makupskl', rand(1,3)
						mc_inventory['cosmetics'] -= 3
						vidageday -= 1
						pcs_makeup = 4
						'<<$makeupHeavy>>'
						act 'Continue': gt 'mirror', 'start'
					end
				end

				if pcs_makeup < 6:
					act 'Bimbo make-up':
						*clr & cla
						minut += 10
						gs 'exp_gain', 'makupskl', rand(1,3)
						mc_inventory['cosmetics'] -= 3
						vidageday -= 1
						pcs_makeup = 6
						'<<$makeupBimbo>>'
						act 'Continue': gt 'mirror', 'start'
					end
				end
			end
		end
	elseif mc_inventory['cosmetics'] <= 0:
		'You don''t have any cosmetics to apply.'
	end

	if mc_inventory['lipbalm']  > 0 and pcs_lipbalm <= 0:
		act 'Apply lip balm':
			cla
			gs 'mirror','applyLipbalm'
			act 'View results':gt 'mirror', 'start'
		end
	end

	if mc_inventory['eyelash_fake'] > 0 and pcs_lashes < 3 and lashextensionstyle <= 0:
		act 'Apply false lashes':
			cla
			gs 'mirror','applyLashesplain'
			act 'View results':gt 'mirror', 'start'
		end
	end

	if mc_inventory['eyelash_mink'] > 0 and pcs_lashes < 4 and lashextensionstyle <= 0:
		act 'Apply mink lashes':
			cla
			gs 'mirror','applyLashesmink'
			act 'View results':gt 'mirror', 'start'
		end
	end

	act 'Manage your custom make-up routines': gs 'mirror', 'routine_manage'

	temp_routine_index = 1
	:makeup_routine_apply_acts_loop
	$temp_routine_name = $makeup['routine_<<temp_routine_index>>_name']
	dynamic "if $makeup['routine_<<temp_routine_index>>'] ! '':
		gs 'mirror', 'routine_description', <<temp_routine_index>>
		if func('mirror', 'routine_check', <<temp_routine_index>>):
			act 'Apply <<$temp_routine_name>>':
				gt 'mirror', 'works', makeup['routine_<<temp_routine_index>>_makeup'], makeup['routine_<<temp_routine_index>>_lipbalm'], makeup['routine_<<temp_routine_index>>_lashes']
			end
		end
	end"
	if temp_routine_index < 4: temp_routine_index += 1 & jump 'makeup_routine_apply_acts_loop'
	gs 'stat'
	killvar 'serv'

	act '<<iif(newstylemirror,''Change to the old style mirror'',''Change to the new style mirror'')>>': newstylemirror = iif(newstylemirror,0,1) & gt 'mirror','start'
end

!! --- start ---

!! for now keeping this monstrosity here for reference
! mid($routine4,1,1), mid($routine4,2,1), mid($routine4,3,1)
if $ARGS[0] = 'routine_manage':
	cls & cla
	*nl
	'Select make-up level'
	*p iif(makeupSetting = 0,'none,', '<a href="exec:makeupSetting = 0 & gs ''mirror'', ''routine_manage''">none</a>,')
	*p iif(makeupSetting = 1,' light,', ' <a href="exec:makeupSetting = 1 & gs ''mirror'', ''routine_manage''">light</a>,')
	*p iif(makeupSetting = 2,' vibrant,', ' <a href="exec:makeupSetting = 2 & gs ''mirror'', ''routine_manage''">vibrant</a>,')
	*p iif(makeupSetting = 3,' thick,', ' <a href="exec:makeupSetting = 3 & gs ''mirror'', ''routine_manage''">thick</a>,')
	*pl iif(makeupSetting = 5,' bimbo', ' <a href="exec:makeupSetting = 5 & gs ''mirror'', ''routine_manage''">bimbo</a>')
	*nl
	'Choose if you will use lipbalm'
	*p iif(cust_lipbalm = 0,'no,', '<a href="exec:cust_lipbalm = 0 & gs ''mirror'', ''routine_manage''">no</a>,')
	*pl iif(cust_lipbalm = 1,' yes', ' <a href="exec:cust_lipbalm = 1 & gs ''mirror'', ''routine_manage''">yes</a>')
	*nl
	'Choose lash options'
	*p iif(custlashes = 0,'none,', '<a href="exec:custlashes = 0 & gs ''mirror'', ''routine_manage''">none</a>,')
	*p iif(custlashes = 1,' fake,', ' <a href="exec:custlashes = 1 & gs ''mirror'', ''routine_manage''">fake</a>,')
	*pl iif(custlashes = 2,' mink', ' <a href="exec:custlashes = 2 & gs ''mirror'', ''routine_manage''">mink</a>')

	$routine = str(makeupSetting) + str(cust_lipbalm) + str(custlashes)

	act 'Exit': gt 'mirror','start'

	temp_routine_index = 0
	:makeup_routine_save_selector_loop
		temp_routine_index += 1
	if temp_routine_index < 5 and $makeup['routine_<<temp_routine_index>>'] ! '': jump 'makeup_routine_save_selector_loop'

	dynamic "if temp_routine_index < 5:
		act 'Save routine':
			makeup['routine_<<temp_routine_index>>_makeup'] = makeupSetting
			makeup['routine_<<temp_routine_index>>_lipbalm'] = cust_lipbalm
			makeup['routine_<<temp_routine_index>>_lashes'] = custlashes
			$makeup['routine_<<temp_routine_index>>'] = $routine
			$makeup['routine_<<temp_routine_index>>_name'] = 'routine <<temp_routine_index>>'
			gs 'mirror', 'routine_manage'
		end
	end"

	temp_routine_index = 1
	:makeup_routine_manage_acts_loop
	$temp_routine_name = $makeup['routine_<<temp_routine_index>>_name']
	dynamic "if $makeup['routine_<<temp_routine_index>>'] ! '':
		gs 'mirror', 'routine_description', temp_routine_index, 'no_color'
		act 'Remove <<$temp_routine_name>>':
			gs 'shortgs', 'remove_array_element', 'makeup', 'routine_<<temp_routine_index>>'
			gs 'shortgs', 'remove_array_element', 'makeup', 'routine_<<temp_routine_index>>_name'
			gs 'mirror', 'routine_manage'
		end
		act 'Rename <<$temp_routine_name>>':
			$makeup['routine_<<temp_routine_index>>_name'] = input ('Name the routine')
			gs 'mirror', 'routine_manage'
		end
	end"
	if temp_routine_index < 4: temp_routine_index += 1 & jump 'makeup_routine_manage_acts_loop'
end

if $ARGS[0] = 'routine_description':
	*nl 'Make-up routine <<ARGS[1]>> is called <font color="#268bd2"><<$makeup[''routine_<<ARGS[1]>>_name'']>></font> and consists of:'
	*nl
	if makeup['routine_<<ARGS[1]>>_makeup'] > 0:
		killvar '$temp_prefix' & killvar '$temp_postfix'
		if $ARGS[2] = '' and pcs_makeup < makeup['routine_<<ARGS[1]>>_makeup'] + 1:
			if mc_inventory['cosmetics'] >= min(makeup['routine_<<ARGS[1]>>_makeup'], 3):
				$temp_prefix = '<font color="#E5C07B">'
				$temp_postfix = ' - Not applied</font>'
			else
				$temp_prefix = '<font color="#dc322f">'
				$temp_postfix = ' - Not enough to apply</font>'
			end
		end
		if makeup['routine_<<ARGS[1]>>_makeup'] = 1:
			' <<$temp_prefix>>Light make-up<<$temp_postfix>>'
		elseif makeup['routine_<<ARGS[1]>>_makeup'] = 2:
			' <<$temp_prefix>>Vibrant make-up<<$temp_postfix>>'
		elseif makeup['routine_<<ARGS[1]>>_makeup'] = 3:
			' <<$temp_prefix>>Thick make-up<<$temp_postfix>>'
		elseif makeup['routine_<<ARGS[1]>>_makeup'] = 5:
			' <<$temp_prefix>>Bimbo make-up<<$temp_postfix>>'
		end
	end
	if makeup['routine_<<ARGS[1]>>_lipbalm'] > 0:
		killvar '$temp_prefix' & killvar '$temp_postfix'
		if $ARGS[2] = '' and pcs_lipbalm < makeup['routine_<<ARGS[1]>>_lipbalm']:
			if mc_inventory['lipbalm'] > 0:
				$temp_prefix = '<font color="#E5C07B">'
				$temp_postfix = ' - Not applied</font>'
			else
				$temp_prefix = '<font color="#dc322f">'
				$temp_postfix = ' - Not enough to apply</font>'
			end
		end
		' <<$temp_prefix>>Lipbalm<<$temp_postfix>>'
	end
	if makeup['routine_<<ARGS[1]>>_lashes'] > 0:
		killvar '$temp_prefix' & killvar '$temp_postfix'
		if $ARGS[2] = '' and lashextensionstyle <= 0 and pcs_lashes < makeup['routine_<<ARGS[1]>>_lashes'] + 2:
			if (makeup['routine_<<ARGS[1]>>_lashes'] = 1 and mc_inventory['eyelash_fake'] >= 1) or (makeup['routine_<<ARGS[1]>>_lashes'] = 2 and mc_inventory['eyelash_mink'] >= 1):
				$temp_prefix = '<font color="#E5C07B">'
				$temp_postfix = ' - Not applied</font>'
			else
				$temp_prefix = '<font color="#dc322f">'
				$temp_postfix = ' - Not enough to apply</font>'
			end
		end
		if makeup['routine_<<ARGS[1]>>_lashes'] = 1:
			' <<$temp_prefix>>False lashes<<$temp_postfix>>'
		elseif makeup['routine_<<ARGS[1]>>_lashes'] = 2:
			' <<$temp_prefix>>Mink false lashes<<$temp_postfix>>'
		end
	end
	killvar '$temp_prefix' & killvar '$temp_postfix'
end

if $ARGS[0] = 'routine_check':
	if (makeup['routine_<<ARGS[1]>>_makeup'] > 0 and pcs_makeup < makeup['routine_<<ARGS[1]>>_makeup'] + 1 and mc_inventory['cosmetics'] >= min(makeup['routine_<<ARGS[1]>>_makeup'], 3)) or (makeup['routine_<<ARGS[1]>>_lipbalm'] > 0 and pcs_lipbalm < makeup['routine_<<ARGS[1]>>_lipbalm'] and mc_inventory['lipbalm'] > 0) or (makeup['routine_<<ARGS[1]>>_lashes'] > 0 and lashextensionstyle <= 0 and pcs_lashes < makeup['routine_<<ARGS[1]>>_lashes'] + 2 and ((makeup['routine_<<ARGS[1]>>_lashes'] = 1 and mc_inventory['eyelash_fake'] >= 1) or (makeup['routine_<<ARGS[1]>>_lashes'] = 2 and mc_inventory['eyelash_mink'] >= 1))): result = 1
end
! if $ARGS[0] = 'routine_check': {
	makeup['routine_<<ARGS[1]>>_makeup'] > 0 and
	pcs_makeup < makeup['routine_<<ARGS[1]>>_makeup'] + 1 and
	mc_inventory['cosmetics'] >= min(makeup['routine_<<ARGS[1]>>_makeup'], 3)

	makeup['routine_<<ARGS[1]>>_lipbalm'] > 0 and
	pcs_lipbalm < makeup['routine_<<ARGS[1]>>_lipbalm'] and
	mc_inventory['lipbalm'] > 0

	makeup['routine_<<ARGS[1]>>_lashes'] > 0 and
	lashextensionstyle <= 0 and
	pcs_lashes < makeup['routine_<<ARGS[1]>>_lashes'] + 2 and
	((
		makeup['routine_<<ARGS[1]>>_lashes'] = 1 and
		mc_inventory['eyelash_fake'] >= 1
	) or (
		makeup['routine_<<ARGS[1]>>_lashes'] = 2 and
		mc_inventory['eyelash_mink'] >= 1
	))
}

if $ARGS[0] = 'steam':
	menu_off = 1
	'<center><img <<$set_imgh>> src="images/shared/home/bathroom/mirror1.jpg"></center>'
	'<center>The mirror is heavily misted. It must be wiped or left to cool.</center>'
	gs 'stat'
	act 'Wipe the mirror':
		*clr & cla
		minut += 1
		mirror_steam = 100
		gs 'stat'
		'<center><img <<$set_imgh>> src="images/shared/home/bathroom/mirror2.jpg"></center>'
		'<center>You wipe the mirror with a towel.</center>'
		act 'Look in the mirror':gt 'mirror','start'
	end
	act 'Move away from the mirror':gt 'mirror','fin'
end

if $ARGS[0] = 'brush':
	menu_off = 1
	*clr & cla
	minut += min(15, max(1, pcs_hairlng / 80))
	pcs_hairbsh = 1
	if newstylemirror = 1:
		$serv['noaction'] = '<img <<$set_imgh>> src="images/system/icons/blank.png">'
		if player_avatar = 1:
			$serv['avatar']='<img <<$set_imgh>> src="images/avatar.jpg">'
		else
			$serv['avatar']='<img <<$set_imgh>> src="<<FUNC(''$face_image'')>>">'
		end
		if $mirrorloc = 'mirror':
			$serv['back']='<a href="exec: gt ''mirror'',''start''"><img src="images/system/icons/action/back.png"></a>'
		else
			$serv['back']='<a href="exec: gt ''mirror'',''fin''"><img src="images/system/icons/action/back.png"></a>'
		end
		'<center><table align=center cellspacing=0 cellpadding=0><tr><td align=center colspan=15><center><<$serv["avatar"]>></center></td></tr><tr><td colspan=15><hr></td></tr><tr><td colspan=10></td><td><<$serv["back"]>></td><td colspan=4></td></tr></table></center>'
		killvar('$serv')
	else
		if player_avatar = 1:
			'<center><img <<$set_imgh>> src="images/avatar.jpg"></center>'
		else
			'<center><img <<$set_imgh>> src="<<FUNC(''$face_image'')>>"></center>'
		end
		'You brush your hair.'
	end
	if $mirrorloc = 'mirror':
		act 'Finish': gt 'mirror', 'start'
	else
		act 'Finish': gt 'mirror', 'fin'
	end
end

if $ARGS[0] = 'works':
	'<center><img <<$set_imgh>> src="images/pc/activities/makeup_1.jpg"></center>'
	if pcs_makeup = 0: pcs_makeup = makeup['base']
	if ARGS[1] > 0 and pcs_makeup < ARGS[1] + 1:
		if mc_inventory['cosmetics'] <= 0:
			'You don''t have any cosmetics.'
		elseif mc_inventory['cosmetics'] >= min(ARGS[1], 3):
			*nl
			if ARGS[1] = 1 and pcs_makeup < 2:
				'You subtly apply some neutral tones, with a light application of makeup to bring out your natural beauty.'
				minut += 3
				gs 'exp_gain', 'makupskl', rand(1,3)
				mc_inventory['cosmetics'] -= 1
				pcs_makeup = 2
			elseif ARGS[1] = 2 and pcs_makeup < 3:
				'You apply some mildly vibrant tones and colors of makeup to cover your minor imperfections and enhance your best features.'
				minut += 5
				gs 'exp_gain', 'makupskl', rand(1,3)
				mc_inventory['cosmetics'] -= 2
				pcs_makeup = 3
			elseif ARGS[1] = 3 and pcs_makeup < 4:
				'You apply some deeper, richer shades of makeup, thick enough to cover most imperfections, while drawing attention to your eyes and lips.'
				minut += 10
				gs 'exp_gain', 'makupskl', rand(1,3)
				mc_inventory['cosmetics'] -= 3
				vidageday -= 1
				pcs_makeup = 4
			elseif ARGS[1] = 5 and pcs_makeup < 6:
				'You apply some bright, seductive makeup, thick enough to cover most imperfections, while drawing attention in a way only a bimbo can.'
				minut += 10
				gs 'exp_gain', 'makupskl', rand(1,3)
				mc_inventory['cosmetics'] -= 3
				vidageday -= 1
				pcs_makeup = 6
			end
		else
			'You don''t have enough cosmetics to apply your chosen option.'
		end
	end
	if pcs_hairbsh < 1:
		minut += 3
		pcs_hairbsh = 1
		'You brush your hair.'
	end
	if ARGS[2] > 0: gs 'mirror', 'applyLipbalm'
	if ARGS[3] > 0 and lashextensionstyle <= 0 and pcs_lashes < ARGS[3] + 2:
		if ARGS[3] = 1 and mc_inventory['eyelash_fake'] >= 1:
			gs 'mirror', 'applyLashesplain'
		elseif ARGS[3] = 2 and mc_inventory['eyelash_mink'] >= 1:
			gs 'mirror', 'applyLashesmink'
		end
	end
	cla
	act 'View results':gt 'mirror', 'start'
end &! --- works ----

if $ARGS[0] = 'applyLipbalm':
	if mc_inventory['lipbalm'] > 0 and pcs_lipbalm <= 0:
		minut += 1
		mc_inventory['lipbalm'] -= 1
		lipkoef += rand(0, 1)
		if lipkoef > 50:
			lipkoef = 0
			pcs_lip += 1
		end
		pcs_lipbalm += 8
		'You apply some moisturizing balm on your lips.'
	end
end &! --- applyLipbalm ---

if $ARGS[0] = 'applyLashesmink':
	if mc_inventory['eyelash_mink'] > 0 and pcs_lashes < 4:
		minut += 15
		mc_inventory['eyelash_mink'] -=  1
		if false_lashes >= 1 and pcs_lashes = 3:'You remove your old, plain lashes first.'
		false_lashes = 1
		pcs_lashes = 4
		'You spend a good bit of time affixing your lavish, mink lash strips.'
	end
end &! --- applyLashesmink ---

if $ARGS[0] = 'applyLashesplain':
	if mc_inventory['eyelash_fake'] > 0 and pcs_lashes < 3:
		minut += 15
		mc_inventory['eyelash_fake'] -=  1
		false_lashes = 1
		pcs_lashes = 3
		'You spend a fair bit of time carefully trimming and affixing your flirtatious false lashes.'
	end
end &! --- applyLashesplain ---

if $ARGS[0] = 'fin':
	killvar '$makeupLight'
	killvar '$makeupNatural'
	killvar '$makeupHeavy'
	killvar '$routine'
	killvar '$mirrorloc'
	killvar 'temp_routine_index'
	killvar '$temp_routine_name'
	menu_off = 0
	gt $locM, $locM_arg
end &! --- fin ----

if $ARGS[0] = 'd_bag_mirror':
	*clr & cla
	gs 'stat'
	'<center><h1>Compact Mirror</h1></center>'
	'<center><img <<$set_imgh>> src="images/pc/items/mirror_compact.jpg"></center>'
	'<center><table cellspacing="0" cellpadding="20" valign="top"><tr>'
	'<td cellspacing="0" cellpadding="0" valign="top">'
	'You have '+iif(mc_inventory['travel_makeup'] > 0, '<b><<mc_inventory[''travel_makeup'']>></b>', 'no')+' cosmetic applications and '+iif(mc_inventory['makeup_wipes'] > 0, '<b><<mc_inventory[''makeup_wipes'']>></b>', 'no')+' tissues left in your purse.'
	*nl

	if pcs_hairbsh < 1 and mc_inventory['comb'] = 1:
		'<a href="exec: pcs_hairbsh = 1 & gt ''mirror'', ''d_bag_mirror''"><b>Brush your hair</b></a>'
	end

	if pcs_makeup = 0:
		if mc_inventory['makeup_wipes'] > 0:
			'<a href="exec: mc_inventory[''makeup_wipes''] -= 1 & pcs_makeup = makeup[''base''] & gt ''mirror'', ''d_bag_mirror''"><b>Clear smeared cosmetics</b></a>'
			if mc_inventory['travel_makeup'] >= min(makeupSetting, 3):
				if makeup['base'] < makeupSetting + 1:
					'<a href="exec: gt ''mirror'', ''kosmetitka_fix''"><b>Fix your makeup</b></a>'
				end
			else
				'You need portable makeup and tissues to fix your makeup.'
			end
		else
			'You need portable makeup and tissues to fix your makeup.'
		end
	else
		if pcs_makeup = 1:
			if mc_inventory['travel_makeup'] > 0:
				'<a href="exec: minut += 3 & gs ''exp_gain'', ''makupskl'', rand(1,3) & pcs_makeup = 2 & mc_inventory[''travel_makeup''] -= 1 & gt ''mirror'', ''d_bag_mirror''"><b>Put on light makeup</b></a>'
			end
		elseif pcs_makeup > makeup['base']:
			if mc_inventory['makeup_wipes'] > 0:
				'<a href="exec: mc_inventory[''makeup_wipes''] -= 1 & pcs_makeup = makeup[''base''] & gt ''mirror'', ''d_bag_mirror''"><b>Remove your makeup</b></a>'
			end
		end
		if pcs_lipbalm <= 0 and mc_inventory['lipbalm'] > 0:
			'<a href="exec: gs ''mirror'', ''applyLipbalm'' & gt ''mirror'', ''d_bag_mirror''"><b>Apply lip balm</b></a>'
		end
	end
	'</td></tr></table></center>'
	act 'Finish': gt 'din_bad', 'd_bag'
end

if $ARGS[0] = 'kosmetitka_fix':
	*clr & cla
	'<center><h1>Compact Mirror</h1></center>'
	'<center><img <<$set_imgh>> src="images/pc/activities/routine/4.jpg"></center>'
	mc_inventory['makeup_wipes'] -= 1
	gs 'exp_gain', 'makupskl', rand(1,3)
	if makeupSetting = 1:
		minut += 3
		mc_inventory['travel_makeup'] -=  1
		pcs_makeup = 2
		'<center>You carefully fix your makeup and restore the neutral and light tones that bring out your natural beauty.</center>'
	elseif makeupSetting = 2:
		minut += 5
		mc_inventory['travel_makeup'] -=  2
		pcs_makeup = 3
		'<center>You carefully fix your makeup and restore the mildly vibrant tones and colors that cover your minor imperfections and enhance your best features.</center>'
	elseif makeupSetting = 3:
		minut += 10
		mc_inventory['travel_makeup'] -=  3
		vidageday -= 1
		pcs_makeup = 4
		'<center>You carefully fix your makeup and restore the deeper, richer shades, thick enough to cover most imperfections, while drawing attention to your eyes and lips.</center>'
	elseif makeupSetting = 4:
		minut += 10
		mc_inventory['travel_makeup'] -=  3
		vidageday -= 1
		pcs_makeup = 6
		'<center>You carefully fix your makeup and restore the bright, seductive shades, thick enough to cover most imperfections, while drawing attention in a way only a bimbo can.</center>'
	end

	gs 'stat'

	act 'Continue': gt 'mirror', 'd_bag_mirror'
end

--- mirror ---------------------------------

