# begin
gs 'din_pav'
gs 'dinSex2'
gs 'dina'
gs 'din_van'
gs 'din_bad'
gs 'obj_din'
gs 'BanSexType'

!{cycle start}
daylastperiod = daystart
temprand = rand(0,3)
if temprand = 0:
	cycle = 0
	mesec = rand(1,120)
	EggRH = 0
	FocH = 0
	unfertegg = 0
	ferteggage = 0
	Ovulate = 0
	LutH = 0
	daylastperiod -= (96-mesec)/24
elseif temprand = 1:
	cycle = 1
	EggRH = rand(1,149)
	FocH = EggRH
	mesec = 0
	unfertegg = 0
	ferteggage = 0
	Ovulate = 0
	LutH = 0
	daylastperiod -= 4+(FocH/24)
elseif temprand = 2:
	cycle = 2
	unfertegg = 1
	ferteggage = rand(0,44)
	Ovulate = (rand(24,44) - ferteggage)
	if Ovulate <= 0: Ovulate = 1
	mesec = 0
	EggRH = 0
	FocH = 0
	LutH = 0
	daylastperiod -= 10+(ferteggage/24)
elseif temprand = 3:
	cycle = 3
	LutH = rand(0,300)
	ferteggage = 36 + LutH
	mesec = 0
	EggRH = 0
	FocH = 0
	unfertegg = 0
	Ovulate = 0
	daylastperiod -= 10+(ferteggage/24)
end
temp[1] = daystart-daylastperiod
$cycreport_txt = 'It has been <<temp[1]>> days since you last had a period.'
if menoage <= 0:
	menoage = rand(40,50)
	temprand = rand(0,10)
	if temprand = 0:
		menoage += rand(0,5)
	elseif temprand < 4:
		menoage += rand(3,10)
	elseif temprand < 9:
		menoage += rand(5,12)
	else
		menoage += rand(7,13)
	end
end

'<center><b><font color="maroon">CHOOSE GAME START</font></b></center>'
*nl
'<b>Original Start:</b>'
'You are Michael Kuznetsov, a fairly average, 35 year old businessman whose life is about to be turned inside out. Features magic and an (incomplete) over-arching plot. Beware of unintelligible translations.'
*nl
'<b>Alternate Start:</b>'
'You are a 15 or 16 year old small-town girl with another year of school remaining. Name and starting stats are customizable, no magic and no major ''plot'' other than <i>life</i>. Not to say that your classmates and family don''t have their own stories, though!'
*nl
'<b>Cursed schoolgirl Start:</b>'
'You are a 15 or 16 year old small-town girl with another year of school remaining. Name and starting stats are customizable. Includes magic and the (incomplete) plot from original start, plus all the family and classmate events from the alternate start.'

act '<center><b>Original start</b></center>':
	cla
	act '<center>Show intro (recommended)</center>':
		cla
		music_on = 0
		showstat 1
		showobjs 1
		addobj 'Player'
		gt 'roomPRE'
	end
	act '<center>Skip intro (seen it before)</center>':
		music_on = 0
		gs 'begin1'
		gt 'street'
	end
end

act '<center><b>Alternate Start</b></center>':
	cla
	MagikDostup = 1
	gt 'alterStart'
end

act '<center><b>Cursed Schoolgirl Start</b></center>':
	cla
	altQS = 1
	gt 'alterStart'
end

if $ARGS[0] = 'real_character':
	cls
	cla
	'<center><b><font color = maroon>CHARACTER SELECTION</font></b></center>'
	'<center><img src="images/pic/character_creation.jpeg"></center>'
	*nl
	'This game has the ability to create your own character.'
	'To do this, replace the image "<a href="exec:view''avatar.jpg''">avatar</a>" in the root folder of the game with a file of the same name and format JPEG (.jpg). That''s it!'
	'Please note, this choice is given only once and you will not be able to change it without starting a new game! Also in-game changes to hair color, length etc. will not affect the displayed image if you are using a custom one.'
	'This function is made solely to simplify things for those that want to use a custom image without having to sort through hundreds of pictures.'
	'Your selected image is your own personal choice, and is based on your personal preferences. By default, the game uses an avatar image from the site wikimedia.org.'
	act'<center><b>Start a standard character</b></center>':
		cla
		cls
		gt'begin'
	end
	act'<center><b>Customize your character</b></center>':
		cla
		cls
		player_avatar = 1
		glacol = 1
		glaraz = 2
		hcol = 1
		lip = 2
		gt'begin','description_real_character'
	end
