# home_activity

!! this file is for repeatable activities and events that can happen in a home

!! --------------- vomiting hangovers and morning sickness ----------------------------

if $ARGS[0] = 'vomiting_check':
	!! if not one of these locations, event will not fire
	if at_home = 1 or at_home = 2 or at_home = 3 or at_home = 4 or $home['current'] = 5 or at_home = 6 or at_home = 13 or at_home = 15 or $loc = 'mey_home':
		gs 'home_activity', 'vomiting_images'
		gt 'home_activity', 'morning_vomit'
!!	else
!!		vomit['morning_sick'] = 0
!!		vomit['hangover'] = 0
!!		vomit['unlucky'] = 0
	end
end

if $ARGS[0] = 'vomiting_images':
	$at_home = func('homes_properties', 'get_property_code', $loc)
	if $at_home = 'city_apartment':
		!! location = 'City residential apartment'
		if rembedr = 0:
			$home_activity['vomit_bedroom'] = '<center><img <<$set_imgh>> src="images/locations/city/residential/apartment/bedr.jpg"></center>'
		else
			$home_activity['vomit_bedroom'] = '<center><img <<$set_imgh>> src="images/locations/city/residential/apartment/bedr2.jpg"></center>'
		end
		if remvanr = 0:
			$home_activity['vomit_bathroom'] = '<center><img <<$set_imgh>> src="images/locations/city/residential/apartment/home/vanr.jpg"></center>'
		elseif remvanr = 1:
			$home_activity['vomit_bathroom'] = '<center><img <<$set_imgh>> src="images/locations/city/residential/apartment/home/vanr2.jpg"></center>'
		end
		$home_activity['vomit_exit'] = 'vanr'
	elseif $at_home = 'parents_home':
		!! location = 'Parent''s home in Pavlovsk'
		$home_activity['vomit_bedroom'] = '<center><img <<$set_imgh>> src="images/locations/pavlovsk/resident/apartment/home/bedrpar.jpg"></center>'
		$home_activity['vomit_bathroom'] = '<center><img <<$set_imgh>> src="images/locations/pavlovsk/resident/apartment/home/vanrpar.jpg"></center>'
		$home_activity['vomit_exit'] = 'vanrPar'
	elseif $at_home = 'village_cottage':
		!! location = 'My cottage in the cooperative farm'
		if func('homes_properties', 'is_property_renovated', 'village_cottage'):
			$home_activity['vomit_bedroom'] = '<center><img <<$set_imgh>> src="images/locations/suburban/cottage/dacharoom2.jpg"></center>'
			$home_activity['vomit_bathroom'] = '<center><img <<$set_imgh>> src="images/locations/suburban/cottage/dacharoom2.jpg"></center>'
		else
			$home_activity['vomit_bedroom'] = '<center><img <<$set_imgh>> src="images/locations/suburban/cottage/dacharoom1.jpg"></center>'
			$home_activity['vomit_bathroom'] = '<center><img <<$set_imgh>> src="images/locations/suburban/cottage/dacharoom1.jpg"></center>'
		end
		$home_activity['vomit_exit'] =  ' ''dachain'', ''dachabath'' '
	elseif $at_home = 'old_town_apartment':
		!! location = 'Old town apartment'
		$home_activity['vomit_bedroom'] = '<center><img <<$set_imgh>> src="images/locations/city/residential/apartment/bedr2.jpg"></center>'
		$home_activity['vomit_bathroom'] = '<center><img <<$set_imgh>> src="images/locations/pushkin/apartment/vanr2x.jpg"></center>'
		$home_activity['vomit_exit'] = 'vanr2x'
	elseif $at_home = 'matryona_mansion':
		!! location = 'Matryona mansion'
		
		if ymanrem[4] = 2:
			$home_activity['vomit_bedroom'] = '<center><img <<$set_imgh>> src="images/locations/city/suburb/mansion/y_bedroom.jpg"></center>'
		elseif ymanrem[4] = 1:
			$home_activity['vomit_bedroom'] = '<center><img <<$set_imgh>> src="images/locations/city/suburb/mansion/i_finished.jpg"></center>'
		else
			$home_activity['vomit_bedroom'] = '<center><img <<$set_imgh>> src="images/locations/city/suburb/mansion/i_unfinished.jpg"></center>'
		end
		if ymanrem[5] = 2:
			$home_activity['vomit_bathroom'] = '<center><img <<$set_imgh>> src="images/locations/city/suburb/mansion/y_bathroom.jpg"></center>'
		elseif ymanrem[5] = 1:
			$home_activity['vomit_bathroom'] = '<center><img <<$set_imgh>> src="images/locations/city/suburb/mansion/i_finished.jpg"></center>'
		else
			$home_activity['vomit_bathroom'] = '<center><img <<$set_imgh>> src="images/locations/city/suburb/mansion/i_unfinished.jpg"></center>'
		end
		$home_activity['vomit_exit'] = ' ''city_mansion_residence_1'', ''ybathroom'' '
	elseif $at_home = 'pavlovsk_hotel'
		!! location = 'My hotel room in Pavlovsk'
		if hotelRoom[$hotel] = 1:
			$home_activity['vomit_bedroom'] = '<center><img <<$set_imgh>> src="images/locations/pavlovsk/hotel/hotel.room.normal.jpg"></center>'
			$home_activity['vomit_bathroom'] = '<center><img <<$set_imgh>> src="images/locations/pavlovsk/hotel/hotel.room.normal1.jpg"></center>'
		elseif hotelRoom[$hotel] = 2:
			$home_activity['vomit_bedroom'] = '<center><img <<$set_imgh>> src="images/locations/pavlovsk/hotel/hotel.room.better.jpg"></center>'
			$home_activity['vomit_bathroom'] = $home_activity['vomit_bedroom'] = '<center><img <<$set_imgh>> src="images/locations/pavlovsk/hotel/hotel.room.better1.jpg"></center>'
		elseif hotelRoom[$hotel] = 3:
			$home_activity['vomit_bedroom'] = '<center><img <<$set_imgh>> src="images/locations/pavlovsk/hotel/hotel.room.best.jpg"></center>'
			$home_activity['vomit_bathroom'] = '<center><img <<$set_imgh>> src="images/locations/pavlovsk/hotel/hotel.room.best1.jpg"></center>'
		end
		
		$home_activity['vomit_exit'] = ' ''HotelRoom'', ''shower1'' '
		
