wishing fixes for "* glass"
The wishing code intended to make a wish for "blue glass" yield a "worthless piece of blue glass" (and similarly for other specific colors) but it didn't work right. Also, wishing for "looking glass" tripped up on that same code and didn't work either. (Several other permutations for worthless gems such as "worthless blue glass" and "piece of glass" already do work.)
This commit is contained in:
@@ -189,6 +189,7 @@ prevent crash after animating a statue via stone to flesh by avoiding use
|
|||||||
of the obj in newsym() after it was deleted
|
of the obj in newsym() after it was deleted
|
||||||
print "magic spreads" message when eating ring of increase damage, etc.
|
print "magic spreads" message when eating ring of increase damage, etc.
|
||||||
grammar tid: "The looking glass miss the <monster>."
|
grammar tid: "The looking glass miss the <monster>."
|
||||||
|
fix wishing for "looking glass" and "<color> glass"
|
||||||
|
|
||||||
|
|
||||||
Platform- and/or Interface-Specific Fixes
|
Platform- and/or Interface-Specific Fixes
|
||||||
|
|||||||
+3
-1
@@ -2040,6 +2040,8 @@ boolean from_user;
|
|||||||
oclass = GEM_CLASS;
|
oclass = GEM_CLASS;
|
||||||
dn = actualn = bp;
|
dn = actualn = bp;
|
||||||
goto srch;
|
goto srch;
|
||||||
|
} else if (!strcmpi(bp, "looking glass")) {
|
||||||
|
; /* avoid false hit on "* glass" */
|
||||||
} else if (!BSTRCMPI(bp, p-6, " glass") || !strcmpi(bp, "glass")) {
|
} else if (!BSTRCMPI(bp, p-6, " glass") || !strcmpi(bp, "glass")) {
|
||||||
register char *g = bp;
|
register char *g = bp;
|
||||||
if (strstri(g, "broken")) return (struct obj *)0;
|
if (strstri(g, "broken")) return (struct obj *)0;
|
||||||
@@ -2052,7 +2054,7 @@ boolean from_user;
|
|||||||
typ = LAST_GEM + rnd(9);
|
typ = LAST_GEM + rnd(9);
|
||||||
if (objects[typ].oc_class == GEM_CLASS) goto typfnd;
|
if (objects[typ].oc_class == GEM_CLASS) goto typfnd;
|
||||||
else typ = 0; /* somebody changed objects[]? punt */
|
else typ = 0; /* somebody changed objects[]? punt */
|
||||||
} else if (g > bp) { /* try to construct canonical form */
|
} else { /* try to construct canonical form */
|
||||||
char tbuf[BUFSZ];
|
char tbuf[BUFSZ];
|
||||||
Strcpy(tbuf, "worthless piece of ");
|
Strcpy(tbuf, "worthless piece of ");
|
||||||
Strcat(tbuf, g); /* assume it starts with the color */
|
Strcat(tbuf, g); /* assume it starts with the color */
|
||||||
|
|||||||
Reference in New Issue
Block a user