# stol

if $ARGS[0] = 'start':
	*clr & cla
	menu_off = 1
	gs 'stat'
	'<center><h1>Desk</h1></center>'
	'<center><img <<$set_imgh>> src="images/shared/home/bedroom/stol.jpg"></center>'
	*nl
	'You sit down at your desk.'

	act 'Get up': gt $loc, $loc_arg
	act 'Check your birth control': gt 'stol', 'bc'

	if mentats_have > 0:
		'<a href="exec:gs ''drugs'', ''mentats'' & gt ''stol'', ''start''"><b>Take neurobooster pill.</b></a> Uses left: <<mentats_have>>. Warning on the box says not to take more than one per day.'
	end
	if steroid_have > 0:
		'<a href="exec:gs ''drugs'', ''steroids'' & gt ''stol'', ''start''"><b>Take steroids.</b></a> Uses left: <<steroid_have>>.'
	end
	if aphrodisiac_have > 0:
		'<a href="exec:gs ''drugs'', ''aphrodisiac'' & gt ''stol'', ''start''"><b>Chew aphrodisiac gum.</b></a> Uses left: <<aphrodisiac_have>>.'
	end

	killvar '$stol_loc_temp'
	if mc_inventory['strapon'] = 1:
		if mc_inventory['dildo_small'] + mc_inventory['dildo_normal'] + mc_inventory['dildo_big'] + mc_inventory['dildo_large'] + mc_inventory['dildo_huge'] + mc_inventory['dildo_enormous'] + mc_inventory['dildo_gigantic'] > 0:
			act 'Check out your strapon harness': $stol_loc_temp = 'start' & gt 'stol', 'strapon'
		else
			act 'Check out your strapon harness': '<br>You don''t have any dildos to attach to your strapon harness'
		end
	end

	if mc_inventory['cigarettes'] > 0:
		act 'Hide some cigarettes in your drawer':
			cla
			cigIN = input('How many cigarettes do you want to hide in your drawer? (Your purse contains <<mc_inventory[''cigarettes'']>> cigarettes.)')

			if cigIN <= 0 or cigIN > mc_inventory['cigarettes']:
				'You can''t put this amount into the drawer.'
			else
				stolcigarettes += cigIN
				mc_inventory['cigarettes'] -= cigIN
			end

			gt 'stol', 'start'
		end
	end

	if stolcigarettes > 0:
		act 'Take some cigarettes from your drawer':
			cla
			cigOUT = input ("How many cigarettes do you want to put in your purse? (There are <<stolcigarettes>> cigarettes here.)")

			if cigOUT <= 0 or cigOUT > stolcigarettes:
				'You can''t take this amount from your drawer.'
			else
				stolcigarettes -= cigOUT
				mc_inventory['cigarettes'] += cigOUT
			end

			gt 'stol', 'start'
		end
	end

	if money > 0:
		act 'Put some money in the desk drawer':
			cla
			stolIN = input ("How much money you want to put in the drawer? (Your purse contains <<money>> <b>₽</b>.)")

			if stolIN <= 0 or stolIN > money:
				'You can''t put this amount into the drawer.'
			else
				stolmoney += stolIN
				money -= stolIN
			end

			gt 'stol', 'start'
		end
	end

	if stolmoney > 0:
		act 'Take some money from the desk drawer':
			cla
			stolOUT = input ("How much money do you want to put in your purse? (There is <<stolmoney>> <b>₽</b> here.)")

			if stolOUT <= 0 or stolOUT > stolmoney:
				'You can''t take this amount from the drawer.'
			else
				stolmoney -= stolOUT
				money += stolOUT
				if stolmoney > 0: 'You have <<stolmoney>> <b>₽</b> hiden in the drawer.'
			end

			gt 'stol', 'start'
		end
	end

	!! uni homework
	if university['enrolled_in_semester'] > university['semester_passed']:
		if university['semester_week'] > 0:
			i = 0
			:study_loop
			if $class_list_institution[i] = 'uni_<<$university[''enrolled_in'']>>_semester_<<university[''enrolled_in_semester'']>>':
				if dyneval ('RESULT = class[''<<$class_list_institution[i]>>_<<$class_list_name[i]>>_optional_weekly_grade_gain'']') < dyneval ('RESULT = class[''<<$class_list_institution[i]>>_<<$class_list_name[i]>>_optional_weekly_max'']'):
					dynamic '	act ''Study for your <<$class_list_name[i]>> class'': gt ''stol'', ''studying'', ''<<$class_list_institution[i]>>'', ''<<$class_list_name[i]>>'', ''start'' '
				else
					*nl
					'You don''t need to study more this week for your <<$class_list_name[i]>> class.'
				end
			end

			i += 1
			if ARRSIZE('class_list_institution') >= i: jump 'study_loop'
			killvar 'i'
		elseif university['exam_week'] > 0:
			i = 0
			:exam_loop
			if $class_list_institution[i] = 'uni_<<$university[''enrolled_in'']>>_semester_<<university[''enrolled_in_semester'']>>' and func('uni_programs', 'exam', 'is_over', $class_list_name[i]) = 0:
				dynamic '	act ''Study intensely for your <<$class_list_name[i]>> exam'': gt ''stol'', ''studying_exam'', ''<<$class_list_institution[i]>>'', ''<<$class_list_name[i]>>'', ''start'' '
			end

			i += 1
			if ARRSIZE('class_list_institution') >= i: jump 'exam_loop'
			killvar 'i'
		end
	end

	!! school homework
	gs 'willpower', 'chore', 'self', iif(grupTipe = 4 and pcs_traits['nerd_status'] = 0, 'hard', iif(pcs_traits['nerd_status'] > 0, 'easy', 'medium'))
	if pcs_traits['nerd_status'] = 2: will_cost = will_cost / 2
	if lernHome > 0 and (will_cost <= pcs_willpwr or pcs_traits['nerd_status'] = 3):
		'<br>You have homework to do. Finishing everything will take <<lernHome>> '+iif(lernHome = 1, 'hour.', 'hours.')
		act 'Do some homework (1:00'+iif(pcs_traits['nerd_status'] = 3, '', ' and <<will_cost>> Willpower')+')':
			cla & *clr
			'<center><img <<$set_imgh>> src="images/locations/shared/apartment/homework.jpg"></center>'
			minut += 60
			pcs_mood += 5 * pcs_traits['nerd_status']
			lern += 1
			gs 'willpower', 'chore', 'self', iif(grupTipe = 4, 'hard', iif(pcs_traits['nerd_status'] > 0, 'easy', 'medium'))
			if pcs_traits['nerd_status'] = 2: will_cost = will_cost / 2
			if pcs_traits['nerd_status'] < 3: gs 'willpower', 'pay', 'self'
			gs'stat'
			if mc_inventory['tech_computer'] = 1:
				gs 'grades', 'homework', 'school', 'yes', 1, 0, 0
				'You spend an hour '+iif(lernHome = 0, 'completing', 'doing part of')+' your homework.'
			else
				gs 'grades', 'homework', 'school', 'no', 1, 0, 0
				'You spend an hour '+iif(lernHome = 0, 'completing', 'doing part of')+' your homework. The part for computer class is not as good as it could be since you don''t have a computer. You could do your homework at the library at the community center in the future since there is a computer available to use there.'
			end
			act 'Continue':gt 'stol', 'start'
		end
	elseif lernHome > 0 and will_cost > pcs_willpwr:
		act 'Do some homework (<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You don''t have enough willpower to use this action.</font>'
	end

	will_cost = will_cost * lernHome
	if lernHome > 1 and (will_cost <= pcs_willpwr or pcs_traits['nerd_status'] = 3):
		act 'Finish all of your homework (<<lernHome>>:00'+iif(pcs_traits['nerd_status'] = 3, '', ' and <<will_cost>> Willpower')+')':
			cla & *clr
			minut += 60 * lernHome
			pcs_mood += 5 * pcs_traits['nerd_status'] *lernHome
			lern += 1 + lernHome/2
			if pcs_traits['nerd_status'] < 3: gs 'willpower', 'pay', 'self'
			gs'stat'
			'<center><img <<$set_imgh>> src="images/locations/shared/apartment/homework.jpg"></center>'
			if mc_inventory['tech_computer'] = 1:
				gs 'grades', 'homework', 'school', 'yes', lernHome, 0, 0
				'It took you <<lernHome>> hours to complete your homework.'
			else
				gs 'grades', 'homework', 'school', 'no', lernHome, 0, 0
				'It took you <<lernHome>> hours to complete your homework. The part for computer class is not as good as it could be since you don''t have a computer. You could do your homework at the library at the community center in the future since there is a computer available to use there.'
			end

			act 'Continue':gt 'stol', 'start'
		end
	elseif lernHome > 1 and will_cost > pcs_willpwr:
		act 'Finish all of your homework (<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You don''t have enough willpower to use this action.</font>'
	end
