Пример #1
0
 def __init__(self):
     super().__init__('profsun', __file__)
     self.set_description('tall wise elf', 'This is a tall, wise elf.')
     self.add_names('sun', 'elf')
     self.add_adjectives('mr')
     self.graduates = []
     self.waiting = False
     self.unchecked_homework = []
     self.wizardry_element = 'fire'
     self.proper_name = 'Prof. Sun'
     self.giving_class = False
     self.script_index = 0
     self.scripts = [
         '''Magical gems are foundational to the art of wizardry. Their role on society is unchallenged.
     There are three basic types of gems: the producers, the connecters, and the consumers.
     The producers are essential, as they store all power. The most common producer is emerald.
     The connecters are essential to  long distance communictions. The most common connecter is jade.
     Finally, the consumers are the gems that bring us light and wampth, sound and flight. The most common consumer is hard to say, although it might be ruby.
     Now you will perform an experiment in basic gem connection. I will give each of you an emerald and a ruby. You shall power the ruby using the power from the emerald. When you do, it will make light.''',
         '''Very good job.
     Your homework will be to power an opal with an emerald to make dark.'''
     ]
     self.emeralds = [gametools.clone('domains.school.school.emerald')]
     self.rubies = [gametools.clone('domains.school.school.ruby')]
     self.checking_done = False
Пример #2
0
def load():
    roomPath = gametools.findGamePath(__file__)
    exists = room.check_loaded(roomPath)
    if exists: return exists

    woods = room.Room('woods', pref_id=roomPath)
    woods.set_description(
        'bright and cheerful woods',
        'These woods have happy birdsongs and pretty trees. They are bright.')
    woods.add_exit('west', 'domains.school.forest.entryway')
    woods.add_exit('north', 'domains.school.forest.forest1')
    woods.add_exit('south', 'domains.school.forest.clearing')

    bag = gametools.clone('domains.school.forest.bag')
    woods.insert(bag)

    flashlight = gametools.clone('domains.school.forest.flashlight')
    woods.insert(flashlight)

    beech = scenery.Scenery(
        "beech", "old beech tree full of carvings",
        "This large old beech tree has been scarred with the reminders of many passers-by, who decided to immortalize their visit by carving their initials into the tree."
    )
    beech.add_names("tree")
    beech.add_adjectives("old", "beech", "carved")
    beech.add_response([
        "carve"
    ], "You think about carving your own initials into the tree, but an uneasy feeling--as if the forest itself is watching--makes you stop."
                       )
    woods.insert(beech)

    bird = gametools.clone('domains.school.forest.bird')
    woods.insert(bird)

    return woods
Пример #3
0
def load():
    roomPath = gametools.findGamePath(__file__)
    exists = room.check_loaded(roomPath)
    if exists: return exists

    bathroom = room.Room('bathroom', pref_id=roomPath, indoor=True)
    bathroom.set_description(
        'modern bathroom',
        'This small bathroom has a bathtub, a shower, and a sink.')
    bathroom.add_exit('east', 'home.alex.house.lr31795')
    bathroom.add_adjectives('modern')

    bathtub = gametools.clone('home.alex.house.bathtub')
    bathtub.move_to(bathroom, True)

    sink = gametools.clone('home.alex.house.sink')
    sink.move_to(bathroom, True)

    toilet = scenery.Scenery('toilet', 'ordinary toilet',
                             'This is an ordinary toilet.')
    toilet.add_response(['flush'], 'You flush the toilet.')
    toilet.move_to(bathroom, True)

    cabinet = gametools.clone('home.alex.house.cabinets')
    cabinet.move_to(bathroom, True)

    return bathroom
