コード例 #1
0
""", "at")

elevator = Location(
    "Elevator", """The elevator is turned off, but the door is open.
The controls on the elevator do not seem to work.
To the west is an intersection.
""")

# "\n" makes a new line in a Python string.
secret_lab = Location(
    "Secret Laboratory",
    "This place is spooky. It's dark and \nthere are cobwebs everywhere. There must \nbe a light switch somewhere."
)

# Let's add the locations to your game.
game.add_location(sidewalk)
game.add_location(vestibule)
game.add_location(reception)
game.add_location(intersection)
game.add_location(elevator)

# You can also add a simple location with the convience function 'new_location'.
# "\n" makes a new line in a Python string.
game.new_location(
    "Secret Laboratory",
    "This place is spooky. It's dark and \nthere are cobwebs everywhere. There must \nbe a light switch somewhere."
)

# Create connections between the different places. Each connection
# needs a name, the two locations to connect, and the two directions
# you can go to get in and out of the space.
コード例 #2
0
blood_room = Location(
    "Blood donations",
    "You are teleported in the middle of what is probably a mile-wide and two-miles long room full of little 'igloos'. Your iCommunicator beams:"
    "'Welcome volunteer!  Volunteering in a simple, gentle act of love. "
    "We provide 'Happypills50K' for free, please use liberally. Feel free to go in your very own, personal blood room(TM)!'",
    "on")

personal_blood_room = Location(
    "Blood Room igloo",
    "Your personal blood room is rather spartan; only the bare necessities for 12 hours of happy labour. Your iCommunicator beams:"
    "'Lay in bed and volunteer your blood. Have some pills if you want.", "on")

hero = SV()
game.add_actor(hero)
game.add_location(lobby)
game.add_location(blood_room)

#--------------------------------------------------------------------
game.add_location(personal_blood_room)
happypills = Food("happypills50K",
                  "happypills50K: A pill a day takes the boredom away",
                  Say("Happy pills make me happy!"))
personal_blood_room.add_object(happypills)

happypills = Food("happypills50K",
                  "happypills50K: A pill a day takes the boredom away",
                  Say("Happy pills make me happy!"))

blood_extractor = BloodExtractor(
    "BE50K", "An infernally-looking machine that extracts blood",
コード例 #3
0
north that leads to the shop. To the east is the elevator
landing, to the west is the guest lounge, and to the
south is the reception desk. There is nothing to do here.
""", "at")

elevator = Location("Elevator",
"""The elevator is turned off, but the door is open.
The controls on the elevator do not seem to work.
To the west is an intersection.
""")

# "\n" makes a new line in a Python string.
secret_lab = Location("Secret Laboratory", "This place is spooky. It's dark and \nthere are cobwebs everywhere. There must \nbe a light switch somewhere.")

# Let's add the locations to your game.
game.add_location(sidewalk)
game.add_location(vestibule)
game.add_location(reception)
game.add_location(intersection)
game.add_location(elevator)

# You can also add a simple location with the convience function 'new_location'.
# "\n" makes a new line in a Python string.
game.new_location(
"Secret Laboratory", "This place is spooky. It's dark and \nthere are cobwebs everywhere. There must \nbe a light switch somewhere.")

# Create connections between the different places. Each connection
# needs a name, the two locations to connect, and the two directions
# you can go to get in and out of the space.
# example: variable = Connection("The Connection Name", location_a, location_b, direction_a, direction_b)
#
コード例 #4
0
"'Welcome volunteer!  Volunteering in a simple, gentle act of love. "
"We provide 'Happypills50K' for free, please use liberally. Feel free to go in your very own, personal blood room(TM)!'"

, "on")

personal_blood_room = Location(
"Blood Room igloo",
"Your personal blood room is rather spartan; only the bare necessities for 12 hours of happy labour. Your iCommunicator beams:"
"'Lay in bed and volunteer your blood. Have some pills if you want."
, "on")



hero = SV()
game.add_actor(hero)
game.add_location(lobby)
game.add_location(blood_room)

#--------------------------------------------------------------------
game.add_location(personal_blood_room)
happypills = Food("happypills50K",
                       "happypills50K: A pill a day takes the boredom away",
                       Say("Happy pills make me happy!"))
personal_blood_room.add_object(happypills)

happypills = Food("happypills50K",
                       "happypills50K: A pill a day takes the boredom away",
                       Say("Happy pills make me happy!"))

blood_extractor = BloodExtractor("BE50K", "An infernally-looking machine that extracts blood", Say("This looks rather funny...?"), hero)
icommunicator_messages = Object("LocationMessage", "'Did you know you could change your cruise-ship for just 10 more years of volunteering?"