# HG changeset patch # User Jeremy Thurgood # Date 1378596945 -7200 # Node ID 45eff33c3dadaa0ce8a3cd5c5c52df6101d6f8af # Parent cf276bb2a854fd5fc411c1e0e36bb8549056b078 Increased health. diff -r cf276bb2a854 -r 45eff33c3dad nagslang/constants.py --- a/nagslang/constants.py Sun Sep 08 01:34:17 2013 +0200 +++ b/nagslang/constants.py Sun Sep 08 01:35:45 2013 +0200 @@ -59,7 +59,7 @@ ZORDER_HIGH = 3 WEREWOLF_SOAK_FACTOR = 5 -PROTAGONIST_HEALTH_MAX_LEVEL = 100 +PROTAGONIST_HEALTH_MAX_LEVEL = 200 PROTAGONIST_HEALTH_MIN_LEVEL = 0 BULLET_DAMAGE = 25 diff -r cf276bb2a854 -r 45eff33c3dad nagslang/protagonist.py --- a/nagslang/protagonist.py Sun Sep 08 01:34:17 2013 +0200 +++ b/nagslang/protagonist.py Sun Sep 08 01:35:45 2013 +0200 @@ -373,7 +373,7 @@ self._go_to_next_form() if int(self.lifetime + dt) > int(self.lifetime): if self.in_wolf_form(): - self.gain_health(1) + self.gain_health(2) super(Protagonist, self).update(dt) def force_wolf_form(self): diff -r cf276bb2a854 -r 45eff33c3dad nagslang/screens/area.py --- a/nagslang/screens/area.py Sun Sep 08 01:34:17 2013 +0200 +++ b/nagslang/screens/area.py Sun Sep 08 01:35:45 2013 +0200 @@ -10,7 +10,7 @@ from nagslang.constants import ( COLLISION_TYPE_WALL, COLLISION_TYPE_PLAYER, CALLBACK_COLLIDERS, COLLISION_TYPE_FURNITURE, COLLISION_TYPE_WEREWOLF_ATTACK, - CMD_TOGGLE_FORM, CMD_ACTION) + CMD_TOGGLE_FORM, CMD_ACTION, PROTAGONIST_HEALTH_MAX_LEVEL) from nagslang.events import ( AddDrawableEvent, DeathEvent, DoorEvent, QuitEvent, ScreenChange) from nagslang.level import Level @@ -295,7 +295,9 @@ health_colour = pygame.color.THECOLORS['red'] else: health_colour = pygame.color.THECOLORS['violetred3'] - rect = pygame.Rect(5, 5, self.protagonist.get_health_level(), 30) + health = self.protagonist.get_health_level() + rect = pygame.Rect( + 5, 5, (100 * health) / PROTAGONIST_HEALTH_MAX_LEVEL, 30) pygame.draw.rect(bar_surface, health_colour, rect, 0) bar_surface.set_alpha(192) y_pos = surface.get_height() - 20 - bar_surface.get_height()