diff options
Diffstat (limited to 'rpg-super-hell.py')
| -rw-r--r-- | rpg-super-hell.py | 294 |
1 files changed, 294 insertions, 0 deletions
| diff --git a/rpg-super-hell.py b/rpg-super-hell.py new file mode 100644 index 0000000..da18c99 --- /dev/null +++ b/rpg-super-hell.py | |||
| @@ -0,0 +1,294 @@ | |||
| 1 | |||
| 2 | # print game name | ||
| 3 | |||
| 4 | |||
| 5 | print("====================================") | ||
| 6 | print() | ||
| 7 | print(" The Organ Braille ") | ||
| 8 | print() | ||
| 9 | print("====================================") | ||
| 10 | |||
| 11 | inventory = [] | ||
| 12 | |||
| 13 | # ask for player username | ||
| 14 | |||
| 15 | name = input("What is your name, Traveler? ") | ||
| 16 | |||
| 17 | # welcome them | ||
| 18 | |||
| 19 | |||
| 20 | print(f"Welcome to the game, {name}, I wish you the best of luck!") | ||
| 21 | |||
| 22 | |||
| 23 | answer = input("Do you wish to proceed further? ") | ||
| 24 | |||
| 25 | |||
| 26 | if answer.lower() == "no": | ||
| 27 | print("Well then, off you go!") | ||
| 28 | exit() | ||
| 29 | |||
| 30 | |||
| 31 | print("Choose your class!") | ||
| 32 | print("1. Knight") | ||
| 33 | print("2. Rogue") | ||
| 34 | print("3. Mage") | ||
| 35 | |||
| 36 | |||
| 37 | valid_class = False | ||
| 38 | |||
| 39 | |||
| 40 | while valid_class == False: | ||
| 41 | player_class = input("> ") | ||
| 42 | |||
| 43 | if player_class == "1": | ||
| 44 | print("A mighty knight you are! Move forward with pride!") | ||
| 45 | valid_class = True | ||
| 46 | elif player_class == "2": | ||
| 47 | print("A stealthy rogue, sneak between shadows and cut from behind!") | ||
| 48 | valid_class = True | ||
| 49 | elif player_class == "3": | ||
| 50 | print("A powerful mage, cast spells of fire and ice to batter your opponent!") | ||
| 51 | valid_class = True | ||
| 52 | else: | ||
| 53 | print("That isn't a class!") | ||
| 54 | |||
| 55 | if player_class == "1": | ||
| 56 | print("health - 150") | ||
| 57 | player_health = 1 | ||
| 58 | max_player_health = 1 | ||
| 59 | print("damage - 80") | ||
| 60 | player_damage = 5 | ||
| 61 | elif player_class == "2": | ||
| 62 | print("health - 80") | ||
| 63 | player_health = 1 | ||
| 64 | max_player_health = 1 | ||
| 65 | print("damage - 120") | ||
| 66 | player_damage = 12 | ||
| 67 | elif player_class == "3": | ||
| 68 | print("health - 130") | ||
| 69 | player_health = 1 | ||
| 70 | max_player_health = 1 | ||
| 71 | print("damage - 90") | ||
| 72 | player_damage = 6 | ||
| 73 | |||
| 74 | alchemist_shop = False | ||
| 75 | |||
| 76 | |||
| 77 | print("You procede along a small path towards a giant cave far in the distance.") | ||
| 78 | |||
| 79 | print("The cave was home to an evil dragon, the end goal of your quest is to slay him and save the kingdom!") | ||
| 80 | |||
| 81 | print("Will you procede forward to fight a Goblin or detour at the Alchemy shop?") | ||
| 82 | |||
| 83 | while alchemist_shop == False: | ||
| 84 | potioninq = input("Goblin or Alchemist? ") | ||
| 85 | |||
| 86 | |||
| 87 | if potioninq.lower() == "alchemist": | ||
| 88 | print("You say hello to the Alchemist and he gives you a potion and a small piece of bread for the road.") | ||
| 89 | inventory.append("Potion") | ||
| 90 | inventory.append("Bread") | ||
| 91 | alchemist_shop = True | ||
| 92 | elif potioninq.lower() == "goblin": | ||
| 93 | print("You procede forward to battle the goblin") | ||
| 94 | alchemist_shop = True | ||
| 95 | else: | ||
| 96 | print("That isn't an option!") | ||
| 97 | |||
| 98 | def battle(enemy_name, enemy_health, enemy_damage): | ||
| 99 | global player_health | ||
| 100 | global inventory | ||
| 101 | global max_player_health | ||
| 102 | global player_damage | ||
| 103 | import random | ||
| 104 | print(f"You enter a battle with a {enemy_name}!") | ||
| 105 | |||
| 106 | while player_health > 0 and enemy_health > 0: | ||
| 107 | item_selected = False | ||
| 108 | print("Select the number of the action you would like to do!") | ||
| 109 | print("1. Fight") | ||
| 110 | print("2. Item") | ||
| 111 | print("3. Run") | ||
| 112 | battle_selection = (input("> ")) | ||
| 113 | |||
| 114 | |||
| 115 | if battle_selection.lower() in ["1", "fight"]: | ||
| 116 | player_damage = random.randint( | ||
| 117 | player_damage - 15, | ||
| 118 | player_damage + 10 | ||
| 119 | ) | ||
| 120 | enemy_health = enemy_health - player_damage | ||
| 121 | print(f"You dealt {player_damage} to {enemy_name}") | ||
| 122 | print(f"{enemy_name} has {enemy_health} HP remaining!") | ||
| 123 | |||
| 124 | |||
| 125 | elif battle_selection.lower() in ["2", "item"]: | ||
| 126 | if not inventory: | ||
| 127 | print("Your inventory is empty!") | ||
| 128 | continue | ||
| 129 | else: | ||
| 130 | while item_selected == False: | ||
| 131 | print("Inventory") | ||
| 132 | for item in inventory: | ||
| 133 | print(f"- {item}") | ||
| 134 | |||
| 135 | |||
| 136 | itemselected = input("Use which item? Type exit to not use an item. ") | ||
| 137 | if itemselected.lower() == "potion": | ||
| 138 | if "Potion" in inventory: | ||
| 139 | inventory.remove("Potion") | ||
| 140 | player_health = player_health + 80 | ||
| 141 | print("You drank the Alchemists potion. You regained 80 Health.") | ||
| 142 | item_selected = True | ||
| 143 | if player_health > max_player_health: | ||
| 144 | player_health = max_player_health | ||
| 145 | else: | ||
| 146 | print("You do not have that!") | ||
| 147 | elif itemselected.lower() == "bread": | ||
| 148 | if "Bread" in inventory: | ||
| 149 | inventory.remove("Bread") | ||
| 150 | player_health = player_health + 50 | ||
| 151 | print("You ate the bread. You regained 50 Health.") | ||
| 152 | item_selected = True | ||
| 153 | if player_health > max_player_health: | ||
| 154 | player_health = max_player_health | ||
| 155 | elif itemselected.lower() == "witch's brew": | ||
| 156 | if "Witch's Brew" in inventory: | ||
| 157 | inventory.remove("Witch's Brew") | ||
| 158 | brewkill = random.randint(1, 2) | ||
| 159 | if brewkill >= 2: | ||
| 160 | player_health = max_player_health | ||
| 161 | print("You are healed fully by the Witch's Brew") | ||
| 162 | itemselected = True | ||
| 163 | elif brewkill <= 1: | ||
| 164 | print("The Witch's Brew eat and burns through your throat.") | ||
| 165 | print("You collapse slowly to the ground.") | ||
| 166 | print("Game over.") | ||
| 167 | exit() | ||
| 168 | elif itemselected.lower() == "exit": | ||
| 169 | itemselected = True | ||
| 170 | break | ||
| 171 | continue | ||
| 172 | elif battle_selection.lower() in ["3", "run"]: | ||
| 173 | print("You can't run, idiot.") | ||
| 174 | player_health = player_health - 15 | ||
| 175 | print("You tripped and took 15 damage.") | ||
| 176 | else: | ||
| 177 | print("Not an option!") | ||
| 178 | continue | ||
| 179 | |||
| 180 | |||
| 181 | if enemy_health > 0: | ||
| 182 | |||
| 183 | |||
| 184 | |||
| 185 | attack = random.randint(0, 1) | ||
| 186 | if attack == 0: | ||
| 187 | print("YOU DIED YOU SUCK EZ EZ EZ BUM LALALALALALA") | ||
| 188 | exit() | ||
| 189 | |||
| 190 | elif attack == 1: | ||
| 191 | print("You live to see another turn.") | ||
| 192 | |||
| 193 | battle("Goblin", 125, 15) | ||
| 194 | |||
| 195 | |||
| 196 | import random | ||
| 197 | |||
| 198 | |||
| 199 | player_gold = random.randint(0, 60) | ||
| 200 | |||
| 201 | |||
| 202 | print("You won! The goblin falls to the ground defeated.") | ||
| 203 | print() | ||
| 204 | print() | ||
| 205 | print("He points you down the path. Ahead was a small shop.") | ||
| 206 | print(f"The goblin gives you {player_gold} gold.") | ||
| 207 | print() | ||
| 208 | print() | ||
| 209 | print() | ||
| 210 | print("Down the path was a little shop. You stop inside.") | ||
| 211 | print("Spend your gold here!") | ||
| 212 | print("What would you like to buy?") | ||
| 213 | |||
| 214 | road_shop = False | ||
| 215 | |||
| 216 | |||
| 217 | while road_shop == False: | ||
| 218 | print(f"You have {player_gold} to spend!") | ||
| 219 | item_bought = input("Potion 35 Gold, Bread 20 Gold, Witch's Brew 80 Gold. Type exit to leave without buying anything. ") | ||
| 220 | |||
| 221 | |||
| 222 | if item_bought.lower() == "potion": | ||
| 223 | print("You bought a Potion!") | ||
| 224 | inventory.append("Potion") | ||
| 225 | player_gold = player_gold - 35 | ||
| 226 | print(f"You have {player_gold} gold left!") | ||
| 227 | |||
| 228 | elif item_bought.lower() == "bread": | ||
| 229 | print("You bought bread!") | ||
| 230 | inventory.append("Bread") | ||
| 231 | player_gold = player_gold - 20 | ||
| 232 | print(f"You have {player_gold} gold left!") | ||
| 233 | |||
| 234 | elif item_bought.lower() == "witch's brew": | ||
| 235 | print("You bought a bubbling Witch's brew!") | ||
| 236 | inventory.append("Witch's Brew") | ||
| 237 | player_gold = player_gold - 80 | ||
| 238 | print(f"You have {player_gold} gold left!") | ||
| 239 | |||
| 240 | elif item_bought.lower() == "exit": | ||
| 241 | print("You leave the shop after taking a look around.") | ||
| 242 | road_shop = True | ||
| 243 | |||
| 244 | else: | ||
| 245 | print("Not an option!") | ||
| 246 | |||
| 247 | |||
| 248 | print("You stumble across a man along the path after you leave the shop.") | ||
| 249 | print("He asks if you want to know about the path ahead of you.") | ||
| 250 | |||
| 251 | |||
| 252 | manquestion = input("yes or no? ") | ||
| 253 | |||
| 254 | |||
| 255 | if manquestion.lower() == "yes": | ||
| 256 | print("The man tells you about a powerful Ogre down the path a little while.") | ||
| 257 | print("You feel as if you will cross paths with that monster.") | ||
| 258 | |||
| 259 | |||
| 260 | else: | ||
| 261 | print("You feel an impending sense of doom of the path ahead of you.") | ||
| 262 | print("You don't know how to feel about it.") | ||
| 263 | |||
| 264 | |||
| 265 | print("You come across a bridge. There's a seemingly evil presence under it. Will you investigate or not.") | ||
| 266 | |||
| 267 | |||
| 268 | bridgelook = input("yes or no ") | ||
| 269 | |||
| 270 | if bridgelook.lower() == "yes": | ||
| 271 | print("You find a horrifying looking monster. He tells you to not worry.") | ||
| 272 | print() | ||
| 273 | print("He tells you that he wasn't anything to worry about.") | ||
| 274 | print("The creature asks if you wanted to be friends, and introduces himself as Golem.") | ||
| 275 | print() | ||
| 276 | print("You tell him you will be his friend, and he gives you 200 Gold.") | ||
| 277 | player_gold = player_gold + 200 | ||
| 278 | |||
| 279 | |||
| 280 | else: | ||
| 281 | print("You cross the bridge carefully. Nothing happens as you cross, and you continue down the path.") | ||
| 282 | |||
| 283 | |||
| 284 | print("You felt a sense of unease rise onto your back. You turn and a goblin ambushes you!") | ||
| 285 | |||
| 286 | |||
| 287 | battle("Strong Goblin", 300, 40) | ||
| 288 | |||
| 289 | |||
| 290 | print("The strong goblin falls beneath your strength. He gives you a permanent health upgrade.") | ||
| 291 | |||
| 292 | |||
| 293 | |||
| 294 | |||
