Example #1
0
 def add_wound(self, location=None, damage=0, bleed=0, dmg_type=None):
     """
     Adds wounds to a character, based on damage, bleed, and damage type.
     """
     if damage == 0 and bleed > 0:
         wound = wounds.BloodlossWound(bleed, self)
     elif damage > 0:
         wound = wounds.Wound(location, damage, bleed, dmg_type, self)
     self.db.wounds.append(wound)
     new_health = self.db.health - damage
     self.set_health(new_health)
     if bleed > 0 and not self.ndb.combat_handler:
         tickerhandler.add(self, 30, hook_key="at_bleed_tick")
     if not self.ndb.combat_handler:
         tickerhandler.add(self, 3600, hook_key="at_heal_tick")
Example #2
0
 def add_wound(self, location=None, damage=0, bleed=0, dmg_type=None):
     """
     Adds wounds to a character, based on damage, bleed, and damage type.
     """
     if damage == 0 and bleed > 0:
         wound = wounds.BloodlossWound(bleed, self)
     elif damage > 0:
         wound = wounds.Wound(location, damage, bleed, dmg_type, self)
     self.db.wounds.append(wound)
     new_health = self.db.health - damage
     self.set_health(new_health)
     if bleed > 0 and not self.ndb.combat_handler:
         tickerhandler.add(self, 30, hook_key="at_bleed_tick")
     if not self.ndb.combat_handler:
         tickerhandler.add(self, 3600, hook_key="at_heal_tick")
Example #3
0
 def start_bleed(self):
     """
     Starts the bleed tick.
     """
     tickerhandler.add(self, 30, hook_key="at_bleed_tick")
Example #4
0
 def start_heal(self):
     """
     Starts the heal tick. 
     """
     tickerhandler.add(self, 60 * 60, hook_key="at_heal_tick")
Example #5
0
 def start_bleed(self):
     """
     Starts the bleed tick.
     """
     tickerhandler.add(self, 30, hook_key="at_bleed_tick")
Example #6
0
 def start_heal(self):
     """
     Starts the heal tick. 
     """
     tickerhandler.add(self, 60 * 60, hook_key="at_heal_tick")