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.

198 lines
7.4 KiB
Python

2 years ago
# healing
#by me(ada)
import os , time , random
# current (saved) state
currentRoom = "empty pizzeria"
start = True
healing = False
heal = 0
items = {
"empty pizzeria": ["closure","catharsis", "anger"],
"living room": ["connection", "understanding", "support"],
"study room": ["expression","hope","new experiences"],
"bedroom": ["self-discovery","self-care"],
"kitchen": ["work","nourishment","purpose"]
}
inventory = []
# colors
class bcolors:
BLUE = '\033[94m'
CYAN = '\033[96m'
GREEN = '\033[92m'
YELLOW = '\033[93m'
RED = '\033[91m'
MAGENTA = '\x1b[35m'
ENDC = '\033[0m'
BOLD = '\033[1m'
UNDERLINE = '\033[4m'
# separating the text and printing in delay
def printer (text = "hello i am the default text", slow=True):
for t in text:
print(t, end = "", flush= True)
if slow == True:
time.sleep(random.choice([0.01, 0.05, 0.1, 0.03, 0.02]))
else:
time.sleep(random.choice([0.001, 0.005, 0.01, 0.003, 0.002]))
print()
# Defining the "taker" function and setting it up in each of the three spaces below
def process(planet,thing):
if any(x in spliti for x in ["take", "do", "grab", "carry", "experience","feel","understand"]):
for item in items[planet]:
if item in thing:
printer("good job. you now have some" + item)
inventory.append(item)
items[planet].remove(item)
# Creating the while-loop
while True:
if (start == True):
printer(bcolors.BOLD +"""
.
ᵖᵃᵖᵃ'ˢ ᵗʳᵃᵘᵐᵃ ┃
ᵃⁿᵈ ᶦᵗˢ ʰᵉᵃˡᶦⁿᵍ
""", slow=False)
printer(bcolors.GREEN +"""
welcome to Papa's soul.
as of now, his sould has been shattered.
papa's beloved pizzeria, through which
he took care of his community, has been
destroyed by the mafia.
he is devasted by a loss of safety,
of community,
of hope of the future,
of identity
and of meaningful labour.
will you help him heal by gaining healthy coping skills?
will you help papa re-build his life?
(type explore to being investigating his soul.)
""")
start = False
if (healing == True):
printer(bcolors.RED + """ thank you for healing papa. """)
exit()
# clearing the screen: "clear" for macOS
i = input()
os.system("clear")
spliti = i.split(" ")
action = spliti[0]
thing = " ".join(spliti[1:])
# creating an inventory
if "inventory" in i:
printer("you have healed your soul with " + ", ".join(inventory))
# an help message
if i in ["help","what","instructions", "advice"]:
printer(bcolors.GREEN +"""
you asked for help! great job in reaching out.
the aim of this game is to aid papa in recovering
from the trauma that was inflicted on him by losing
his pizzeria.
you play the game by typing one word answers.
words like here or see will show you the current room.
words like care or experiment will show you what is in the room
words like take or carry will make you collect objects.
the word inventory will show you what you have done so far."""
)
# choices in old pizzeria
if currentRoom == "old pizzeria":
if i in ["here","see","view","explore", "where"]:
printer("""you are currently in papa's old pizzeria. be gentle
with him, this room carries a lot of pain. """)
elif i in ["care", "experiment", "heal", "discover"]:
printer("in papa's old pizzeria you can see " + ", ".join(items["old pizzeria"]))
elif i in ["exit","leave","run","move on","out"]:
printer("you leave the old pizzeria.")
currentRoom = "living room"
else:
taker("old pizzeria",thing)
# choices in living room
elif currentRoom == "living room":
if i in ["here","see","view","explore", "where"]:
printer("""you are currently in papa's living room. this is
where he used to host pizza parties for his community.""")
elif i in ["care", "experiment", "heal", "discover"]:
printer("in papa's living room you can see " + ", ".join(items["old pizzeria"]))
elif i in ["exit","leave","run","move on","out"]:
printer("you leave the living room.")
currentRoom = "study room"
else:
taker("living room",thing)
# choices in study room
elif currentRoom == "study room":
if i in ["here","see","view","explore", "where"]:
printer("""you are currently in papa's study. papa feels
a rush of excitement looking at his empty notebooks.""")
elif i in ["care", "experiment", "heal", "discover"]:
printer("in papa's study you can see " + ", ".join(items["old pizzeria"]))
elif i in ["exit","leave","run","move on","out"]:
printer("you leave the study.")
currentRoom = "bedroom"
else:
taker("study room",thing)
# choices in bedroom
elif currentRoom == "bedroom":
if i in ["here","see","view","explore", "where"]:
printer("""you are currently in papa's bedroom.""")
elif i in ["care", "experiment", "heal", "discover"]:
printer("in papa's bedroom you can see " + ", ".join(items["old pizzeria"]))
elif i in ["exit","leave","run","move on","out"]:
printer("you leave the bedroom.")
currentRoom = "kitchen"
else:
taker("bedroom",thing)
# choices in kitchen
elif currentRoom== "kitchen":
if i in ["look","see","view","explore"]:
printer("""you are now in papa's kitchen. there
are pizza ingredients on the counter""")
elif i in ["care", "experiment", "heal", "discover"]:
printer("in papa's kitchen you can see " + ", ".join(items["old pizzeria"]))
elif i in ["exit","leave","run","move on","out"]:
printer("you leave the bedroom.")
currentRoom = "kitchen"
# the healing condition
elif i in [""]:
printer("")
i = input()
if i in [""]:
if heal >= 119:
printer("""""")
heal = True
else:
printer("" + str(heal) + "")