def _on_ship_destroyed(self, msg): if msg.sender is self.target_ship: self.check_ship_alive() assert not self.target_ship.in_ship_map ShipDestroyed.unsubscribe(self._on_ship_destroyed)
def end(self): if self.target_ship.in_ship_map: ShipDestroyed.unsubscribe(self._on_ship_destroyed) super(ChaseShipsAndAttack, self).end()
def end(self): if self.target_ship.in_ship_map: ShipDestroyed.unsubscribe(self._on_ship_destroyed) super().end()