end

if $ARGS[0] = 'strapon':
!! use gs 'boyStat', 'D<<strapnumber>>' to recall which dildo is attached
	*clr
	'<center><h1>Desk</h1></center>'
	'<center><img <<$set_imgh>> src="images/shared/home/bedroom/stol.jpg"></center>'
	*nl
	if strapnumber = 0: 'Your strapon harness doesn''t have a dildo attached to it.'
	*nl
	if mc_inventory['dildo_small'] = 1: iif(strapnumber = 1, 'Your 10cm dildo is attached to your strapon harness.', '<a href="exec:strapnumber = 1 & gt ''stol'', ''strapon''">Attach</a> your 10cm long dildo.')
	if mc_inventory['dildo_normal'] = 1: iif(strapnumber = 2, 'Your 15cm dildo is attached to your strapon harness.','<a href="exec:strapnumber = 2 & gt ''stol'', ''strapon''">Attach</a> your 15cm long dildo.')
	if mc_inventory['dildo_big'] = 1: iif(strapnumber = 3, 'Your 20cm dildo is attached to your strapon harness.','<a href="exec:strapnumber = 3 & gt ''stol'', ''strapon''">Attach</a> your 20cm long dildo.')
	if mc_inventory['dildo_large'] = 1: iif(strapnumber = 4, 'Your 25cm dildo is attached to your strapon harness.','<a href="exec:strapnumber = 4 & gt ''stol'', ''strapon''">Attach</a> your 25cm long dildo.')
	if mc_inventory['dildo_huge'] = 1: iif(strapnumber = 5, 'Your 30cm dildo is attached to your strapon harness.','<a href="exec:strapnumber = 5 & gt ''stol'', ''strapon''">Attach</a> your 30cm long dildo.')
	if mc_inventory['dildo_enormous'] = 1: iif(strapnumber = 6, 'Your 35cm dildo is attached to your strapon harness.','<a href="exec:strapnumber = 6 & gt ''stol'', ''strapon''">Attach</a> your 35cm long dildo.')
	if mc_inventory['dildo_gigantic'] = 1: iif(strapnumber = 7, 'Your 40cm dildo is attached to your strapon harness.','<a href="exec:strapnumber = 7 & gt ''stol'', ''strapon''">Attach</a> your 40cm long dildo.')
	act 'Back': gt 'stol', $stol_loc_temp
