# anushka_konstantinov_schedule
!! 2023-05-26

!! Her schedule:
!AnushkaLocCity tells us where Anvushka is located
!! Todo make a text array to hold these values and use like AnushkaLocCityDes[locat['A144']] = String
!----------------------------------------------
!locat['A144'] = 0 (Anushka not home Fri and Sat 20:00 for rest of night)
!locat['A144'] = 1 (Anushka in the hallway)
!locat['A144'] = 2 (Anushka in her room)
!locat['A144'] = 3 (Anushka in Radomir''s room)
!locat['A144'] = 4 (Anushka in the kitchen)
!locat['A144'] = 5 (Anushka in the livingroom)
!locat['A144'] = 6 (Anushka in Valentin and Arkadi''s room)
!locat['A144'] = 7 (Anushka in the bathroom)
!locat['A144'] = 8 (Anushka is in the garage with the band Wed 18-23)
!locat['A144'] = 9 (Anushka is at the Coffee Hole working (week = 2 or week = 4 or week = 7) and hour >= 18) or (week = 5 and hour >= 10 and hour < 16))
!locat['A144'] = 10 (Anushka is at the University classes 09:00 to 15:00)
!locat['A144'] = 11 (Anushka is at the modeling studio First Sat of each month 8 to 16:00)
!locat['A144'] = 12 (Anushka is at the University Library Mon and Wed from 15:00 till 18:00)

!locat['A144'] = 20 Home, sleeping getting up in the morning and walking to school.
!locat['A144'] = 21 At school.
!locat['A144'] = 22 Hanging out near the school.
!locat['A144'] = 22 Home, accepting visitors or hanging out near the Five Eight Estate.
!locat['A144'] = 23 Out at an unspecified location in Pav.
!locat['A144'] = 24 Practicing with the band in the garage.
!locat['A144'] = 25 At the community center disco.
!locat['A144'] = 26 Travelling to or from the city to Pav.

!locat['A144'] = 30 On tour with the band

!---------------------------------------------

! City schedule
! Standard location is not at home which should be set at init
!locat['A144'] = 0
!!Anushka is home Mon from 18:00 for rest of night, Tues and Thurs from 15:00 till 18:00, Fri from 16:00 till 20:00, Sat from 08:00 till 20:00 (first Sat each month from 16:00 till 20:00), Sun from 08:00 till 17:00

!! Home is located in her bedroom (2)
! TODO: randomize the location inside home?

