:: city_library
<<set $here = 'city_library'>>
<<set $ARGS = $location_var[$here]>>
<<set $loc_arg = $location_var[$here][0]>>
<<set $loc = 'city_library'>>
<<set $menu_loc = 'city_library'>>
<<set $menu_arg = ''>>
<<set $menu_off = 0>>
<<set $location_type = 'public_indoors'>>
<<set $pc.frost = 0>>

<!-- ! Stuff to do on Studying a Book-->
<!-- !	$larg(0) = Skill to Check-->
<h2>National Library of Russia</h2>
<<image "locations/city/citycenter/library/downlibint.jpg">>
A huge library with thousands upon thousands of books. You could spend years in here and probably still wouldn''t be able to read it all.
<<actCLA 'Leave'>>
	<<set $time.minutes += 5>> <<gt 'city_center'>>
<</actCLA>>
<<if $time.hour >= 8 and $time.hour <= 18>>
	<<actCLA 'Read a science book'>>
		<<run $pc.skillExperienceGain('intelligence',4 + (mentats_dose - rand(0,mentats_dose)))>>
		<<downlibrary['BookStudy']  ''>>
		You read a science book for an hour, trying to make sense of and understand the subject matter.
		<<actCLA 'Put the book down'>>
			<<gt $curloc>>
		<</actCLA>>
	<</actCLA>>
	<<actCLA 'Read an entertaining book'>>
		<<set $pc.mood = 100>>
		<<downlibrary['BookStudy']  ''>>
		You read an adventure book for an hour.
		<<actCLA 'Put the book down'>>
			<<gt $curloc>>
		<</actCLA>>
	<</actCLA>>
	<<actCLA 'Read the collected works of Leo Tolstoy'>>
		<<downlibrary['BookStudy']  'sprt'>>
		You read the book for an hour. Tolstoy is certainly a classic writer, but his works are certainly exhaustive.
		<<actCLA 'Put the book down'>>
			<<gt $curloc>>
		<</actCLA>>
	<</actCLA>>
	<<if getvar("$MagicLibrary") == 1>>
		<<actCLA 'Read magic books'>>
			<<downlibrary['BookStudy']  'splcstng'>>
			You pick out one of the magic books you can actually read and sit down with it.
			Not only is the subject matter complex and mostly a mystery to you, but the descriptions and explanations are unnecessarily wordy, as if the writer had something to prove.
			After about an hour, you decide to take a break from it and instead test your memory. You don't remember much, but you understand magic a little better than before.
			<!-- ! Find Researchable Spells-->
			<<if setup.func('spellList','numAvailableSpells','librarySpells') > 0>>
				<<if rand(1,10) == 10>>
					<<gs 'spellList' 'addAvailableSpells' 'librarySpells'>>
					 * pl 'You have come across a lead on a new spell.'
				<</if>>
			<<else>>
				There doesn''t seem to be any more spells to learn here, but you can still improve your skills in the ones that you've already found.
			<</if>>
			<!-- !!Adding to the Actions opportunity to practice spells MC found-->
			<<gs 'spellList' 'teacherActions' '$librarySpells' 'city_library' ''>>
			<<actCLA 'Put the book down'>>
				<<gt $curloc>>
			<</actCLA>>
		<</actCLA>>
		<!-- !!Adding to the Actions opportunity to practice spells MC found-->
		<<gs 'spellList' 'teacherActions' '$librarySpells' 'city_library' ''>>
	<</if>>
<<else>>
	The library is closed.
<</if>>
<<gs 'camera' 'check_location'>>
:: downlibraryBookStudy_macro[widget]
<<widget 'downlibraryBookStudy'>>
	<<setinit $downlibrary['Skill'] = _args[0]>>
	<<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 you have poor eyesight. Maybe you should visit an ophthalmologists?'&gt $curloc>>
	<</if>>
	<<if getvar("$pcs_nerd") > 0>>
		<<set $lastread = $totminut>>
		<<set $lastreadday = $time.daystart>>
		<<set $pcs_nerd += 1>>
	<</if>>
	<<set $time.minutes += 60>>
	<<if $downlibrary['Skill'] != ''>>
		dynamic "
		<<if $pcs_ << $downlibrary['Skill']>>
			<<setinit $downlibrary['Skill']_exp += rand(0,1)>>
		<<elseif $pcs_ << $downlibrary['Skill']>>
			<<setinit $downlibrary['Skill']_exp += rand(1,2)>>
		<<else>>
			<<setinit $downlibrary['Skill']_exp += rand(1,3)>>
			end"
		<</if>>
		<<set $blizoruk += 1>>
<</widget>>
