blessed +2 fireproof speed boots
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?)
This commit is contained in:
@@ -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
|
||||
|
||||
19
src/objnam.c
19
src/objnam.c
@@ -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++;
|
||||
|
||||
Reference in New Issue
Block a user