Restore kill crediting. Required two rebuilds of regression-test loads.
authorEric S. Raymond <esr@thyrsus.com>
Mon, 27 Feb 2017 16:03:59 +0000 (11:03 -0500)
committerEric S. Raymond <esr@thyrsus.com>
Mon, 27 Feb 2017 16:03:59 +0000 (11:03 -0500)
sst.py
test/test2.chk
test/test3.chk
test/test4.chk
test/test4.log
test/test5.chk
test/test5.log
test/test7.chk
test/test8.chk

diff --git a/sst.py b/sst.py
index 599fe45fdcf977e9124c299c52fb22e0dd1b375e..db33c54e20577b40474f92ac7474d1c4c6782073 100755 (executable)
--- a/sst.py
+++ b/sst.py
@@ -1607,16 +1607,16 @@ def deadkl(w, etype, mv):
         # Killed some type of Klingon
         game.state.galaxy[game.quadrant.i][game.quadrant.j].klingons -= 1
         game.klhere -= 1
         # Killed some type of Klingon
         game.state.galaxy[game.quadrant.i][game.quadrant.j].klingons -= 1
         game.klhere -= 1
-        if type == 'C':
+        if etype == 'C':
             game.state.kcmdr.remove(game.quadrant)
             unschedule(FTBEAM)
             if game.state.kcmdr:
                 schedule(FTBEAM, expran(1.0*game.incom/len(game.state.kcmdr)))
             if is_scheduled(FCDBAS) and game.battle == game.quadrant:
                 unschedule(FCDBAS)
             game.state.kcmdr.remove(game.quadrant)
             unschedule(FTBEAM)
             if game.state.kcmdr:
                 schedule(FTBEAM, expran(1.0*game.incom/len(game.state.kcmdr)))
             if is_scheduled(FCDBAS) and game.battle == game.quadrant:
                 unschedule(FCDBAS)
-        elif type ==  'K':
+        elif etype ==  'K':
             game.state.remkl -= 1
             game.state.remkl -= 1
-        elif type ==  'S':
+        elif etype ==  'S':
             game.state.nscrem -= 1
             game.state.kscmdr.invalidate()
             game.isatb = 0
             game.state.nscrem -= 1
             game.state.kscmdr.invalidate()
             game.isatb = 0
index 33e4010764e46dd924aa5a37c118899599d125d3..d71d2bd8dc673bd8b2bf9379645772e5dd98652d 100644 (file)
@@ -38,11 +38,11 @@ Shields lowered.
 ***Klingon at Sector 6 - 7 destroyed.
 753 unit hit on Commander at Sector 6 - 3
 ***Commander at Sector 6 - 3 destroyed.
 ***Klingon at Sector 6 - 7 destroyed.
 753 unit hit on Commander at Sector 6 - 3
 ***Commander at Sector 6 - 3 destroyed.
-245 unit hit on Klingon at Sector 8 - 6
+261 unit hit on Klingon at Sector 8 - 6
 ***Klingon at Sector 8 - 6 destroyed.
 ***Klingon at Sector 8 - 6 destroyed.
-265 unit hit on Klingon at Sector 7 - 2
+280 unit hit on Klingon at Sector 7 - 2
 ***Klingon at Sector 7 - 2 destroyed.
 ***Klingon at Sector 7 - 2 destroyed.
-265 unit hit on Klingon at Sector 9 - 5
+255 unit hit on Klingon at Sector 9 - 5
 ***Klingon at Sector 9 - 5 destroyed.
 2175 expended on empty space.
 
 ***Klingon at Sector 9 - 5 destroyed.
 2175 expended on empty space.
 
@@ -82,14 +82,18 @@ It is stardate 2149.8.
 The Enterprise has been destroyed in battle.
 
 Dulce et decorum est pro patria mori.
 The Enterprise has been destroyed in battle.
 
 Dulce et decorum est pro patria mori.
-The Federation will be destroyed.
+As a result of your actions, a treaty with the Klingon
+Empire has been signed. The terms of the treaty are
+highly unfavorable to the Federation.
 
 
 Your score --
 
 
 Your score --
