]> git.cameronkatri.com Git - bsdgames-darwin.git/blobdiff - trek/attack.c
Fix for compiling with -DFANCY, as per PR 5832 by Joseph Myers <jsm28@cam.ac.uk>
[bsdgames-darwin.git] / trek / attack.c
index 61c23ed066a1fe9dc859a94b32f11a289c4ada08..fa1fe3168b95bc0e65456238f5409e744946fae4 100644 (file)
@@ -1,6 +1,8 @@
+/*     $NetBSD: attack.c,v 1.4 1997/10/12 21:24:26 christos Exp $      */
+
 /*
- * Copyright (c) 1980 Regents of the University of California.
- * All rights reserved.
+ * Copyright (c) 1980, 1993
+ *     The Regents of the University of California.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * SUCH DAMAGE.
  */
 
+#include <sys/cdefs.h>
 #ifndef lint
-static char sccsid[] = "@(#)attack.c   5.4 (Berkeley) 6/1/90";
+#if 0
+static char sccsid[] = "@(#)attack.c   8.1 (Berkeley) 5/31/93";
+#else
+__RCSID("$NetBSD: attack.c,v 1.4 1997/10/12 21:24:26 christos Exp $");
+#endif
 #endif /* not lint */
 
-# include      "trek.h"
+#include <stdio.h>
+#include <math.h>
+#include "trek.h"
 
 /*
 **  Klingon Attack Routine
@@ -67,15 +76,16 @@ static char sccsid[] = "@(#)attack.c        5.4 (Berkeley) 6/1/90";
 **     Casualties can also occur.
 */
 
+void
 attack(resting)
 int    resting;        /* set if attack while resting */
 {
-       register int            hit, i, l;
-       int                     maxhit, tothit, shldabsb;
-       double                  chgfac, propor, extradm;
-       double                  dustfac, tothe;
-       int                     cas;
-       int                     hitflag;
+       int             hit, i, l;
+       int             maxhit, tothit, shldabsb;
+       double          chgfac, propor, extradm;
+       double          dustfac, tothe;
+       int             cas;
+       int             hitflag;
 
        if (Move.free)
                return;