import random

thisdict = {
    "Eeveelution1": "Eevee",
    "Eeveelution2": "Jolteon",
    "Eeveelution3": "Flareon",
    "Eeveelution4": "Vaporeon",
    "Eeveelution5": "Espeon",
    "Eeveelution6": "Umbreon",
    "Eeveelution7": "Leafeon",
    "Eeveelution8": "Glaceon",
    "Eeveelution9": "Sylveon"
}

secret = random.choice(list(thisdict))
Eeveelution = thisdict[secret]

story_nodes = {
    "start": {
        "text": "You wake up on a stage a single spotlight is on.",
        "choices": {
            "1": "Inspect Canvas",
            "2": "Try to leave"
        }
    },
    "Inspect Canvas": {
        "text": "You inspect the canvas, it's dry and rough, there's a sillouette of something...",
        "choices": {
            "1": "Inspect Sillouette"
        }
    },
    "Try to leave": {
        "text": "Try to to leave, it doesn't budge. yet you try relentlessly, you black out from exaustion.",
        "choices": {
            "1": "start"
        }
    },
    "Inspect Sillouette": {
        Eeveelution:{
            "Umbreon": "It looks sleek and quadrupedal with oval like ears. It begins to glow in some places and it looks a little... intimidating.",
            "Espeon": "It looks sleek and quadrupedal, there's a tail that forks at the end. It's cat-like eyes glow light blue and you feel a presense inside your head.",
            "Flareon": "It looks quadrupedal, but there's large, fluffy area's that break up the sleek look. You feel as if the tempearture just... rose.",
            "Eevee": "It's rather small... it's got a rather fluffy neck too. It's running around behind the canvas like a playful puppy, it's rather cute!",
            "Leafeon": "It looks like a plant, there's small bit's missing from it's ears and tail. The air smells of clean air and... freshly cut grass?",
            "Glaceon": "It looks sleek and quadrupedal, it' has some loose flaps that look like bangs that are diamond shaped, much like it's ears and tail. You feel is aif the temperature just... dropped.",
            "Sylveon": "It looks sleek and quadrupedal, there are what looks like ribbons drifting gracefully around it's body. You start feeling... much less panicked than you were when you woke up.",
            "Vaporeon": "It looks sleek and quadrupedal, it kinda looks like a fish. You feel the canvas and it's damp, you could've sworn the canvas was dryer last time you felt it!",
            "Jolteon": "It's mane looks spiky, and it's tail(...?) is too. You felt a mild shock hit your finger when you try to touch the canvas."
        }
    }
}


current_node_id = "start"


def play_story(start):
    current_node_id = start
    while current_node_id in story_nodes:
        # Initialize the game at the starting story node

        node = story_nodes[current_node_id]
        print("\n" + node["text"] if "text" in node else "\n" + node[Eeveelution][Eeveelution])
        
        # If there are no choices, the story has ended
        if "choices" not in node:
            print("\nLooks like a...", Eeveelution, "how neat!")
            if Eeveelution=="Flareon":
                print("\nA short and fluffy fella!")
            elif Eeveelution=="Leafeon":
                 print("\nOh wait, it's a plant.")
            elif Eeveelution=="Eevee":
                print("\nA hyperactive child!")
            elif Eeveelution=="Umbreon":
                print("A mysterious fella.")
            elif Eeveelution=="Sylveon":
                print("Looks like a fairy!")
            elif Eeveelution=="Glaceon":
                print("Looks as if it got STANDARDS that must be met.")
            elif Eeveelution=="Vaporeon":
                print("Fish.")
            elif Eeveelution=="Jolteon":
                print("Cool! Living 10,000V power bank!")
            else:
                print("Looks like an alien!")
            break
            
        # Display choices to the user
        print("\nWhat do you do?")
        for key, next_node in node["choices"].items():
            print(f"[{key}] Go to {next_node}")
            
        # Get user input
        choice = input("\nEnter your choice: ").strip()
        
        if choice in node["choices"]:
            current_node_id = node["choices"][choice]
        else:
            print("Invalid choice, try again.")

play_story(current_node_id)