+     5 ordinary Klingons destroyed           50
+     1 Klingon commanders destroyed          50
   0.00 Klingons per stardate                  0
      1 ship(s) lost or destroyed           -100
 Penalty for getting yourself killed        -200
 
   0.00 Klingons per stardate                  0
      1 ship(s) lost or destroyed           -100
 Penalty for getting yourself killed        -200
 
-TOTAL SCORE                                -300
+TOTAL SCORE                                -200
 
 May the Great Bird of the Galaxy roost upon your home planet.
 
 May the Great Bird of the Galaxy roost upon your home planet.
index d738bbfa41f0cf04c17beab3d766eca45b705c52..56df3a0861962f187597d72a7fb6a7447e5a6e8b 100644 (file)
@@ -80,27 +80,25 @@ Helmsman Sulu- "Aye, Sir."
 YOU HAVE ATTEMPTED TO CROSS THE NEGATIVE ENERGY BARRIER
 AT THE EDGE OF THE GALAXY.  THE THIRD TIME YOU TRY THIS,
 YOU WILL BE DESTROYED.
 YOU HAVE ATTEMPTED TO CROSS THE NEGATIVE ENERGY BARRIER
 AT THE EDGE OF THE GALAXY.  THE THIRD TIME YOU TRY THIS,
 YOU WILL BE DESTROYED.
+
+Entering Quadrant 6 - 2.
 COMMAND> 
 COMMAND> m 2 5 2 2
 (Manual movement assumed.)
 
 Helmsman Sulu- "Aye, Sir."
 
 COMMAND> 
 COMMAND> m 2 5 2 2
 (Manual movement assumed.)
 
 Helmsman Sulu- "Aye, Sir."
 
-YOU HAVE ATTEMPTED TO CROSS THE NEGATIVE ENERGY BARRIER
-AT THE EDGE OF THE GALAXY.  THE THIRD TIME YOU TRY THIS,
-YOU WILL BE DESTROYED.
-
-Entering Quadrant 4 - 7.
+Entering Quadrant 1 - 4.
 
 [ANNOUNCEMENT ARRIVING...]
 
 Message from Starfleet Command       Stardate 2698.43
 
 [ANNOUNCEMENT ARRIVING...]
 
 Message from Starfleet Command       Stardate 2698.43
-     Supernova in Quadrant 4 - 2; caution advised.
+     Supernova in Quadrant 3 - 8; caution advised.
 
 [ANNOUNCEMENT ARRIVING...]
 
 
 [ANNOUNCEMENT ARRIVING...]
 
-Message from Starfleet Command       Stardate 2698.75
-     Supernova in Quadrant 4 - 3; caution advised.
+Message from Starfleet Command       Stardate 2699.95
+     Supernova in Quadrant 4 - 5; caution advised.
 COMMAND> 
 COMMAND> move 5 8 10 1
 (Manual movement assumed.)
 COMMAND> 
 COMMAND> move 5 8 10 1
 (Manual movement assumed.)
@@ -108,7 +106,7 @@ COMMAND> move 5 8 10 1
 Helmsman Sulu- "Aye, Sir."
 
 Engineering to bridge--
 Helmsman Sulu- "Aye, Sir."
 
 Engineering to bridge--
-We don't have enough energy, but we could do it at warp 4,
+We don't have enough energy, but we could do it at warp 3,
 if you'll lower the shields.
 COMMAND> quit
 
 if you'll lower the shields.
 COMMAND> quit
 
index dae27005df9e1dcfc95a01b9ecd986117d8a2460..133e85eac860c42ac504f38fc0fe37b3658ef062 100644 (file)
@@ -4,8 +4,8 @@ sst2k: seed set to 1329940672
 -SUPER- STAR TREK
 
 Would you like a regular, tournament, or saved game? # SST2K version 2.1
 -SUPER- STAR TREK
 
 Would you like a regular, tournament, or saved game? # SST2K version 2.1
-# recorded by esr@snark on Wed Feb 22 14:57:52 2012
 # Tests game completion (loss)
 # Tests game completion (loss)
