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

indorf = 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
if sister_indorf = 1:sisterHere = 0
''

if StoryLine = 1:

	if sisboyparty_day + 1 = daystart and hour > 18 and sisboypartyQW = 1:
		if sisboyparty = 1:sisboyparty = -1
			if sisboyparty = 2:
			cls
			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, <i>Oh well, hopefully he won''t be offended.</i>'
			act 'Move away':gt $loc, $metka
			exit
		end
	end

	if sister_indorf = 0:
		if $loc = 'bedrPar':
			sisterHere = 0
			sisterdialog = 1

			if hour < 7:
				sisterHere = 1
				'Your sister <a href="exec:gt ''sistersleep''">Anya</a> is asleep in her bed.'
			end

			if week >= 6:
				if hour >= 7 and hour < 10:
					sisterHere = 1
					'Your sister <a href="exec:gt ''sistersleep''">Anya</a> is asleep in her bed.'
				end

				if hour = 10:
					sisterHere = 2
					sisterdialog = 3
					'Your sister <a href="exec:GT ''sister''">Anya</a> is getting ready to go for a walk.'
				end
			end

			if hour >= 18 and sisboyparty_day + 1 ! daystart:
				sisterHere = 2
				'Your sister <a href="exec:gt ''sister''">Anya</a> is sitting on her bed, reading a book.'
			elseif sisboyparty_day + 1 = daystart and sisboyparty = -1 and hour = 22:
				cls
				minut += 5
				gs 'stat'
				'<center><img <<$set_imgh>> src="images/locations/pavlovsk/resident/rekshome/party/sisboyqwparty_6_<<rand(1,7)>>.jpg"></center>'
				'Drunk and disheveled, Anya bursts into the room.'
				'You notice that her hair, and all her clothes are smeared in sticky sperm.'
				'In this state, she falls on the bed and instantly falls asleep.'
				sisboyparty = 1
				act 'Move away':gt $loc
				exit
			elseif sisboyparty_day + 1 = daystart and hour >= 22:
				sisterHere = 1
				if sisboypartyQW = 1:sisboypartyQW = 2
				if sisboyparty = -1:sisboyparty = 1
				'Your drunken sister Anya is sound asleep in her bed.'
			end
		end
		if $loc = 'gdk':
			if week < 6:
				if hour >= 16 and hour < 18:
					'Your sister <a href="exec:GT ''sister'', ''gdk''">Anya</a> is sitting with a group of boys and girls, drinking beer.'
				end
			elseif week >= 6:
				if hour >= 11 and hour < 18:
					'Your sister <a href="exec:GT ''sister'', ''gdk''">Anya</a> is sitting with a group of boys and girls, drinking beer.'
				end
			end
		end		
	end

	if indorf = 0:
		if $loc = 'bedrPar2':
			if hour < 6 or hour >= 21:
				'Your mom and stepfather are sleeping on the bed.'

				if hour = 21:parsexrand = rand(0, 5)
			end
		end

		if $loc = 'sitrPar':
			if hour < 7 or hour >= 21:
				'Your younger brother <a href="exec:gt ''brother'', ''start''">Kolka</a> is sleeping on the couch.'
			end

			if week < 6:
				if father_go = 0:
					if hour >= 16 and hour < 21:
						'Your <a href="exec:gt ''father''">stepfather</a> is sitting on the couch, watching TV.'
					end
				end

				if hour >= 18 and hour < 20:
					if kanikuli > 0:
						'Your younger brother <a href="exec:gt ''brother'', ''start''">Kolka</a> is sitting on the couch, watching TV.'
					else
						'Your little brother <a href="exec:gt ''brother'', ''start''">Kolka</a> is sitting by the table and doing his homework.'
					end
				end
				if hour = 20:
					'Your younger brother <a href="exec:gt ''brother'', ''start''">Kolka</a> is sitting on the couch, watching TV.'
				end
			end

			if week >= 6:
				if father_go = 0:
					if hour >= 7 and hour < 21:'Your <a href="exec:gt ''father''">stepfather</a> is sitting on the couch, watching TV.'
				else
					if hour >= 7 and hour < 16:'Your <a href="exec:gt ''father''">stepfather</a> is sitting on the couch, watching TV.'
				end

				if hour >= 18 and hour <= 20:'Your younger brother <a href="exec:gt ''brother'', ''start''">Kolka</a> is sitting on the couch, watching TV.'
			end
		end

		if $loc = 'kuhrPar':
			gs 'dinmother'

			if mother_go = 0:
				if (week < 6 and hour >= 16 and hour < 21) or (week >= 6 and hour >= 7 and hour < 21):
					*pl dyneval($d_mother[rand(4,8)])
				end
			else
				if (week < 6 and hour >= 17 and hour < 21) or (week >= 6 and hour >= 7 and hour < 21 and hour ! 16):
					*pl dyneval($d_mother[rand(4,8)])
				end
			end
		end

		if $loc = 'korrPar':
			!! for future code I guess
		end

		if $loc = 'vokzalG':
			!! for future code I guess
		end

		if $loc = 'gschool_grounds':
			if (week < 6 and hour >= 14 and hour <= 17) or ((week >= 6 or kanikuli > 0) and hour >= 7 and hour <= 17):
				'You see your <a href="exec:gt ''brother'', ''start''">brother</a> play football by the field near the school.'
			end
		end
	end
end

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

