diff options
-rw-r--r-- | crawl-ref/source/libutil.cc | 4 | ||||
-rw-r--r-- | crawl-ref/source/mon-util.cc | 20 |
2 files changed, 13 insertions, 11 deletions
diff --git a/crawl-ref/source/libutil.cc b/crawl-ref/source/libutil.cc index 2c264313f0..1cc7f40d85 100644 --- a/crawl-ref/source/libutil.cc +++ b/crawl-ref/source/libutil.cc @@ -292,7 +292,7 @@ std::string article_a(const std::string &name, bool lowercase) case 'a': case 'e': case 'i': case 'o': case 'u': case 'A': case 'E': case 'I': case 'O': case 'U': // XXX: Hack - if (starts_with(name, "one-way")) + if (starts_with(name, "one-")) return a + name; return an + name; default: @@ -353,7 +353,7 @@ std::string pluralise(const std::string &name, { if (name == "y") return ("ys"); - // sensibilitiy -> sensibilities + // sensibility -> sensibilities else if (name[name.length() - 2] == 'i') return name.substr(0, name.length() - 1) + "es"; // day -> days, boy -> boys, etc diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc index 5fb06eddb7..ac0a59680e 100644 --- a/crawl-ref/source/mon-util.cc +++ b/crawl-ref/source/mon-util.cc @@ -2116,10 +2116,7 @@ static std::string _str_monam(const monsters& mon, description_level_type desc, result += cardinals[mon.number - 1]; } else - { - snprintf(info, INFO_SIZE, "%d", mon.number); - result += info; - } + result += make_stringf("%d", mon.number); result += "-headed "; } @@ -2156,11 +2153,13 @@ static std::string _str_monam(const monsters& mon, description_level_type desc, break; } - // Vowel fix: Change 'a orc' to 'an orc' + // Vowel fix: Change 'a orc' to 'an orc'. if (result.length() >= 3 && (result[0] == 'a' || result[0] == 'A') && result[1] == ' ' - && is_vowel(result[2])) + && is_vowel(result[2]) + // XXX: Hack + && !starts_with(&result[2], "one-")) { result.insert(1, "n"); } @@ -2189,6 +2188,7 @@ static std::string _str_monam(const monsters& mon, description_level_type desc, std::string mons_type_name(int type, description_level_type desc ) { std::string result; + if (!mons_is_unique(type)) { switch (desc) @@ -2201,7 +2201,7 @@ std::string mons_type_name(int type, description_level_type desc ) } } - switch(type) + switch (type) { case RANDOM_MONSTER: result += "random monster"; @@ -2230,11 +2230,13 @@ std::string mons_type_name(int type, description_level_type desc ) result += me->name; - // Vowel fix: Change 'a orc' to 'an orc'. + // Vowel fix: Change 'a orc' to 'an orc'.. if (result.length() >= 3 && (result[0] == 'a' || result[0] == 'A') && result[1] == ' ' - && is_vowel(result[2]) ) + && is_vowel(result[2]) + // XXX: Hack + && !starts_with(&result[2], "one-")) { result.insert(1, "n"); } |