+# recorded by esr@snark on Mon Feb 27 10:57:26 2017
 r
 Would you like a Short, Medium, or Long game? s
 Are you a Novice, Fair, Good, Expert, or Emeritus player? n
 r
 Would you like a Short, Medium, or Long game? s
 Are you a Novice, Fair, Good, Expert, or Emeritus player? n
@@ -104,9 +104,18 @@ COMMAND> move aut 6 2 5 5
 
 Ensign Chekov- "Course laid in, Captain."
 
 
 Ensign Chekov- "Course laid in, Captain."
 
-First Officer Spock- "Captain, I compute that such
-  a trip would require approximately 134 percent of our
-  remaining time.  Are you sure this is wise?" n
+Entering Quadrant 6 - 2.
+COMMAND> n
+LEGAL COMMANDS ARE:
+SRSCAN       STATUS       REQUEST      LRSCAN       
+PHASERS      TORPEDO      PHOTONS      MOVE         SHIELDS      
+DOCK         DAMAGES      CHART        IMPULSE      REST         
+WARP         SENSORS      ORBIT        TRANSPORT    MINE         
+CRYSTALS     SHUTTLE      PLANETS      REPORT       COMPUTER     
+COMMANDS     EMEXIT       PROBE        SAVE         FREEZE       
+ABANDON      DESTRUCT     DEATHRAY     CAPTURE      CLOAK        
+DEBUG        MAYDAY       SOS          CALL         QUIT         
+HELP         SCORE                     
 COMMAND> 
 COMMAND> warp 7
 Engineer Scott- "Aye, but our maximum safe speed is warp 6."
 COMMAND> 
 COMMAND> warp 7
 Engineer Scott- "Aye, but our maximum safe speed is warp 6."
@@ -117,29 +126,63 @@ COMMAND> move aut 2 6 5 5
 
 Ensign Chekov- "Course laid in, Captain."
 
 
 Ensign Chekov- "Course laid in, Captain."
 
-First Officer Spock- "Captain, I compute that such
-  a trip would require approximately 93 percent of our
-  remaining time.  Are you sure this is wise?" y
-
 Entering Quadrant 2 - 6.
 Entering Quadrant 2 - 6.
+COMMAND> y
+LEGAL COMMANDS ARE:
+SRSCAN       STATUS       REQUEST      LRSCAN       
+PHASERS      TORPEDO      PHOTONS      MOVE         SHIELDS      
+DOCK         DAMAGES      CHART        IMPULSE      REST         
+WARP         SENSORS      ORBIT        TRANSPORT    MINE         
+CRYSTALS     SHUTTLE      PLANETS      REPORT       COMPUTER     
+COMMANDS     EMEXIT       PROBE        SAVE         FREEZE       
+ABANDON      DESTRUCT     DEATHRAY     CAPTURE      CLOAK        
+DEBUG        MAYDAY       SOS          CALL         QUIT         
+HELP         SCORE                     
 COMMAND> 
 COMMAND> move aut 5 8 5 5
 
 Ensign Chekov- "Course laid in, Captain."
 
 First Officer Spock- "Captain, I compute that such
 COMMAND> 
 COMMAND> move aut 5 8 5 5
 
 Ensign Chekov- "Course laid in, Captain."
 
 First Officer Spock- "Captain, I compute that such
-  a trip would require approximately 1600 percent of our
+  a trip would require approximately 151 percent of our
   remaining time.  Are you sure this is wise?" n
 COMMAND> move aut 9 9
 
   remaining time.  Are you sure this is wise?" n
 COMMAND> move aut 9 9
 
