start = ''' Welcome! Please choose the side you'd like to fight for. ''' print(start) #Note-to-self: Inputs 'b' (BOSS), 'm' (Monster), 'f' (Farmer), and 'b' (Blacksmith) are broken. Troubleshoot them ASAP. Possible Reason: https://stackoverflow.com/questions/20445549/python-variable-not-defined-error-when-it-is #Note-to-self-2: Once the above issue is resolved (make sure to date the day it was fixed, future me), make sure to add an additional outcome that asks you to enter again if you don't enter a valid input, or else it'll break the script. #You may need a while-true loop to accomplish the above. print("Type 'one' to go on adventure one as a Monster. Type 'two' to go on adventure two as a Human.") #Prompt one. Choose adventure. user_input = input() if user_input == "one": #Adventure 1. Monster. print("Welcome to adventure one!") print("I'm your faithful guide, though you may call me what you wish. I'll be giving you options to choose from throughout your adventure.") print("You are a Monster, fighting in a war against the Humans. All you want is peace, but the Humans are too afraid to listen. Are you a BOSS Monster, or a regular Monster?") print("Enter 'b' if you are a BOSS Monster, or 'm' if you are a regular Monster.") user_input = input() if user_input == "b": #Adventure 1A. Boss Monster. print("You have chosen 'BOSS Monster'! Congratulations. You are among some of the most unique and powerful Monsters.") print("As a Monster, you have a natural preference for magic as opposed to material weapons. Choose your magic class.") print("Type 'f' for fire magic (elemental, offensive), 'g' for psychokinetic (anti-gravity, defensive) magic, or enter 'h' for healing (green, passive) magic.") #Critical Plot Point: The below outcomes are for choosing your species. if user_input == "f": print("You have selected fire magic. You are an elemental Monster, and specialize in raw magical energy. You are necessary for seizing submission from Humans, but are weak to many other elements.") elif user_input == "g": print("You have selected psychokinetic magic. You are a physical forces Monster and a conjurer of an object of choice. You have an excess arsenal of magical power, but little physical strength.") elif user_input == "h": print("You have selected healing magic. You are an empathetic Monster that would rather help than fight. You are mandatory to keep fighters on the front lines, but are often the first target of your opponents in combat.") print("Press 'a' to continue.") #Critical Plot Point: The below outcomes depict the actual start of the story. if user_input == "a": print("Day one. Five days to battle.") print("You, as a BOSS Monster, automatically have authority over other, daresay 'lesser' monsters. It is your job, thus, to wake up the troops in the morning. How will you wake them up?") print("Press 'k' for a kind and gentle wake-up call. Press 'r' for a rowdy, rude wake-up call.") if user_input == "k": print("The Monsters are a bit slower to get up as a result of your gently prodding voice, but your methods are successful none-the-less.") elif user_input == "r": print("The Monsters are practically tripping over themselves to get out of their tents. They seem a bit frazzled, and some disgruntled, but your methods are successful none-the-less.") if user_input == "m": #Adventure 2A. Regular Monster. print("You have chosen ''Monster'. Congratulations. You are among the majority of Monsters.") print("As a Monster, you have a natural preference for magic as opposed to material weapons. Choose your magic class.") print("Type 'f' for fire magic (elemental, offensive), 'g' for psychokinetic (anti-gravity, defensive) magic, or enter 'h' for healing (green, passive) magic.") if user_input == "f": print("You have selected fire magic. You are an elemental Monster, and specialize in raw magical energy. You are necessary for seizing submission from Humans, but are weak to many other elements.") elif user_input == "g": print("You have selected psychokinetic magic. You are a physical forces Monster and a conjurer of an object of choice. You have an excess arsenal of magical power, but little physical strength.") elif user_input == "h": print("You have selected healing magic. You are an empathetic Monster that would rather help than fight. You are mandatory to keep fighters on the front lines, but are often the first target of your opponents in combat.") print("Press 'a' to continue.") #Critical Plot Point: The below outcomes depict the actual start of the story. if user_input == "a": print("Day one. Five days to battle.") print("The BOSS Monsters have declared that it's time to get up for the day. Getting dressed and putting on your best smile, you walk out of your tent to greet your fellow soldiers.") #This is the divider between the two adventures. Rose, please do not write either story above or below the wrong line. elif user_input == "two": #Adventure 2. Human. print("Welcome to adventure two!") print("I'm your faithful guide, though you may call me what you wish. I'll be giving you options to choose from throughout your adventure.") print("You are a Human. Monsters have too much power, and you fear for the safety of your loved ones. Now tell me--are you a farmer, or are you a blacksmith?") print("Type 'f' for farmer, and 'bs' for blacksmith.") if user_input == "f": #Adventure 1B. Farmer. print("You have chosen 'farmer'! Congratulations. Here are your tools: a pitchfork, a small rucksack full of food, and dilapidated boots.") print("As a farmer, you are the majority of Humans fighting in the war. You must make sure that you're well trained in order to face any chance against the magic-wielding Monsters. Think of a number between one and five, and answer your response below.") print("As a farmer, you are the majority of Humans " "fighting in the war. You must make sure that you're " "well trained in order to face any chance against the " "magic-wielding Monsters. Think of a number between " "one and five, and answer your response below.") #Critical Plot Point: The below outcomes are for choosing your skill in your specialty. if user_input == "one": print("You have the lowest training out of all of the farmers. You will likely be placed on the front-lines, and are viewed as expendable.") elif user_input == "two": print("You have some training, but not a lot. You likely joined the war late. Your intelligence is acceptable at best, and you will probably be just behind the front lines.") elif user_input == "three": print("You have intermediate training and average intelligence. You may be asked to make some decisions on strategy, but will mostly be on the battlefield.") elif user_input == "four": print("Your training and knowledge is above average. You are likely a commander, and will direct many of the different war efforts.") elif user_input == "five": print("Your training and knowledge are supberb. You are vital to the Human war machine, and without you war efforts will likely fail.") print("Press 'a' to continue.") #Critical Plot Point: The below outcomes depict the actual start of the story. if user_input == "a": print("Day one. Five days to battle.") print("You have been readying for battle for a long time now. You have five days to finish preparations before it will be time for battle.") #Text needs to be here so that "elif" is not invalid syntax, or else this line of code thinks that the next line is the result of the user input. elif user_input == "bs": #Adventure 2B. Blacksmith. print("You have chosen 'blacksmith'! Congratulations. Here are your tools: a hammer, a small sack of apples, and a rusty musket.") print("As a blacksmith, you are responsible for making sure that the Humans are armed with weapons appropriate to take on magic-wielding Monsters. Think of a number between one and five, and enter your response below.") #Critical Plot Point: The below outcomes are for choosing your skill in your specialty. if user_input == "one": print("You are an apprentice, and probably don't make too many of the weapons, for fear of wasting necessary materials.") elif user_input == "two": print("You are a veteran apprentice. You probably make some low-quality weapons, but leave most of the work to the artisians.") elif user_input == "three": print("You are a rookie blacksmith, likely having recently graduated from apprenticeship. You make average weapons and may be sought out by front-line soldiers.") elif user_input == "four": print("You are a more experienced blacksmith. You have been smithing for years. You make above-average weapons, and likely will be sought out by more reputable soldiers.") elif user_input == "five": print("You have been blacksmithing for most of your life. Your swordsmanship and smithing is incredibly ahead of it's time. Your trade is expensive, but well respected and sought out by important military commanders.") print("Press 'a' to continue.") #The below outcomes depict the actual start of the story. if user_input == "a": print("Day one. Five days to battle.") print("You have been readying for battle for a long time now. You have five days to finish preparations before it will be time for battle.")
Run
Reset
Share
Import
Link
Embed
Language▼
English
中文
Python Fiddle
Python Cloud IDE
Follow @python_fiddle
Browser Version Not Supported
Due to Python Fiddle's reliance on advanced JavaScript techniques, older browsers might have problems running it correctly. Please download the latest version of your favourite browser.
Chrome 10+
Firefox 4+
Safari 5+
IE 10+
Let me try anyway!
url:
Go
Python Snippet
Stackoverflow Question