:: city_mansion_residence_2
<<set $here = 'city_mansion_residence_2'>>
<<set $ARGS = $location_var[$here]>>
<<if $location_var[$here][0] == 'yliving'>>
	<<set $loc = 'city_mansion_residence_2'>>
	<<set $loc_arg = 'yliving'>>
	<<set $menu_loc = 'city_mansion_residence_2'>>
	<<set $menu_arg = 'yliving'>>
	<<set $location_type = 'private'>>
	<<set $locclass = 'livingr'>>
	<<set $menu_off = 0>>
	<<set $time.minutes += 1>>
	<h2>Living Room</h2>
	<<if $ymanrem[7] == 2>>
		<<image "locations/city/suburb/mansion/y_living.jpg">>
	<<elseif $ymanrem[7] == 1>>
		<<image "locations/city/suburb/mansion/i_finished.jpg">>
	<<else>>
		<<image "locations/city/suburb/mansion/i_unfinished.jpg">>
	<</if>>
	<<act 'Leave the room'>>
		<<gt 'city_mansion_residence_1' 'yfoyer'>>
	<</act>>
	<<if $ymanrem[7] == 2>>
		A large room where you can watch <<link "TV">><<gt 'TV' 'start'>><</link>>, or relax on your luxury <<link "leather sofa">><<gt 'divan' 'start'>><</link>>.
		<<if $ml_guitar['location'] == $loc>>
			Your guitar rests on its stand next to the sofa.

		<</if>>
		<<gs 'subkid'>>
		<<gs 'music_actions' 'music_icon'>>
	<</if>>
<</if>>
<<if $location_var[$here][0] == 'ylounge'>>
	<<set $loc = 'city_mansion_residence_2'>>
	<<set $loc_arg = 'ylounge'>>
	<<set $menu_loc = 'city_mansion_residence_2'>>
	<<set $menu_arg = 'ylounge'>>
	<<set $location_type = 'private'>>
	<<set $menu_off = 0>>
	<<set $time.minutes += 1>>
	<h2>Lounge</h2>
	<<if $ymanrem[8] == 2>>
		<<image "locations/city/suburb/mansion/y_lounge.jpg">>
	<<elseif $ymanrem[8] == 1>>
		<<image "locations/city/suburb/mansion/i_finished.jpg">>
	<<else>>
		<<image "locations/city/suburb/mansion/i_unfinished.jpg">>
	<</if>>
	<<act 'Leave the room'>>
		<<gt 'city_mansion_residence_1' 'yfoyer'>>
	<</act>>
	<<if $ymanrem[8] == 2>>
		The lounge, where you can work on your tapestries and relax in front of the fireplace.
		<<if getvar("$sewing_kit") == 1>>
			Your <<link "sewing kit">><<gt 'sewing' 'start'>><</link>> is stored next to your favorite chair.
			<<if getvar("$gobelen") > 0>>
				You have completed <<gobelen>> tapestries.
			<</if>>
			<<if getvar("$tkan") <= 0>>
				You do not have any fabric.
			<<else>>
				<<if $pc.skillLevel("sewing") < 40>>
					You have <<tkan>> pieces of sewing fabric left.
				<<elseif $pc.skillLevel("sewing") < 80>>
					You have enough fabric for <<tkan>> lessons.
				<<else>>
					<<if getvar("$newgobelen") == 0>>
						<<actCLA 'Start a new tapestry (00:15)'>>
							<<set $menu_off = 1>>
							<<set $tkan -= 1>>
							<<set $newgobelen = 1>>
							<<set $time.minutes += 15>>
							You spend 15 minutes at the embroidery frame, preparing the fabric and outlining the pattern for the tapestry.
							<<act 'Set the tapestry aside'>>
								<<gt 'city_mansion_residence_2' 'ylounge'>>
							<</act>>
						<</actCLA>>
					<</if>>
				<</if>>
			<</if>>
			<<if getvar("$newgobelen") >= 1>>
				Your tapestry is <<newgobelen/10>> percent finished.
				<<actCLA 'Work on the tapestry (01:00)'>>
					<<set $menu_off = 1>>
					<<set $time.minutes += 60>>
					<<run $pc.skillExperienceGain('sewing',rand($pc.intelligence/10, $pc.intelligence/5))>>
					<<set $gobramax = ($pc.skillLevel("sewing") - 70) * 6>>
					<<set $gobramin = ($pc.skillLevel("sewing") - 70) * 2>>
					<<set $newgobelen += rand(gobramin,gobramax)>>
					<<if getvar("$newgobelen") < 1000>>
						You spend an hour working on your tapestry, which is now <<newgobelen/10>> percent finished.

					<</if>>
					<<if getvar("$newgobelen") >= 1000>>
						<<set $newgobelen = 0>>
						<<set $gobelen += 1>>
						Your work on the tapestry is done.
					<</if>>
					<<act 'Set the tapestry aside'>>
						<<gt 'city_mansion_residence_2' 'ylounge'>>
					<</act>>
				<</actCLA>>
			<</if>>
		<</if>>
	<</if>>