+COMMAND> y
+LEGAL COMMANDS ARE:
+SRSCAN       STATUS       REQUEST      LRSCAN       
+PHASERS      TORPEDO      PHOTONS      MOVE         SHIELDS      
+DOCK         DAMAGES      CHART        IMPULSE      REST         
+WARP         SENSORS      ORBIT        TRANSPORT    MINE         
+CRYSTALS     SHUTTLE      PLANETS      REPORT       COMPUTER     
+COMMANDS     EMEXIT       PROBE        SAVE         FREEZE       
+ABANDON      DESTRUCT     DEATHRAY     CAPTURE      CLOAK        
+DEBUG        MAYDAY       SOS          CALL         QUIT         
+HELP         SCORE                     
+COMMAND> n
+LEGAL COMMANDS ARE:
+SRSCAN       STATUS       REQUEST      LRSCAN       
+PHASERS      TORPEDO      PHOTONS      MOVE         SHIELDS      
+DOCK         DAMAGES      CHART        IMPULSE      REST         
+WARP         SENSORS      ORBIT        TRANSPORT    MINE         
+CRYSTALS     SHUTTLE      PLANETS      REPORT       COMPUTER     
+COMMANDS     EMEXIT       PROBE        SAVE         FREEZE       
+ABANDON      DESTRUCT     DEATHRAY     CAPTURE      CLOAK        
+DEBUG        MAYDAY       SOS          CALL         QUIT         
+HELP         SCORE                     
+COMMAND> move aut 5  8 5 5
+
+Ensign Chekov- "Course laid in, Captain."
 
 First Officer Spock- "Captain, I compute that such
 
 First Officer Spock- "Captain, I compute that such
-  a trip would require approximately 251 percent of our
+  a trip would require approximately 168 percent of our
   remaining time.  Are you sure this is wise?" y
 
   remaining time.  Are you sure this is wise?" y
 
+Entering Quadrant 5 - 8.
+
 
 
 
 
-It is stardate 3421.1.
+It is stardate 3423.8.
 
 Your time has run out and the Federation has been
 conquered.  Your starship is now Klingon property,
 
 Your time has run out and the Federation has been
 conquered.  Your starship is now Klingon property,
@@ -150,8 +193,9 @@ LIVE LONG AND PROSPER.
 
 
 Your score --
 
 
 Your score --
-  0.00 Klingons per stardate                  0
+     2 ordinary Klingons destroyed           20
+  0.20 Klingons per stardate                101
 
 
-TOTAL SCORE                                   0
+TOTAL SCORE                                 121
 
 May the Great Bird of the Galaxy roost upon your home planet.
 
 May the Great Bird of the Galaxy roost upon your home planet.
index 9b6b9569af6f382257e67912818747f3268063f0..5b5cb863014c320889c900db92cb91f3071560a5 100644 (file)
@@ -1,8 +1,8 @@
 # seed 1329940672
 # options 
 # SST2K version 2.1
 # seed 1329940672
 # options 
 # SST2K version 2.1
-# recorded by esr@snark on Wed Feb 22 14:57:52 2012
 # Tests game completion (loss)
 # Tests game completion (loss)
+# recorded by esr@snark on Mon Feb 27 10:57:26 2017
 r
 s
 n
 r
 s
 n
@@ -46,3 +46,5 @@ n
 move aut 9 9
 y
 n
 move aut 9 9
 y
 n
+move aut 5  8 5 5
+y
index 6465ad36bbe5eba69e409718a22524279d5483d3..c47db12d661514c0e490c55485ee3cd7fc7bd4d5 100644 (file)
@@ -209,36 +209,56 @@ COMMAND> move aut 8 5 2 2
 
 Ensign Chekov- "Course laid in, Captain."
 
 
 Ensign Chekov- "Course laid in, Captain."
 
-First Officer Spock- "Captain, I compute that such
-  a trip would require approximately 267 percent of our
-  remaining time.  Are you sure this is wise?" n
+Entering Quadrant 8 - 5.
+COMMAND> n
+LEGAL COMMANDS ARE:
+SRSCAN       STATUS       REQUEST      LRSCAN       
+PHASERS      TORPEDO      PHOTONS      MOVE         SHIELDS      
+DOCK         DAMAGES      CHART        IMPULSE      REST         
+WARP         SENSORS      ORBIT        TRANSPORT    MINE         
+CRYSTALS     SHUTTLE      PLANETS      REPORT       COMPUTER     
+COMMANDS     EMEXIT       PROBE        SAVE         FREEZE       
+ABANDON      DESTRUCT     DEATHRAY     CAPTURE      CLOAK        
+DEBUG        MAYDAY       SOS          CALL         QUIT         
+HELP         SCORE                     
 COMMAND> 
 COMMAND> move aut 6 7 2 2
 
 Ensign Chekov- "Course laid in, Captain."
 
 COMMAND> 
 COMMAND> move aut 6 7 2 2
 
 Ensign Chekov- "Course laid in, Captain."
 
