From 7c5e54508666b65c7890ddc45880f64b38f887cb Mon Sep 17 00:00:00 2001 From: dshaligram Date: Thu, 31 May 2007 19:25:30 +0000 Subject: sort_menus now allows the user to choose what menus to sort, and how to sort items, at the cost of obfuscating the sort_menus option massively. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1494 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/Kills.cc | 50 ----------------------------------------------- 1 file changed, 50 deletions(-) (limited to 'crawl-ref/source/Kills.cc') diff --git a/crawl-ref/source/Kills.cc b/crawl-ref/source/Kills.cc index b8da6d4b82..3652662dde 100644 --- a/crawl-ref/source/Kills.cc +++ b/crawl-ref/source/Kills.cc @@ -352,56 +352,6 @@ static const char *modifier_suffixes[] = "zombie", "skeleton", "simulacrum", NULL, }; -// Pluralises a monster name. This'll need to be updated for correctness -// whenever new monsters are added. -std::string pluralise(const std::string &name, - const char *no_of[]) -{ - std::string::size_type pos; - - // Pluralise first word of names like 'eye of draining', but only if the - // whole name is not suffixed by a modifier, such as 'zombie' or 'skeleton' - if ( (pos = name.find(" of ")) != std::string::npos - && !ends_with(name, no_of) ) - return pluralise(name.substr(0, pos)) + name.substr(pos); - else if (ends_with(name, "us")) - // Fungus, ufetubus, for instance. - return name.substr(0, name.length() - 2) + "i"; - else if (ends_with(name, "larva") || ends_with(name, "amoeba")) - // Giant amoebae sounds a little weird, to tell the truth. - return name + "e"; - else if (ends_with(name, "ex")) - // Vortex; vortexes is legal, but the classic plural is cooler. - return name.substr(0, name.length() - 2) + "ices"; - else if (ends_with(name, "cyclops")) - return name.substr(0, name.length() - 1) + "es"; - else if (ends_with(name, "y")) - return name.substr(0, name.length() - 1) + "ies"; - else if (ends_with(name, "elf") || ends_with(name, "olf")) - // Elf, wolf. Dwarfs can stay dwarfs, if there were dwarfs. - return name.substr(0, name.length() - 1) + "ves"; - else if (ends_with(name, "mage")) - // mage -> magi - return name.substr(0, name.length() - 1) + "i"; - else if ( ends_with(name, "sheep") || ends_with(name, "manes") - || ends_with(name, "fish") ) - // Maybe we should generalise 'manes' to ends_with("es")? - return name; - else if (ends_with(name, "ch") || ends_with(name, "sh") - || ends_with(name, "x")) - // To handle cockroaches, fish and sphinxes. Fish will be netted by - // the previous check anyway. - return name + "es"; - else if (ends_with(name, "um")) - // simulacrum -> simulacra - return name.substr(0, name.length() - 2) + "a"; - else if (ends_with(name, "efreet")) - // efreet -> efreeti. Not sure this is correct. - return name + "i"; - - return name + "s"; -} - // Naively prefix A/an to a monster name. At the moment, we don't have monster // names that demand more sophistication (maybe ynoxinul - don't know how // that's pronounced). -- cgit v1.2.3-54-g00ecf