More boolean cleanups.
[super-star-trek.git] / src / sst.c
index 7fbbfc2ef558af029e37e827537410314a35ef4f..96e5edb68b34f4af481980f8c9ca80b134faf68e 100644 (file)
--- a/src/sst.c
+++ b/src/sst.c
@@ -162,6 +162,12 @@ for a lot of magic numbers and refactored the heck out of it.
       type is "plain" or "almy".)
 
    6. User input is now logged so we can do regression testing.
       type is "plain" or "almy".)
 
    6. User input is now logged so we can do regression testing.
+
+   7. More BSD-Trek features: You can now lose if your entire crew
+      dies in battle.  When abandoning ship in a game with inhabited
+      worlds enabled, they must have one in the quadrant to beam down
+      to; otherwise they die in space and this counts heavily against
+      your score.  Docking at a starbase replenishes your crew.
 */
 
 /* the input queue */
 */
 
 /* the input queue */
@@ -463,7 +469,7 @@ static void makemoves(void)
            dreprt();
            break;
        case CHART:                     // chart
            dreprt();
            break;
        case CHART:                     // chart
-           chart(0);
+           chart(false);
            break;
        case IMPULSE:                   // impulse
            impuls();
            break;
        case IMPULSE:                   // impulse
            impuls();
@@ -564,14 +570,14 @@ static void makemoves(void)
                if (game.alldone) break;        // Events did us in
            }
            if (game.state.galaxy[game.quadrant.x][game.quadrant.y].supernova) { // Galaxy went Nova!
                if (game.alldone) break;        // Events did us in
            }
            if (game.state.galaxy[game.quadrant.x][game.quadrant.y].supernova) { // Galaxy went Nova!
-               atover(0);
+               atover(false);
                continue;
            }
                continue;
            }
-           if (hitme && game.justin==0) {
+           if (hitme && !game.justin) {
                attack(2);
                if (game.alldone) break;
                if (game.state.galaxy[game.quadrant.x][game.quadrant.y].supernova) {    // went NOVA! 
                attack(2);
                if (game.alldone) break;
                if (game.state.galaxy[game.quadrant.x][game.quadrant.y].supernova) {    // went NOVA! 
-                   atover(0);
+                   atover(false);
                    hitme = true;
                    continue;
                }
                    hitme = true;
                    continue;
                }
@@ -909,20 +915,23 @@ void debugme(void)
                    chew();
                    proutn("In quadrant- ");
                    key = scan();
                    chew();
                    proutn("In quadrant- ");
                    key = scan();
-                   if (key != IHREAL) {
-                       prout("Event %d canceled, no y coordinate.", i);
-                       unschedule(i);
-                       continue;
-                   }
-                   w.y = (int)aaitem;
-                   key = scan();
-                   if (key != IHREAL) {
-                       prout("Event %d canceled, no x coordinate.", i);
-                       unschedule(i);
-                       continue;
+                   /* IHEOL says to leave coordinates as they are */
+                   if (key != IHEOL) {
+                       if (key != IHREAL) {
+                           prout("Event %d canceled, no x coordinate.", i);
+                           unschedule(i);
+                           continue;
+                       }
+                       w.x = (int)aaitem;
+                       key = scan();
+                       if (key != IHREAL) {
+                           prout("Event %d canceled, no y coordinate.", i);
+                           unschedule(i);
+                           continue;
+                       }
+                       w.y = (int)aaitem;
+                       ev->quadrant = w;
                    }
                    }
-                   w.x = (int)aaitem;
-                   ev->quadrant = w;
                }
            }
        }
                }
            }
        }
@@ -931,6 +940,6 @@ void debugme(void)
     proutn("Induce supernova here? ");
     if (ja()) {
        game.state.galaxy[game.quadrant.x][game.quadrant.y].supernova = true;
     proutn("Induce supernova here? ");
     if (ja()) {
        game.state.galaxy[game.quadrant.x][game.quadrant.y].supernova = true;
-       atover(1);
+       atover(true);
     }
 }
     }
 }