end

if $ARGS[0] = 'bc':
	*clr & cla
	'<center><h1>Desk</h1></center>'
	'<center><img <<$set_imgh>> src="images/shared/home/bedroom/stol.jpg"></center>'
	*nl
	gs 'stat'
	gs 'din_bad'
	'In the drawer of your desk, you store your birth control.'
	act 'Close the drawer':gt $loc, $loc_arg
	act'Check your condoms':
		if mc_inventory['equipped_condoms'] + mc_inventory['normal_condoms'] + mc_inventory['sabotaged_condoms'] > 0:
			if $locclass = 'bedr':
				*clr
				'<center><img <<$set_imgh>> src="images/pc/items/accessories/birthcontrol/condoms.jpg"></center>'
			end
			if preziktype = 2 or mc_inventory['sabotaged_condoms'] > 0:
				'You have <<iif(preziktype = 2, mc_inventory[''normal_condoms''], mc_inventory[''normal_condoms'']+mc_inventory[''equipped_condoms''])>> normal, and <<iif(preziktype = 2, mc_inventory[''equipped_condoms'']+mc_inventory[''sabotaged_condoms''], mc_inventory[''sabotaged_condoms''])>> sabotaged <a href="exec:dynamic $din_Table_Condom_Menu"><b>condoms.</b></a>'
			elseif preziktype < 2 and mc_inventory['sabotaged_condoms'] = 0:
				'You have <<mc_inventory[''equipped_condoms'']+mc_inventory[''normal_condoms'']>> <a href="exec:dynamic $din_Table_Condom_Menu"><b>condoms.</b></a>'
			end
			*nl
		else
			if $locclass = 'bedr':
				*clr
				'<center><img <<$set_imgh>> src="images/shared/home/bedroom/drawer_empty.jpg"></center>'
			end
			'You are out of condoms.'
		end
	end

	act'Check your birth control pills':
		if mc_inventory['contraceptive_pill'] > 0 or pillsleft[ptype] > 0:
			if $locclass = 'bedr':
				*clr
				'<center><img <<$set_imgh>> src="images/pc/items/accessories/birthcontrol/bc_pills.jpg"></center>'
			end
			if mc_inventory['contraceptive_pill'] > 0 and pillsleft[ptype] > 0:
				'You have <<mc_inventory[''contraceptive_pill'']>> unopened packages of <a href="exec:dynamic $d_tabletkiedt">birth control pills</a> and <<pillsleft[ptype]>> pills left in your opened package.</b>'
			elseif mc_inventory['contraceptive_pill']	= 0 and pillsleft[ptype] > 0:
				'You have <<pillsleft[ptype]>> <a href="exec:dynamic $d_tabletkiedt">birth control pills</a> left.</b>'
			elseif mc_inventory['contraceptive_pill'] > 0 and pillsleft[ptype] = 0:
				'You have <<mc_inventory[''contraceptive_pill'']>> unopened packages of <a href="exec:dynamic $d_tabletkiedt">birth control pills</a>.'
			end
		else
			if $locclass = 'bedr':
				*clr
				'<center><img <<$set_imgh>> src="images/shared/home/bedroom/drawer_empty.jpg"></center>'
			end
			'You are out of birth control pills.'
		end
	end
	act'Check your morning after pills':
		if mc_inventory['morning_after_pill'] > 0:
			if $locclass = 'bedr':
				*clr
				'<center><img <<$set_imgh>> src="images/pc/items/accessories/birthcontrol/morning_after_pill.jpg"></center>'
			end
			if mc_inventory['morning_after_pill'] = 1:
				'You have a <a href="exec:gs''medical_din'',''morning_after_pill''">morning after pill</a> hidden in the back corner of the drawer.'
			else
				'You have <b><<mc_inventory[''morning_after_pill'']>></b> <a href="exec:gs''medical_din'',''morning_after_pill''">morning after pills</a> stacked in the back corner of the drawer.'
			end
		else
			if $locclass = 'bedr':
				*clr
				'<center><img <<$set_imgh>> src="images/shared/home/bedroom/drawer_empty.jpg"></center>'
			end
			'You have no morning after pills.'
		end
	end