!!{	elseif $at_home = 'shulga_apartment':
		!! location = 'Uncle Sergey''s apartment'
		$home_activity['vomit_bedroom'] = 
		$home_activity['vomit_bathroom'] = 
		
		'vasilyhome', 'bathroom'}
	elseif $at_home = 'shared_apartment':
		!! location = 'Shared apartment in Pavlovsk'
		$home_activity['vomit_bedroom'] = '<center><img <<$set_imgh>> src="images/shared/home/bedroom/sofabed.jpg"></center>'
		$home_activity['vomit_bathroom'] = '<center><img <<$set_imgh>> src="images/locations/pavlovsk/resident/apartment/home/vanrpar.jpg"></center>'
		'pav_shared_apt', 'bathroom'

!!{	elseif $at_home = 'grandparents_house':
		!! location = 'Grandparent''s house in Gadukino'
		$home_activity['vomit_bedroom'] = 
		$home_activity['vomit_bathroom'] = }
	elseif $at_home = 'city_house':
		!! location = 'City residential house'
		$home_activity['vomit_bedroom'] = '<center><img <<$set_imgh>> src="images/locations/city/residential/house/crh_bedroom.jpg"></center>'
		$home_activity['vomit_bathroom'] = '<center><img <<$set_imgh>> src="images/locations/city/residential/house/crh_bathroom.jpg"></center>'
		'city_house_res_bathr', 'bathr'
!!	elseif at_home = 16:
	elseif $at_home = 'meynold_household':
		!! location = 'Meynold Household'
		$home_activity['vomit_bedroom'] = '<center><img <<$set_imgh>> src="images/locations/pavlovsk/resident/meynolds/guestroom.jpg"></center>'
		$home_activity['vomit_bathroom'] = '<center><img <<$set_imgh>> src="images/locations/pavlovsk/hotel/hotel.room.best1.jpg"></center>'
		'mey_home', '2'
	end
end

