]> granicus.if.org Git - nethack/commitdiff
blessed +2 fireproof speed boots
authorarromdee <arromdee>
Sat, 2 Feb 2002 07:18:52 +0000 (07:18 +0000)
committerarromdee <arromdee>
Sat, 2 Feb 2002 07:18:52 +0000 (07:18 +0000)
The inability to wish for a blessed +2 fireproof speed boots really was a bug.
Prefixes are checked for inside a loop which should allow them to be in any
order; for some reason +nnn and empty were outside that loop.

Also adding the secret door detection fix to betabugs 3.3.0.  (Is it safe to
hand-modify betabugs 3.3.2?)

doc/fixes33.2
src/objnam.c

index 033c0d98c07f69c55861c354a13bb1c52699f29c..ed7731c6a34d0336f6ae82f0cb6b963d60bf98d3 100644 (file)
@@ -416,6 +416,7 @@ consider vortexes to be nonliving
 dragons have scales, not fur
 if player teleports a monster while swallowed on a noteleport level, the
        player should not teleport along with the monster
+prefixes that can appear in any order when wishing should include +/- and empty
 
 
 Platform- and/or Interface-Specific Fixes
index 0ad9650c879e1aea366e498c09bd28c42c83b3c0..68486d2e26310988762932afb8e1d343f7888808 100644 (file)
@@ -1557,6 +1557,12 @@ struct obj *no_wish;
                        while(digit(*bp)) bp++;
                        while(*bp == ' ') bp++;
                        l = 0;
+               } else if (*bp == '+' || *bp == '-') {
+                       spesgn = (*bp++ == '+') ? 1 : -1;
+                       spe = atoi(bp);
+                       while(digit(*bp)) bp++;
+                       while(*bp == ' ') bp++;
+                       l = 0;
                } else if (!strncmpi(bp, "blessed ", l=8) ||
                           !strncmpi(bp, "holy ", l=5)) {
                        blessed = 1;
@@ -1616,21 +1622,14 @@ struct obj *no_wish;
                        ishistoric = 1;
                } else if (!strncmpi(bp, "diluted ", l=8)) {
                        isdiluted = 1;
+               } else if(!strncmpi(bp, "empty ", l=6)) {
+                       contents = EMPTY;
                } else break;
                bp += l;
        }
        if(!cnt) cnt = 1;               /* %% what with "gems" etc. ? */
-       if(!strncmpi(bp, "empty ", 6)) {
-               contents = EMPTY;
-               bp += 6;
-       }
        if (strlen(bp) > 1) {
-           if (*bp == '+' || *bp == '-') {
-               spesgn = (*bp++ == '+') ? 1 : -1;
-               spe = atoi(bp);
-               while(digit(*bp)) bp++;
-               while(*bp == ' ') bp++;
-           } else if ((p = rindex(bp, '(')) != 0) {
+           if ((p = rindex(bp, '(')) != 0) {
                if (p > bp && p[-1] == ' ') p[-1] = 0;
                else *p = 0;
                p++;