You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

134 lines
4.3 KiB
Plaintext

{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import time\n",
"import sys\n",
"\n",
"a = 0.2\n",
"b = 2\n",
"\n",
"def inventoryWipe():\n",
" file = open(\"inventory.txt\", \"w\")\n",
" file.close()\n",
"inventoryWipe()\n",
"\n",
"print(\" _________\")\n",
"print(\" / ======= .\")\n",
"print(\" / __________. \")\n",
"print(\" | ___________ |\")\n",
"print(\" | | words | |\")\n",
"print(\" | | for | |\")\n",
"print(\" | |_the_____| |________________________\")\n",
"print(\" \\=____________/ future )\")\n",
"print(\" / =========== \\ /\")\n",
"print(\"/ ::::::::::::: \\ =D-'\")\n",
"print(\"(________________)\")\n",
"s = '\"Hello Traveler\"'\n",
"for character in s:\n",
" sys.stdout.write(character)\n",
" sys.stdout.flush()\n",
" time.sleep(a)\n",
"time.sleep(b)\n",
"print()\n",
"print('Enter your name:')\n",
"name = input()\n",
"count = 0\n",
"\n",
"def select_element():\n",
" global count\n",
" print('Hello, ' + name + \". Welcome to ***Earthrise***. Are you ready to set sail to the land of the future? If yes, pick one of these elements to start: water, fire, wind\")\n",
" time.sleep(b)\n",
"\n",
" while True:\n",
"\n",
" print('Type your choice below, ' + name + '!')\n",
" element = input()\n",
" if element.lower().strip() == \"water\":\n",
" print('Great work, ' + name + ', Captain Atata picked you up with his ferry! Where should we go from here? (north/west)')\n",
" count = count + 1\n",
" print(count)\n",
" elif element.lower().strip() == \"fire\":\n",
" print('Great work, ' + name + ', You find yourself at the foot of an active volcano. Where do we go from here? (north/west)')\n",
" count = count + 1\n",
" elif element.lower().strip() == \"wind\":\n",
" print('You lift off the earth into the skies now, ' + name + ', you are floating. Where do we go from here? (north/west)')\n",
" count = count + 1\n",
" else:\n",
" print(\"this spell has no power here.\")\n",
"\n",
"\n",
" direction = input()\n",
" if direction.lower().strip() == \"west\" and count == 1:\n",
" print(\"You are walking along a \" + element + \" stream until you see a big book.\")\n",
"\n",
" elif direction.lower().strip() == \"north\":\n",
" print(\"You find yourself in a dense forest. By your feet you see a magic elixier and a whistle. You only have space for one, which one do you pick? (elixier/whistle)\")\n",
" count = count + 1\n",
" else:\n",
" print(\"this spell has no power here.\")\n",
"\n",
" object = input()\n",
" if object.lower().strip() == \"elixier\" and count == 2:\n",
" print(\"You don't understand what to use it for yet, so you keep on walking.\")\n",
"\n",
" elif direction.lower().strip() == \"whistle\":\n",
" print(\"You try to make sounds with it, until you finally suceed. You hear the whistle sound being echoed from far. (follow)\")\n",
"\n",
" else:\n",
" print(\"this spell has no power here.\")\n",
"select_element()\n",
"\n",
"\n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
}
},
"nbformat": 4,
"nbformat_minor": 4
}