Changeset 309:2b0494b3ce6a


Ignore:
Timestamp:
09/05/13 22:41:14 (8 years ago)
Author:
Jeremy Thurgood <firxen@…>
Branch:
default
Phase:
public
Rebase:
62623330633333623261663961363235346464306533646463623233656135356239393137653330
Message:

Werewolf form heals every second.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nagslang/protagonist.py

    r305 r309  
    6060
    6161        self.go_human()
     62        self._time = 0
    6263
    6364    def _make_physics(self, space, position):
     
    300301        if self.health_level > PROTAGONIST_HEALTH_MAX_LEVEL:
    301302            self.health_level = PROTAGONIST_HEALTH_MAX_LEVEL
     303
     304    def update(self, dt):
     305        last_secs = int(self._time)
     306        self._time += dt
     307        secs = int(self._time)
     308        if self.form == self.WOLF_FORM and secs > last_secs:
     309            self.gain_health(1)
     310        super(Protagonist, self).update(dt)
Note: See TracChangeset for help on using the changeset viewer.