end



$din_birthday_select = {
	cls
	cla
	'<center><b><font color = maroon>CHARACTER CUSTOMIZATION</font></b></center>'
	'<center><img src="images/pic/character_creation_pic1.jpg"></center>'
	'<center>Choose your date of birth:</center>'
	*nl
	if birthmonth = 2:
		monthdays = 28
	elseif birthmonth = 4 or birthmonth = 6 or birthmonth = 9 or birthmonth = 11:
		monthdays = 30
	else:
		monthdays = 31
	end

	if birthmonth > 12: birthmonth = 12
	if birthmonth < 1: birthmonth = 1
	if birthday < 1: birthday = 1
	if birthday > monthdays: birthday = monthdays

	if birthday < 10 and birthmonth < 10:
		'<center>Your birthday: <B>0<<birthmonth>>/0<<birthday>></B> (MM/DD)</center>'
	elseif birthday < 10 and birthmonth >= 10:
		'<center>Your birthday: <B><<birthmonth>>/0<<birthday>></B> (MM/DD)</center>'
	elseif birthday >= 10 and birthmonth < 10:
		'<center>Your birthday: <B>0<<birthmonth>>/<<birthday>></B> (MM/DD)</center>'
	elseif birthday >= 10 and birthmonth >= 10:
		'<center>Your birthday: <B><<birthmonth>>/<<birthday>></B> (MM/DD)</center>'
	end
	*nl
	'<center><a href="exec:birthday += 5 & dynamic $din_birthday_select">+5 Days</a></center>'
	'<center><a href="exec:birthday += 1 & dynamic $din_birthday_select">+1 Day</a></center>'
	'<center><a href="exec:birthday -= 1 & dynamic $din_birthday_select">-1 Day</a></center>'
	'<center><a href="exec:birthday -= 5 & dynamic $din_birthday_select">-5 Days</a></center>'
	'<center><a href="exec:birthmonth = 1 & dynamic $din_birthday_select">January</a></center>'
	'<center><a href="exec:birthmonth = 2 & dynamic $din_birthday_select">February</a></center>'
	'<center><a href="exec:birthmonth = 3 & dynamic $din_birthday_select">March</a></center>'
	'<center><a href="exec:birthmonth = 4 & dynamic $din_birthday_select">April</a></center>'
	'<center><a href="exec:birthmonth = 5 & dynamic $din_birthday_select">May</a></center>'
	'<center><a href="exec:birthmonth = 6 & dynamic $din_birthday_select">June</a></center>'
	'<center><a href="exec:birthmonth = 7 & dynamic $din_birthday_select">July</a></center>'
	'<center><a href="exec:birthmonth = 8 & dynamic $din_birthday_select">August</a></center>'
	'<center><a href="exec:birthmonth = 9 & dynamic $din_birthday_select">September</a></center>'
	'<center><a href="exec:birthmonth = 10 & dynamic $din_birthday_select">October</a></center>'
	'<center><a href="exec:birthmonth = 11 & dynamic $din_birthday_select">November</a></center>'
	'<center><a href="exec:birthmonth = 12 & dynamic $din_birthday_select">December</a></center>'
	act'<center><b>Done</b></center>':gt'begin','description_real_character'
}

$din_hcol = {
	hcol += 1
	if hcol > 3: hcol = 0
}

$avatar_hair = {
	avatar_hair = 1
	$av_hair = input("Enter a description of your hair:")
}