<</if>>
<<if $location_var[$here][0] == 'ylibrary'>>
	<<set $loc = 'city_mansion_residence_2'>>
	<<set $loc_arg = 'ylibrary'>>
	<<set $menu_loc = 'city_mansion_residence_2'>>
	<<set $menu_arg = 'ylibrary'>>
	<<set $location_type = 'private'>>
	<<set $menu_off = 0>>
	<<set $time.minutes += 1>>
	<h2>Library</h2>
	<<if $ymanrem[10] == 2>>
		<<image "locations/city/suburb/mansion/y_library.jpg">>
	<<elseif $ymanrem[10] == 1>>
		<<image "locations/city/suburb/mansion/i_finished.jpg">>
	<<else>>
		<<image "locations/city/suburb/mansion/i_unfinished.jpg">>
	<</if>>
	<<act 'Leave the room'>>
		<<gt 'city_mansion_residence_1' 'yfoyer'>>
	<</act>>
	<<if $ymanrem[10] == 2>>
		A huge collection of books are neatly placed on the bookshelves.
		<<actCLA 'Read a book on science (1:00)'>>
			<<set $menu_off = 1>>
			<<if getvar("$blizoruk") == 500 or getvar("$pc.glassqw") == 1>>
				<<set $pc.glassqw = 1>> <<msg 'The text blurs across the page, it seems that your eyesight is actually pretty poor. Maybe you should head to the city and visit an ophthalmologist.'>> <<gt $curloc>>

			<</if>>
			<<if getvar("$pcs_nerd") > 0>>
				<<set $lastread = $totminut>> <<set $lastreadday = $time.daystart>> <<setn $pcs_nerd += 1>>

			<</if>>
			<<set $time.minutes += 60>>
			<<run $pc.skillExperienceGain('intelligence',rand(3,6) + (mentats_dose - rand(0,mentats_dose)))>>
			<<set $blizoruk += 1>>
			<<run $quest('school').func('groupRelInc','nerds',1)>>
			<<image "pc/items/accessories/books/science1.jpg">>
			You spend an hour reading, trying to make sense of all the clever propositions writen inside and to finally understand the subject it describes.
			<<act 'Put the book back'>>
				<<gt 'city_mansion_residence_2' 'ylibrary'>>
			<</act>>
		<</actCLA>>
		<<actCLA 'Read an adventure novel (1:00)'>>
			<<set $menu_off = 1>>
			<<if getvar("$blizoruk") == 500 or getvar("$pc.glassqw") == 1>>
				<<set $pc.glassqw = 1>> <<msg 'The text blurs across the page, it seems that your eyesight is actually pretty poor. Maybe you should head to the city and visit an ophthalmologist.'>> <<gt $curloc>>

			<</if>>
			<<if getvar("$pcs_nerd") > 0>>
				<<set $lastread = $totminut>> <<set $lastreadday = $time.daystart>> <<setn $pcs_nerd += 1>>

			<</if>>
			<<set $time.minutes += 60>>
			<<set $pc.mood = 100>>
			<<set $blizoruk += 1>>
			<<run $quest('school').func('groupRelInc','nerds',1)>>
			<<image "pc/items/accessories/books/fiction#.jpg" 1 2>>
			You spend an hour reading an adventure novel, immersing yourself in daring deeds and awesome twists.
			<<act 'Put the book back'>>
				<<gt 'city_mansion_residence_2' 'ylibrary'>>
			<</act>>
		<</actCLA>>
		<<actCLA 'Read a fantasy novel (1:00)'>>
			<<set $menu_off = 1>>
			<<if getvar("$blizoruk") == 500 or getvar("$pc.glassqw") == 1>>
				<<set $pc.glassqw = 1>> <<msg 'The text blurs across the page, it seems that your eyesight is actually pretty poor. Maybe you should head to the city and visit an ophthalmologist.'>> <<gt $curloc>>

			<</if>>
			<<if getvar("$pcs_nerd") > 0>>
				<<set $lastread = $totminut>> <<set $lastreadday = $time.daystart>> <<setn $pcs_nerd += 1>>

			<</if>>
			<<set $time.minutes += 60>>
			<<set $pc.mood = 100>>
			<<set $blizoruk += 1>>
			<<run $quest('school').func('groupRelInc','nerds',1)>>
			<<image "pc/items/accessories/books/fantasy#.jpg" 1 9>>
			You spend an hour reading a fantasy novel, rescuing damsels from dragons, digging for jewels with dwarves and performing word changing magic alongside elves and druids.
			<<act 'Put the book back'>>
				<<gt 'city_mansion_residence_2' 'ylibrary'>>
			<</act>>
		<</actCLA>>
		<<actCLA 'Read a science fiction novel (1:00)'>>
			<<set $menu_off = 1>>
			<<if getvar("$blizoruk") == 500 or getvar("$pc.glassqw") == 1>>
				<<set $pc.glassqw = 1>> <<msg 'The text blurs across the page, it seems that your eyesight is actually pretty poor. Maybe you should head to the city and visit an ophthalmologist.'>> <<gt $curloc>>

			<</if>>
			<<if getvar("$pcs_nerd") > 0>>
				<<set $lastread = $totminut>> <<set $lastreadday = $time.daystart>> <<setn $pcs_nerd += 1>>

			<</if>>
			<<set $time.minutes += 60>>
			<<set $pc.mood = 100>>
			<<set $blizoruk += 1>>
			<<run $quest('school').func('groupRelInc','nerds',1)>>
			<<image "pc/items/accessories/books/scifi#.jpg" 1 6>>
			<p>You spend an hour reading a science fiction novel - flying off into space, travelling though time, running from rogue AI's and creating monsters with your hunchbacked assistant.</p>
			<<act 'Put the book back'>>
				<<gt 'city_mansion_residence_2' 'ylibrary'>>
			<</act>>
		<</actCLA>>
		<<actCLA 'Read a romance novel (1:00)'>>
			<<set $menu_off = 1>>
			<<if getvar("$blizoruk") == 500 or getvar("$pc.glassqw") == 1>>
				<<set $pc.glassqw = 1>> <<msg 'The text blurs across the page, it seems that your eyesight is actually pretty poor. Maybe you should head to the city and visit an ophthalmologist.'>> <<gt $curloc>>

			<</if>>
			<<if getvar("$pcs_nerd") > 0>>
				<<set $lastread = $totminut>> <<set $lastreadday = $time.daystart>> <<setn $pcs_nerd += 1>>

			<</if>>
			<<set $time.minutes += 60>>
			<<set $pc.mood = 100>>
			<<set $blizoruk += 1>>
			<<set $pc.horny += 20>>
			<<image "pc/items/accessories/books/romance#.jpg" 1 20>>
			<p>You spend a very short hour reading a romance novel - choosing between a vampire or a werewolf, falling in love with an obscenely wealthy Grey... several of the scenes are very steamy and you find yourself getting quite aroused.</p>
			<<act 'Put the book back'>>
				<<gt 'city_mansion_residence_2' 'ylibrary'>>
			<</act>>
		<</actCLA>>
		<<actCLA 'Read from the collected works of Leo Tolstoy (1:00)'>>
			<<set $menu_off = 1>>
			<<if getvar("$blizoruk") == 500 or getvar("$pc.glassqw") == 1>>
				<<set $pc.glassqw = 1>> <<msg 'The text blurs across the page, it seems that your eyesight is actually pretty poor. Maybe you should head to the city and visit an ophthalmologist.'>> <<gt $curloc>>

			<</if>>
			<<if getvar("$pcs_nerd") > 0>>
				<<set $lastread = $totminut>> <<set $lastreadday = $time.daystart>> <<setn $pcs_nerd += 1>>

			<</if>>
			<<set $time.minutes += 60>>
			<<run $pc.skillExperienceGain('spirit',rand(3,6))>>
			<<set $blizoruk += 1>>
			<<run $quest('school').func('groupRelInc','nerds',2)>>
			<<image "pc/items/accessories/books/tolstoy.jpg">>
			<p>You read the book for an hour. Tolstoy is certainly a classic writer, no one denies this, but he used a shit-load of words.</p>
			<<act 'Put the book back'>>
				<<gt 'city_mansion_residence_2' 'ylibrary'>>
			<</act>>
		<</actCLA>>
	<</if>>