Пример #4
0
def load():
    roomPath = gametools.findGamePath(__file__)
    exists = room.check_loaded(roomPath)
    if exists: return exists

    magic_room = room.Room('magical room', roomPath, indoor=True)
    magic_room.set_description(
        'magical room',
        'This room has a lot of magical supplies. It also has a door on the west side of the room with a piece of paper above it.'
    )
    magic_room.add_exit('north', 'home.alex.house.lr31795')
    magic_room.add_exit('west', 'woods')
    magic_room.add_names('room')
    magic_room.add_adjectives('magic', 'magical')

    paper = gametools.clone('home.alex.house.paper')
    magic_room.insert(paper, True)

    emerald = gametools.clone('home.alex.house.emerald')
    magic_room.insert(emerald, True)

    ruby = gametools.clone('home.alex.house.ruby')
    magic_room.insert(ruby, True)

    opal = gametools.clone('home.alex.house.opal')
    magic_room.insert(opal, True)

    return magic_room
Пример #5
0
def load():
    roomPath = gametools.findGamePath(__file__)
    exists = room.check_loaded(roomPath)
    if exists: return exists

    bedroom = room.Room('bedroom', roomPath)
    bedroom.indoor = True
    bedroom.set_description(
        'dusty bedroom',
        'The bare board walls of this bedroom are dusty. A musty smell fills the air.'
    )
    bedroom.add_exit('northwest', 'domains.school.forest.hallway')
    bed = scenery.Scenery(
        'bed', 'decrepit old bed',
        'This decrepit bed supports a bare stained mattress and is covered with a thick layer of dust.'
    )
    bed.add_adjectives('old', 'decrepit')
    bed.add_response([
        'sleep'
    ], 'You briefly consider sleeping on the dusty, soiled mattress but quickly think better of it.',
                     True, True)
    bed.add_response(
        ['make'],
        'You look around for sheets or blankets but see nothing suitable with which to make the bed.',
        emit_message='%s looks around the room.')
    bedroom.insert(bed)

    sword = gametools.clone('domains.school.forest.sword')
    bedroom.insert(sword)
    leather_suit = gametools.clone('domains.school.forest.leather_suit')
    bedroom.insert(leather_suit)

    return bedroom
Пример #6
0
 def create_potion(self, i):
     while self.contents:
         a = self.contents[0]
         self.extract(a)
         Thing.ID_dict['nulspace'].insert(a)
     if i[1] == 'pink potion':
         created = gametools.clone('pink_potion')
         created.move_to(self)
     if i[1] == 'invisibility potion':
         created = gametools.clone('invisibility_potion')
         created.move_to(self)
     if i[1] == 'strength potion':
         created = gametools.clone('strength_potion')
         created.move_to(self)
     self.emit('The contents of the cauldron simmer, smoke, then vanish with a bang! In their place a %s has formed.' % (created.short_desc))
Пример #7
0
def load():
    roomPath = gametools.findGamePath(__file__)
    exists = room.check_loaded(roomPath)
    if exists: return exists

    r = room.Room('lonelyfire', roomPath)
    r.set_description(
        'abandoned fire',
        'You find yourself in a small chamber. On the the floor are several pieces of burnt wood arranged in a rough circle, as well as \
    a series of charcoal paintings on the walls. One of the pieces of wood looks sturdy enough to take. The cave continues to the northwest.'
    )
    r.add_adjectives('dark')
    r.add_exit('northwest', 'domains.school.forest.oil_pool')
    r.add_exit('south', 'domains.school.forest.forest_cave_entry')

    burnt_log = scenery.Scenery(
        'log', 'burnt log',
        'This log is large enough to have come from a tree, and it\'s sharp edges suggest that it was cut.'
    )
    burnt_log.add_response(
        ['take', 'get'],
        'The log begins to crumble in your hands when you try to take it.')
    burnt_log.add_adjectives('burnt', 'old', 'large', 'cut')
    burnt_log.move_to(r, True)

    log = gametools.clone('domains.school.forest.log')
    log.move_to(r, True)
    return r
