]> granicus.if.org Git - nethack/commitdiff
improve pluralization on some words ending with a k-sound
authornhmall <nhmall@nethack.org>
Sat, 16 Nov 2019 13:27:07 +0000 (08:27 -0500)
committernhmall <nhmall@nethack.org>
Sat, 16 Nov 2019 13:27:07 +0000 (08:27 -0500)
fixes #245

doc/fixes36.3
src/objnam.c

index 287b74044ee6d3e985f00491429b685edcd596aa..d65976a9d62bc413fba9b4306e70980831d7bf31 100644 (file)
@@ -232,6 +232,7 @@ dipping into an undiscovered potion would offer chance to give a name to the
        potion even when its description wasn't known (picked up while blind)
 dipping lichen corpse into acid when not blind and acid was undicovered would
        not offer a chance to give a name to the potion after lichen feedback
+pluralization improvement for words ending in a k-sound like "biotech"
 
 
 Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository
index 765414417c71808e2290fc1e4544635ee71f25a6..ba301b9cf8185a8d95525341f7150290d38a7bb2 100644 (file)
@@ -2435,7 +2435,10 @@ const char *oldstr;
 
     /* Ends in z, x, s, ch, sh; add an "es" */
     if (index("zxs", lo_c)
-        || (len >= 2 && lo_c == 'h' && index("cs", lowc(*(spot - 1))))
+        || (len >= 2 && lo_c == 'h' && index("cs", lowc(*(spot - 1)))
+            /* 21st century k-sound */
+            && !(len >= 4 && !strcmpi(spot - 2, "ech")
+                && index("tm", lowc(*(spot - 4)))))
         /* Kludge to get "tomatoes" and "potatoes" right */
         || (len >= 4 && !strcmpi(spot - 2, "ato"))
         || (len >= 5 && !strcmpi(spot - 4, "dingo"))) {