diff options
-rw-r--r-- | brutalmaze/game.py | 2 | ||||
-rw-r--r-- | brutalmaze/maze.py | 7 | ||||
-rwxr-xr-x | setup.py | 2 |
3 files changed, 6 insertions, 5 deletions
diff --git a/brutalmaze/game.py b/brutalmaze/game.py index 65fcffb..cd34199 100644 --- a/brutalmaze/game.py +++ b/brutalmaze/game.py @@ -17,7 +17,7 @@ # You should have received a copy of the GNU Affero General Public License # along with Brutal Maze. If not, see <https://www.gnu.org/licenses/>. -__version__ = '0.8.24' +__version__ = '0.8.25' import re from argparse import ArgumentParser, FileType, RawTextHelpFormatter diff --git a/brutalmaze/maze.py b/brutalmaze/maze.py index 9830611..ef4f13f 100644 --- a/brutalmaze/maze.py +++ b/brutalmaze/maze.py @@ -311,7 +311,10 @@ class Maze: if wound <= 0 or not self.isdisplayed(gridx, gridy): fallen.append(i) elif bullet.color == 'Aluminium': + active_enemies = [e for e in self.enemies if e.awake] if self.map[gridx][gridy] == WALL and self.next_move <= 0: + fallen.append(i) + if not active_enemies: continue self.glitch = wound * 1000 enemy = new_enemy(self, gridx, gridy) enemy.awake = True @@ -319,10 +322,8 @@ class Maze: play(self.sfx_spawn, enemy.spawn_volumn, enemy.get_angle()) enemy.hit(wound) self.enemies.append(enemy) - fallen.append(i) continue - for j, enemy in enumerate(self.enemies): - if not enemy.awake: continue + for j, enemy in enumerate(active_enemies): if bullet.get_distance(*enemy.pos) < self.distance: enemy.hit(wound) if enemy.wound >= ENEMY_HP: diff --git a/setup.py b/setup.py index ad9814a..15bf0da 100755 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ with open('README.rst') as f: setup( name='brutalmaze', - version='0.8.24', + version='0.8.25', description="Minimalist thrilling shoot 'em up game", long_description=long_description, url='https://github.com/McSinyx/brutalmaze', |