From: Eric S. Raymond Date: Tue, 12 Sep 2006 10:23:36 +0000 (+0000) Subject: Added the ability to suppress newer features with a game type option. X-Git-Tag: 2.0~297 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=6b396c7a585fcf5c54caf29c527b195999d23bfe;p=super-star-trek.git Added the ability to suppress newer features with a game type option. --- diff --git a/TODO b/TODO index b0986e6..2a95c47 100644 --- a/TODO +++ b/TODO @@ -1,5 +1,7 @@ Super Star Trek TO-DO list -* The time machine switch. Specify a year, get only the features that - then existed. (This would be partly so people can try the original - non-"super" version Matuszek and Reynolds wrote.) +* 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/ai.c b/ai.c index 1e70f2a..a1b4bbf 100644 --- a/ai.c +++ b/ai.c @@ -151,7 +151,7 @@ static void movebaddy(int comx, int comy, int loccom, int ienm) else { if (forces > 1000.0) /* Very strong -- move in for kill */ motion = (1.0-square(Rand()))*dist1 + 1.0; - if (condit==IHDOCKED) /* protected by base -- back off ! */ + if (condit==IHDOCKED && (game.options & OPTION_BASE)) /* protected by base -- back off ! */ motion -= skill*(2.0-square(Rand())); } #ifdef DEBUG @@ -213,7 +213,7 @@ static void movebaddy(int comx, int comy, int loccom, int ienm) looky = nexty + krawly; krawly = -krawly; } - else if (game.quad[lookx][looky] != IHDOT) { + else if ((game.options & OPTION_RAMMING) && game.quad[lookx][looky] != IHDOT) { /* See if we should ram ship */ if (game.quad[lookx][looky] == ship && (ienm == IHC || ienm == IHS)) { @@ -294,12 +294,13 @@ void movcom(void) /* if skill level is high, move other Klingons and Romulans too! Move these last so they can base their actions on what the commander(s) do. */ - if (skill >= SKILL_EXPERT) for_local_enemies(i) { - ix = game.kx[i]; - iy = game.ky[i]; - if (game.quad[ix][iy] == IHK || game.quad[ix][iy] == IHR) - movebaddy(ix, iy, i, game.quad[ix][iy]); - } + if (skill >= SKILL_EXPERT && (game.options & OPTION_MVBADDY)) + for_local_enemies(i) { + ix = game.kx[i]; + iy = game.ky[i]; + if (game.quad[ix][iy] == IHK || game.quad[ix][iy] == IHR) + movebaddy(ix, iy, i, game.quad[ix][iy]); + } sortkl(); } diff --git a/battle.c b/battle.c index 903e216..56a981f 100644 --- a/battle.c +++ b/battle.c @@ -349,7 +349,7 @@ void torpedo(double course, double r, int inx, int iny, double *hit, int i, int } else { /* * Stas Sergeev added the possibility that - * you can shove the Thingy abd piss it off. + * you can shove the Thingy and piss it off. * It then becomes an enemy and may fire at you. */ iqengry=1; diff --git a/moving.c b/moving.c index 7d3f6df..a5d11b3 100644 --- a/moving.c +++ b/moving.c @@ -153,7 +153,7 @@ void imove(void) if (game.damage[l]>0) n++; probf=pow(1.4,(energy+shield)/5000.0-1.0)*pow(1.3,1.0/(n+1)-1.0); - if (Rand()>probf) + if ((game.options & OPTION_BLKHOLE) && Rand()>probf) timwrp(); else finish(FHOLE); diff --git a/planets.c b/planets.c index 7dd9541..bce9a1a 100644 --- a/planets.c +++ b/planets.c @@ -10,7 +10,7 @@ static int consumeTime(void) // double asave; ididit = 1; #if 0 - /* Don't wory about this */ + /* Don't worry about this */ if (future[FTBEAM] <= game.state.date+Time && game.state.remcom != 0 && condit != IHDOCKED) { /* We are about to be tractor beamed -- operation fails */ return 1; diff --git a/setup.c b/setup.c index 72c2e84..8888467 100644 --- a/setup.c +++ b/setup.c @@ -467,6 +467,23 @@ int choose(int needprompt) else if (skill == SKILL_NONE) proutn("Are you a Novice, Fair, Good, Expert, or Emeritus player? "); } } + // Choose game options -- added by ESR for SST2K + if (scan() != IHALPHA) { + chew(); + proutn("Choose your game options: "); + scan(); + } + 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")) + // Approximates Tom Almy's version. + game.options &=~ (OPTION_THINGY | OPTION_BLKHOLE | OPTION_BASE); + else if (strlen(citem)) { + proutn("What is \""); + proutn(citem); + prout("\"?"); + } setpassword(); #ifdef DEBUG if (strcmp(game.passwd, "debug")==0) idebug = 1; diff --git a/sst-doc.xml b/sst-doc.xml index 62662b7..85e56f8 100644 --- a/sst-doc.xml +++ b/sst-doc.xml @@ -229,6 +229,36 @@ and start a new game. The Klingons are waiting. + +Starting the Game + +The program will ask you some setup questions. You can give it +command-line arguments that will be treated as answers. Any token +may be abbreviated to a unique prefix. + +The first question concerns whether you want a regullar, +tournament, or saved game. For discussion, see the description of the freeze command. + +The second question will concern the length of the game. +Longer games include more enemies. + +The third question will set the game's difficulty level. +You should probably start out at the novice level, even if you are +already familiar with one of the other versions of the Star Trek +game—but, of course, the level of game you play is up to you. If +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. + How To Issue Commands @@ -303,7 +333,7 @@ complicated, but you will learn the abbreviations qGuickly enough. You can abbreviate practically anything -If you forget, the computer will proompt you +If you forget, the computer will prompt you If you remember, you can type it all on one line @@ -1220,7 +1250,7 @@ in the galaxy. Since planets do not show up on long-range scans, the only way to obtain this information is with the SENSORS command. -Freeze +Freeze Mnemonic: FREEZE @@ -1497,12 +1527,6 @@ print the certificate to a file, import it into your word processor, selecting Courier 8pt font, and then print in landscape orientation. -You should probably start out at the novice level, even if you are -already familiar with one of the other versions of the Star Trek -game—but, of course, the level of game you play is up to you. If -you want to start at the Expert level, go ahead. It's your funeral. -The emeritus game is strictly for masochists. - Handy Reference Page diff --git a/sst.c b/sst.c index e27f7fb..b8aa183 100644 --- a/sst.c +++ b/sst.c @@ -15,19 +15,28 @@ Dave Matuszek says: SRSCAN, MOVE, PHASERS, CALL, STATUS, IMPULSE, PHOTONS, ABANDON, LRSCAN, WARP, SHIELDS, DESTRUCT, CHART, REST, DOCK, QUIT, and DAMAGE - were in the original non-"super" version. + were in the original non-"super" version of UT FORTRAN Star Trek. Tholians weren't in the original. Dave is dubious about their merits. + (They are now controlled by OPTION_THOLIAN and turned off if the game + type is "plain".) Planets and dilithium crystals weren't in the original. Dave is OK - with this idea. He says the bit about the Galileo getting - turned into a McDonald's is "consistant with our original vision". + with this idea. (It's now controlled by OPTION_PLANETS and turned + off if the game type is "plain".) + + Dave says the bit about the Galileo getting turned into a + McDonald's is "consistant with our original vision". (This has been + left permanently enabled, as it can only happen if OPTION_PLANETS + is on.) Dave also says the Space Thingy should not be preserved across saved games, so you can't prove to others that you've seen it. He says it shouldn't fire back, either. It should do nothing except scream and disappear when hit by photon torpedos. It's OK that it may move - when attacked, but it didn't in the original. + when attacked, but it didn't in the original. (Whether the Thingy + can fire back is now controlled by OPTION_THINGY and turned off if the + game type is "plain" or "almy". The no-save behavior has been restored.) The Faerie Queen, black holes, and time warping were in the original. @@ -37,6 +46,7 @@ Here are Tom Almy's changes: "call" and the "terminate" command to "quit" to better match user expectations. The DECUS version apparently made those 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. @@ -48,62 +58,75 @@ Here are Tom Almy's changes: 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. - Movecom no longer reports movement if sensors are damaged so you wouldn't - otherwise know it. + Klingon commander movements are no longer reported if long-range + sensors are damaged. Also added: - 1. Better base positioning at startup + 1. Better base positioning at startup. + + 2. Deathray improvement (but keeping original failure alternatives). - 2. Deathray improvement (but keeping original failure alternatives) + 3. Tholian Web. (Now controlled by OPTION_THOLIAN and turned off + if game type is "plain".) - 3. Tholian Web. + 4. Enemies can ram the Enterprise. (Now controlled by OPTION_RAMMING + and turned off if game type is "plain".) - 4. Enemies can ram the Enterprise. Regular Klingons and Romulans can - move in Expert and Emeritus games. This code could use improvement. + 5. 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".) - 5. The deep space probe looks interesting! DECUS version + 6. The deep-space probe feature from the DECUS version. (Now controlled + by OPTION_PROBE and turned off if game type is "plain"). - 6. Perhaps cloaking to be added later? BSD version + 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 + klingons in crowded quadrants. (These fixes are in SST2K.) Here are Stas Sergeev's changes: 1. The Space Thingy can be shoved, if you ram it, and can fire back if - fired upon. + fired upon. (Now controlled by OPTION_THINGY and turned off if game + type is "plain" or "almy".) - 2. The Tholian can be hit with phasers - - 3. When you are docked, base covers you with an almost invincible shields - (a commander can still ram you, or a Romulan can destroy the base, + 2. When you are docked, base covers you with an almost invincible shield. + (A commander can still ram you, or a Romulan can destroy the base, or a SCom can even succeed with direct attack IIRC, but this rarely - happens). + happens.) (Now controlled by OPTION_BASE and turned off if game + type is "plain" or "almy".) + + 3. Ramming a black hole is no longer instant death. There is a + chance you might get timewarped instead. (Now controlled by + OPTION_BLKHOLE and turned off if game type is "plain" or "almy".) - 4. SCom can't escape from you if no more enemies remain (without this, + 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. Probe target you enter is now the destination quadrant. Before I don't + 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. - 6. Secret password is now autogenerated. + 7. Secret password is now autogenerated. - 7. "Plaque" is adjusted for A4 paper :-) + 8. "Plaque" is adjusted for A4 paper :-) - 8. Phasers now tells you how much energy needed, but only if the computer - is alive. + 9. Phasers now tells you how much energy needed, but only if the computer + is alive. - 9. Planets are auto-scanned when you enter the quadrant. + 10. Planets are auto-scanned when you enter the quadrant. - 10. Mining or using crystals in presense of enemy now yields an attack. + 11. Mining or using crystals in presense of enemy now yields an attack. There are other minor adjustments to what yields an attack and what does not. - 11. Ramming a black hole is no longer instant death. There is a - chance you might get timewarped instead. - 12. "freeze" command reverts to "save", most people will understand this - better anyway. + better anyway. (SST2K recognizes both.) - 13. Screen-oriented interface, with sensor scans always up. + 13. Screen-oriented interface, with sensor scans always up. (SST2K + supports both screen-oriented and TTY modes.) Eric Raymond's changes: @@ -114,7 +137,10 @@ for a lot of magic numbers and refactored the heck out of it. 2. Status report now indicates when dilithium crystals are on board. - 3. Per Dave Matuszek's remarks, Thingy state is not saved across games. + 3. Per Dave Matuszek's remarks, Thingy state is never saved across games. + + 4. Added game option selection so you can play a close (but not bug-for- + bug identical) approximation of older versions. */ /* the input queue */ diff --git a/sst.h b/sst.h index ae8c4f5..da74f31 100644 --- a/sst.h +++ b/sst.h @@ -101,6 +101,10 @@ typedef struct { #define OPTION_THINGY 0x00000010 /* Space Thingy can shoot back */ #define OPTION_PROBE 0x00000020 /* deep-space probes */ #define OPTION_SHOWME 0x00000040 /* bracket Enterprise in chart */ +#define OPTION_RAMMING 0x00000080 /* enemies may ram Enterprise */ +#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 devices */ #define DSRSENS 0 diff --git a/sst.xml b/sst.xml index 3adfbbc..8f01be8 100644 --- a/sst.xml +++ b/sst.xml @@ -47,10 +47,11 @@ remainder of the command line before standard input. Thus, for example, you can invoke the program as -sst regular medium good +sst regular medium good plain -to start a regular medium game as a good player. +to start a regular medium game as a good player in 'plain' +mode (with only the features from the FOTRAN original enabled). AUTHORS