From 65bfbb1f2182ac4ba33ae5739f00e231dd2b6ed2 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Thu, 17 Aug 2023 05:31:26 -0400 Subject: [PATCH] Fix inverted test of Almy option. Alas, we need a new tesr of bad-guy movement code and demonstration of energy exhaustion --- sst | 6 +- test/test25.chk | 52 +++---- test/test25.log | 12 +- test/test30.chk | 362 ++++-------------------------------------------- test/test30.log | 56 +------- 5 files changed, 52 insertions(+), 436 deletions(-) diff --git a/sst b/sst index b105bde..307562c 100755 --- a/sst +++ b/sst @@ -5080,8 +5080,10 @@ def deathray(): prouts(_("WHIRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR")) skip(1) dprob = 0.30 - # FIX-ME: This test looks inverted - if not (game.options & OPTION_ALMY): + # Ugh. This test (For Tom Almy's death-ray upgrade) was inverted for a long time. + # Furthermore, somebody (ESR or Stas?) changed Tom Almy's 0.7 upgraded chance of + # working to 0.5. + if game.options & OPTION_ALMY: dprob = 0.5 r = rnd.real() if r > dprob: diff --git a/test/test25.chk b/test/test25.chk index e02673d..4198f8a 100644 --- a/test/test25.chk +++ b/test/test25.chk @@ -4,46 +4,22 @@ -It is stardate 2116. The Federation is being attacked by -a deadly Klingon invasion force. As captain of the United -Starship U.S.S. Enterprise, it is your mission to seek out -and destroy this invasion force of 7 battle cruisers. -You have an initial allotment of 14 stardates to complete -your mission. As you proceed you may be given more time. +Stardate 4176. -You will have 4 supporting starbases. -Starbase locations- d8 b6 f3 f2 +57 Klingons. +An unknown number of Romulans. +And one (GULP) Super-Commander. +14 stardates. +4 starbases in h5 d5 h8 b7 -The Enterprise is currently in Quadrant a2 Sector g9 +The Enterprise is currently in Quadrant g7 Sector e6 Good Luck! + YOU'LL NEED IT. COMMAND> # SST2K version 2.7 -# Test use of death ray (successful) -# recorded by esr@snark.thyrsus.com on Wed Aug 16 05:26:11 2023 -m a d1 - -COMMAND> sh up -Shields raised. -COMMAND> chart - STAR CHART FOR THE KNOWN GALAXY - 1 2 3 4 5 6 7 8 -a | 102 <..8> ..1 ... ... ... ... ... | -b | ..8 ..3 ..5 ... ... .1. ... ... | -c | ... ... ... ... ... ... ... ... | -d | ... ... ... ... ... ... ... .1. | -e | ... ... ... ... ... ... ... ... | -f | ... .1. .1. ... ... ... ... ... | -g | ... ... ... ... ... ... ... ... | -h | ... ... ... ... ... ... ... ... | - -COMMAND> m a a1 d10 - -Ensign Chekov- "Course laid in, Captain." - -Entering Quadrant a1. - -Enemy attack reduces shield strength to 95%, torpedoes left 10 -COMMAND> deathray +# Test death ray (successful) +# recorded by esr@snark.thyrsus.com on Thu Aug 17 05:19:31 2023 +deathray Spock- "Captain, the 'Experimental Death Ray' is highly unpredictible. Considering the alternatives, @@ -61,7 +37,11 @@ Kirk- "Engage!" WHIRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR Sulu- "Captain! It's working!" -***Klingon at Sector a6 destroyed. +***Klingon at Sector j8 destroyed. +***Klingon at Sector h2 destroyed. +***Klingon at Sector b4 destroyed. +***Klingon at Sector b8 destroyed. +***Klingon at Sector e9 destroyed. Ensign Chekov- "Congratulations, Captain!" Spock- "Captain, I believe the `Experimental Death Ray' has been rendered nonfunctional." diff --git a/test/test25.log b/test/test25.log index a8e42aa..2b7e7a9 100644 --- a/test/test25.log +++ b/test/test25.log @@ -1,12 +1,8 @@ -# seed 1692177971 -# arguments regular medium novice fancy +# seed 1692263971 +# arguments regular medium expert fancy # SST2K version 2.7 -# Test use of death ray (successful) -# recorded by esr@snark.thyrsus.com on Wed Aug 16 05:26:11 2023 -m a d1 -sh up -chart -m a a1 d10 +# Test death ray (successful) +# recorded by esr@snark.thyrsus.com on Thu Aug 17 05:19:31 2023 deathray y quit diff --git a/test/test30.chk b/test/test30.chk index ace5691..7a3c884 100644 --- a/test/test30.chk +++ b/test/test30.chk @@ -17,7 +17,7 @@ The Enterprise is currently in Quadrant d2 Sector h6 Good Luck! YOU'LL NEED IT. COMMAND> # SST2K version 2.7 -# Test bad-guy movement code; demonstrate energy exhausion +# Death ray failure (kaboom) # recorded by esr@snark.thyrsus.com on Wed Aug 16 15:02:57 2023 chart STAR CHART FOR THE KNOWN GALAXY @@ -252,369 +252,70 @@ Kirk- "Engage!" WHIRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR Sulu- "Captain! It's working!" +***RED ALERT! RED ALERT! +***MATTER-ANTIMATTER IMPLOSION IMMINENT! + +***RED ALERT! RED A*L******************************** +****************************************************** +****************** KA-BOOM!!!! ******************* +****************************************************** +************ Entropy of Enterprise maximized ********* +****************************************************** ***Klingon at Sector c2 destroyed. ***Commander at Sector b4 destroyed. ***Klingon at Sector e1 destroyed. -***Klingon at Sector a8 destroyed. -***Klingon at Sector h1 destroyed. -***Klingon at Sector d4 destroyed. -***Klingon at Sector c8 destroyed. -***Klingon at Sector d9 destroyed. -Ensign Chekov- "Congratulations, Captain!" -Spock- "Captain, I believe the `Experimental Death Ray' - has been rendered nonfunctional." -COMMAND> chart - STAR CHART FOR THE KNOWN GALAXY - 1 2 3 4 5 6 7 8 -a | .1. ... ... ... ... ... ... ... | -b | ... ... ... ... ... ... ... ... | -c | ..6 ..7 ..9 ..9 ... ... ... ... | -d | ..4 ..6 ..9 ..5 ... ... ..8 ..4 | -e | ..3 ..2 ..2 ..1 ..6 ... ..3 <..6> | -f | ... ..1 ..1 102 605 ... 104 ..9 | -g | ... ..6 ..4 .19 108 ... ... ... | -h | ... ... ... ... .1. ... ... ... | - -COMMAND> sh down -Shields lowered. -COMMAND> m a i1 - -COMMAND> m a e7 i10 - -Ensign Chekov- "Course laid in, Captain." - -Entering Quadrant e7. -COMMAND> chart - STAR CHART FOR THE KNOWN GALAXY - 1 2 3 4 5 6 7 8 -a | .1. ... ... ... ... ... ... ... | -b | ... ... ... ... ... ... ... ... | -c | ..6 ..7 ..9 ..9 ... ... ... ... | -d | ..4 ..6 ..9 ..5 ... ..2 ..8 ..4 | -e | ..3 ..2 ..2 ..1 ..6 ..3 <..3> ..6 | -f | ... ..1 ..1 102 605 ..5 104 ..9 | -g | ... 106 ..4 .19 108 ... ... ... | -h | ... ... ... ... .1. ... ... ... | - -COMMAND> m a f7 a10 - -Ensign Chekov- "Course laid in, Captain." - -Entering Quadrant f7. - -72 unit hit from Klingon at i6 - - -Energy left 1067 shields down 23%, torpedoes left 7 - -43 unit hit from Klingon at i6 - - -Energy left 1023 shields down 23%, torpedoes left 7 -COMMAND> torp 1 i6 - -Torpedo track- b9 -***Star at Sector b9 unaffected by photon blast. - -41 unit hit from Klingon at i6 - - -Energy left 956 shields down 23%, torpedoes left 6 -COMMAND> m a f10 - - -48 unit hit from Klingon at i6 - - -Energy left 908 shields down 23%, torpedoes left 6 -COMMAND> torp 1 i6 - -Torpedo track- g9 g8 h7 -i6 -***Klingon at Sector i6 destroyed. -COMMAND> chart - STAR CHART FOR THE KNOWN GALAXY - 1 2 3 4 5 6 7 8 -a | .1. ... ... ... ... ... ... ... | -b | ... ... ... ... ... ... ... ... | -c | ..6 ..7 ..9 ..9 ... ... ... ... | -d | ..4 ..6 ..9 ..5 ... ..2 ..8 ..4 | -e | ..3 ..2 ..2 ..1 ..6 ..3 ..3 ..6 | -f | ... ..1 ..1 102 605 ..5 <..4> ..9 | -g | ... ..6 ..4 .19 108 ..4 502 ..9 | -h | ... ... ... ... .1. ... ... ... | - -COMMAND> sh down -Shields already down. -COMMAND> m a f1 - - -[ANNOUNCEMENT ARRIVING...] -Lt. Uhura- "Captain, Starfleet Intelligence reports - the Super-commander is in Quadrant e1. -COMMAND> chart - STAR CHART FOR THE KNOWN GALAXY - 1 2 3 4 5 6 7 8 -a | .1. ... ... ... ... ... ... ... | -b | ... ... ... ... ... ... ... ... | -c | ..6 ..7 ..9 ..9 ... ... ... ... | -d | ..4 ..6 ..9 ..5 ... ..2 ..8 ..4 | -e | 103 ..2 ..2 ..1 ..6 ..3 ..3 ..6 | -f | ... ..1 ..1 102 605 ..5 <..4> ..9 | -g | ... ..6 ..4 .19 108 ..4 502 ..9 | -h | ... ... ... ... .1. ... ... ... | +[CONTINUE?] -COMMAND> m a h5 a10 -Ensign Chekov- "Course laid in, Captain." -Entering Quadrant h5. -COMMAND> m a e3 -Enterprise blocked by object at c6; -Emergency stop required 125 units of energy. -Collision detected -COMMAND> m a e7 -COMMAND> m a e3 -COMMAND> dock -Docked. -COMMAND> damage -DEVICE REPAIR TIMES - IN FLIGHT DOCKED - Computer 2.80 0.69 - Death Ray 40.00 9.99 -COMMAND> rest -How long? 3 -[ANNOUNCEMENT ARRIVING...] -Lt. Uhura- "Captain, Starfleet Intelligence reports - the Super-commander is in Quadrant f3. -[ANNOUNCEMENT ARRIVING...] -Lt. Uhura- "Captain, Starfleet Intelligence reports - the Super-commander is in Quadrant e4. -[ANNOUNCEMENT ARRIVING...] -Lt. Uhura- "Captain, Starfleet Intelligence reports - the Super-commander is in Quadrant d6. -11 stardates left. -COMMAND> damage -DEVICE REPAIR TIMES - IN FLIGHT DOCKED - Death Ray 40.00 9.99 -COMMAND> r 1 -UNRECOGNIZED REQUEST. Legal requests are: - date, condition, position, lsupport, warpfactor, - energy, torpedoes, shields, klingons, system, time. -COMMAND> rest -How long? 1 -[ANNOUNCEMENT ARRIVING...] -Lt. Uhura- "Captain, Starfleet Intelligence reports - the Super-commander is in Quadrant f8. -Uhura- Captain, Medusa in Quadrant g5 reports it is under attack -by a Klingon invasion fleet. -Mr. Spock- "Captain, shall we cancel the rest period?"y -10 stardates left. -COMMAND> m a a5 -COMMAND> sh up -Shields raised. -COMMAND> m a g5 j5 -Ensign Chekov- "Course laid in, Captain." -Entering Quadrant g5. -Enemy attack reduces shield strength to 98%, torpedoes left 10 -Enemy attack reduces shield strength to 97%, torpedoes left 10 -COMMAND> phasers -Weapons Officer Sulu- "High-speed shield control enabled, sir." -Manual or automatic? a -Phasers locked on target. Energy available: 4669.10 -340 units required. Units to fire= 340 -Shields lowered. -174 unit hit on Klingon at Sector a9 -***Klingon at Sector a9 destroyed. -Shields raised. -COMMAND> planets - -Spock- "Planet report follows, Captain." - -No information available. -COMMAND> sh down -Shields lowered. -COMMAND> m a c4 -COMMAND> m a a4 - -COMMAND> sh up -Shields raised. -COMMAND> m a f5 j4 - -Ensign Chekov- "Course laid in, Captain." -Entering Quadrant f5. -Enemy attack reduces shield strength to 77%, torpedoes left 10 - -37 unit hit from Klingon at g3 - -23 unit hit from Klingon at c4 - -27 unit hit from Klingon at c8 - - -Energy left 4076 shields up 65%, torpedoes left 10 -COMMAND> phasers - -Weapons Officer Sulu- "High-speed shield control enabled, sir." -Manual or automatic? a -Phasers locked on target. Energy available: 3851.85 -1851 units required. Units to fire= 1851 - -Shields lowered. - -168 unit hit on Klingon at Sector g3 -***Klingon at Sector g3 destroyed. -240 unit hit on Klingon at Sector c4 -***Klingon at Sector c4 destroyed. -213 unit hit on Klingon at Sector c8 +***Klingon at Sector a8 destroyed. +***Klingon at Sector h1 destroyed. +***Klingon at Sector d4 destroyed. ***Klingon at Sector c8 destroyed. -224 unit hit on Klingon at Sector b7 -***Klingon at Sector b7 destroyed. -825 expended on empty space. - -Shields raised. - -12 unit hit from Klingon at a4 - -13 unit hit from Klingon at a1 - - -Energy left 1975 shields up 63%, torpedoes left 10 -COMMAND> phasers - -Weapons Officer Sulu- "High-speed shield control enabled, sir." -Manual or automatic? a -Phasers locked on target. Energy available: 1775.72 -491 units required. Units to fire= 491 - -Shields lowered. - -101 unit hit on Klingon at Sector a4 -***Klingon at Sector a4 destroyed. -18 unit hit on Klingon at Sector a1 -239 expended on empty space. - -Shields raised. - -9 unit hit from Klingon at a1 - - -Energy left 1275 shields up 63%, torpedoes left 10 -COMMAND> m a c7 - - -8 unit hit from Klingon at a1 - - -Energy left 1266 shields up 62%, torpedoes left 10 -COMMAND> torp 1 a1 - -Torpedo track- c6 b5 b4 -b3 b2 a1 -***Klingon at Sector a1 destroyed. -COMMAND> sh down -Shields lowered. -COMMAND> m a c1 - -COMMAND> sh up -Shields raised. -COMMAND> m a f4 c10 - -Ensign Chekov- "Course laid in, Captain." - -Entering Quadrant f4. - -84 unit hit from Klingon at f1 - - -Energy left 866 shields up 58%, torpedoes left 9 - -87 unit hit from Klingon at f1 - - -Energy left 778 shields up 54%, torpedoes left 9 -COMMAND> torp 1 f1 - -Torpedo track- c9 d8 d7 -d6 e5 e4 e3 f2 -f1 -***Commander at Sector f1 damaged-- displaced by blast to Sector f10 -*** Klingon from Sector i10 retreats to Sector i10. - -6 unit hit from Klingon at i10 - - -Energy left 747 shields up 53%, torpedoes left 8 -COMMAND> torp 1 i10 - -Torpedo track- d10 e10 f10 -g10 h10 i10 -***Klingon at Sector i10 destroyed. -COMMAND> chart - STAR CHART FOR THE KNOWN GALAXY - 1 2 3 4 5 6 7 8 -a | .1. ... ... ... ... ... ... ... | -b | ... ... ... ... ... ... ... ... | -c | ..6 ..7 ..9 ..9 ... ... ... ... | -d | ..4 ..6 ..9 ..5 ... ..2 ..8 ..4 | -e | ..3 ..2 ..2 ..1 ..6 ..3 ..3 ..6 | -f | ... ..1 ..1 <..2> ..5 ..5 ..4 ..9 | -g | ... ..6 ..4 .19 ..8 ..4 502 ..9 | -h | ... ... ... 205 112 504 ... ... | - -COMMAND> m a h5 a1 - -Ensign Chekov- "Course laid in, Captain." - -Entering Quadrant h5. - -195 unit hit from Klingon at a8 - - -Energy left 551 shields up 46%, torpedoes left 7 - -346 unit hit from Klingon at a8 - -***CRITICAL HIT--S. R. Sensors damaged. - -Energy left 205 shields up 37%, torpedoes left 7 - +***Klingon at Sector d9 destroyed. -It is stardate 4738.4. -Your energy supply is exhausted. +It is stardate 4731.3. -Your starship is a derelict in space. +Your starship is now an expanding cloud of subatomic particles The Federation will be destroyed. -[CONTINUE?] +Your score -- + 11 ordinary Klingons destroyed 110 + 2 Klingon commanders destroyed 100 + 7.96 Klingons per stardate 3979 + 9 casualties incurred -9 + 1 ship(s) lost or destroyed -100 +Penalty for getting yourself killed -200 +TOTAL SCORE 3880 +May the Great Bird of the Galaxy roost upon your home planet. +[CONTINUE?] @@ -637,14 +338,5 @@ The Federation will be destroyed. -Your score -- - 20 ordinary Klingons destroyed 200 - 2 Klingon commanders destroyed 100 - 2.53 Klingons per stardate 1267 - 9 casualties incurred -9 - 1 ship(s) lost or destroyed -100 -Penalty for getting yourself killed -200 -TOTAL SCORE 1258 -May the Great Bird of the Galaxy roost upon your home planet. diff --git a/test/test30.log b/test/test30.log index aa5729c..8c3036f 100644 --- a/test/test30.log +++ b/test/test30.log @@ -1,7 +1,7 @@ # seed 1692212577 # arguments regular medium expert fancy # SST2K version 2.7 -# Test bad-guy movement code; demonstrate energy exhausion +# Death ray failure (kaboom) # recorded by esr@snark.thyrsus.com on Wed Aug 16 15:02:57 2023 chart m a d10 @@ -27,57 +27,3 @@ m a g 7 m a g7 deathray y -chart -sh down -m a i1 -m a e7 i10 -chart -m a f7 a10 -torp 1 i6 -m a f10 -torp 1 i6 -chart -sh down -m a f1 -chart -m a h5 a10 -m a e3 -m a e7 -m a e3 -dock -damage -rest -3 -damage -r 1 -rest -1 -y -m a a5 -sh up -m a g5 j5 -phasers -a -340 -planets -sh down -m a c4 -m a a4 -sh up -m a f5 j4 -phasers -a -1851 -phasers -a -491 -m a c7 -torp 1 a1 -sh down -m a c1 -sh up -m a f4 c10 -torp 1 f1 -torp 1 i10 -chart -m a h5 a1 -- 2.31.1