all repos — Legends-RPG @ 5d4d09e8ded491a659f167c2e96f001b5a78037e

A fantasy mini-RPG built with Python and Pygame.

Tinting no longer happens when enemy misses.
Justin Armstrong justinmeister@gmail.com
Wed, 30 Apr 2014 10:43:35 -0700
commit

5d4d09e8ded491a659f167c2e96f001b5a78037e

parent

4725cd9192b0e1268a61e6f175a3ccac71c78e52

2 files changed, 3 insertions(+), 2 deletions(-)

jump to
M data/components/person.pydata/components/person.py

@@ -421,7 +421,7 @@ Put a red overlay over sprite to indicate damage.

""" if self.damaged: self.image = copy.copy(self.spritesheet_dict['facing left 2']) - self.image = pg.transform.scale2x(self.image) + self.image = pg.transform.scale2x(self.image).convert_alpha() damage_image = copy.copy(self.image).convert_alpha() damage_image.fill((255, 0, 0, self.damage_alpha), special_flags=pg.BLEND_RGBA_MULT) self.image.blit(damage_image, (0, 0))
M data/observer.pydata/observer.py

@@ -108,7 +108,8 @@ self.info_box.state = c.DISPLAY_ENEMY_ATTACK_DAMAGE

self.level.state = c.DISPLAY_ENEMY_ATTACK_DAMAGE self.level.set_timer_to_current_time() self.level.player_damaged(player_damage) - self.player.damaged = True + if player_damage: + self.player.damaged = True def player_attack(self): enemy_posx = self.arrow.rect.x + 60