date and time created 88/10/19 15:33:10 by bostic
[unix-history] / usr / src / games / trek / ram.c
index eff61bd..102a2fc 100644 (file)
@@ -1,6 +1,23 @@
+/*
+ * Copyright (c) 1980 Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the University of California, Berkeley.  The name of the
+ * University may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)ram.c      4.1     (Berkeley)      %G%";
-#endif not lint
+static char sccsid[] = "@(#)ram.c      5.4 (Berkeley) %G%";
+#endif /* not lint */
 
 # include      "trek.h"
 
 
 # include      "trek.h"
 
@@ -21,7 +38,7 @@ int   ix, iy;
        register int            i;
        register char           c;
 
        register int            i;
        register char           c;
 
-       printf("\aRED ALERT\a: collision imminent\n");
+       printf("\07RED ALERT\07: collision imminent\n");
        c = Sect[ix][iy];
        switch (c)
        {
        c = Sect[ix][iy];
        switch (c)
        {
@@ -43,7 +60,7 @@ int   ix, iy;
                killb(Ship.quadx, Ship.quady);
                /* don't penalize the captain if it wasn't his fault */
                if (!damaged(SINS))
                killb(Ship.quadx, Ship.quady);
                /* don't penalize the captain if it wasn't his fault */
                if (!damaged(SINS))
-                       Game.killb =+ 1;
+                       Game.killb += 1;
                break;
        }
        sleep(2);
                break;
        }
        sleep(2);
@@ -51,8 +68,8 @@ int   ix, iy;
 
        /* select the number of deaths to occur */
        i = 10 + ranf(20 * Game.skill);
 
        /* select the number of deaths to occur */
        i = 10 + ranf(20 * Game.skill);
-       Game.deaths =+ i;
-       Ship.crew =- i;
+       Game.deaths += i;
+       Ship.crew -= i;
        printf("McCoy: Take it easy Jim; we had %d casualties.\n", i);
 
        /* damage devices with an 80% probability */
        printf("McCoy: Take it easy Jim; we had %d casualties.\n", i);
 
        /* damage devices with an 80% probability */