예제 #1
0
 def build_set_equip(self, loc, player=None):
     """Set the equip location for this item."""
     if loc in EQUIP_SLOTS.keys():
         self.equip_slot = loc
         self.save()
         return 'Item equip location set.\n'
     else:
         return 'That equip location doesn\'t exist.\n'
예제 #2
0
 def build_set_equip(self, loc, player=None):
     """Set the equip location for this item."""
     if loc in EQUIP_SLOTS.keys():
         self.equip_slot = loc
         self.save()
         return 'Item equip location set.\n'
     else:
         return 'That equip location doesn\'t exist.\n'
예제 #3
0
 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)
예제 #4
0
 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)