summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-util.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-03-21 18:32:15 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-03-21 18:32:15 +0000
commitd9ea3d23c7f996b76d1663272e48b8ce5698d08d (patch)
treeadcc762851560abb08d6ffba5e6b0138186de7c1 /crawl-ref/source/mon-util.cc
parenta827d0a2fe6398a6262bc7a41318afbd26f18847 (diff)
downloadcrawl-ref-d9ea3d23c7f996b76d1663272e48b8ce5698d08d.tar.gz
crawl-ref-d9ea3d23c7f996b76d1663272e48b8ce5698d08d.zip
Fix [2700197]: Use "a" instead of "an" for one-headed hydras.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9525 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/mon-util.cc')
-rw-r--r--crawl-ref/source/mon-util.cc20
1 files changed, 11 insertions, 9 deletions
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");
}