end

if $args[0] = 'studying':
	cla & *clr
	'<center><img <<$set_imgh>> src="images/locations/shared/apartment/homework.jpg"></center>'
	minut += 30
	if mc_inventory['tech_computer'] = 1:
		gs 'grades', 'optional_activity_attribute', '<<$ARGS[1]>>', '<<$ARGS[2]>>', 'yes', pcs_intel
	else
		gs 'grades', 'optional_activity_attribute', '<<$ARGS[1]>>', '<<$ARGS[2]>>', 'no', pcs_intel
	end
	gs 'stat'
	if dyneval ('RESULT = class[''<<$ARGS[1]>>_<<$ARGS[2]>>_optional_weekly_grade_gain'']') < dyneval ('RESULT = class[''<<$ARGS[1]>>_<<$ARGS[2]>>_optional_weekly_max'']'):
		'You study for half an hour, and you can tell you will need to study more if you want to completly understand this weeks material'
	else
		'You study for half an hour, and you think you understand everything that is covered this week'
	end
	act 'Get up from your desk': gt 'stol', '<<$ARGS[3]>>'
end

if $ARGS[0] = 'studying_exam':
	cla & *clr
	'<center><img <<$set_imgh>> src="images/locations/shared/apartment/homework.jpg"></center>'
	!!Nerds likes studying and so their mood improves a little. Everbody else get in a worse mood by studying.
	gs 'exp_gain', 'intel', max(0,rand(-1,1))
	pcs_mood += (pcs_traits['nerd_status']*5 -10)
	minut += 30
	if pcs_sleep < 5:
		no_study = 1
		'You are so tired that you are constantly falling a sleep. You get no studying done in this condition.'
	elseif pcs_sleep < 30:
		study_mod -= 20
		'You are very tired and have a hard time keeping you eyes open.'
	end
	if alko >= 6:
		no_study = 1
		'You are so drunk that you eyes can''t make sense of the letters written in the books. Holding your pen is also a problem.'
	elseif alko >= 4:
		study_mod -= 40
		'You are drunk and have trouble concentration on reading the books. When you look back on the notes you made a lot of them are incomprehensible.'
	elseif alko >= 2:
		study_mod -= 20
		'You are feeling a little tipsy and the you think that the studying is going great. But when you afterwards look at it you notice that a lot of your notes you made makes no sense.'
	end
	if mentats_dose >= 1: study_mod += 30
	If pcs_mood < 50:
		study_mod -= 20
		'you are in a bad mood and it clearly effects you studying.'
	end
	if StrongNarkota > 0 or jointhigh > 0:
		study_mod -= 40
		'You are stoned, and it is not making it easier to concentrate on studying.'
	end
	if amphHigh > 0: study_mod += 20
	if pcs_energy < 5:
		study_mod -= 20
		'You are extremely hungry and it it is hard thinking about anything else that food.'
	elseif pcs_energy < 10:
		study_mod -= 10
		'You are very hungry and it affect your ability to concentrate.'
	elseif pcs_energy < 20:
		study_mod -=10
		'You ar hungry and your thought often drift to food, affecting your performance negatively.'
	end
	if pcs_horny > 90:
		study_mod -= 10
		'ou are so arouse that you thought often drifts to sex effecting you ability your study.'
	end
	if pain['total'] > 90:
		no_study = 1
		'You are in so much pain that you can''t study.'
	elseif pain['total'] > 75:
		study_mod -= 40
		'You are in so much pain that you have a very hard time concentrating on studying.'
	elseif pain['total'] > 60:
		study_mod -= 20
		'Your pain a constantly bothering and it makes it harder to study.'
	end
	*nl
	study_mod = max(0,rand(30 + study_mod,pcs_intel + study_mod)/33)
	if no_study = 1:
		'You try to study for half an hour, but gets nothing done.'
	else
		if study_mod = 0:
			'You study for half an hour. But don''t think you are improving.'
		elseif study_mod = 1:
			'You study for half an hour, and think you are improving a little.'
		elseif study_mod = 2:
			'You study for half an hour, and think you are doing good progress in getting ready for the exam.'
		else
			'You study for half an hour, and think you are improving a lot.'
		end
		gs 'grades', 'grade_award', '<<$ARGS[1]>>', '<<$ARGS[2]>>', study_mod
	end

	gs 'stat'

	killvar 'study_mod'
	killvar 'nod_study'

	act 'Get up from your desk': gt 'stol', '<<$ARGS[3]>>'
end
--- stol ---------------------------------

