there are lists of annointed usernames in battlestar. this creates an unfair
playing field! worse, there is a list of "bad" people! and i'm almost one of
them!

-static const char *const badguys[] = {
-       "wnj",
-       "root",
-       "ted",
-       0
-};


Index: com1.c
===================================================================
RCS file: /home/cvs/src/games/battlestar/com1.c,v
retrieving revision 1.15
diff -u -p -r1.15 com1.c
--- com1.c      31 Dec 2015 17:51:19 -0000      1.15
+++ com1.c      9 May 2019 03:31:36 -0000
@@ -129,7 +129,7 @@ news(void)
                }
                rythmn = ourtime - ourtime % CYCLE;
        }
-       if (!wiz && !tempwiz)
+       if (!tempwiz)
                if ((TestBit(inven, TALISMAN) || TestBit(wear, TALISMAN)) && 
(TestBit(inven, MEDALION) || TestBit(wear, MEDALION)) && (TestBit(inven, 
AMULET) || TestBit(wear, AMULET))) {
                        tempwiz = 1;
                        puts("The three amulets glow and reenforce each other 
in power.\nYou are now a wizard.");
Index: com4.c
===================================================================
RCS file: /home/cvs/src/games/battlestar/com4.c,v
retrieving revision 1.15
diff -u -p -r1.15 com4.c
--- com4.c      31 Dec 2015 17:51:19 -0000      1.15
+++ com4.c      9 May 2019 03:32:49 -0000
@@ -53,7 +53,7 @@ take(unsigned int from[])
                        printf("%s:\n", objsht[value]);
                        heavy = (carrying + objwt[value]) <= WEIGHT;
                        bulky = (encumber + objcumber[value]) <= CUMBER;
-                       if ((TestBit(from, value) || wiz || tempwiz) && heavy 
&& bulky && !TestBit(inven, value)) {
+                       if ((TestBit(from, value) || tempwiz) && heavy && bulky 
&& !TestBit(inven, value)) {
                                SetBit(inven, value);
                                carrying += objwt[value];
                                encumber += objcumber[value];
Index: com6.c
===================================================================
RCS file: /home/cvs/src/games/battlestar/com6.c,v
retrieving revision 1.24
diff -u -p -r1.24 com6.c
--- com6.c      7 Feb 2018 20:22:23 -0000       1.24
+++ com6.c      9 May 2019 03:33:19 -0000
@@ -130,13 +130,10 @@ post(char ch)
 
        if (score_fp != NULL) {
                fprintf(score_fp, "%s  %31s  %c%20s", date, username, ch, 
rate());
-               if (wiz)
-                       fprintf(score_fp, "   wizard\n");
+               if (tempwiz)
+                       fprintf(score_fp, "   WIZARD!\n");
                else
-                       if (tempwiz)
-                               fprintf(score_fp, "   WIZARD!\n");
-                       else
-                               fprintf(score_fp, "\n");
+                       fprintf(score_fp, "\n");
        }
        sigprocmask(SIG_SETMASK, &osigset, (sigset_t *)0);
 }
Index: cypher.c
===================================================================
RCS file: /home/cvs/src/games/battlestar/cypher.c,v
retrieving revision 1.19
diff -u -p -r1.19 cypher.c
--- cypher.c    31 Dec 2015 17:51:19 -0000      1.19
+++ cypher.c    9 May 2019 03:34:13 -0000
@@ -105,7 +105,7 @@ cypher(void)
                        break;
 
                case UP:
-                       if (location[position].access || wiz || tempwiz) {
+                       if (location[position].access || tempwiz) {
                                if (!location[position].access)
                                        puts("Zap!  A gust of wind lifts you 
up.");
                                if (!moveplayer(location[position].up, AHEAD))
@@ -318,7 +318,7 @@ cypher(void)
                        break;
 
                case SU:
-                       if (wiz || tempwiz) {
+                       if (tempwiz) {
                                getnum(&position, "\nRoom (was %d) = ", 
position);
                                getnum(&ourtime, "Time (was %d) = ", ourtime);
                                getnum(&fuel, "Fuel (was %d) = ", fuel);
@@ -326,8 +326,8 @@ cypher(void)
                                getnum(&CUMBER, "CUMBER (was %d) = ", CUMBER);
                                getnum(&WEIGHT, "WEIGHT (was %d) = ", WEIGHT);
                                getnum(&ourclock, "Clock (was %d) = ", 
ourclock);
-                               if (getnum(&junk, "Wizard (was %d, %d) = ", 
wiz, tempwiz) != -1 && !junk)
-                                       tempwiz = wiz = 0;
+                               if (getnum(&junk, "Wizard (was %d) = ", 
tempwiz) != -1 && !junk)
+                                       tempwiz = 0;
                                printf("\nDONE.\n");
                                return (0);     /* No commands after a SU */
                        } else
Index: extern.h
===================================================================
RCS file: /home/cvs/src/games/battlestar/extern.h,v
retrieving revision 1.20
diff -u -p -r1.20 extern.h
--- extern.h    31 Dec 2015 17:51:19 -0000      1.20
+++ extern.h    9 May 2019 03:31:56 -0000
@@ -283,7 +283,6 @@ extern int     followgod;
 extern int     godready;
 extern int     win;
 extern int     wintime;
-extern int     wiz;
 extern int     tempwiz;
 extern int     matchlight;
 extern int     matchcount;
Index: globals.c
===================================================================
RCS file: /home/cvs/src/games/battlestar/globals.c,v
retrieving revision 1.15
diff -u -p -r1.15 globals.c
--- globals.c   27 Aug 2016 03:34:45 -0000      1.15
+++ globals.c   9 May 2019 03:34:26 -0000
@@ -255,7 +255,6 @@ int     snooze;
 int     meetgirl;
 int     godready;
 int     wintime;
-int     wiz;
 int     tempwiz;
 int     matchlight;
 int     loved;
Index: init.c
===================================================================
RCS file: /home/cvs/src/games/battlestar/init.c,v
retrieving revision 1.16
diff -u -p -r1.16 init.c
--- init.c      31 Dec 2015 17:51:19 -0000      1.16
+++ init.c      9 May 2019 03:30:50 -0000
@@ -39,9 +39,7 @@
 
 #include "extern.h"
 
-static int checkout(const char *);
 static const char *getutmp(void);
-static int wizard(const char *);
 
 void
 initialize(const char *filename)
@@ -72,7 +70,6 @@ initialize(const char *filename)
                restore(savefile);
                free(savefile);
        }
-       wiz = wizard(username);
        signal(SIGINT, die);
 }
 
@@ -90,59 +87,4 @@ getutmp(void)
                name = " ??? ";
 
        return(strdup(name));
-}
-
-/* Hereditary wizards.  A configuration file might make more sense. */
-static const char *const list[] = {
-       "riggle",
-       "chris",
-       "edward",
-       "comay",
-       "yee",
-       "dmr",
-       "ken",
-       0
-};
-
-static const char *const badguys[] = {
-       "wnj",
-       "root",
-       "ted",
-       0
-};
-
-static int
-wizard(const char *username)
-{
-       int     flag;
-
-       if ((flag = checkout(username)) != 0)
-               printf("You are the Great wizard %s.\n", username);
-       return flag;
-}
-
-static int
-checkout(const char *username)
-{
-       const char  *const *ptr;
-
-       for (ptr = list; *ptr; ptr++)
-               if (strcmp(*ptr, username) == 0)
-                       return 1;
-       for (ptr = badguys; *ptr; ptr++)
-               if (strcmp(*ptr, username) == 0) {
-                       printf("You are the Poor anti-wizard %s.  Good Luck!\n",
-                           username);
-                       if (location != NULL) {
-                               CUMBER = 3;
-                               WEIGHT = 9;     /* that'll get him! */
-                               ourclock = 10;
-                               SetBit(location[7].objects, WOODSMAN);  /* 
viper room */
-                               SetBit(location[20].objects, WOODSMAN); /* 
laser " */
-                               SetBit(location[13].objects, DARK);     /* 
amulet " */
-                               SetBit(location[8].objects, ELF);       /* 
closet */
-                       }
-                       return 0;       /* anything else, Chris? */
-               }
-       return 0;
 }

Reply via email to