if yearstart = 1 and (month < 6 or year = 2016):
	!! Schedule for the first year of the game until just after school ends
	if week < 6:
		if hour < 8:
			locat['A144'] = 20
		elseif hour < 14:
			locat['A144'] = 21
		elseif hour < 15:
			locat['A144'] = 22
		elseif hour < 16:
			if locat['A144_rand1'] ! daystart:
				if rand(0,4) = 0:
					locat['A144'] = 23
				else
					locat['A144'] = 22
				end
				locat['144_rand1'] = daystart
				locat['144_save1'] = locat['144']
			else
				locat['144'] = locat['144_save1']
			end
		elseif hour < 18:
			if week =3:
				locat['A144'] = 24
			else
				if locat['A144_rand2'] ! daystart:
					if rand(0,1) = 0:
						locat['A144'] = 23
					else
						locat['A144'] = 22
					end
					locat['144_rand2'] = daystart
					locat['144_save2'] = locat['144']
				else
					locat['144'] = locat['144_save2']
				end
			end
		elseif hour < 20:
			if week = 3:
				locat['A144'] = 24
			else
				if locat['A144_rand3'] ! daystart:
					if rand(0,3) = 0:
						locat['A144'] = 23
					else
						locat['A144'] = 22
					end
					locat['144_rand3'] = daystart
					locat['144_save3'] = locat['144']
				else
					locat['144'] = locat['144_save3']
				end
			end
		elseif hour < 22:
			if week = 3:
				locat['A144'] = 24
			elseif week = 5:
				locat['A144'] = 25
			else
				if locat['A144_rand4'] ! daystart:
					if rand(0,3) = 0:
						locat['A144'] = 23
					else
						locat['A144'] = 22
					end
					locat['144_rand4'] = daystart
					locat['144_save4'] = locat['144']
				else
					locat['144'] = locat['144_save4']
				end
			end
		else
			if week = 5:
				locat['A144'] = 25
			else
				locat['A144'] = 20
			end
		end
	elseif week = 6:
		if hour < 9:
			locat['A144'] = 20	
		elseif hour< 13:
			if day < 8:
				locat['A144'] = 11
			else
				if locat['A144_rand1'] ! daystart:
					if rand(0,3) = 0:
						locat['A144'] = 23
					else
						locat['A144'] = 22
					end
					locat['144_rand1'] = daystart
					locat['144_save1'] = locat['144']
				else
					locat['144'] = locat['144_save1']
				end
			end
		elseif hour < 16:
			if day < 8:
				locat['A144'] = 11
			else
				if locat['A144_rand2'] ! daystart:
					if rand(0,1) = 0:
						locat['A144'] = 23
					else
						locat['A144'] = 22
					end
					locat['144_rand2'] = daystart
					locat['144_save2'] = locat['144']
				else
					locat['144'] = locat['144_save2']
				end
			end
		elseif hour < 18:
			if day < 8:
				locat['A144'] = 23
			else
				if locat['A144_rand3'] ! daystart:
					if rand(0,1) = 0:
						locat['A144'] = 23
					else
						locat['A144'] = 22
					end
					locat['144_rand3'] = daystart
					locat['144_save3'] = locat['144']
				else
					locat['144'] = locat['144_save3']
				end
			end
		elseif hour < 20:
			if locat['A144_rand4'] ! daystart:
				if rand(0,3) = 0:
					locat['A144'] = 23
				else
					locat['A144'] = 22
				end
				locat['144_rand4'] = daystart
				locat['144_save4'] = locat['144']
			else
				locat['144'] = locat['144_save4']
			end
		else
			locat['A144'] = 25
		end
	else
		if hour < 9:
			locat['A144'] = 20	
		elseif hour < 13:
			if locat['A144_rand1'] ! daystart:
				if rand(0,3) = 0:
					locat['A144'] = 23
				else
					locat['A144'] = 22
				end
				locat['144_rand1'] = daystart
				locat['144_save1'] = locat['144']
			else
				locat['144'] = locat['144_save1']
			end
		elseif hour < 17:
			if locat['A144_rand2'] ! daystart:
				if rand(0,1) = 0:
					locat['A144'] = 23
				else
					locat['A144'] = 22
				end
				locat['144_rand2'] = daystart
				locat['144_save2'] = locat['144']
			else
				locat['144'] = locat['144_save2']
			end
		elseif hour < 20:
			if locat['A144_rand3'] ! daystart:
				if rand(0,1) = 0:
					locat['A144'] = 23
				else
					locat['A144'] = 22
				end
				locat['144_rand3'] = daystart
				locat['144_save3'] = locat['144']
			else
				locat['144'] = locat['144_save3']
			end
		elseif hour < 22:
			if locat['A144_rand4'] ! daystart:
				if rand(0,3) = 0:
					locat['A144'] = 23
				else
					locat['A144'] = 22
				end
				locat['144_rand4'] = daystart
				locat['144_save4'] = locat['144']
			else
				locat['144'] = locat['144_save4']
			end
		else
			locat['A144'] = 20
		end
	end
elseif yearstart = 1 or (yearstart = 2 and month = 8 and day < 10):
	!! Schedule for the rest of the first year (and a week of the second) She is on tour with the band.
	locat['A144'] = 30