Пример #8
0
def clone():
    bookshelf = container.Container('bookshelf', __file__)
    bookshelf.set_description(
        'oak bookshelf',
        'This bookshelf is made of oak. It has many different books on it.')
    bookshelf.closable = False
    bookshelf.add_adjectives('oak')
    bookshelf.add_names('shelf')
    bookshelf.set_prepositions('on', 'onto')

    blue_book = gametools.clone('home.alex.house.blue_book')
    blue_book.move_to(bookshelf, True)

    dusty_book = gametools.clone('home.alex.house.dusty_book')
    dusty_book.move_to(bookshelf, True)
    return bookshelf
Пример #9
0
def load():
    roomPath = gametools.findGamePath(__file__)
    exists = room.check_loaded(roomPath)
    if exists: return exists
    
    r = room.Room('tapestries', roomPath)
    r.indoor = True
    r.set_description('room with many tapestries hanging', 'This smaller circular room has many tapestries hanging around it.')
    r.add_exit('northwest', 'domains.school.elementQuest.firepit')
    r.add_exit('south', 'domains.school.elementQuest.shaft_of_sunlight')
    
    cloth = gametools.clone('domains.school.elementQuest.cloth')
    r.insert(cloth)

    tapestry1 = scenery.Scenery('tapestry', 'tapestry decorated with dancing flames', 'This tapestry has a fire with dancing flames woven into it. It almost seems as if the fire on it was actually burning.')
    tapestry1.add_response(['take', 'get'], 'You feel as if this tapestry should not be taken...as if you would be taking a piece of the room.')
    tapestry1.add_adjectives('dancing', 'flames')
    r.insert(tapestry1)

    tapestry2 = scenery.Scenery('tapestry', 'tapestry decorated with burning embers', 'This tapestry has the burning embers of a fire woven into it. It almost seems as if they were actual coals.')
    tapestry2.add_response(['take', 'get'], 'You feel as if this tapestry should not be taken...as if you would be taking a piece of the room.')
    tapestry2.add_adjectives('burning', 'embers')
    r.insert(tapestry2)

    return r
Пример #10
0
 def clone(self, p, cons, oDO, oIDO):
     '''Clone a new copy of an object specified by ID or by module path, and bring it to the player.'''
     if cons.user != self:
         return "I don't quite get what you mean."
     if len(p.words) < 2: 
         cons.write("Usage:\n\t'clone <id>', where id is an entry in Thing.ID_dict[]"
                    "\n\t'clone <path>', where path is of the form 'domains.school.test_object'")
         return True
     id = " ".join(p.words[1:])
     try:
         current_obj = Thing.ID_dict[id]
         objpath = current_obj.path
     except KeyError: 
         objpath = id
     obj = gametools.clone(objpath)
     if obj == None:
         return "There seems to be no object with true name '%s'!" % id
     if isinstance(obj, Creature) or obj.move_to(self) == False:
         if obj.move_to(self.location) == False:
             cons.write("You attempt to clone the %s but somehow cannot bring it to this place." % obj.names[0])
         else:
             cons.write("You perform a magical incantation and bring the %s to this place!" % obj.names[0])
     else:
         cons.write("You perform a magical incantation and the %s appears in your hands!" % obj.names[0])
     self.emit("&nD%s performs a magical incantation. You sense something has changed." % self.id, [self])
     
     return True                    
Пример #11
0
def load():
    roomPath = gametools.findGamePath(__file__)
    exists = room.check_loaded(roomPath)
    if exists: return exists

    dark_forest = room.Room('darkforest', roomPath)
    dark_forest.set_description(
        'scary, dark forest',
        'This is a scary, dark forest that you want to leave...soon!')
    dark_forest.add_exit("south", "domains.school.forest.forest3")
    dark_forest.add_exit("north", "domains.school.forest.gloomy_forest")

    dead_tree = scenery.Scenery(
        'dead_tree', 'big dead tree',
        'This dead tree is big and bare with no bark. At the bottom of it there is a rat hole. '
    )
    dead_tree.add_names('tree')
    dead_tree.add_adjectives('dead')
    dead_tree.add_response([
        'climb'
    ], 'When you try to climb the tree, the branch you grab on to breaks off with an eerie snap.'
                           )
    dark_forest.insert(dead_tree)

    rat = gametools.clone('domains.school.forest.rat')
    rat.move_to(dark_forest)

    return dark_forest