-First Officer Spock- "Captain, I compute that such
-  a trip would require approximately 267 percent of our
-  remaining time.  Are you sure this is wise?" y
-
 Entering Quadrant 6 - 7.
 
 Entering Quadrant 6 - 7.
 
+[ANNOUNCEMENT ARRIVING...]
 
 
+Message from Starfleet Command       Stardate 4077.10
+     Supernova in Quadrant 3 - 1; caution advised.
 
 
-It is stardate 4075.7.
-
-Your time has run out and the Federation has been
-conquered.  Your starship is now Klingon property,
-and you are put on trial as a war criminal.  On the
-basis of your record, you are acquitted.
-
-LIVE LONG AND PROSPER.
-
-
-Your score --
-  0.00 Klingons per stardate                  0
-     4 stars destroyed by your action       -20
+[ANNOUNCEMENT ARRIVING...]
 
 
-TOTAL SCORE                                 -20
+Message from Starfleet Command       Stardate 4077.67
+     Supernova in Quadrant 5 - 7; caution advised.
+COMMAND> y
+LEGAL COMMANDS ARE:
+SRSCAN       STATUS       REQUEST      LRSCAN       
+PHASERS      TORPEDO      PHOTONS      MOVE         SHIELDS      
+DOCK         DAMAGES      CHART        IMPULSE      REST         
+WARP         SENSORS      ORBIT        TRANSPORT    MINE         
+CRYSTALS     SHUTTLE      PLANETS      REPORT       COMPUTER     
+COMMANDS     EMEXIT       PROBE        SAVE         FREEZE       
+ABANDON      DESTRUCT     DEATHRAY     CAPTURE      CLOAK        
+DEBUG        MAYDAY       SOS          CALL         QUIT         
+HELP         SCORE                     
+COMMAND> n
+LEGAL COMMANDS ARE:
+SRSCAN       STATUS       REQUEST      LRSCAN       
+PHASERS      TORPEDO      PHOTONS      MOVE         SHIELDS      
+DOCK         DAMAGES      CHART        IMPULSE      REST         
+WARP         SENSORS      ORBIT        TRANSPORT    MINE         
+CRYSTALS     SHUTTLE      PLANETS      REPORT       COMPUTER     
+COMMANDS     EMEXIT       PROBE        SAVE         FREEZE       
+ABANDON      DESTRUCT     DEATHRAY     CAPTURE      CLOAK        
+DEBUG        MAYDAY       SOS          CALL         QUIT         
+HELP         SCORE                     
+COMMAND> quit
 
 May the Great Bird of the Galaxy roost upon your home planet.
 
 May the Great Bird of the Galaxy roost upon your home planet.
index 190237303d7627a0f6958b5589fb844eed5ef8de..4861ea1ec7228a99b3ce706a2898ea0a7630fb40 100644 (file)
@@ -61,3 +61,4 @@ n
 move aut 6 7 2 2
 y
 n
 move aut 6 7 2 2
 y
 n
+quit
index 885a13fb37d694998bfbd6dfa9ff81cb6536d572..df0b6ccf5d6b1e3e58fedf5fadb18fe82c1887fe 100644 (file)
@@ -219,17 +219,17 @@ It is stardate 3536.1.
 Your starship has been destroyed by a nova.
 That was a great shot.
 
 Your starship has been destroyed by a nova.
 That was a great shot.
 
-The Federation will be destroyed.
+As a result of your actions, a treaty with the Klingon
+Empire has been signed. The terms of the treaty are
+favorable to the Federation.
+
+Congratulations!
 
 
 Your score --
 
 
 Your score --
