Abstract out damage checks.
[super-star-trek.git] / src / finish.c
index 54b5beaca08a7db10f4b5b19f89706390adf1b15..78680d871953b89d5ef573e3ad17db178d30998a 100644 (file)
@@ -6,7 +6,7 @@ void dstrct()
 {
     /* Finish with a BANG! */
     chew();
-    if (game.damage[DCOMPTR] != 0.0) {
+    if (damaged(DCOMPTR)) {
        prout(_("Computer damaged; cannot execute destruct sequence."));
        return;
     }