From: nhmall Date: Sat, 16 Nov 2019 13:27:07 +0000 (-0500) Subject: improve pluralization on some words ending with a k-sound X-Git-Tag: NetHack-3.6.3.beta1.2019.11.17~20 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8b1c6148f61c47d3629911258d4767f937cd4f32;p=nethack improve pluralization on some words ending with a k-sound fixes #245 --- diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 287b74044..d65976a9d 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -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 diff --git a/src/objnam.c b/src/objnam.c index 765414417..ba301b9cf 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -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"))) {