def __init__(self, args={}): Model.__init__(self, args) # Initialize the current state of the door from the default settings: self._closed = self.closed self._locked = self.locked if 'to_room' in args: self.to_room = args.get('to_room')
def __init__(self, args={}): Model.__init__(self, args) self.rooms = {} self.items = {} self.npcs = {} self.scripts = {} self.time_of_last_reset = 0 self.times_visited_since_reset = 0
def __init__(self, args={}): Model.__init__(self, args) self.buys_types = [] if not self.sale_items: #We only get here if this is the first instance of the merchant, # otherwise the merchandise will be loaded from load_extras() merch_dict = {'merchant': self} self.sale_items = MerchandiseList(merch_dict) self.sale_items.save()
def __init__(self, args={}): self.items = [] self.exits = {'north': None, 'south': None, 'east': None, 'west': None, 'up': None, 'down': None} self.npcs = [] self.spawns = {} self.players = {} Model.__init__(self, args)
def characterize(self, args={}): Model.__init__(self, args) self.atk = 0 self.battle = None self._battle_target = None self.inventory = [] self.equipped = {} #Stores current item in each slot from EQUIP_SLOTS for i in EQUIP_SLOTS.keys(): self.equipped[i] = '' self.isequipped = [] #Is a list of the currently equipped items self._attack_queue = [] self.hit = IntRegister() self.evade = IntRegister() self.absorb = DictRegister() self.damage = DamageRegister() self.effects = {} self.position = ('standing', None)
def __init__(self, args={}): Model.__init__(self, args) # Both the "live" and "dead" lists contain dictionaries in the form: # {'id': item_id, 'area': item_area, 'name': item_name, 'price': price} # # Neither directly keeps track of items. If an item on the merchandise # list no longer exists, it will be stored in the 'dead' list. Dead # items are occationally checked on, and re-added to the 'live' list # if the area gets re-imported. # # Keywords are stored with live items so we can check quickly if they # are in the merchandise list. Keywords are not saved with their items, # and may not exist for dead items. if not self.live: self.live = [] if not self.dead: self.dead = [] self.resolve()
def __init__(self, args={}): Model.__init__(self, args) if args.get('script'): self.script = args.get('script')
def __init__(self, args={}): self.item_types = {} Model.__init__(self, args) if not self.keywords and self.name: self.keywords = self.name.lower().split()
def __init__(self, args={}): Model.__init__(self, args) self.spawn_object = args.get('obj') self.nested_spawns = []