# family

sisterAge = year - ((npc_dob['A33'] - (npc_dob['A33'] mod 10000)) / 10000)
gs 'family_schedule'

if daystart ! m_day:
	m_day = daystart
	father_go = 0
	mother_go = rand(0,1)
end

indorf = 0
!brother or father are in the livign room
ocpd_room = 0

if indorf_month ! month and week ! 7 and week ! 1:
	!!monthly
	indorf_month = month
	dostupindorf = 1
end

if week = 1 and dostupindorf = 1:dostupindorf = 0

if dostupindorf = 1 and ((week = 6 and hour >= 12) or (week = 7 and hour < 20)):
	!!go to the village
	indorf = 1
	father_go = 0
	mother_go = 0
end

if indorf = 1 and sister_opr_indorf = 0:
	sister_opr_indorf = 1
	sister_indorf = rand(0, 1)
end

if indorf = 0:
	sister_opr_indorf = 0
	sister_indorf = 0
end
if sisboyparty_day + 1 = daystart:sister_indorf = 0
*nl

if StoryLine = 1:
	if sisboyparty_day + 1 = daystart and hour > 18 and sisboypartyQW = 1:
		if sisboyparty = 1: sisboyparty = -1
		if sisboyparty = 2:
			*clr & cla
			menu_off = 1
			minut += 5
			sisboyparty = -1
			gs 'stat'
			'<center><img <<$set_imgh>> src="images/locations/pavlovsk/resident/rekshome/party/sisboyqwparty_7.jpg"></center>'
			'You forgot to go to Rexs'' birthday party.'
			'You brush it off thinking, '+$OpenInnerThought+'Oh well, hopefully he won''t be offended.'+$CloseInnerThought
			act 'Move away':gt $loc, $loc_arg
			exit
		end
	end

	if sister_indorf = 0 and $loc = 'pav_commcenter' and anyaloc = 10:
		'Your sister <a href="exec:gt ''sister'', ''pav_commcenter''">Anya</a> is sitting with a group of boys and girls, drinking beer.'
	end

	if indorf = 0:
		if $loc = 'bedrPar2':
			if momloc = 1 and sdadloc = 1:
				'Your <<$npc_nickname[''A29'']>> and stepfather are sleeping on the bed.'
			elseif momloc = 1:
				'Your <<$npc_nickname[''A29'']>> is sleeping on the bed.'
			elseif sdadloc = 1:
				'Your stepfather is sleeping on the bed.'
			end
		end

		if $loc = 'sitrPar' or ($loc = 'family' and $loc_arg = 'sofa'):
			if kolloc = 2 and brothermorningsex = daystart:
				ocpd_room = 1
				'Your younger brother <a href="exec:gt ''brother'', ''start''">Kolka</a> is getting ready for school.'
			elseif kolloc = 1:
				ocpd_room = 1
				'Your younger brother <a href="exec:gt ''brother'', ''start''">Kolka</a> is sleeping on the sofa.'
			elseif kolloc = 7:
				ocpd_room = 1
				'Your little brother <a href="exec:gt ''brother'', ''start''">Kolka</a> is sitting by the table and doing his homework.'
			elseif kolloc = 11:
				ocpd_room = 1
				if momloc = 19 and sdadloc = 10:
					'Your younger brother <a href="exec:gt ''brother'', ''start''">Kolka</a> is sitting in the armchair, playing on his phone.'
				elseif momloc = 19:
					'Your younger brother <a href="exec:gt ''brother'', ''start''">Kolka</a> is sitting in the armchair, playing on his phone.'
				elseif sdadloc = 10:
					'Your younger brother <a href="exec:gt ''brother'', ''start''">Kolka</a> is sitting in the armchair, playing on his phone.'
				else
					'Your younger brother <a href="exec:gt ''brother'', ''start''">Kolka</a> is sitting on the sofa, playing video games.'
				end
			end

			if sdadloc = 10:
				ocpd_room = 1
				if momloc = 19:
					''
				else
					'Your <a href="exec:gt ''father''">stepfather</a> is sitting on the sofa, watching TV.'
				end
			end
		end

		if $loc = 'gschool_grounds':
			if week = 5 and kolloc = 6:
				'You wonder if your <a href="exec:gt ''brother'', ''start''">brother</a> is one of the kids yelling.'
			elseif (week < 6 and kolloc = 6) or ((week >= 6 or kanikuli > 0) and kolloc = 9):
				'You see your <a href="exec:gt ''brother'', ''start''">brother</a> play football by the field near the school.'
			end
		end
	end
end

if $loc = 'sitrPar': act 'Sit on the sofa':gt 'family', 'sofa'

if $loc = 'sitrPar' and ocpd_room = 0 and momloc ! 24 and momloc ! 19:
	'No one else is here right now, so you''re free to use the room how you like.'
	gs 'exercise','start'
end

if $ARGS[0]='sofa':
	$menu_loc = 'family'
	$menu_arg = 'sofa'
	menu_off = 0
	$loc_arg = 'sofa'
	$loc = 'family'
	*clr & cla
	gs 'stat'
	'<center><img <<$set_imgh>> src="images/locations/pavlovsk/resident/apartment/home/sofa.jpg"></center>'
	''
	'<center>A small sofa bed, when not folded out into a bed, is just big enough for you to curl up on and take a nap.</center>'
	''
	act 'Watch TV':gt 'TV','pav'

	if ocpd_room = 0 and pornMagazine > 0:
		'<br>There is a porn magazine under the sofa cushions'
		gs 'events', 'read_porn'
		if pcs_horny >= 50:
			act 'Masturbate':gt 'selfplay', 'start'
		end
	end

	gs 'events', 'read'
	gs 'family'

	if ocpd_room = 0:
		act 'Take a nap (1:00)':
			if pcs_sleep < 90:
				pcs_sleep += 10
				pcs_health += 5
				minut += 60
				gs 'stat'
				'You sleep about an hour.'
			else
				minut += 5
				gs 'stat'
				'You are not tired enough to sleep, even for a short nap.'
			end
		end
	end
	act 'Get up':gt 'sitrPar'
end

--- family ---------------------------------

