X-Git-Url: https://jxself.org/git/?p=super-star-trek.git;a=blobdiff_plain;f=src%2Fsst.py;h=ace9641c7da650a38076089c0f05ba4c97016f96;hp=477c05ab0765159e13f32b2b0b5b7859f5067514;hb=9aef5f5aae5fde0ed2b462945750c7aee59b3c1e;hpb=9ae916e9144e84ef1de4a86ea73a45a2bc4cc1be diff --git a/src/sst.py b/src/sst.py index 477c05a..ace9641 100644 --- a/src/sst.py +++ b/src/sst.py @@ -297,7 +297,7 @@ class game: def communicating(): "Are we in communication with Starfleet Command?" - return (not damaged("DRADIO")) or game.condition == docked + return (not damaged("DRADIO")) or game.condition == "docked" # Code corresponding to ai.c begins here @@ -523,7 +523,7 @@ def movebaddy(ship): prout(" retreats to sector %s" % ship.location) ship.sectormove(next) -def movcom(): +def moveklings(): "Allow enemies to move." for enemy in self.quad.enemies(): if enemy.type == "Commander": @@ -544,7 +544,6 @@ def movcom(): def movescom(ship, avoid): # commander movement helper - global ipage if game.state.kscmdr == game.quadrant or \ game.state.galaxy[iq].supernova or \ game.state.galaxy[iq].klingons > MAXKLQUAD-1: @@ -575,9 +574,7 @@ def movescom(ship, avoid): # destroy the planet del planet if communicating(): - if not ipage: pause_game(True) - ipage = true prout("Lt. Uhura- \"Captain, Starfleet Intelligence reports") proutn(_(" a planet in ")) proutn(cramlc(quadrant, game.state.kscmdr)) @@ -669,9 +666,7 @@ def scom(): if not communicating(): return # no warning game.iseenit = True - if not ipage: - pause_game(true) - ipage = True + pause_game(true) proutn(_("Lt. Uhura- \"Captain, the starbase in ")) proutn(cramlc(quadrant, game.state.kscmdr)) skip(1) @@ -690,9 +685,7 @@ def scom(): if (Rand() > 0.2 or not communicating() or not game.state.galaxy[game.state.kscmdr].charted): return - if ipage: - pause_game(true) - ipage = true + pause_game(true) prout(_("Lt. Uhura- \"Captain, Starfleet Intelligence reports")) proutn(_(" the Super-commander is in ")) proutn(cramlc(quadrant, game.state.kscmdr))