:: intro_tg[event]
<<image 'system/1_openings/tg/mysteryMan.jpg'>>
<<set _nations = ['France','Germany','Russia','UK','USA','somewhere else']>>
<<set _playerNation = _playerNation ?? 'Germany'>>

<p>
	You are <<textbox "_playerNameFirst" 'Alexander'>> <<textbox "_playerNameLast" 'Peters'>>,
	a <<numberbox "_playerAge" 42>> years old man from <<listbox "_playerNation" autoselect>><<optionsfrom _nations>><</listbox>>.
</p>

<p>
	Right now, you are spending your holidays visiting St. Petersburg and the surrounding areas.
</p>

<<act 'Next'>>
	<<if _playerAge < 18 or _playerAge > 120>>
		<<msg 'Please enter a valid age in the range 18-120.'>>
	<<else>>
		<<set $npc('playerOldSelf').gender = 0>>
		<<set $npc('playerOldSelf').defaults = ['defaults']>>
		<<set $npc('playerOldSelf').firstname = _playerNameFirst>>
		<<set $npc('playerOldSelf').lastname = _playerNameLast>>
		<<set $npc('playerOldSelf').ageRaw = _playerAge>>
		<<set $npc('playerOldSelf').nationality = _playerNation>>
		<<gt 'intro_tg_train'>>
	<</if>>
<</act>>

:: intro_tg_train[event]
	<<image 'system/1_openings/tg/train.jpg'>>
	<p>
		For today, you decided to visit the city of Pavlovsk to take a look at the palace there.
	</p>
	<p>
		The train ride there was a tedious affair.
		The old, worn-out train creaked and groaned as it chugged along the tracks,
		its rhythmic sound creating a constant drone in the air.
		The scenery outside the windows offered little to capture the attention of the weary passengers.
		The train's interior was equally unremarkable, with faded, threadbare seats that offered little comfort.
		The occasional jolt and bump reminded passengers of the train's age and lack of maintenance.
		Time seemed to stretch endlessly, each passing minute feeling like an eternity as the train sluggishly made its way towards Pavlovsk.
	</p>
	<p>
		And then the train stops in the middle of nowhere.
		At first you think that something must have broken down, but then you realize that the pathway next to the train is a rudimentary train plattform
		and that this is actually a scheduled stop.
		Apparently, this is the small village of Gadukino.
	</p>
	<<act 'Wait'>>
		<<gt 'intro_tg_sveta'>>
	<</act>>

:: intro_tg_sveta[event]
	<<image 'system/1_openings/tg/girl.jpeg'>>
	<p>
		A teenage girl, enters the compartment and, after briefly smiling at you and the other two people here, sits down on a seat next to a window.
		She is around the age of 16 to 19 years.
	</p>
	<<set _tempPCAge = $npc('playerOldSelf').ageRaw>>
	<p>
		You don't know what it is, but she has it.
		It feels like you've known her for all her life yet she is a stranger.
		<<if _tempPCAge < 22>>
			Maybe you should just talk to her? After all, you're not that much older than she is.
		<<elseif _tempPCAge < 30>>
			Talking to her might be deemed inappropriate. After all, you are quite a bit older than she is. But maybe that is a risk worth taking?
		<<elseif _tempPCAge < 40>>
			Talking to her might be deemed inappropriate. After all, you are almost twice her age. But maybe that is a risk worth taking?
		<<elseif _tempPCAge < 60>>
			You feel compelled to talk to her. But what would you say? After all, you are old enough to be her father.
		<<elseif _tempPCAge < 80>>
			You feel compelled to talk to her. But what would you say? After all, you are old enough to be her grandfather.
		<<else>>
			You feel like you need to talk to her. There's no need to worry, due to your high age you could claim to have senile dementia if she deems the approach inappropriate.
		<</if>>
	</p>
	<<act 'Talk to her'>>
		<<gt 'intro_tg_crash'>>
	<</act>>

:: intro_tg_crash[event]
	<<image 'system/1_openings/tg/crash.jpg'>>
	<p>
		You stand up to go over to the girl.
		Just as you are close enough for her to realize your intend and turn her head, it happens.
	</p>
	<p>
		The train jolts violently as a deafening screech filled the air.
		Panic spreads through the carriage as passengers clung desperately to anything within reach.
		The impact is jarring, causing the windows to shatter and sending shards of glass flying.
		The screeching and grinding of metal fills the air, drowning out all other sounds.
		The train lurches sideways, tilting at an alarming angle, as if defying gravity for a split second before crashing onto its side.
		Screams of terror and cries for help fill the air.
	</p>
	<p>
		The last thing you realize is that you are lying on top of the lifeless body of the girl you just wanted to talk to.
		Then everything turns dark.
	</p>
	<<act 'Darkness...'>>
		<<gt 'intro_tg_wakeup'>>
	<</act>>

