# HG changeset patch # User Thibaut Girka # Date 1341438798 -7200 # Node ID eab591728abf70363131fde68132587164adbc6f # Parent 94fdb6c782c1e48292f16f59cf3965b5d0ce3b68 Minor fix in boss rush mode diff --git a/eosd b/eosd --- a/eosd +++ b/eosd @@ -34,23 +34,25 @@ from pytouhou.vm.msgrunner import NextSt class EoSDGameBossRush(EoSDGame): def run_iter(self, keystate): for i in range(20): - EoSDGame.run_iter(self, (keystate | 256) if i == 0 else 0) + skip = not (self.enemies or self.items or self.lasers + or self.bullets or self.cancelled_bullets) + if skip: + keystate &= ~1 + EoSDGame.run_iter(self, keystate | 256 if i == 0 else 0) if not self.enemies and self.frame % 90 == 0: for player in self.players: if player.state.power < 128: player.state.power += 1 - if (self.enemies or self.items - or self.lasers or self.bullets or self.cancelled_bullets): + if not skip: break + def cleanup(self): if not (self.boss or self.msg_wait or self.ecl_runner.boss_wait): self.enemies = [enemy for enemy in self.enemies if enemy.boss_callback != -1 or enemy.frame > 1] self.lasers = [laser for laser in self.lasers if laser.frame > 1] self.bullets = [bullet for bullet in self.bullets if bullet.frame > 1] - self.players_lasers = [(laser if laser and laser.frame > 1 else None) for laser in self.players_lasers] - self.players_bullets = [bullet for bullet in self.players_bullets if bullet.frame > 1] EoSDGame.cleanup(self)