Пример #12
0
 def present_gems(self):
     players = [
         x for x in self.location.contents
         if isinstance(x, creature.Creature) and x not in self.graduates
         and x != self
     ]
     while len(players) > len(self.emeralds):
         self.emeralds.append(
             gametools.clone('domains.school.school.emerald'))
         self.rubies.append(gametools.clone('domains.school.school.ruby'))
     for i in range(0, len(players)):
         self.emeralds[i].move_to(players[i])
         self.rubies[i].move_to(players[i])
         players[i].perceive(
             'You notice an emerald and a ruby appear in front of you.')
     self.waiting = False
     self.checking_done = True
Пример #13
0
def clone():
    table = container.Container('table', __file__)
    table.set_description(
        "kitchen table",
        "This dated-looking kitchen table has chrome edging and a Formica top."
    )
    table.fix_in_place("The table is too heavy and awkward to move.")
    table.add_adjectives("kitchen", "dated", "formica")
    table.set_prepositions("on", "onto")
    table.set_max_volume_carried(5000)
    table.set_max_weight_carried(150000)

    bottle = gametools.clone('domains.school.forest.bottle')
    table.insert(bottle)

    plate = gametools.clone('domains.school.forest.plate')
    table.insert(plate)
    return table
Пример #14
0
def load():
    roomPath = gametools.findGamePath(__file__)
    exists = room.check_loaded(roomPath)
    if exists: return exists

    r = FireQuestPotionRoom('potion room', roomPath)
    r.indoor = True
    r.set_description(
        'potion room', 'This room has shelves along the walls. '
        'On the shelves there are many flasks. In the center of the room sits an enormous cauldron.'
    )
    r.add_exit('northeast', 'domains.school.elementQuest.shaft_of_sunlight')

    cauldron = gametools.clone('domains.school.elementQuest.cauldron')
    r.insert(cauldron)

    door = gametools.clone('domains.school.elementQuest.wooden_door')
    r.insert(door)
    return r
Пример #15
0
def load():
    roomPath =  gametools.findGamePath(__file__)
    exists = room.check_loaded(roomPath)
    if exists: return exists

    kitchen = room.Room('kitchen', roomPath, safe=True, indoor=True)
    kitchen.set_description('warm kitchen', 'This kitchen is mainly filled with a large pot over a central firepit. On one side you see a clay oven. A few metal cabinets hang high on one wall.')
    kitchen.add_adjectives('warm', 'cozy')
    kitchen.add_exit('west', 'domains.school.school.fire_lounge')

    central_pot = gametools.clone('domains.school.school.central_pot')
    central_pot.move_to(kitchen)

    clay_oven = gametools.clone('domains.school.school.clay_oven')
    clay_oven.move_to(kitchen)

    metal_cabinets = gametools.clone('domains.school.school.metal_cabinets')
    metal_cabinets.move_to(kitchen)
    return kitchen
Пример #16
0
 def __init__(self):
     super().__init__('oyster', __file__)
     self.set_description(
         'ordinary oyster',
         'This is an ordinary oyster. It seems firmly closed, but you almost think you see a pearl inside.'
     )
     self.closable = True
     self.close()
     self.actions.append(
         container.Action(self.open, ['open', 'separate'], True, False))
     self.insert(gametools.clone('domains.school.elementQuest.pearl'))
