Another rollup patch.
[super-star-trek.git] / src / battle.c
index 9fc6082a3a7ff11213bd77dddf86697b974622d3..63eb38da3d52c9364fa95360daaf198904da5337 100644 (file)
@@ -276,7 +276,8 @@ void torpedo(double course, double r, coord in, double *hit, int i, int n)
        if (iquad==IHDOT) continue;
        /* hit something */
        setwnd(message_window);
-       skip(1);        /* start new line after text track */
+       if (damaged(DSRSENS) && !game.condition==docked)
+           skip(1);    /* start new line after text track */
        switch(iquad) {
        case IHE: /* Hit our ship */
        case IHF:
@@ -387,7 +388,7 @@ void torpedo(double course, double r, coord in, double *hit, int i, int n)
            q->planet = NOPLANET;
            DESTROY(&game.state.plnets[game.iplnet]);
            game.iplnet = 0;
-           game.plnet.x = game.plnet.y = 0;
+           invalidate(game.plnet);
            game.quad[w.x][w.y] = IHDOT;
            if (game.landed) {
                /* captain perishes on planet */
@@ -401,7 +402,7 @@ void torpedo(double course, double r, coord in, double *hit, int i, int n)
            q->planet = NOPLANET;
            DESTROY(&game.state.plnets[game.iplnet]);
            game.iplnet = 0;
-           game.plnet.x = game.plnet.y = 0;
+           invalidate(game.plnet);
            game.quad[w.x][w.y] = IHDOT;
            if (game.landed) {
                /* captain perishes on planet */
@@ -703,7 +704,6 @@ void deadkl(coord w, feature type, coord mv)
     /* Added mv to allow enemy to "move" before dying */
     int i,j;
 
-    skip(1);
     crmena(true, type, sector, mv);
     /* Decide what kind of enemy it is and update appropriately */
     if (type == IHR) {
@@ -719,7 +719,7 @@ void deadkl(coord w, feature type, coord mv)
     else if (type == IHQUEST) {
        /* Killed a Thingy */
        iqhere = iqengry = false;
-       thing.x =thing.y = 0;
+       invalidate(thing);
     }
     else {
        /* Some type of a Klingon */
@@ -1098,7 +1098,7 @@ void phasers(void)
        }
        if (key != IHREAL && game.nenhere != 0) {
            prout(_("Phasers locked on target. Energy available: %.2f"),
-                 ifast?game.energy-200.0:game.energy,1,2);
+                 ifast?game.energy-200.0:game.energy);
        }
        irec=0;
        do {
@@ -1169,7 +1169,7 @@ void phasers(void)
        chew();
        key = IHEOL;
        if (damaged(DCOMPTR))
-           prout(_("Battle computer damaged, manual file only."));
+           prout(_("Battle computer damaged, manual fire only."));
        else {
            skip(1);
            prouts(_("---WORKING---"));
@@ -1326,7 +1326,7 @@ void hittem(double *hits)
        else /* decide whether or not to emasculate klingon */
            if (kpow > 0 && Rand() >= 0.9 &&
                kpow <= ((0.4 + 0.4*Rand())*kpini)) {
-               prout(_("***Mr. Spock-  \"Captain, the vessel at "),
+               prout(_("***Mr. Spock-  \"Captain, the vessel at %s"),
                      cramlc(sector, w));
                prout(_("   has just lost its firepower.\""));
                game.kpower[kk] = -kpow;