From: Eric S. Raymond Date: Mon, 27 Feb 2017 16:03:59 +0000 (-0500) Subject: Restore kill crediting. Required two rebuilds of regression-test loads. X-Git-Tag: 2.2~20 X-Git-Url: https://jxself.org/git/?p=super-star-trek.git;a=commitdiff_plain;h=97dc6b2ea8dcb30579e2e1fa9ba6cdcc7bc13dd3 Restore kill crediting. Required two rebuilds of regression-test loads. --- diff --git a/sst.py b/sst.py index 599fe45..db33c54 100755 --- 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 - 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) - elif type == 'K': + elif etype == 'K': game.state.remkl -= 1 - elif type == 'S': + elif etype == 'S': game.state.nscrem -= 1 game.state.kscmdr.invalidate() game.isatb = 0 diff --git a/test/test2.chk b/test/test2.chk index 33e4010..d71d2bd 100644 --- a/test/test2.chk +++ b/test/test2.chk @@ -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. -245 unit hit on Klingon at Sector 8 - 6 +261 unit hit on Klingon at Sector 8 - 6 ***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. -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. @@ -82,14 +82,18 @@ It is stardate 2149.8. 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 -- + 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 -TOTAL SCORE -300 +TOTAL SCORE -200 May the Great Bird of the Galaxy roost upon your home planet. diff --git a/test/test3.chk b/test/test3.chk index d738bbf..56df3a0 100644 --- a/test/test3.chk +++ b/test/test3.chk @@ -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. + +Entering Quadrant 6 - 2. 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 - Supernova in Quadrant 4 - 2; caution advised. + Supernova in Quadrant 3 - 8; caution advised. [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.) @@ -108,7 +106,7 @@ COMMAND> move 5 8 10 1 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 diff --git a/test/test4.chk b/test/test4.chk index dae2700..133e85e 100644 --- a/test/test4.chk +++ b/test/test4.chk @@ -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 -# recorded by esr@snark on Wed Feb 22 14:57:52 2012 # 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 @@ -104,9 +104,18 @@ COMMAND> move aut 6 2 5 5 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." @@ -117,29 +126,63 @@ COMMAND> move aut 2 6 5 5 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. +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 - 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 +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 - 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 +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, @@ -150,8 +193,9 @@ LIVE LONG AND PROSPER. 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. diff --git a/test/test4.log b/test/test4.log index 9b6b956..5b5cb86 100644 --- a/test/test4.log +++ b/test/test4.log @@ -1,8 +1,8 @@ # seed 1329940672 # options # SST2K version 2.1 -# recorded by esr@snark on Wed Feb 22 14:57:52 2012 # Tests game completion (loss) +# recorded by esr@snark on Mon Feb 27 10:57:26 2017 r s n @@ -46,3 +46,5 @@ n move aut 9 9 y n +move aut 5 8 5 5 +y diff --git a/test/test5.chk b/test/test5.chk index 6465ad3..c47db12 100644 --- a/test/test5.chk +++ b/test/test5.chk @@ -209,36 +209,56 @@ COMMAND> move aut 8 5 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?" 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." -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. +[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. diff --git a/test/test5.log b/test/test5.log index 1902373..4861ea1 100644 --- a/test/test5.log +++ b/test/test5.log @@ -61,3 +61,4 @@ n move aut 6 7 2 2 y n +quit diff --git a/test/test7.chk b/test/test7.chk index 885a13f..df0b6cc 100644 --- a/test/test7.chk +++ b/test/test7.chk @@ -219,17 +219,17 @@ It is stardate 3536.1. 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 -- - 0.00 Klingons per stardate 0 + 4 ordinary Klingons destroyed 40 + 0.76 Klingons per stardate 379 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] @@ -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. diff --git a/test/test8.chk b/test/test8.chk index 63de67e..848e52e 100644 --- a/test/test8.chk +++ b/test/test8.chk @@ -147,56 +147,24 @@ COMMAND> 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.