# ============================================================
# Pattern 7: Player Text Input Drives Next Timeline
# ============================================================
# The player types text that gets stored in a variable.
# That variable then determines what happens next.
# ============================================================

label start

join Miko center
join Advisor right

Advisor (pl5): This pattern captures player text input\
and uses it to personalize the next timeline.

Miko (smile): Let me ask you something...

[wait time="0.5"]

[text_input text="What is your name, traveler?" var="Gym.player_name" placeholder="Enter your name..." default="Hero" allow_empty="false"]

Miko (joy): {Gym.player_name}? What a great name!

[wait time="0.5"]

Miko (neutral): Now watch — I can use your name to route you to\
different content.

if {Gym.player_name} == "Miko":
    Miko (surprise): Wait... that's MY name!
    Advisor (surprise): An impostor? Or a coincidence?
    Miko (anger): I'll be watching you, {Gym.player_name}...
elif {Gym.player_name} == "Hero":
    Miko (smile): Classic choice. Very heroic!
    Advisor (pl5): Predictable, but reliable.
else:
    Miko (joy): {Gym.player_name}, that's unique! I've never heard that before.
    Advisor (pl5): A name to remember.

[wait time="1.5"]

Advisor (pl5): In a real game, the name would persist across ALL timelines.
Advisor (pl5): You could reference `{Gym.player_name}` in any dialog.
Miko (smile): NPCs could greet you by name, quest logs would use it...

[wait time="1.0"]

jump gym_main/menu