:: intro_tg_wakeup[event]
	<<timed 4s>>
		Peep.
	<<next 3s>>
		Peep.
	<<next 2s>>
		Peep.
	<<next 1s>>
		Peep.
	<<next 1s>>
		Peep.
	<<next 1s>>
		Peep.
	<<next 1s>>
		Peep.
	<<next 1s>>
		Peep.
	<<next 1s>>
		<<gt 'intro_tg_doctor'>>
	<</timed>>

:: intro_tg_doctor[event]
	<<image 'system/1_openings/tg/doctor.jpg'>>
	<p>
		As consciousness slowly returned, the world around you seemed hazy and disorienting.
		The soft hum of medical equipment and the sterile scent of disinfectant fills the air, signaling that you are in a hospital.
		Your body aches with a dull, throbbing pain.
		Even opening your eyes feels like a chore.
		The sterile white walls add to the surreal atmosphere.
		A middle-aged doctor approaches, his kind eyes offering a glimmer of comfort amidst the unfamiliarity.
	</p>
	<p>
		"Good morning. I'm Dr. Volkov, and I'm glad to see you awake."
		<<if $npc('playerOldSelf').nationality != 'Russia'>>
			Weird, since when do you understand Russian as if it were your native language?
		<</if>>
		"You've been in a coma for almost a week, but your progress has been remarkable.
		Let me assure you that you are safe and receiving the best care possible.
		You may be feeling disoriented and overwhelmed right now, and that's completely normal given the circumstances, Miss."
	</p>
	<p>
		Disoriented? He seems to be the one who is disoriented. Did he really just call you "Miss"?
		Why would he do so?
		Is there something that could have misled him?
	</p>
	<<act 'Look at your body'>>
		<<gt 'intro_tg_inspect'>>
	<</act>>


:: intro_tg_inspect[event]
	<<image 'system/1_openings/tg/inspect.png'>>
	<p>
		Even before you dared to look down, you felt it: an unfamiliar weight on your chest.
		You explored the feeling with your hands and, to your shock, discovered that you had breasts now.
		Starting to hyperventilate, you ran your hands down your body, barely recknognizing the lack of body hair and the soft skin.
	</p>
	<p>
		And, sure enough, it was gone!
		Your manhood, your pride, your penis, wasn't there anymore!
		It had been replaced with... yes, it feels exactly like a vagina.
		And not just on the tips of your fingers, you feel them touching yourself as well.
		You start to panic, as everything goes dark again.
	</p>
	<<act '...'>>
		<<gt 'intro_tg_mirror'>>
	<</act>>

:: intro_tg_mirror[event]
	<<image 'system/1_openings/tg/mirror.webp'>>
	<p>
		As you wake up, you see the doctor again.
		"I am sorry, Miss, we had to sedate you. Apparently, the stress from the crash is still a little much.
		At least I can assure you that your body is almost healed and you haven't suffered any permanent damage."
		He helps you up and leads you to a big mirror which allows you to inspect your whole body.
	</p>
	<p>
		As you gaze into the mirror, a mix of shock and disbelief washes over you.
		You have been transformed into a woman
		And not just any woman.
		You have the body from the girl you've seen at the train!
		With hesitant hands, you begin to explore your new body, trying to comprehend the changes that had occurred.
	</p>
	<p>
		You delicately trace the contours of your face, noting the softer features, the subtle curves that now defined your cheeks and jawline.
		Your eyes, once sharp and intense, now seem to hold a gentler, more enigmatic allure.
	</p>
	<p>
		Moving downward, your hands hesitantly explore your neck and shoulders,
		noting the grace and elegance that seemed to have replaced the broader,
		more angular frame of your previous self.
		Your fingertips trace the collarbones, now delicate and more pronounced, leading to a chest that is fuller, with a gentle curve that had not been there before.
	</p>
	<p>
		Taking a deep breath, you cautiously run your hands across your new breasts,
		feeling a mix of fascination and apprehension.
		Their weight and sensitivity are entirely alien sensation.
	</p>
	<p>
		Continuing the exploration,
		your hands move down to your waist,
		once straight and unyielding, now curving slightly, accentuating your new femininity.
		You follow the curve of your hips, realizing the subtle shift in your center of gravity.
	</p>
	<p>
		Finally, your hands reach your lower body, where you experience the absence of your member again.
		It was replaced with a different anatomy, one that evoked a sense of shock confusion, but at the same time also wonder and curiosity.
	</p>
	<<actCLA 'I need to reverse this'>>
		<<image 'system/1_openings/tg/mirror.webp'>>
		<p>
			Something has given you this new body.
			And certainly there is a way to reverse it!
			Maybe you should find your old body first.
			You assume the girl who originally owned this body likely has it now.
		</p>
		<<act 'Ask about your old self'>>
			<<gt 'intro_tg_askAboutOldBody'>>
		<</act>>
	<</actCLA>>
	<<actCLA "That's actually not too bad">>
		<<image 'system/1_openings/tg/mirror.webp'>>
		<p>
			All in all, that's not too bad.
			You could easily learn to live like this.
			But what about the original owner of this body?
			Is she in your body now?
		</p>
		<<act 'Ask about your old self'>>
			<<gt 'intro_tg_askAboutOldBody'>>
		<</act>>
	<</actCLA>>
