First step in game state encapsulation: the dwarf & pirate locations.
[open-adventure.git] / actions2.c
index a169c481960affea6b660277414d151473f71ebb..208a453b402768e76d1fdc39466bfe0ac6868bee 100644 (file)
@@ -198,11 +198,11 @@ L9128:    RSPEAK(SPK);
        RSPEAK(6);
        DSTROY(OGRE);
        K=0;
-       for (I=1; I<=5; I++) {
-               if(DLOC[I] == LOC) {
+       for (I=1; I < PIRATE; I++) {
+               if(game.dloc[I] == LOC) {
                        K=K+1;
-                       DLOC[I]=61;
-                       DSEEN[I]=false;
+                       game.dloc[I]=61;
+                       game.dseen[I]=false;
                }
        }
        SPK=SPK+1+1/K;
@@ -232,9 +232,9 @@ int throw(FILE *cmdin) {
        return(attack(cmdin));
 
 L9172: SPK=48;
-       if(randrange(7) < DFLAG) goto L9175;
-       DSEEN[I]=false;
-       DLOC[I]=0;
+       if(randrange(NDWARVES+1) < DFLAG) goto L9175;
+       game.dseen[I]=false;
+       game.dloc[I]=0;
        SPK=47;
        DKILL=DKILL+1;
        if(DKILL == 1)SPK=149;