Пример #17
0
def load():
    roomPath = gametools.findGamePath(__file__)
    exists = room.check_loaded(roomPath)
    if exists: return exists

    kitchen = room.Room('kitchen', roomPath)
    kitchen.indoor = True
    kitchen.set_description(
        'dusty kitchen with 50-year-old appliances and decorations',
        'This kitchen looks about 50 years old and is very dusty, but it appears to still be usable.'
    )
    kitchen.add_exit('northeast', 'domains.school.forest.entryway')
    kitchen.add_exit('southeast', 'domains.school.forest.hallway')

    cabinets = gametools.clone('domains.school.forest.cabinets')
    kitchen.insert(cabinets)

    table = gametools.clone('domains.school.forest.table')
    kitchen.insert(table)
    return kitchen
Пример #18
0
def load():
    roomPath = gametools.findGamePath(__file__)
    exists = room.check_loaded(roomPath)
    if exists: return exists
    
    living_room = room.Room('living room', pref_id=roomPath, indoor=True)
    living_room.set_description('well-kept living room', 'This is a comfortable living room, while quite small. It has a couch on one wall.')
    living_room.add_exit('west', 'home.alex.house.btr31795')
    living_room.add_exit('up', 'home.alex.house.br31795')
    living_room.add_exit('south', 'home.alex.house.mr31795')
    living_room.add_names('room', 'space')
    living_room.add_adjectives('living', 'well-kept', 'comfortable')

    bookshelf = gametools.clone('home.alex.house.bookshelf')
    bookshelf.move_to(living_room, True)

    couch = gametools.clone('home.alex.house.couch')
    couch.move_to(living_room, True)

    return living_room
Пример #19
0
def load():
    roomPath = gametools.findGamePath(__file__)
    exists = room.check_loaded(roomPath)
    if exists: return exists
    
    r = room.Room('portal room', roomPath, indoor=True)
    r.set_description('dimly lit stone-walled room', 'This room is dimly lit by torches. It has been carved out of the rocks. In the center there stands a stone portal with a sheet of flame.')
    r.add_names('room')
    r.add_exit('east', 'domains.school.elementQuest.potion_room')
    p = gametools.clone('domains.school.elementQuest.portal')
    p.move_to(r)
    return r
Пример #20
0
def clone():
    desk = container.Container('desk', __file__)
    desk.set_description(
        'carved oak desk',
        'This carved oak desk is clearly more than 100 years old, and is carved out in the shapes of dragons and other vicious creatures. There are a few papers on its surface.',
        unlisted=True)
    desk.fix_in_place(
        'The desk is very, very heavy, and feels rooted to the floor.')
    desk.add_adjectives('carved', 'oak')
    desk.set_prepositions('on', 'onto', 'in', 'into')
    desk.set_max_weight_carried(4e9)
    desk.set_max_volume_carried(80)

    paper_one = gametools.clone('domains.school.school.paper_one')
    paper_two = gametools.clone('domains.school.school.paper_two')
    paper_three = gametools.clone('domains.school.school.paper_three')
    desk.insert(paper_one, True)
    desk.insert(paper_two, True)
    desk.insert(paper_three, True)

    return desk
Пример #21
0
def load():
    roomPath = gametools.findGamePath(__file__)
    exists = room.check_loaded(roomPath)
    if exists: return exists
    
    root_room = room.Room('roots', roomPath)
    root_room.indoor = True
    root_room.set_description('crude dungeon', 'This is a crude dungeon with a shaft of light coming through some tree roots in a corner.')

    roots = gametools.clone('domains.school.dungeon.roots')
    root_room.insert(roots)
    return root_room
