-
Notifications
You must be signed in to change notification settings - Fork 1
Handy Dandy Quick Reference Guide to Everything
###### location_variable = game_variable.new_location("Name of Location","Description of Location")
Example:
sidewalk = game.new_location("Sidewalk","You are on a paved sidewalk.")
###### connection_variable = game_variable.new_connection("Name of Connection", from_location_variable, to_location_variable, DIRECTION, REVERSE_DIRECTION) ###### connection_variable = game_variable.new_connection("Name of Connection", from_location_variable, to_location_variable, [DIRECTION1, DIRECTION2], [REVERSE_DIRECTION1, REVERSE_DIRECTION2])
Examples:
front_door = game.new_connection("Front Door", sidewalk, vestibule, IN, OUT)
front_door = game.new_connection("Front Door", sidewalk, vestibule, [IN, EAST], [OUT, WEST])
###### player_variable = game_variable.new_player(location_variable)
Example:
player = game.new_player(sidewalk)
###### item_variable = location_variable.new_object("item name","item description")
Example:
key = sidewalk.new_obejct("key","a small silver key")
###### location_variable.make_requirement(item_variable)
###### connection_variable.make_requirement(item_variable)
Examples:
office.make_requirement(key)
office_door.make_requirement(key)
###### item_variable.add_phrase("command", Say("What the game says after you use the game command"))
Example:
key.add_phrase("rub key", Say("This is not a magic lamp."))
###### actor_variable = Actor("name of actor")
###### animal_variable = Animal("name of animal")
Examples:
angry_elf = Actor("angry elf")
sad_polar_bear = Animal("sad polar bear")
###### actor_or_animal_variable.set_location(location_variable)
Examples:
angry_elf.set_location(playground) sad_polar_bear.set_location(upstairs)
###### animal_variable.set_allowed_locations([location_variable1, location_variable2, location_variable3])
Example:
sad_polar_bear.set_allowed_locations([upstairs,vestibule,front])
###### game_variable.add_actor(actor_or_animal_variable)
Examples:
game.add_actor(angry_elf)
game.add_actor(sad_polar_bear)
###### actor_or_animal_variable.add_phrase("command", Say("What the game says after you use the game command"))
Examples:
angry_elf.add_phrase("chat", Say("The angry elf glares at you."))
sad_polar_bear.add_phrase("pet bear", Say("The polar bear smiles."))
###### actor_or_animal_variable.add_phrase("command", Say("What the game says after you use the game command"))
Examples:
angry_elf.add_phrase("chat", Say(["The angry elf glares at you.", "The angry elf snorts in derision.","The angry elf mutters to himself and turns his back on you."]))
sad_polar_bear.add_phrase("pet bear", Say(["The polar bear smiles sadly.","The polar bear licks your face sadly.","The polar bear closes its eyes sadly and dreams of playing in the snow."]))