X-Git-Url: https://jxself.org/git/?p=super-star-trek.git;a=blobdiff_plain;f=sst.py;h=0bb0a5b430f77751d2d1aed41507fa3aa47ef9a3;hp=3b00bd6dc994c64f2e2a94443f6e1c448ab4ace8;hb=e70b40fc0698a0d6d3d9eebb102c25064662da94;hpb=c02fecd74adf1c58c2db2e20b7c3f9a5e1fe321a diff --git a/sst.py b/sst.py index 3b00bd6..0bb0a5b 100755 --- a/sst.py +++ b/sst.py @@ -319,7 +319,9 @@ class Enemy: else: self.location = Coord() self.kdist = self.kavgd = None - game.enemies.remove(self) + # Guard prevents failure on Tholian or thingy + if self in game.enemies: + game.enemies.remove(self) return motion def __repr__(self): return "<%s,%s.%f>" % (self.type, self.location, self.power) # For debugging @@ -2606,7 +2608,7 @@ def wait(): if key != "IHEOL": break proutn(_("How long? ")) - scanner.chew() + scanner.chew() if key != "IHREAL": huh() return @@ -3431,8 +3433,8 @@ def proutn(proutntline): pause_game() clrscr() # Uncomment this to debug curses problems - if logfp: - logfp.write("#curses: at %s proutn(%s)\n" % ((y, x), repr(proutntline))) + #if logfp: + # logfp.write("#curses: at %s proutn(%s)\n" % ((y, x), repr(proutntline))) curwnd.addstr(proutntline) curwnd.refresh() else: