From 3868664905ce279ef69733486367247fd60318a4 Mon Sep 17 00:00:00 2001 From: Felix <172711650+Mzachky@users.noreply.github.com> Date: Sat, 9 May 2026 21:05:31 +0100 Subject: [PATCH] Create devcontainer.json import random def play_game(): # 1. Setup the initial state inventory = ["Flashlight"] hp = 100 print("--- Ghost Hunter: Inventory Edition ---") print(f"You start your hunt with: {inventory}") # Scene 1: Finding an item print("\nExploring the old cabin, you see a jar of [SALT] on a shelf.") action = input("Do you take it? (YES/NO): ").strip().upper() if action == "YES": inventory.append("Salt") print(f"Inventory updated: {inventory}") # Scene 2: The Ghost Encounter print("\nA spirit blocks the exit! Its eyes glow red.") if "Salt" in inventory: print("\nYou quickly throw the Salt on the floor, creating a barrier!") print("The ghost cannot cross. You escape safely. YOU WIN!") else: print("\nYou have nothing to protect yourself!") damage = random.randint(50, 80) hp -= damage print(f"The ghost strikes! You took {damage} damage. HP is now {hp}.") if hp <= 0: print("You didn't survive the night...") else: print("You crawled away, but the haunt continues...") if __name__ == "__main__": play_game() --- .devcontainer/devcontainer.json | 36 +++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000000..18e44b3c23 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,36 @@ +{def start_hunt(): + print("--- Forest Ghost Mysteries: The Close Call ---") + print("You are deep in the Blackwood Forest with your thermal camera.") + print("Suddenly, the temperature drops and a faint whisper calls your name...") + + # First Choice + choice1 = input("\nDo you [RUN] back to the van or [INVESTIGATE] the sound? ").strip().upper() + + if choice1 == "INVESTIGATE": + investigate_path() + elif choice1 == "RUN": + print("\nYou trip over a root in the dark! The ghost catches up. Game Over.") + else: + print("\nIndecision is fatal in the forest. The ghost disappears, and so do you.") + +def investigate_path(): + print("\nYou shine your light toward an ancient oak tree.") + print("A shadowy figure emerges! It's a Ghost Attack!") + + # Second Choice + choice2 = input("\nDo you use your [SALT] circle or try to [TALK] to it? ").strip().upper() + + if choice2 == "SALT": + print("\nThe ghost recoils from the salt barrier! You survived the close call.") + print("CONGRATULATIONS, GHOST HUNTER!") + elif choice2 == "TALK": + print("\nThe ghost wasn't looking for a conversation. You've been haunted! Game Over.") + else: + print("\nYou froze in fear. The mystery of the forest remains unsolved.") + +# This line starts the game +if __name__ == "__main__": + start_hunt() + "image": "mcr.microsoft.com/devcontainers/universal:2", + "features": {} +}