if $ARGS[0] = 'morning_vomit':
	cla & *clr
	$home_activity['vomit_bedroom']
	'Before you even open your eyes, your stomach churns. Nausea courses through you, acid burns at the back of your throat, and you know without a doubt:'
	*nl
	'<b>You''re about to throw up.</b>'
	act'Run to the bathroom':
		minut += 1
		gs 'stat'
		cla & *clr
		'<center><img <<$set_imgh>> src="images/locations/shared/home/bathroom/vomit.jpg"></center>'
		'Clamping your hand over your mouth, you scramble from your bed and tear your way to the bathroom. You barely manage to lift the lid up in time and violently hurl into the toilet bowl.'
		act'Continue':
			cla & *clr
			minut += rand(2,8)
			gs 'stat'
			'<center><img <<$set_imgh>> src="images/locations/shared/home/bathroom/vomit_after.jpg"></center>'
			'After several minutes of retching, your stomach finally seems to be empty, and you just lay there, panting over the toilet bowl. You groan, headache pounding in your skull with the kind of throb that makes you think it''s going to be there for the rest of the day.'
			if vomit['hangover'] = 1:
				!! hangover = 1
				!! change above variable to whatever would make the most sense, this is just a placeholder
				'<i>Ugh, maybe I had too much to drink last night...</i> you think to yourself as you lay there on the floor.'
				if $loc = 'mey_home':
					act'Continue':gt 'mey_home', 'mey_morning_vomit'
				else
					act'Continue':gt'home_activity','vomiting_exit'
				end
			elseif vomit['morning_sick'] = 1:
				if knowpreg = 1:
					if morning_sickness = 0:
						morning_sickness = 1
						'<i>Ugh, is this what morning sickness feels like?</i> you think to yourself as you lay there on the floor.'
					else
						'<i>Ugh! Why does pregnancy have to come with so many side effects...</i> you think to yourself as you lay there on the floor.'
					end
				elseif thinkpreg = 1:
					gs 'home_activity', 'think_preg_react'
				elseif knowpreg = 0:
					if daystart - daylastperiod > 35 and rand(1,100) < pcs_intel:
						gs 'home_activity', 'preg_scare'
					else
						'<i>Ugh, I feel awful! I wonder if I should see a doctor?</i> you think to yourself as you lay there on the floor.'
					end
				end
			elseif vomit['unlucky'] = 1:
				'<i>Ugh, I feel awful! I wonder if I should see a doctor?</i> you think to yourself as you lay there on the floor.'
				if $loc = 'mey_home':
					act'Continue':gt 'mey_home', 'mey_morning_vomit'
				else
					act'Continue':gt'home_activity','vomiting_exit'
				end
			end
		end
	end
end

if $ARGS[0] = 'preg_scare':
	thinkpreg = 1
	if stat['think_virgin'] = 0:
		'<i>Ugh, I feel awful!</i> you think to yourself. <i>I wonder if-</i>'
		*nl
		'You stop in shock as your brain suddenly puts the facts together:'
		if daystart - stat['last_man_sex_day'] < 30:
			if (daystart - daylastperiod > 28) and (daystart - daylastperiod <= 35):
				'You''ve been having sex, your period is late, and you''re throwing up in the morning.'
			elseif (daystart - daylastperiod > 35) and (daystart - daylastperiod <= 42):
				'You''ve been having sex, your period is a week late, and you''re throwing up in the morning.'
			elseif (daystart - daylastperiod > 42) and (daystart - daylastperiod <= 56):
				'You''ve been having sex, your period is two weeks late, and you''re throwing up in the morning.'
			elseif daystart - daylastperiod > 56:
				'You''ve been having sex, your period is a month late, and you''re throwing up in the morning.'
			end
			*nl
			'Are you...<i>pregnant?</i>'
		else
			if (daystart - daylastperiod > 28) and (daystart - daylastperiod <= 35):
				'Your period is late and you''re throwing up in the morning.'
			elseif (daystart - daylastperiod > 35) and (daystart - daylastperiod <= 42):
				'Your period is a week late and you''re throwing up in the morning.'
			elseif (daystart - daylastperiod > 42) and (daystart - daylastperiod <= 56):
				'Your period is two weeks late and you''re throwing up in the morning.'
			elseif daystart - daylastperiod > 56:
				'Your period is a month late and you''re throwing up in the morning.'
			end
			*nl
			'Are you...<i>pregnant?</i> But how? You haven''t fucked a guy in weeks!'
		end
	else
		if (daystart - daylastperiod > 28) and (daystart - daylastperiod <= 35):
			'Your period is late and you''re throwing up in the morning.'
		elseif (daystart - daylastperiod > 35) and (daystart - daylastperiod <= 42):
			'Your period is a week late and you''re throwing up in the morning.'
		elseif (daystart - daylastperiod > 42) and (daystart - daylastperiod <= 56):
			'Your period is two weeks late and you''re throwing up in the morning.'
		elseif daystart - daylastperiod > 56:
			'Your period is a month late and you''re throwing up in the morning.'
		end
		*nl
		'Are you...<i>pregnant?</i>'
		'But you''ve never had sex! This can''t be true!'
	end
	if $loc = 'mey_home':
		act'Continue':gt 'mey_home', 'mey_preg_scare'
	else
		gs 'home_activity', 'preg_scare_react'
	end
end