Пример #22
0
def load():
    roomPath = gametools.findGamePath(__file__)
    exists = room.check_loaded(roomPath)
    if exists: return exists

    forest_three = room.Room('forest', roomPath)
    forest_three.set_description(
        'ancient forest',
        'This is an ancient forest with towering trees. They must be hundreds of years old at least. The trees seem gloomy here. There is a small dark cave to the west.'
    )
    forest_three.add_adjectives('ancient', 'towering', 'gloomy')
    forest_three.add_exit('southeast', 'domains.school.forest.forest1')
    forest_three.add_exit('west', 'domains.school.cave.cave_entry')
    forest_three.add_exit('north', 'domains.school.forest.dark_forest')

    oak = scenery.Scenery(
        'oak', 'menacing old oak',
        'This is an old oak that is leaning over the trail. It seems to be scowling at you. You see some truffles at the base.'
    )
    oak.add_adjectives('menacing', 'old', 'oak')
    oak.add_names('tree')
    oak.add_response(
        ['climb'],
        "The towering oak looks climbable, but it is a menacing old tree--the most so you have ever seen. So you decide to look around for another tree instead.",
        emit_message='%s looks up at the tree.')
    oak.add_response(
        ['grab', 'hold', 'touch', 'hug'],
        "To touch the scary old tree for no reason seems silly and slightly intimidating, so you decide not to. You think that if you saw a nice tree you would hug it.",
        emit_message='%s looks at the tree trunk.')
    forest_three.insert(oak)

    willow = scenery.Scenery(
        'willow', 'sad weeping willow',
        'This is the most mournful weeping willow you have ever seen. You almost cry from looking at it.'
    )
    willow.add_adjectives('weeping', 'sad', 'mournful', 'willow')
    willow.add_names('tree')
    willow.add_response(
        ['climb'],
        'You cannot hold onto the branches, and they are over a small river.',
        emit_message='%s reaches for the willow.')
    willow.add_response([
        'cry', 'weep'
    ], 'You cry as you look at the willow, but then you see the menacing old oak tree across the path and eventually stop.',
                        False, True, '%s weeps.')
    willow.add_response(['hug', 'hold'],
                        'This just isn\'t the right tree to hug.')
    forest_three.insert(willow)

    truffles = gametools.clone('domains.school.forest.truffles')
    forest_three.insert(truffles)

    return forest_three
def load():
    roomPath = gametools.findGamePath(__file__)
    exists = room.check_loaded(roomPath)
    if exists: return exists

    potion_storage = room.Room('potion storage', safe=True, pref_id=roomPath)
    potion_storage.indoor = True
    potion_storage.set_description(
        'potion storage room',
        'This is a stone-walled potion storage room that is dimly lit. It has many cauldrons on an open shelf and many burners for heating cauldrons. It has many ingredients on a different open shelf across the room.'
        'You have to step carefully here, as the floor is covered in shards of broken glass.'
    )
    potion_storage.add_names('potion', 'storage')
    potion_storage.add_names('room')
    potion_storage.add_exit('up', 'domains.school.school.library')

    cauldron = gametools.clone('domains.school.school.cauldron')
    potion_storage.insert(cauldron)

    scale = gametools.clone('domains.school.school.dragon_scale')
    return potion_storage
Пример #24
0
def load():
    roomPath = gametools.findGamePath(__file__)
    exists = room.check_loaded(roomPath)
    if exists: return exists

    goblin_post = room.Room('square room', roomPath)
    goblin_post.indoor = True
    goblin_post.set_description(
        'square, torchlit room',
        'You are in a square room lit by torches. Above the tunnel to the east there is writing that says, "All who dare to come in will perish."'
    )
    goblin_post.add_exit('east', 'domains.school.dungeon.dark_tunnel')
    goblin_post.add_names('room', 'hall', 'post')
    goblin_post.add_adjectives('spooky', 'torchlit', 'square')

    goblin = gametools.clone('domains.school.dungeon.goblin')
    goblin_post.insert(goblin)

    master_goblin = gametools.clone('domains.school.dungeon.master_goblin')
    goblin_post.insert(master_goblin)
    return goblin_post