else
	!! Schedule for later uni years.
	if week = 1:
		! Monday
		if hour >= 9 and hour < 15:
			! Need an additional check: is the university open?
			locat['A144'] = 10
		elseif hour >= 15 and hour < 18:
			locat['A144'] = 12
		elseif hour >= 18 and hour <= 23:
			locat['A144'] = 2
		else
			locat['A144'] = 0
		end
	elseif week = 2:
		if hour >= 9 and hour < 15:
			locat['A144'] = 10
		elseif hour >= 15 and hour < 18:
			locat['A144'] = 2
		elseif hour >= 18 and hour <23:
			locat['A144'] = 9
		else
			locat['A144'] = 0
		end
	elseif week = 3:
		if hour >= 9 and hour < 15:
			locat['A144'] = 10
		elseif hour >= 15 and hour < 18:
			locat['A144'] = 12
		elseif hour >= 18 and hour < 23:
			locat['A144'] = 8
		else
			locat['A144'] = 0
		end
	elseif week = 4:
		if hour >= 9 and hour < 15:
			locat['A144'] = 10
		elseif hour >= 18 and hour <23:
			locat['A144'] = 9
		else
			locat['A144'] = 0
		end
	elseif week = 5:
		if hour < 9:
			locat['A144'] = 0
		elseif hour < 10:
			locat['A144'] = 10
		elseif hour < 16:
			locat['A144'] = 9
		elseif hour < 20:
			locat['A144'] = 2
		else
			locat['A144'] = 0
		end
	elseif week = 6:
		!(first Sat each month from 16:00 till 20:00)
		if day <= 7:
			if hour >= 8 and hour < 16:
				locat['A144'] = 11
			elseif hour >= 16 and hour < 20:
				locat['A144'] = 2
			else
				locat['A144'] = 0
			end
		else
			if hour <= 8 and hour < 20:
				locat['A144'] = 2
			else
				locat['A144'] = 0
			end
		end
	else
		if hour >= 18 and hour <23:
			locat['A144'] = 9
		else
			locat['A144'] = 0
		end
	end
end

if locat['A144'] > 0 and locat['A144'] < 8:
	$AnushkaLocCity = 'home'
else
	$AnushkaLocCity = 'notHome'
end

! Use this in the calendar app on Sveta''s phone Loop over an array there that holds NPC IDs she is allowed to see there, and for each ID call this function.
if $ARGS[0] = 'getLocation':
	!Set the text for the current NPC ID
	if locat['A144'] = 0:
		$npcLocation['A144'] = 'Anushka not home Fri and Sat 20:00 for rest of night'
	elseif locat['A144'] = 1: 
		$npcLocation['A144'] = 'Anushka in the hallway at her city apartment'
	elseif locat['A144'] = 2:
		$npcLocation['A144'] = 'Anushka in her room at her city apartment'
	elseif locat['A144'] = 3:
		$npcLocation['A144'] = 'Anushka in Radomir''s room at her city apartment'
	elseif locat['A144'] = 4:
		$npcLocation['A144'] = 'Anushka in the kitchen at her city apartment'
	elseif locat['A144'] = 5:
		$npcLocation['A144'] = 'Anushka in the livingroom at her city apartment'
	elseif locat['A144'] = 6: 
		$npcLocation['A144'] = 'Anushka in Valentin and Arkadi''s room'
	elseif locat['A144'] = 7:
		$npcLocation['A144'] = 'Anushka in the bathroom'
	elseif locat['A144'] = 8:
		$npcLocation['A144'] = 'Anushka is in the garage with the band Wed 18-23'
	elseif locat['A144'] = 9:
		$npcLocation['A144'] = 'Anushka is at her job at the The Coffee Hole'
	elseif locat['A144'] = 10:
		$npcLocation['A144'] = 'Anushka is at the University classes 09:00 to 15:00'
	elseif locat['A144'] = 11:
		$npcLocation['A144'] = 'Anushka is at the modeling studio First Sat of each month 8:00 to 16:00'
	elseif locat['A144'] = 12:
		$npcLocation['A144'] = 'Anushka is at the University Library Mon and Wed from 15:00 till 18:00'
	end
end

!! Get the current description for a journal entry
!! This function will create a text, already formatted, showing the current instruction to progress for this character. That means we can store all scheduling info here and there is no need to edit other files.
if $ARGS[0] = 'journal':

	! City quest 
	if anushkaCityQW['first_visit'] = 0:
		'You don''t know where she lives but you likely know her as you went to school with her.'
	elseif anushkaCityQW['first_visit'] = 1:
		'She told you where her apartment in they city is but you have not been there with her.'
	elseif anushkaCityQW['first_visit'] >= 2:
		'You have visited her at her apartment, you should visit her again.'
	end
	!anushka_konstantinov_schedule_journal & *nl
	if anushkaQW['kiss'] <= 5:
		'I think Anushka is really pretty and I would like to be more than just friends with her. Hopefully she will do more if we have done enough kissing.'
	elseif anushkaQW['kiss'] > 5:
		'Anushka is really pretty, I think I definitely want to go further than just kissing.'
	end

end

--- anushka_konstantinov_schedule ---------------------------------

