Deathray is now regressed to original 5% probability in 'plain' games.
[super-star-trek.git] / planets.c
index 68bb27ca2ee912e7951f6a0548a7426bf81df7e4..217ce1414e72a47ce740e163cd1b02d0989a8532 100644 (file)
--- 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;
@@ -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();
@@ -394,7 +395,7 @@ void shuttle(void)
 
 void deathray(void) 
 {
-    double r = Rand();
+    double dprob, r = Rand();
        
     ididit = 0;
     skip(1);
@@ -429,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 (game.state.remkl == 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 (KLINGREM == 0) finish(FWON);
+       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;
     }