From: cohrs Date: Wed, 5 Mar 2003 05:45:45 +0000 (+0000) Subject: U319 - lotu juice X-Git-Tag: MOVE2GIT~2109 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=baa912fa61174948a2de4b8d779ee3685446ab59;p=nethack U319 - lotu juice Valid fruit names like lotus would result in funny fruit juice names, eg "lotu juice". Looking at a long list of words ending in "us", the ones one might reasonbly use for a fruit name were all singular, as were almost all of the unreasonable words. Changed the logic to prefer to leave "us" words alone, except for 2 monster types that might be entered with "s" at the end. Tengus is not correct, according to makeplural, but I put that in to be nice. --- diff --git a/doc/fixes35.0 b/doc/fixes35.0 index 8963d41c4..4ac8aedfb 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -9,6 +9,7 @@ missing opthelp for use_inverse Never say "It moves only reluctantly" expert fireball/cone of cold could not target a monster seen only with infravision or ESP +display "lotus juice", not "lotu juice" for the fruit juice name Platform- and/or Interface-Specific Fixes diff --git a/src/objnam.c b/src/objnam.c index c3dfadc48..cb34b45c1 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -1524,6 +1524,11 @@ const char *oldstr; !BSTRCMP(bp, p-6, "scales")) return bp; + } else if (!BSTRCMP(bp, p-2, "us")) { /* lotus, fungus... */ + if (BSTRCMP(bp, p-6, "tengus") && /* but not these... */ + BSTRCMP(bp, p-7, "hezrous")) + return bp; + } else if (!BSTRCMP(bp, p-5, "boots") || !BSTRCMP(bp, p-9, "gauntlets") || !BSTRCMP(bp, p-6, "tricks") || @@ -1532,13 +1537,10 @@ const char *oldstr; !BSTRCMP(bp, p-4, "ness") || !BSTRCMP(bp, p-14, "shape changers") || !BSTRCMP(bp, p-15, "detect monsters") || - !BSTRCMPI(bp, p-11, "Aesculapius") || /* staff */ - !BSTRCMP(bp, p-10, "eucalyptus") || #ifdef WIZARD !BSTRCMP(bp, p-9, "iron bars") || #endif - !BSTRCMP(bp, p-5, "aklys") || - !BSTRCMP(bp, p-6, "fungus")) + !BSTRCMP(bp, p-5, "aklys")) return bp; mins: p[-1] = '\0';