if $ARGS[0] = 'think_preg_react':
	act'This is scaring you':
		cla & *clr
		$home_activity['vomit_bathroom']
		'Anxiety fills your chest, replacing the bile recently vacated from it.'
		*nl
		'You don''t like the frequency with which this is happening. More and more, the evidence is pointing towards you being pregnant.'
		*nl
		'<i>What am I going to do?</i> you think to yourself.'
		act'Continue':gt'home_activity','vomiting_exit'
	end
	
	act'I better not be pregnant':
		cla & *clr
		$home_activity['vomit_bathroom']
		'Disgust and irritation fill you as you reach out to flush the toilet.'
		*nl
		'<i>Oh God,</i> you groan internally. <i>I swear, this better be a stomach bug and not pregnancy. I am not ready for motherhood.</i>'
		act'Continue':gt'home_activity','vomiting_exit'
	end
	
	act'I can''t wait for this baby':
		cla & *clr
		$home_activity['vomit_bathroom']
		'Even through the pain and the horrid taste on your lips, you can''t help but smile.'
		*nl
		'<i>I''m so ready for this baby!</i> you think excitedly.'
		act'Continue':gt'home_activity','vomiting_exit'
	end
	
	act'Baby good, morning sickness bad':
		cla & *clr
		$home_activity['vomit_bathroom']
		'You clutch your head, wincing at the sharp pain that lances through it.'
		*nl
		'<i>This baby can not come sooner,</i> you think to yourself. <i>Really looking forward to watching it grow, but <b>really</b> hate this pregnancy stuff.</i>'
		act'Continue':gt'home_activity','vomiting_exit'
	end
end

if $ARGS[0] = 'preg_scare_react':
	act'I need a test!':
		cla & *clr
		$home_activity['vomit_bathroom']
		'<i>I need to take a pregnancy test right now!</i> you think urgently. <i>I need to figure out what is going on!</i>'
		act'Continue':gt'home_activity','vomiting_exit'
	end
	
	act'This is really bad':
		cla & *clr
		$home_activity['vomit_bathroom']
		'<i>This is really really bad!</i> you think, the blood draining from your face. <i>I don''t want to be a mom! Not now!</i>'
		act'Continue':gt'home_activity','vomiting_exit'
	end
	
	act'This is wonderful!':
		cla & *clr
		$home_activity['vomit_bathroom']
		if kid = 0:
			'<i>I''m going to be a mom!</i> you think, smiling to yourself. <i>This is the best day of my life!</i>'
		else
			'<i>I''m going to have another baby!</i> you think, smiling to yourself. <i>This is wonderful!</i>'
		end
		act'Continue':gt'home_activity','vomiting_exit'
	end
	
	if stat['think_virgin'] = 1:
		act'This is impossible':
			cla & *clr
			$home_activity['vomit_bathroom']
			'<i>This doesn''t make any sense,</i> you think to yourself, putting your hand on your head, feeling woozy again.'
			act'Continue':gt'home_activity','vomiting_exit'
		end
	end
end


if $ARGS[0] = 'vomiting_exit':
	vomit['morning_sick'] = 0
	vomit['hangover'] = 0
	vomit['unlucky'] = 0
	if at_home = 1:
		!! location = 'City residential apartment'
		gt 'vanr'
	elseif at_home = 2:
		!! location = 'Parent''s home in Pavlovsk'
		gt 'vanrPar'
	elseif at_home = 3:
		!! location = 'My cottage in the cooperative farm'
		gt 'dachain', 'dachabath'
	elseif at_home = 4:
		!! location = 'Old town apartment'
		gt 'vanr2x'
	elseif $home['current'] = 5:
		!! location = 'Matryona mansion'
		gt'city_mansion_residence_1','ybathroom'
	elseif at_home = 6:
		!! location = 'My hotel room in Pavlovsk'
		gt 'HotelRoom', 'shower1'
!!{	elseif at_home = 9:
		!! location = 'Uncle Sergey''s apartment'
		$home_activity['vomit_bedroom'] = 
		$home_activity['vomit_bathroom'] = 
		
		gt 'vasilyhome', 'bathroom'}
	elseif at_home = 13:
		gt 'pav_shared_apt', 'bathroom'
!!{	elseif at_home = 14:
		!! location = 'Grandparent''s house in Gadukino'
		$home_activity['vomit_bedroom'] = 
		$home_activity['vomit_bathroom'] = }
	elseif at_home = 15:
		!! location = 'City residential house'
		gt 'city_house_res_bathr', 'bathr'
	elseif $loc = 'mey_home':
		!! location = 'Meynold Household'
		gt 'mey_home', '2'
	end
end

!! --------------- end vomiting ----------------------------
--- home_activity ---------------------------------