Esempio n. 1
0
 def __init__(self, name, atk_mod=0, dmg_mod=0):
     Attributes.__init__(self)
     self.name = name
     # Modifiers
     self.atk = intOrZero(atk_mod)
     if type(dmg_mod) is int:
         self.dmg_roll = DamageRoll(None, None, dmg_mod)
     elif isinstance(dmg_mod, DamageRoll):
         self.dmg_roll = dmg_mod
     elif isinstance(dmg_mod, basestring):
         self.dmg_roll = DamageRoll(None, None, intOrZero(dmg_mod))
     else:
         raise ValueError("Unrecognized damage modifier %s" % dmg_mod)
     # UI Details
     Buff._last_id += 1
     self.id = self._last_id
     self.ui_id = ''
Esempio n. 2
0
 def __init__(self):
     Attributes.__init__(self)
     self.hit_die = 0
Esempio n. 3
0
 def __init__(self, name, atk_mod=0, dmg_mod=0):
     Attributes.__init__(self)
     self.name = name
Esempio n. 4
0
 def __init__(self, name, attack):
     Attributes.__init__(self)
     self.name = name
     assert isinstance(attack, Attack)
     self._attack = attack
Esempio n. 5
0
 def __init__(self, name):
     Attributes.__init__(self)
     self.name = name