<</if>>
<<if $location_var[$here][0] == 'yoffice'>>
	<<set $loc = 'city_mansion_residence_2'>>
	<<set $loc_arg = 'yoffice'>>
	<<set $menu_loc = 'city_mansion_residence_2'>>
	<<set $menu_arg = 'yoffice'>>
	<<set $locM = 'city_mansion_residence_2'>>
	<<set $locM_arg = 'yoffice'>>
	<<set $location_type = 'private'>>
	<<set $menu_off = 0>>
	<<set $time.minutes += 1>>
	<h2>Office</h2>
	<<if $ymanrem[12] == 2>>
		<<image "locations/city/suburb/mansion/y_office.jpg">>
	<<elseif $ymanrem[12] == 1>>
		<<image "locations/city/suburb/mansion/i_finished.jpg">>
	<<else>>
		<<image "locations/city/suburb/mansion/i_unfinished.jpg">>
	<</if>>
	<<act 'Leave the room'>>
		<<gt 'city_mansion_residence_1' 'yfoyer'>>
	<</act>>
	<<if $ymanrem[12] == 2>>
		Your work room where you spend most of the time signing important papers and handling your business needs.
		<!-- !!TODO: Code to check if Sveta is not alone-->
		<<gs 'internet_mobile' 'get_access'>>
		There''s a <<link "computer">><<gt 'computer'>><</link>> sitting on your antique <<link "desk">><<gt 'stol' 'start'>><</link>>.
		<!-- !! IMPORTANT: if there is anything added later that could mean that others are in the room, gs 'music_actions', 'not_alone' should be added with the correct conditions.-->
		<<gs 'music_actions' 'music_icon'>>
	<</if>>
<</if>>
<<if $location_var[$here][0] == 'ynursery'>>
	<<set $loc = 'city_mansion_residence_2'>>
	<<set $loc_arg = 'ynursery'>>
	<<set $menu_loc = 'city_mansion_residence_2'>>
	<<set $menu_arg = 'ynursery'>>
	<<set $location_type = 'private'>>
	<<set $menu_off = 0>>
	<<set $time.minutes += 1>>
	<h2>Nursery</h2>
	<<if $ymanrem[9] == 2>>
		<<image "locations/city/suburb/mansion/y_nursery.jpg">>
		<center>The neatly designed nursery room, only the best for your children.</center>
	<<elseif $ymanrem[9] == 1>>
		<<image "locations/city/suburb/mansion/i_finished.jpg">>
	<<else>>
		<<image "locations/city/suburb/mansion/i_unfinished.jpg">>
	<</if>>
	<<act 'Leave the room'>>
		<<gt 'city_mansion_residence_1' 'yfoyer'>>
	<</act>>
	<<if $ymanrem[9] == 2>>
		<<gs 'subkid'>>

	<</if>>
<</if>>
