Update pipeline for python3 and PyYAML.
[open-adventure.git] / actions.c
index 2b9973a55a7836348a22c05d74a5c974a66db73b..cc2f66cedc1348eb781a5ee8c1ffa18425a03835 100644 (file)
--- a/actions.c
+++ b/actions.c
@@ -774,11 +774,10 @@ static int quit(FILE *input)
 static int read(FILE *input, token_t verb, token_t obj)
 /*  Read.  Print stuff based on objtxt.  Oyster (?) is special case. */
 {
-    int i;
     int spk = ACTSPK[verb];
     if (obj == INTRANSITIVE) {
        obj = 0;
-       for (i=1; i<=NOBJECTS; i++) {
+       for (int i=1; i<=NOBJECTS; i++) {
            if (HERE(i) && OBJTXT[i] != 0 && game.prop[i] >= 0)
                obj = obj * NOBJECTS + i;
        }
@@ -849,7 +848,7 @@ static int say(void)
     int wd=VOCAB(WD1,-1);
     if (wd == 62 || wd == 65 || wd == 71 || wd == 2025 || wd == 2034) {
        WD2=0;
-       return(2630);
+       return GO_LOOKUP;
     }
     RSPEAK(258);
     return GO_CLEAROBJ;
@@ -1051,7 +1050,7 @@ int action(FILE *input, enum speechpart part, long verb, token_t obj)
        case intransitive:
            if (WD2 > 0 && verb != SAY) return(2800);
            if (verb == SAY)obj=WD2;
-           if (obj == 0) {
+           if (obj == 0 || obj == INTRANSITIVE) {
                /*  Analyse an intransitive verb (ie, no object given yet). */
                    switch (verb-1) {
                    case  0: /* CARRY */ return carry(verb, INTRANSITIVE);