Пример #25
0
 def create_new_pocket(self, customer):
     DeepPocket.vault_room = self.vault_room
     DeepPocket.customer = customer
     new_pocket = gametools.clone('domains.wizardry.deep_pocket.pocket')
     DeepPocket.customer = None
     new_pocket.move_to(customer)
     customer.cons.write(
         'Silemon says: Ok, this will just take a second...')
     Thing.game.events.schedule(Thing.game.time + 3, self.finish_pocket,
                                customer)
     self.in_process = True
     self.deep_pockets.append(new_pocket)
Пример #26
0
def load():
    roomPath = gametools.findGamePath(__file__)
    exists = room.check_loaded(roomPath)
    if exists: return exists

    fire_lounge = room.Room('lounge', roomPath, safe=True, indoor=True)
    fire_lounge.set_description(
        'warm lounge',
        'You find yourself in a warm room with red and orange painted stone walls and pictures of fires and volcanoes. Many comfortable chairs are in the room. A grand fireplace stands to the south.'
    )
    fire_lounge.add_adjectives('warm', 'comfortable')
    fire_lounge.add_exit('east', 'domains.school.school.fire_kitchen')

    for chairs in range(0, 4):
        c = gametools.clone('domains.school.school.chair')
        c.move_to(fire_lounge)

    fireplace = gametools.clone('domains.school.school.fireplace')
    fireplace.dest = 'domains.school.school.great_hall'
    fireplace.move_to(fire_lounge)
    return fire_lounge
Пример #27
0
def load():
    roomPath = gametools.findGamePath(__file__)
    exists = room.check_loaded(roomPath)
    if exists: return exists

    library = room.Room('library', safe=True, pref_id=roomPath)
    library.indoor = True
    library.set_description('library', "You find yourself in a comfortable library filled from floor to ceiling with books and bookcases. The room is circular and must be built into a round tower as windows look out in every direction. A spiral staircase in the center of the room leads upwards.")
    library.add_exit('northwest', 'domains.school.school.landing')
    library.add_exit('up', 'domains.school.school.towerstairs')

    bookcase = gametools.clone('domains.school.school.library_bookcase')
    library.insert(bookcase)

    potion_book = gametools.clone('domains.school.school.potion_book')
    library.insert(potion_book)

    blue_book = gametools.clone('domains.school.school.blue_book')
    library.insert(blue_book)

    return library
 def fill_container(self, p, cons, oDO, oIDO):
     if oDO == None: 
         return "What do you intend to fill from the jet of water?"
     
     filling = oDO
     if not getattr(filling, 'liquid'):
         cons.write('The water leaves the %s and flows into the pool.' % filling)
         return True
     cons.write('The water fills your %s' % filling)
     self.emit('&nD%s fills a %s with water from the jet.' % (cons.user.id, filling))
     water = gametools.clone('domains.school.school.water')
     oDO.insert(water)
     return True
Пример #29
0
def clone():
    scavenger = creature.NPC('horster', __file__, 1)
    scavenger.set_description(
        'large red horster',
        'This is a bright red horster. It scans the ground carefully, looking for things. It keeps a huge pile of things in an old bag it has.'
    )
    scavenger.add_adjectives('large', 'red')
    scavenger.choices.append(take_stuff)
    scavenger.act_frequency = 2

    bag = gametools.clone('domains.school.forest.bag')
    scavenger.insert(bag)
    return scavenger
Пример #30
0
def load():
    roomPath = gametools.findGamePath(__file__)
    exists = room.check_loaded(roomPath)
    if exists: return exists

    clearing = room.Room('clearing', pref_id=roomPath)
    clearing.set_description(
        'bright clearing',
        'This clearing is bright and has an absolutely enormous pile of random stuff in the center of it.'
    )
    clearing.add_adjectives('bright')
    clearing.add_exit('north', 'domains.school.forest.woods')

    horster = gametools.clone('domains.school.forest.scavenger')
    clearing.insert(horster)

    ruby = gametools.clone('domains.school.forest.ruby')
    clearing.insert(ruby)

    paper = gametools.clone('domains.school.forest.torn_paper')
    clearing.insert(paper)
    return clearing