:: intro_tg_askAboutOldBody[event]
	<<image 'system/1_openings/tg/doctor.jpg'>>
	<p>
		As the doctor leads you back to your bed, you ask him about the whereabouts of your old body, giving him every detail you can think of.
	</p>
	<p>
		"I am sorry, Miss, but we have no record of anybody matching your description.
		And we have treated every passenger who survived the crash.
		I am afraid, the person you are looking for is not be amonst them."
	</p>
	<p>
		You only have a split second to realize what he has just said before he continues.
		"Anyways, we have contacted your mother. She will be here in a few minutes to pick you up. You are safe to go home now."
	</p>
	<p>
		Your mother... wait, no, of course it would be the girls' mother.
		How would you even reckognize her?
	</p>
	<<act 'Wait'>>
		<<gt 'intro_tg_mother'>>
	<</act>>
:: intro_tg_mother[event]
	<<image 'system/1_openings/tg/mum.jpg'>>
	<p>The doctor leaves you after wishing you farewell.</p>
	<p>You don't have to wait long before a woman enters the room. She appears to be in her thirties and smiles at you.</p>
	<<act '<i>Hello ... nurse?</i>'>>
		<<gt 'intro_tg_mother2'>>
	<</act>>
	<<act '<i>Hello ... dear sister?</i>'>>
		<<gt 'intro_tg_mother2'>>
	<</act>>
	<<act '<i>Hello ... Olga?</i>'>>
		<<gt 'intro_tg_mother2'>>
	<</act>>

:: intro_tg_mother2[event]
	<<set $npc_father = 'A28'>>
	<<set $npc_mother = 'A29'>>
	<<set $npc_aunt = 'A30'>>
	<<set $npc_sister = 'A33'>>
	<<set $npc_brother = 'A34'>>
	<<image 'system/1_openings/tg/mum.jpg'>>
	<p>
		She still smiles at you.
		"No, silly, it's me, your mother. I am so happy you are awake. The doctors said... nevermind, the only thing important is that you are healthy.".
	</p>
	<p>
		She takes a closer look at you.
		"You really don't remember me? That's fine. The doctors said something like this could happen. I'm sure your memory will be back in no time."
	</p>
	<p>
		"Your name is <<textbox "$pc.name_first" $pc.name_first>> <<textbox "$pc.name_last" $pc.name_last>>,
		but friends and family call you <<textbox "$pc.name_nick" $pc.name_nick>>.
		My name is <<textbox "_motherName" $npc($npc_mother).firstname>> and we are living together with your stepfather,
		<<textbox "_fatherName" $npc($npc_father).firstname>>, in Pavlovsk."
	</p>
	<p>
		"<<textbox "_sisterName" $npc($npc_sister).firstname>> is your older sister. She also still lives at home,
		as does your younger half-brother, <<textbox "_brotherName" $npc($npc_brother).firstname>>."
	</p>
	<p>
		All these names mean nothing to you, but you guess that it would be best if you just pretended as if you were remembering.
		You slowly and make a acknowledging "Uhuhm.".
		This makes the woman smile brigthly. "See, you already remember your family.".
	</p>
	<p>
		"I think it's time to get home. You've been here for long enough. Luckily, you haven't missed school. There are still some days of the summer holidays left."
		Wait, what? You have to go to school?!
	</p>
	<<act 'Leave Hospital'>>
		<<run $time.initTime(2018,8,28,9,0)>>
		<<set _kolkasBirthday = new Date($pc.birthdayDate.getTime())>>
		<<run _kolkasBirthday.setDate(_kolkasBirthday.getDate() + 280 + rand(0,30)+rand(0,30))>><!-- roughly 9-11 months difference -->
		<<set $npc('A34').birthday = _kolkasBirthday>>
		<<gs 'intro_initialization'>>
		<<gs 'init_post_intro'>>

		<<gt 'bedrPar'>>
	<</act>>