$din_hair_select = {
	cls
	cla
	'<center><b><font color = maroon>CHARACTER CUSTOMIZATION</font></b></center>'
	'<center><img src="images/pic/character_creation_pic1.jpg"></center>'
	*nl
	if hcol = 0 and curly <= 0:$hair = 'You have <a href="exec:curly = 1 & dynamic $din_hair_select">straight</a>, <a href="exec:dynamic $din_hcol & dynamic $din_hair_select">black</a> hair.'& $hair2 = 'black hair' & $hair3 = 'black hair'
	if hcol = 1 and curly <= 0:$hair = 'You have <a href="exec:curly = 1 & dynamic $din_hair_select">straight</a>, <a href="exec:dynamic $din_hcol & dynamic $din_hair_select">brown</a> hair.'& $hair2 = 'brown hair' & $hair3 = 'brown hair'
	if hcol = 2 and curly <= 0:$hair = 'You have <a href="exec:curly = 1 & dynamic $din_hair_select">straight</a>, <a href="exec:dynamic $din_hcol & dynamic $din_hair_select">red</a> hair.'& $hair2 = 'Red hair' & $hair3 = 'red hair'
	if hcol = 3 and curly <= 0:$hair = 'You have <a href="exec:curly = 1 & dynamic $din_hair_select">straight</a>, <a href="exec:dynamic $din_hcol & dynamic $din_hair_select">blonde</a> hair.'& $hair2 = 'blond hair' & $hair3 = 'blond hair'
	if hcol = 0 and curly > 0:$hair = 'You have <a href="exec:curly = 0 & dynamic $din_hair_select">curly</a>, <a href="exec:dynamic $din_hcol & dynamic $din_hair_select">black</a> hair.'& $hair2 = 'curls' & $hair3 = 'black curls'
	if hcol = 1 and curly > 0:$hair = 'You have <a href="exec:curly = 0 & dynamic $din_hair_select">curly</a>, <a href="exec:dynamic $din_hcol & dynamic $din_hair_select">brown</a> hair.'& $hair2 = 'curls' & $hair3 = 'blond curls'
	if hcol = 2 and curly > 0:$hair = 'You have <a href="exec:curly = 0 & dynamic $din_hair_select">curly</a>, <a href="exec:dynamic $din_hcol & dynamic $din_hair_select">red</a> hair.'& $hair2 = 'curls' & $hair3 = 'red hair'
	if hcol = 3 and curly > 0:$hair = 'You have <a href="exec:curly = 0 & dynamic $din_hair_select">curly</a>, <a href="exec:dynamic $din_hcol & dynamic $din_hair_select">blonde</a> hair.' &$hair2 = 'curls' & $hair3 = 'blond curls'
	'<center>Adjust your hair to match your <a href="exec:view''avatar.jpg''">avatar</a>. Please note that, at present, hair choices are overridden by your starting personality choice (e.g. volleyball players will always have straight blond hair).</center>'
	*nl
	if avatar_hair = 1:
		'<center>Please note that this choice is given only once and you will not be able to change it without starting a new game!</center>'
		'<center>You have <i><<$av_hair>>.</i> <a href="exec:avatar_hair = 0 & dynamic $din_hair_select">Revert to default</a>.</center>'
	else
		'<center><i><<$hair>></i> You may also <a href="exec:dynamic $avatar_hair & dynamic $din_hair_select">manually enter a description</a></center>.'
	end
	act'<center><b>Done</b></center>':gt'begin','description_real_character'
}

$din_glacol_select = {
	glacol += 1
	if glacol > 3: glacol = 0
}

$din_glaza_select = {
	cls
	cla
	'<center><b><font color = maroon>CHARACTER CUSTOMIZATION</font></b></center>'
	'<center><img src="images/pic/character_creation_pic1.jpg"></center>'
	*nl
if glacol = 0:$glacol = 'brown' & $glacol2 = 'brown'
if glacol = 1:$glacol = 'gray' & $glacol2 = 'gray'
if glacol = 2:$glacol = 'green' & $glacol2 = 'green'
if glacol = 3:$glacol = 'blue' & $glacol2 = 'blue'
if glass <= 0:$glass = '' & glassvnesh = 0
if glass = 1:$glass = ' You wear glasses.' & glassvnesh = 10
if glass = 2:$glass = ' You wear glasses.' & glassvnesh = 5
if resnic > 2:resnic = 2
if resnic = 0:$resnic = 'with short lashes'
if resnic = 1:$resnic = 'normal eyelashes'
if resnic = 2:$resnic = 'with long eyelashes'
if glaraz > 3:glaraz = 3
if glaraz = 0:$glaza = 'You have little <a href="exec:dynamic $din_glacol_select & dynamic $din_glaza_select"><<$glacol>></a> eyes, <<$resnic>>.<<$glass>>' & $glaza2 = '<<$glacol>> eyes' & $glaza3 = '<<$glacol2>> eyes'
if glaraz = 1:$glaza = 'You have expressive <a href="exec:dynamic $din_glacol_select & dynamic $din_glaza_select"><<$glacol>></a> eyes, <<$resnic>>.<<$glass>>' & $glaza2 = 'expressive <<$glacol>> eyes' & $glaza3 = 'expressive <<$glacol2>> eyes'
if glaraz = 2:$glaza = 'You have large <a href="exec:dynamic $din_glacol_select & dynamic $din_glaza_select"><<$glacol>></a> eyes, <<$resnic>>.<<$glass>>' & $glaza2 = 'big <<$glacol>> eyes' & $glaza3 = 'high <<$glacol2>> eyes'
if glaraz = 3:$glaza = 'You have huge <a href="exec:dynamic $din_glacol_select & dynamic $din_glaza_select"><<$glacol>></a> eyes, <<$resnic>>.<<$glass>>' & $glaza2 = 'great <<$glacol>> eyes' & $glaza3 = 'great <<$glacol2>> eyes'
	'<center>Adjust your eyes and eyelashes to match your <a href="exec:view''avatar.jpg''">avatar</a>. Please note, glasses choice may be overridden by your starting personality choice (e.g. bookworms/nerds will always start with glasses).</center>'
	*nl
	'<center><i><<$glaza>></i></center>'
	*nl
	if resnic < 2:'<center><a href="exec:resnic += 1 & dynamic $din_glaza_select">Lengthen lashes</a></center>'
	if resnic > 0:'<center><a href="exec:resnic -= 1 & dynamic $din_glaza_select">Shorten lashes</a></center>'
	if glaraz < 3:'<center><a href="exec:glaraz += 1 & dynamic $din_glaza_select">Larger eyes</a></center>'
	if glaraz > 0:'<center><a href="exec:glaraz -= 1 & dynamic $din_glaza_select">Smaller eyes</a></center>'
	if glass = 0 and glass < 2:'<center><a href="exec:glass = 2 & dynamic $din_glaza_select">Wear glasses</a></center>'
	if glass > 0 and glass <= 2:'<center><a href="exec:glass = 0 & dynamic $din_glaza_select">Remove glasses</a></center>'
	act'<center><b>Done</b></center>':gt'begin','description_real_character'
}

