Magic-number elimination.
[open-adventure.git] / actions2.c
index a169c481960affea6b660277414d151473f71ebb..08a62837e73449a499072458dc90ffbd97183ad4 100644 (file)
@@ -198,7 +198,7 @@ L9128:      RSPEAK(SPK);
        RSPEAK(6);
        DSTROY(OGRE);
        K=0;
-       for (I=1; I<=5; I++) {
+       for (I=1; I < PIRATE; I++) {
                if(DLOC[I] == LOC) {
                        K=K+1;
                        DLOC[I]=61;
@@ -232,7 +232,7 @@ int throw(FILE *cmdin) {
        return(attack(cmdin));
 
 L9172: SPK=48;
-       if(randrange(7) < DFLAG) goto L9175;
+       if(randrange(NDWARVES+1) < DFLAG) goto L9175;
        DSEEN[I]=false;
        DLOC[I]=0;
        SPK=47;