diff options
author | Nguyễn Gia Phong <vn.mcsinyx@gmail.com> | 2018-02-27 20:55:23 +0700 |
---|---|---|
committer | Nguyễn Gia Phong <vn.mcsinyx@gmail.com> | 2018-02-27 20:55:23 +0700 |
commit | 0cfeaf9cab423d9662f621215b2ebcaa69b13ef8 (patch) | |
tree | ce17c0ba1c6f189855657dd36ce0ad84ee1199fb | |
parent | 0ba2f33bda16e42016e77abf5a91d9316c0cd39c (diff) | |
download | brutalmaze-0cfeaf9cab423d9662f621215b2ebcaa69b13ef8.tar.gz |
Make Agent Orange more lethal and noticable
-rw-r--r-- | brutalmaze/characters.py | 7 | ||||
-rw-r--r-- | brutalmaze/maze.py | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/brutalmaze/characters.py b/brutalmaze/characters.py index 6399d70..e72fd91 100644 --- a/brutalmaze/characters.py +++ b/brutalmaze/characters.py @@ -73,10 +73,10 @@ class Hero: old_speed, time = self.spin_speed, get_ticks() self.spin_speed = fps / (HERO_HP-self.wound**0.5) self.spin_queue *= self.spin_speed / old_speed - if time > self.next_heal: + if time >= self.next_heal: self.wound -= HEAL_SPEED / self.spin_speed / HERO_HP if self.wound < 0: self.wound = 0.0 - if time > self.next_beat: + if time >= self.next_beat: play(self.sfx_heart) self.next_beat = time + MIN_BEAT*(2 - self.wound/HERO_HP) @@ -95,7 +95,8 @@ class Hero: def draw(self): """Draw the hero.""" - trigon = regpoly(3, self.R, self.angle, self.x, self.y) + sides = 3 if get_ticks() >= self.next_heal else 4 + trigon = regpoly(sides, self.R, self.angle, self.x, self.y) fill_aapolygon(self.surface, trigon, self.color[int(self.wound)]) def resize(self): diff --git a/brutalmaze/maze.py b/brutalmaze/maze.py index 70577ae..6c5052c 100644 --- a/brutalmaze/maze.py +++ b/brutalmaze/maze.py @@ -277,7 +277,7 @@ class Maze: fallen.append(i) break elif bullet.get_distance(self.x, self.y) < self.distance: - if self.hero.spin_queue: + if self.hero.spin_queue and time >= self.hero.next_heal: play(bullet.sfx_missed, wound, bullet.angle + pi) else: self.hit_hero(wound, bullet.color) |