Example #1
0
def start():
	print "-----"
	a=str(raw_input("Welcome. Would you like to begin? (Y/N/help)\n"))
	if a=="y":
		startArea.startArea()
	elif a=="n":
		print "Exiting..."
		exit()
	elif a=="help":
		print "-----"
		print '''All responses are typed using lowercase letters. Things you can interact with are generally indicated with capital letters. For example, a sentence that says, "The FLASHLIGHT is turned off, and the WALL behind it is unlit," indicates that you may interact with the flashlight and the wall. 
		
		Commands are very simple. Oftentimes just entering the capitalized word will produce results, but you can usually "look <object>" or "leave|go back." If you would like to enter a room, you can usually just type the name of that room if it is accessable from your current position.
		
		The command "info" reprints what information you were given when entering the room, while "describe" uses great detail to describe the room. ("Describe" and "info" commands not yet implemented.)'''
		start()
	elif a=="entryway":
		entryway.entryway()
	elif a=="danceroom":
		danceRoom.danceRoom()
	elif a=="corridor":
		corridor.corridor()
	elif a=="woodshop":
		woodShop.woodShop()
	elif a=="hallway1":
		hallway1.hallway1()
	else:
		print "Error. Invalid command."
		start()
Example #2
0
def entryway():
    print "-----"
    print "In front of you are two paths: the right one leads to a STAIRCASE, and the left one turns off into a CORRIDOR. Behind you is a set of DOORs surrounded by WINDOWs. You find yourself standing on a MAT.\n"
    a = str(raw_input("What do you want to do?\n"))
    if a == "lay down":
        print "-----"
        print "You lay back down on the linoleum floor."
        startArea.startArea()
    if a == "staircase":
        print "-----"
        print "You walk up the STAIRCASE. As you near the top, however, an unbearable sense of foreboding overcomes you, and you are forced to turn around and go back. You return to the ENTRYWAY."
        entryway()
    elif a == "look window" or a == "examine window" or a == "window":
        print "-----"
        print "You go up to the WINDOW and look out through it. It's dark outside of the building. Everything is still and empty, trees sit without leaves. Before you lies a street; there are rusty signs along the edge of it, and sagging buildings in the distance. You get the chills. You turn back to face the CORRIDOR."
        globalvariables.doorForeboding = 1
        entryway()
    elif a == "corridor":
        print "-----"
        print "You step forward, into the CORRIDOR."
        corridor.corridor()
    elif a == "open door" or a == "try door" or a == "unlock door":
        if globalvariables.doorForeboding == 1:
            print "-----"
            print "You don't want to do that. The outside gives you the chills, and not from the cold. You turn back to face the CORRIDOR."
            entryway()
        elif globalvariables.doorForeboding == 0:
            print "-----"
            print "Perhaps you should check the WINDOW to see where you are headed before you try this door."
            entryway()
        else:
            print "Error: Check door variable."
            entryway()
    elif a == "examine door" or a == "look door" or a == "door":
        print "-----"
        print "The DOORs look old but sturdy. They're made with metal, the paint is peeling off. They have small slits for windows filled with reinforced glass. You turn back to face the CORRIDOR."
        entryway()
    elif a == "look mat" or a == "examine mat" or a == "mat":
        if globalvariables.keyAccess == 0:
            print "-----"
            print "Beneath you is a dirty, tattered MAT meant for the cleaning of shoes. There is nothing of interest here. You turn back to the CORRIDOR."
            entryway()
        elif globalvariables.keyAccess == 1:
            mat()
        else:
            print "-----"
            print "Error: keyAccess storage."
            entryway()
    else:
        print "-----"
        print "You don't think you can do that."
        entryway()