if (game.damage[DSRSENS] == 0.0 || game.damage[DLRSENS] == 0.0 ||
condit == IHDOCKED) {
crmena(1, ienm, 2, game.kx[loccom], game.ky[loccom]);
- proutn(" escapes to %s (and regains strength).",
+ prout(" escapes to %s (and regains strength).",
cramlc(quadrant, iqx, iqy));
}
/* handle local matters related to escape */
if (game.damage[DSRSENS] == 0 || condit == IHDOCKED) {
proutn("***");
cramen(ienm);
- proutn(" from");
- cramlc(2, comx, comy);
- if (game.kdist[loccom] < dist1) proutn(" advances to");
+ proutn(" from %s", cramlc(2, comx, comy));
+ if (game.kdist[loccom] < dist1) proutn(" advances to ");
else proutn(" retreats to ");
prout(cramlc(sector, nextx, nexty));
}
+#ifdef SERGEEV
+#include <conio.h>
+#endif /* SERGEEV */
#include "sst.h"
#include <string.h>
#include <time.h>
prout("Computer damaged; cannot execute destruct sequence.");
return;
}
- skip(1);
prouts("---WORKING---"); skip(1);
- prout("SELF-DESTRUCT-SEQUENCE-ACTIVATED");
+ prouts("SELF-DESTRUCT-SEQUENCE-ACTIVATED"); skip(1);
prouts(" 10"); skip(1);
prouts(" 9"); skip(1);
prouts(" 8"); skip(1);
prouts(" 7"); skip(1);
prouts(" 6"); skip(1);
+#ifdef SERGEEV
+ skip(1);
+#endif /* SERGEEV */
prout("ENTER-CORRECT-PASSWORD-TO-CONTINUE-");
+#ifdef SERGEEV
+ skip(1);
+#endif /* SERGEEV */
prout("SELF-DESTRUCT-SEQUENCE-OTHERWISE-");
+#ifdef SERGEEV
+ skip(1);
+#endif /* SERGEEV */
prout("SELF-DESTRUCT-SEQUENCE-WILL-BE-ABORTED");
+#ifdef SERGEEV
+ skip(1);
+#endif /* SERGEEV */
scan();
chew();
if (strcmp(game.passwd, citem) != 0) {
prouts("PASSWORD-REJECTED;"); skip(1);
- prout("CONTINUITY-EFFECTED");
- skip(1);
+ prouts("CONTINUITY-EFFECTED");
+ skip(2);
return;
}
prouts("PASSWORD-ACCEPTED"); skip(1);
prouts("GOODBYE-CRUEL-WORLD");
skip(1);
}
- skip(2);
kaboom();
}
alldone = 1;
skip(3);
prout("It is stardate %.1f.", game.state.date);
- prout("");
+ skip(1);
switch (ifin) {
case FWON: // Game has been won
if (game.state.nromrem != 0)
prout("The remaining %d Romulans surrender to Starfleet Command.",
game.state.nromrem);
-
+
prout("You have smashed the Klingon invasion fleet and saved");
prout("the Federation.");
gamewon=1;
break;
case 5:
skip(1);
- prout("Computer- ERROR-ERROR-ERROR-ERROR");
+ proutn("Computer- ");
+ prouts("ERROR-ERROR-ERROR-ERROR");
+ skip(2);
+ prouts(" YOUR-SKILL-HAS-EXCEEDED-THE-CAPACITY-OF-THIS-PROGRAM");
+ skip(1);
+ prouts(" THIS-PROGRAM-MUST-SURVIVE");
+ skip(1);
+ prouts(" THIS-PROGRAM-MUST-SURVIVE");
skip(1);
- prout(" YOUR-SKILL-HAS-EXCEEDED-THE-CAPACITY-OF-THIS-PROGRAM");
- prout(" THIS-PROGRAM-MUST-SURVIVE");
- prout(" THIS-PROGRAM-MUST-SURVIVE");
- prout(" THIS-PROGRAM-MUST-SURVIVE");
- prout(" THIS-PROGRAM-MUST?- MUST ? - SUR? ? -? VI");
+ prouts(" THIS-PROGRAM-MUST-SURVIVE");
skip(1);
+ prouts(" THIS-PROGRAM-MUST?- MUST ? - SUR? ? -? VI");
+ skip(2);
prout("Now you can retire and write your own Star Trek game!");
skip(1);
break;
)
prout("You cannot get a citation, so...");
else {
- prout("Do you want your Commodore Emeritus Citation printed?");
- proutn("(You need a 132 column printer.)");
+ proutn("Do you want your Commodore Emeritus Citation printed? ");
chew();
if (ja()) {
igotit = 1;
double timused = game.state.date - indate;
int ithperd, iwon, klship;
- pause_game(0);
-
iskill = skill;
if ((timused == 0 || game.state.remkl != 0) && timused < 5.0) timused = 5.0;
perdate = (game.state.killc + game.state.killk + game.state.nsckill)/timused;
prout("%6d Super-Commander destroyed %5d",
game.state.nsckill, 200*game.state.nsckill);
if (ithperd)
- prout("%.2f Klingons per stardate %5d",
+ prout("%6.2f Klingons per stardate %5d",
perdate, ithperd);
if (game.state.starkl)
prout("%6d stars destroyed by your action %5d",
if (alive==0)
prout("Penalty for getting yourself killed -200");
if (gamewon) {
- skip(1);
proutn("Bonus for winning ");
switch (skill) {
case 1: proutn("Novice game "); break;
}
prout(" %5d", iwon);
}
- skip(2);
+ skip(1);
prout("TOTAL SCORE %5d", iscore);
}
skip(2);
while (fp == NULL) {
+#ifdef SERGEEV
+ proutn("File or device name for your plaque: ");
+ getline(winner, sizeof(winner));
+#else
proutn("File or device name for your plaque:");
fgets(winner, 128, stdin);
winner[strlen(winner)-1] = '\0';
+#endif /* SERGEEV */
fp = fopen(winner, "w");
if (fp==NULL) {
- prout("Invalid name.");
+ prout("Invalid name.");
}
}
- proutn("Enter name to go on plaque (up to 30 characters):");
- fgets(winner, 128, stdin);
- winner[strlen(winner)-1] = '\0';
+ proutn("Enter name to go on plaque (up to 30 characters): ");
+ getline(winner, sizeof(winner));
+ proutn("Enter name to go on plaque (up to 30 characters): ");
+ getline(winner, sizeof(winner));
winner[30] = '\0';
+#ifdef SERGEEV
+ nskip = 38 - strlen(winner)/2;
+#else
nskip = 64 - strlen(winner)/2;
+#endif /* SERGEEV */
fprintf(fp,"\n\n\n\n");
/* --------DRAW ENTERPRISE PICTURE. */
- fprintf(fp, " EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE\n" );
+ fprintf(fp, " EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE\n" );
fprintf(fp, " EEE E : : : E\n" );
fprintf(fp, " EE EEE E : : NCC-1701 : E\n");
- fprintf(fp, " EEEEEEEEEEEEEEEE EEEEEEEEEEEEEEE E : : : E\n");
- fprintf(fp, " E E EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE\n");
+ fprintf(fp, "EEEEEEEEEEEEEEEE EEEEEEEEEEEEEEE : : : E\n");
+ fprintf(fp, " E EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE\n");
fprintf(fp, " EEEEEEEEE EEEEEEEEEEEEE E E\n");
fprintf(fp, " EEEEEEE EEEEE E E E E\n");
fprintf(fp, " EEE E E E E\n");
height = (1400.+7200.*Rand());
prout("Sulu- \"Entered orbit at altitude %.2f kilometers.\"", height);
inorbit = 1;
- return;
+#ifdef SERGEEV
+ ididit=1;
+#endif /* SERGEEV */
}
void sensor(void) {
+#ifdef SERGEEV
+ if (game.damage[DSRSENS] != 0.0) return;
+ if ((plnetx != 0)&&(game.state.plnets[iplnet].known == 0)) {
+#else
skip(1);
chew();
if (game.damage[DSRSENS] != 0.0) {
prout("No planet in this quadrant.");
return;
}
+#endif /* SERGEEV */
prout("Spock- \"Sensor scan for %s-", cramlc(quadrant, quadx, quady));
skip(1);
prout(" Planet at %s is of class %s.",
if (game.state.plnets[iplnet].crystals == 0) proutn(" no");
prout(" dilithium crystals present.\"");
if (game.state.plnets[iplnet].known == unknown) game.state.plnets[iplnet].known = known;
- return;
+#ifdef SERGEEV
+ }
+#endif /* SERGEEV */
}
void beam(void) {
skip(1);
prout("Kirk- \"Energize.\"");
}
+#ifdef SERGEEV
+ ididit=1;
+#endif /* SERGEEV */
skip(1);
prouts("WWHOOOIIIIIRRRRREEEE.E.E. . . . . . .");
skip(2);
}
void mine(void) {
-
- ididit = 0;
skip(1);
chew();
if (landed!= 1) {
if (consumeTime()) return;
prout("Mining operation complete.");
imine = 1;
- return;
+#ifdef SERGEEV
+ ididit=1;
+#endif /* SERGEEV */
}
void usecrystals(void) {
-
+ ididit=0;
skip(1);
chew();
if (icrystl!=1) {
prout(" are going crazy, but I think it's");
prout(" going to work!! Congratulations, Sir!\"");
cryprob *= 2.0;
- return;
+#ifdef SERGEEV
+ ididit=1;
+#endif /* SERGEEV */
}
void shuttle(void) {
chew();
skip(1);
- ididit = 0;
if(game.damage[DSHUTTL] != 0.0) {
if (game.damage[DSHUTTL] == -1.0) {
if (inorbit && game.state.plnets[iplnet].known == shuttle_down)
return;
}
}
-
void deathray(void) {
double r = Rand();