Ignore:
Timestamp:
09/07/13 23:35:45 (8 years ago)
Author:
Jeremy Thurgood <firxen@…>
Branch:
default
Children:
635:1eed282b6dea, 638:30d7982f43dc
Phase:
public
Rebase:
36396365373764363437653135666131356538393537613433323535346435366132616232633764
Message:

Increased health.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nagslang/screens/area.py

    r626 r634  
    1111    COLLISION_TYPE_WALL, COLLISION_TYPE_PLAYER, CALLBACK_COLLIDERS,
    1212    COLLISION_TYPE_FURNITURE, COLLISION_TYPE_WEREWOLF_ATTACK,
    13     CMD_TOGGLE_FORM, CMD_ACTION)
     13    CMD_TOGGLE_FORM, CMD_ACTION, PROTAGONIST_HEALTH_MAX_LEVEL)
    1414from nagslang.events import (
    1515    AddDrawableEvent, DeathEvent, DoorEvent, QuitEvent, ScreenChange)
     
    296296        else:
    297297            health_colour = pygame.color.THECOLORS['violetred3']
    298         rect = pygame.Rect(5, 5, self.protagonist.get_health_level(), 30)
     298        health = self.protagonist.get_health_level()
     299        rect = pygame.Rect(
     300            5, 5, (100 * health) / PROTAGONIST_HEALTH_MAX_LEVEL, 30)
    299301        pygame.draw.rect(bar_surface, health_colour, rect, 0)
    300302        bar_surface.set_alpha(192)
Note: See TracChangeset for help on using the changeset viewer.