summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/Kills.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-05-31 19:25:30 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-05-31 19:25:30 +0000
commit7c5e54508666b65c7890ddc45880f64b38f887cb (patch)
tree452f6a59973c7f7236a2f9fb1f3b39c76eb088c9 /crawl-ref/source/Kills.cc
parent8df9960b2b34f903658b041751ef4a8c47338c10 (diff)
downloadcrawl-ref-7c5e54508666b65c7890ddc45880f64b38f887cb.tar.gz
crawl-ref-7c5e54508666b65c7890ddc45880f64b38f887cb.zip
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
Diffstat (limited to 'crawl-ref/source/Kills.cc')
-rw-r--r--crawl-ref/source/Kills.cc50
1 files changed, 0 insertions, 50 deletions
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).