From: Eric S. Raymond Date: Tue, 12 Sep 2006 17:27:46 +0000 (+0000) Subject: Deathray is now regressed to original 5% probability in 'plain' games. X-Git-Tag: 2.0~296 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=ca9de456d928ab8f7ef95f2fa03aeab2b3161d97;p=super-star-trek.git Deathray is now regressed to original 5% probability in 'plain' games. --- diff --git a/TODO b/TODO index 2a95c47..0c10488 100644 --- a/TODO +++ b/TODO @@ -2,6 +2,3 @@ * Wrap a GUI around it. -* Find out what the deathray behavior was before Tom Almy changed it, - and reverse the change when the game type is 'plain'. - diff --git a/planets.c b/planets.c index bce9a1a..217ce14 100644 --- a/planets.c +++ b/planets.c @@ -395,7 +395,7 @@ void shuttle(void) void deathray(void) { - double r = Rand(); + double dprob, r = Rand(); ididit = 0; skip(1); @@ -430,20 +430,25 @@ void deathray(void) skip(1); prouts("WHIRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR"); skip(1); - if (r > .30) { + dprob = .30; + if (game.options & OPTION_PLAIN) + dprob = .5; + if (r > dprob) { prouts("Sulu- \"Captain! It's working!\""); skip(2); while (nenhere > 0) deadkl(game.kx[1],game.ky[1],game.quad[game.kx[1]][game.ky[1]],game.kx[1],game.ky[1]); prout("Ensign Chekov- \"Congratulations, Captain!\""); if (KLINGREM == 0) finish(FWON); - prout("Spock- \"Captain, I believe the `Experimental Death Ray'"); - if (Rand() <= 0.05) { - prout(" is still operational.\""); - } - else { - prout(" has been rendered nonfunctional.\""); - game.damage[DDRAY] = 39.95; + if ((game.options & OPTION_PLAIN) == 0) { + prout("Spock- \"Captain, I believe the `Experimental Death Ray'"); + if (Rand() <= 0.05) { + prout(" is still operational.\""); + } + else { + prout(" has been rendered nonfunctional.\""); + game.damage[DDRAY] = 39.95; + } } return; } diff --git a/setup.c b/setup.c index 8888467..9bf6a25 100644 --- a/setup.c +++ b/setup.c @@ -473,13 +473,19 @@ int choose(int needprompt) proutn("Choose your game options: "); scan(); } - if (isit("plain")) + if (isit("plain")) { // Approximates the UT FORTRAN version. game.options &=~ (OPTION_THOLIAN | OPTION_PLANETS | OPTION_THINGY | OPTION_PROBE | OPTION_RAMMING | OPTION_MVBADDY | OPTION_BLKHOLE | OPTION_BASE); - if (isit("almy")) + game.options |= OPTION_PLAIN; + } + if (isit("almy")) { // Approximates Tom Almy's version. game.options &=~ (OPTION_THINGY | OPTION_BLKHOLE | OPTION_BASE); - else if (strlen(citem)) { + game.options |= OPTION_ALMY; + } + if (isit("fancy")) + /* do nothing */; + if (strlen(citem)) { proutn("What is \""); proutn(citem); prout("\"?"); diff --git a/sst-doc.xml b/sst-doc.xml index 85e56f8..411da29 100644 --- a/sst-doc.xml +++ b/sst-doc.xml @@ -251,13 +251,14 @@ you want to start at the Expert level, go ahead. It's your funeral. The Emeritus game is strictly for masochists. The fourth question, new in SST2K, sets your game options. A -blank answer enables all SST2K features. The option 'plain' disables -a number of features (Tholians, planets & dilithium, Thingies -shooting back, deep-space-probes, Klingon ramming and movement, -time-warping through black holes), approximating the original CDC 6600 -FORTRAN game from UT Austin. The option 'almy' approximates Tom -Almy's C translation from 1979, disabling Thingies shooting back and -time-warping through black holes. +blank answer or 'fancy' enables all SST2K features. The option +'plain' disables a number of features (Tholians, planets & +dilithium, Thingies shooting back, deep-space-probes, Klingon ramming +and movement, time-warping through black holes, death-ray upgrade), +approximating the original CDC 6600 FORTRAN game from UT Austin. The +option 'almy' approximates Tom Almy's C translation from 1979, +disabling Thingies shooting back, base shields, and time-warping +through black holes. How To Issue Commands diff --git a/sst.c b/sst.c index b8aa183..8f85a76 100644 --- a/sst.c +++ b/sst.c @@ -48,38 +48,47 @@ Here are Tom Almy's changes: as well as changing "freeze" to "save". However I like "freeze". (Both "freeze" and "save" work in SST2K.) - When I got a later version of Super Star Trek that I was converting - from, I added the emexit command. + When I got a later (1979) version of Super Star Trek that I was converting + from, I added the emexit command from it. - That later version also mentions srscan and lrscan working when + That 1979 version also mentions srscan and lrscan working when docked (using the starbase's scanners), so I made some changes here to do this (and indicating that fact to the player), and then realized the base would have a subspace radio as well -- doing a Chart when docked updates the star chart, and all radio reports will be heard. The Dock command will also give a report if a base is under attack. - Klingon commander movements are no longer reported if long-range - sensors are damaged. - Also added: - 1. Better base positioning at startup. - - 2. Deathray improvement (but keeping original failure alternatives). + 1. The experimental deathray originally had only a 5% chance of + success, but could be used repeatedly. I guess after a couple + years of use, it was less "experimental" because the 1979 + version had a 70% success rate. However it was prone to breaking + after use. I upgraded the deathray, but kept the original set of + failure modes (great humor!). (Now controlled by OPTION_DEATHRAY + and turned off if game type is "plain".) - 3. Tholian Web. (Now controlled by OPTION_THOLIAN and turned off - if game type is "plain".) + 2. Tholian Web from the 1979 version. (Now controlled by + OPTION_THOLIAN and turned off if game type is "plain".) - 4. Enemies can ram the Enterprise. (Now controlled by OPTION_RAMMING + 3. Enemies can ram the Enterprise. (Now controlled by OPTION_RAMMING and turned off if game type is "plain".) - 5. Regular Klingons and Romulans can move in Expert and Emeritus games. + 4. Regular Klingons and Romulans can move in Expert and Emeritus games. This code could use improvement. (Now controlled by OPTION_MVBADDY and turned off if game type is "plain".) - 6. The deep-space probe feature from the DECUS version. (Now controlled + 5. The deep-space probe feature from the DECUS version. (Now controlled by OPTION_PROBE and turned off if game type is "plain"). + 6. Bugfix: Klingon commander movements are no longer reported if long-range + sensors are damaged. + + 7. Bugfix: Better base positioning at startup (more spread out). + That made sense to add because most people abort games with + bad base placement. + + In June 2002, I fixed two known bugs and a documentation typo. In June 2004 I fixed a number of bugs involving: 1) parsing invalid numbers, 2) manual phasers when SR scan is damaged and commander is present, 3) time warping into the future, 4) hang when moving @@ -103,8 +112,8 @@ Here are Stas Sergeev's changes: 4. The Tholian can be hit with phasers. - 5. SCom can't escape from you if no more enemies remain (without this, - chasing SCom can take an eternity). + 5. SCom can't escape from you if no more enemies remain + (without this, chasing SCom can take an eternity). 6. Probe target you enter is now the destination quadrant. Before I don't remember what it was, but it was something I had difficulty using. @@ -534,7 +543,7 @@ int main(int argc, char **argv) { int i, option; - game.options = OPTION_ALL &~ (OPTION_IOMODES | OPTION_SHOWME); + game.options = OPTION_ALL &~ (OPTION_IOMODES | OPTION_SHOWME | OPTION_PLAIN | OPTION_ALMY); if (getenv("TERM")) game.options |= OPTION_CURSES | OPTION_SHOWME; else diff --git a/sst.h b/sst.h index da74f31..f8d65ff 100644 --- a/sst.h +++ b/sst.h @@ -105,6 +105,8 @@ typedef struct { #define OPTION_MVBADDY 0x00000100 /* more enemies can move */ #define OPTION_BLKHOLE 0x00000200 /* black hole may timewarp you */ #define OPTION_BASE 0x00000400 /* bases have good shields */ +#define OPTION_PLAIN 0x01000000 /* user chose plain game */ +#define OPTION_ALMY 0x02000000 /* user chose Almy variant */ /* Define devices */ #define DSRSENS 0 diff --git a/sst.xml b/sst.xml index 8f01be8..277640f 100644 --- a/sst.xml +++ b/sst.xml @@ -47,11 +47,11 @@ remainder of the command line before standard input. Thus, for example, you can invoke the program as -sst regular medium good plain +sst regular medium good fancy -to start a regular medium game as a good player in 'plain' -mode (with only the features from the FOTRAN original enabled). +to start a regular medium game as a good player in 'fancy' +mode (all features enabled). AUTHORS