-  0.00 Klingons per stardate                  0
+     4 ordinary Klingons destroyed           40
+  0.76 Klingons per stardate                379
      2 stars destroyed by your action       -10
      2 stars destroyed by your action       -10
-     8 casualties incurred                   -8
-     1 ship(s) lost or destroyed           -100
-Penalty for getting yourself killed        -200
-
-TOTAL SCORE                                -317
 [PRESS ENTER TO CONTINUE]
 
 
 [PRESS ENTER TO CONTINUE]
 
 
@@ -255,5 +255,10 @@ TOTAL SCORE                                -317
 
 
 
 
 
 
+     8 casualties incurred                   -8
+     1 ship(s) lost or destroyed           -100
+Penalty for getting yourself killed        -200
+
+TOTAL SCORE                                 101
 
 May the Great Bird of the Galaxy roost upon your home planet.
 
 May the Great Bird of the Galaxy roost upon your home planet.
index 63de67ec1f7530a9ca991e07f2810733319bc852..848e52ef9fb1543c77947f96b9d792c753577992 100644 (file)
@@ -147,56 +147,24 @@ COMMAND>
 COMMAND> mov aut 10 1
 
 
 COMMAND> mov aut 10 1
 
 
-Lt. Uhura-  "The deep space probe is now in Quadrant 1 - 5."
+***RED ALERT!  RED ALERT!
+***Enterprise pulled into black hole at Sector 10 - 2
 
 
-Lt. Uhura-  "The deep space probe is now in Quadrant 1 - 4."
-COMMAND> 
-COMMAND> mov aut 3 3 1 1
-
-Ensign Chekov- "Course laid in, Captain."
-
-Entering Quadrant 3 - 3.
-
-LT. Uhura- "Captain, an urgent message.
-  I'll put it on audio."  CLICK
-
-INTRUDER! YOU HAVE VIOLATED THE ROMULAN NEUTRAL ZONE.
-LEAVE AT ONCE, OR YOU WILL BE DESTROYED!
-
-Lt. Uhura-  "The deep space probe is now in Quadrant 1 - 3."
-
-Lt. Uhura-  "The deep space probe is now in Quadrant 1 - 2."
 
 
-Lt. Uhura-  "The deep space probe is now in Quadrant 1 - 1."
+It is stardate 3771.7.
 
 
-[ANNOUNCEMENT ARRIVING...]
-
-Lt. Uhura-  "The deep space probe has left the galaxy."
-COMMAND> 
-COMMAND> torp 1
-Target sector for torpedo number 1- 10 10
+Your ship is drawn to the center of the black hole.
+You are crushed into extremely dense matter.
+The Federation will be destroyed.
 
 
-Torpedo track- 2 - 2   3 - 3   4 - 4   
-5 - 5   6 - 6   7 - 6   
 
 
-***Black hole at Sector 7 - 6 swallows torpedo.
+Your score --
+     1 Klingon commanders destroyed          50
+  0.18 Klingons per stardate                 89
+     1 ship(s) lost or destroyed           -100
+Penalty for getting yourself killed        -200
 
 
-75 unit hit on the Enterprise from Romulan at Sector 1 - 2
-
-
-Energy left 247    shields down 100%,   torpedoes left 7
-COMMAND> 
-COMMAND> n
-LEGAL COMMANDS ARE:
-SRSCAN       STATUS       REQUEST      LRSCAN       
-PHASERS      TORPEDO      PHOTONS      MOVE         SHIELDS      
-DOCK         DAMAGES      CHART        IMPULSE      REST         
-WARP         SENSORS      ORBIT        TRANSPORT    MINE         
-CRYSTALS     SHUTTLE      PLANETS      REPORT       COMPUTER     
-COMMANDS     EMEXIT       PROBE        SAVE         FREEZE       
-ABANDON      DESTRUCT     DEATHRAY     CAPTURE      CLOAK        
-DEBUG        MAYDAY       SOS          CALL         QUIT         
-HELP         SCORE                     
-COMMAND> quit
+TOTAL SCORE                                -161
+Collision detected
 
 May the Great Bird of the Galaxy roost upon your home planet.
 
 May the Great Bird of the Galaxy roost upon your home planet.