X-Git-Url: https://jxself.org/git/?p=super-star-trek.git;a=blobdiff_plain;f=planets.c;h=7dd95415b29cfb945fcd2f8bdff13791e5816e30;hp=5cf8965784186dab691972d1ad5dff1f73fa7d1a;hb=3997c103ce06a0e1f689a1b542daa68c523d1c5d;hpb=65b9a64fa507a2ec318ffaea1d8fdb070245c581 diff --git a/planets.c b/planets.c index 5cf8965..7dd9541 100644 --- a/planets.c +++ b/planets.c @@ -17,7 +17,7 @@ static int consumeTime(void) } #endif // asave = future[FSNOVA]; -// future[FSNOVA] = 1e30; /* defer supernovas */ +// future[FSNOVA] = FOREVER; /* defer supernovas */ events(); /* Used to avoid if future[FSCMOVE] within time */ // future[FSNOVA] = asave; /*fails if game over, quadrant super-novas or we've moved to new quadrant*/ @@ -69,7 +69,8 @@ void orbit(void) } if (plnetx == 0 || abs(sectx-plnetx) > 1 || abs(secty-plnety) > 1) { crmshp(); - prout(" not adjacent to planet.\n"); + prout(" not adjacent to planet."); + skip(1); return; } Time = 0.02+0.03*Rand(); @@ -82,7 +83,7 @@ void orbit(void) ididit=1; } -void sensor(int force) +void sensor(void) { skip(1); chew(); @@ -90,11 +91,11 @@ void sensor(int force) prout("Short range sensors damaged."); return; } - if (!plnetx && ((game.state.plnets[iplnet].known == unknown || force))) { + if (!plnetx && (game.options & OPTION_TTY)) { prout("Spock- \"No planet in this quadrant, Captain.\""); return; } - if ((plnetx != 0)&&(game.state.plnets[iplnet].known == unknown)) { + if ((plnetx != 0)&& (game.state.plnets[iplnet].known == unknown)) { prout("Spock- \"Sensor scan for %s-", cramlc(quadrant, quadx, quady)); skip(1); prout(" Planet at %s is of class %s.", @@ -435,7 +436,7 @@ void deathray(void) 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 (game.state.remkl == 0) finish(FWON); + if (KLINGREM == 0) finish(FWON); prout("Spock- \"Captain, I believe the `Experimental Death Ray'"); if (Rand() <= 0.05) { prout(" is still operational.\""); @@ -482,8 +483,8 @@ void deathray(void) proutn("Spock- \"I believe the word is"); prouts(" *ASTONISHING*"); prout(" Mr. Sulu."); - for (i=1; i<=QUADSIZE; i++) - for (j=1; j<=QUADSIZE; j++) + for_sectors(i) + for_sectors(j) if (game.quad[i][j] == IHDOT) game.quad[i][j] = IHQUEST; prout(" Captain, our quadrant is now infested with"); prouts(" - - - - - - *THINGS*.");