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
|
||||
print "magic spreads" message when eating ring of increase damage, etc.
|
||||
grammar tid: "The looking glass miss the <monster>."
|
||||
fix wishing for "looking glass" and "<color> glass"
|
||||
|
||||
|
||||
Platform- and/or Interface-Specific Fixes
|
||||
|
||||
@@ -2040,6 +2040,8 @@ boolean from_user;
|
||||
oclass = GEM_CLASS;
|
||||
dn = actualn = bp;
|
||||
goto srch;
|
||||
} else if (!strcmpi(bp, "looking glass")) {
|
||||
; /* avoid false hit on "* glass" */
|
||||
} else if (!BSTRCMPI(bp, p-6, " glass") || !strcmpi(bp, "glass")) {
|
||||
register char *g = bp;
|
||||
if (strstri(g, "broken")) return (struct obj *)0;
|
||||
@@ -2052,7 +2054,7 @@ boolean from_user;
|
||||
typ = LAST_GEM + rnd(9);
|
||||
if (objects[typ].oc_class == GEM_CLASS) goto typfnd;
|
||||
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];
|
||||
Strcpy(tbuf, "worthless piece of ");
|
||||
Strcat(tbuf, g); /* assume it starts with the color */
|
||||
|
||||
Reference in New Issue
Block a user