X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;ds=inline;f=sst.py;h=77740da60e2dbad43a6608e940e6bca1cdcc527a;hb=6c6420478d3ea0eb4359ea94e73821a30b970399;hp=0bb0a5b430f77751d2d1aed41507fa3aa47ef9a3;hpb=e70b40fc0698a0d6d3d9eebb102c25064662da94;p=super-star-trek.git diff --git a/sst.py b/sst.py index 0bb0a5b..77740da 100755 --- a/sst.py +++ b/sst.py @@ -1180,7 +1180,7 @@ def collision(rammed, enemy): game.damage[dev] += game.optime + extradm game.shldup = False prout(_("***Shields are down.")) - if game.state.remkl + len(game.state.kcmdr) + game.state.nscrem: + if game.unwon(): announce() damagereport() else: @@ -3506,7 +3506,7 @@ def setwnd(wnd): legend = "prompt" else: legend = "unknown" - logfp.write("#curses: setwnd(%s)\n" % legend) + #logfp.write("#curses: setwnd(%s)\n" % legend) curwnd = wnd # Some curses implementations get confused when you try this. try: @@ -3710,8 +3710,6 @@ def imove(icourse=None, noattack=False): # check for edge of galaxy kinks = 0 while True: - - kink = False if icourse.final.i < 0: icourse.final.i = -icourse.final.i @@ -5210,7 +5208,8 @@ def lrscan(silent): if not silent and game.state.galaxy[x][y].supernova: proutn(" ***") elif not silent: - proutn(" %3d" % (game.state.chart[x][y].klingons*100 + game.state.chart[x][y].starbase * 10 + game.state.chart[x][y].stars)) + cn = " %3d" % (game.state.chart[x][y].klingons*100 + game.state.chart[x][y].starbase * 10 + game.state.chart[x][y].stars) + proutn(((3 - len(cn)) * '.') + cn) if not silent: prout(" ") @@ -5734,7 +5733,7 @@ def setup(): klumper = MAXKLQUAD while True: r = randreal() - klump = (1.0 - r*r)*klumper + klump = int((1.0 - r*r)*klumper) if klump > krem: klump = krem krem -= klump @@ -5743,7 +5742,7 @@ def setup(): if not game.state.galaxy[w.i][w.j].supernova and \ game.state.galaxy[w.i][w.j].klingons + klump <= MAXKLQUAD: break - game.state.galaxy[w.i][w.j].klingons += int(klump) + game.state.galaxy[w.i][w.j].klingons += klump if krem <= 0: break # Position Klingon Commander Ships @@ -6102,6 +6101,9 @@ def newqad(): game.quad[QUADSIZE-1][0] = '.' if game.quad[QUADSIZE-1][QUADSIZE-1]=='X': game.quad[QUADSIZE-1][QUADSIZE-1] = '.' + # This should guarantee that replay games don't lose info about the chart + if (game.options & OPTION_AUTOSCAN) or replayfp: + lrscan(silent=True) def setpassword(): "Set the self-destruct password."