$din_lip_select = {
	cls
	cla
	'<center><b><font color = maroon>CHARACTER CUSTOMIZATION</font></b></center>'
	'<center><img src="images/pic/character_creation_pic1.jpg"></center>'
	*nl
if lip = 0:$lip = 'you have thin <<$lipbalmstat>> lips.' & $liptalk = 'thin lips' & $liptalk2 = 'thin lips' & $liptalk3 = 'thin lips'
if lip = 1:$lip = 'You have normal <<$lipbalmstat>> lips.' & $liptalk = 'soft lips' & $liptalk2 = 'delicate lips' & $liptalk3 = 'tender lips'
if lip = 2:$lip = 'You have plump <<$lipbalmstat>> lips.' & $liptalk = 'plump lips' & $liptalk2 = 'plump lips' & $liptalk3 = 'plump lips'
if lip = 3:$lip = 'You have large, <<$lipbalmstat>> full lips.' & $liptalk = 'full lips' & $liptalk2 = 'plump lips' & $liptalk3 = 'full lips'
if lip = 4:$lip = 'You have huge, thick <<$lipbalmstat>> lips.' & $liptalk = 'thick lips' & $liptalk2 = 'thick lips' & $liptalk3 = 'thick lips'
	'<center>Adjust the size of your lips to match your <a href="exec:view''avatar.jpg''">image</a>:</center>'
	*nl
	'<center><i><<$lip>></i></center>'
	*nl
	if lip < 4:'<center><a href="exec:lip += 1 & dynamic $din_lip_select">Bigger lips</a></center>'
	if lip > 0:'<center><a href="exec:lip -= 1 & dynamic $din_lip_select">Smaller lips</a></center>'
	act'<center><b>Done</b></center>':gt'begin','description_real_character'
}

if $ARGS[0] = 'description_real_character':
dynamic $din_hair_select
dynamic $din_lip_select
dynamic $din_glaza_select
	cls
	cla
	'<center><b><font color = maroon>CHARACTER CUSTOMIZATION</font></b></center>'
	'<center><img src="images/pic/character_creation_pic1.jpg"></center>'
	*nl
	'<center>On this screen, you may adjust your character''s description to match your <a href="exec:view''avatar.jpg''">avatar</a>. Please note, at present, hair color and glasses choice may be overridden by the personality choice you make during the game intro.</center>'
	*nl
  '<center>Customize your:</center>'
	!'<center>Your name is <B><i><<$name>> <<$surname>></B></i>. (You may change this during the intro, and also at the passport office in-game.)'
	'<center><a href="exec:dynamic $din_birthday_select">Birthday</a></center>'
	'<center><a href="exec:dynamic $din_hair_select">Hair</a></center>'
	'<center><a href="exec:dynamic $din_lip_select">Lips</a></center>'
	'<center><a href="exec:dynamic $din_glaza_select">Eyes</a></center>'
	act'<center><b>Done</b></center>':gt'begin'
end

--- begin ---------------------------------

