Changeset 634:45eff33c3dad for nagslang


Ignore:
Timestamp:
Sep 7, 2013, 11:35:45 PM (7 years ago)
Author:
Jeremy Thurgood <firxen@…>
Branch:
default
Children:
635:1eed282b6dea, 638:30d7982f43dc
rebase_source:
69ce77d647e15fa15e8957a432554d56a2ab2c7d
Message:

Increased health.

Location:
nagslang
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • nagslang/constants.py

    r630 r634  
    6060
    6161WEREWOLF_SOAK_FACTOR = 5
    62 PROTAGONIST_HEALTH_MAX_LEVEL = 100
     62PROTAGONIST_HEALTH_MAX_LEVEL = 200
    6363PROTAGONIST_HEALTH_MIN_LEVEL = 0
    6464
  • nagslang/protagonist.py

    r612 r634  
    374374        if int(self.lifetime + dt) > int(self.lifetime):
    375375            if self.in_wolf_form():
    376                 self.gain_health(1)
     376                self.gain_health(2)
    377377        super(Protagonist, self).update(dt)
    378378
  • 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.