Leogas' bedroom
def bedroom():
global leogasHp
print "Health: ", leogasHp
if leogasLeftBedroom == 0:
bed_Desc1()
else:
bed_Desc2()
# If you haven't left the room yet, this description will trigger
def bed_Desc1():
print "You are standing in your own bedroom. In the corner is a preposterously"
print "large, opulent four-poster bed. Empty wine bottles litter the floor and"
print "the top of the dresser. Discarded clothing lays strewn about the rich"
print "quarters. A faint, directionless light permeates the room."
print "You see exits leading (E)ast, (W)est and (S)outh."
print "Type 'help' for a list of commands."
print
prompt_bed()
# If you've already left the room, and are coming back, this description will trigger
def bed_Desc2():
print "You are standing in your own bedroom. While you were out, it seems the"
print "servants have inconspicuosly tidied up. Your bed was painstakingly made, "
print "and the floors and surfaces are free of clutter. Seems the maids aren't perfect,"
print "however, as one last bottle lays half-hidden beneath the bed. A faint,"
print "directionless light permeates the room."
print "You see exits leading (E)ast, (W)est and (S)outh."
print "Type 'help' for a list of commands."
print
prompt_bed()
#prompt for bedroom
def prompt_bed():
global leogasLeftBedroom
global inventory
prompt_b = raw_input("Your orders, my liege? ").lower()
try:
if prompt_b == "e":
leogasLeftBedroom = 1
library()
elif prompt_b == "w":
leogasLeftBedroom = 1
guardroom()
elif prompt_b == "s":
leogasLeftBedroom = 1
fungalGarden()
elif prompt_b == "help":
help1()
prompt_bed()
elif prompt_b == "look":
if leogasLeftBedroom == 0:
bed_Desc1()
else:
bed_Desc2()
elif prompt_b == "ex bed":
if leogasLeftBedroom == 0:
print "Your bed is a gigantic mess of slept-in silks and satins. Is that a"
print "splash of vomit you see on the brocade pillows?"
else:
print "Your voluminous bed, with its carved mahogany posts, has been"
print "meticulously made."
print
prompt_bed()
#You get a potion later. This ensures you can drink it while in the bedroom.
elif prompt_b == "drink potion" or prompt_b == "drink healing potion":
if "a healing potion" in inventory:
if leogasHp < 35:
leogasHp = 35
print "You've been healed! Your health is now ", leogasHp
inventory.remove("a healing potion")
else:
print "You really ought to save that for when it counts."
print
prompt_bed()
else:
print "You don't have a healing potion."
print
prompt_bed()
elif prompt_b == "ex clothes":
if leogasLeftBedroom == 0:
print "Your fine clothes lay rumpled in scattered heaps across the room. They"
print "smell like pipe smoke and are splotched with stains."
else:
print "Your clothes are hanging neatly in the closet."
print
prompt_bed()
elif prompt_b == "ex bottles" or prompt_b == "ex bottle" or prompt_b == "ex wine":
if leogasLeftBedroom == 0:
print "Countless wine bottles of every shape and size lay around the room."
print "Their emptiness is the only thing they have in common."
else:
print "The maids cleaned out all the bottles, except one, which you see poking"
print "out from beneath the bed."
print
prompt_bed()
elif prompt_b == "take bottles" or prompt_b == "take bottle" or prompt_b == "take wine":
if "an empty wine bottle" in inventory:
print "You're already carrying a wine bottle."
else:
print "You snatch up an empty bottle. Its pleasing heft comforts you."
inventory += ["an empty wine bottle"]
print "Your inventory now contains: "
for item in inventory:
print item
print
prompt_bed()
elif prompt_b == "take bed":
print "It's much too heavy, and anyway, you're in a weakened state."
print
prompt_bed()
elif prompt_b == "ex dresser":
print "This stunning dresser features ironwork handles and a stunning walnut finish."
print
prompt_bed()
elif prompt_b == "open dresser":
print "It's full of dresses. Always wondered why they called it that."
print
prompt_bed()
elif prompt_b == "take dresser":
print "An adventurous spirit is appreciated, but c'mon."
print
prompt_bed()
elif prompt_b == "take dresses":
print "Oh, how the servants would talk."
print
prompt_bed()
elif prompt_b == "take clothes":
print "You ought to wait until the Clean Clothes Fairy comes and washes them, don't"
print "you think?"
print
prompt_bed()
elif prompt_b == "ex pillow" or prompt_b == "ex pillows":
print "The pillows are crafted from the finest red velvet and exquisite brocade."
print "They smell of last night's dinner."
print
prompt_bed()
elif prompt_b == "take pillow" or prompt_b == "take pillows":
print "Pillow fights are for sissies. Or for sultry bar wenches in lingerie."
print "You are neither."
print
prompt_bed()
elif prompt_b == "i":
print "Your inventory contains: "
for item in inventory:
print item
print
prompt_bed()
#you get a spotted mushroom later in the game. If you eat it at any time, you die. This ensures you can eat it in the bedroom.
elif prompt_b == "eat mushroom" or prompt_b == "eat mushrooms":
if "a spotted mushroom" in inventory:
print "Colors and lights start to swirl before your eyes. You feel a portal"
print "to another world opening."
die()
else:
print "You don't have a spotted mushroom."
print
prompt_bed()
elif prompt_b == "q":
quit()
else:
print "Pardon, my lord, I'm sure I don't know what you mean."
print
prompt_bed()
except ValueError:
print "Pardon, my lord, I'm sure I don't know what you mean."
print
prompt_bed()