summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2009-05-29 22:46:41 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2009-05-29 22:46:41 +0000
commit6a14f41c8686a8e31406b4d2c00ec708b45b6762 (patch)
tree003ec922838a05958c9495f9495a652d716daf80
parent0bdad6413abe036f2e70c271f465a2da181b4116 (diff)
downloadcrawl-ref-6a14f41c8686a8e31406b4d2c00ec708b45b6762.tar.gz
crawl-ref-6a14f41c8686a8e31406b4d2c00ec708b45b6762.zip
Added the objective case of pronouns ("him", "her") for use in the
blocked-line-of-fire description. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9847 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/directn.cc2
-rw-r--r--crawl-ref/source/enum.h3
-rw-r--r--crawl-ref/source/mon-util.cc6
-rw-r--r--crawl-ref/source/player.cc1
4 files changed, 9 insertions, 3 deletions
diff --git a/crawl-ref/source/directn.cc b/crawl-ref/source/directn.cc
index 7959b19807..165aae3fec 100644
--- a/crawl-ref/source/directn.cc
+++ b/crawl-ref/source/directn.cc
@@ -3122,7 +3122,7 @@ static std::string _get_monster_desc(const monsters *mon)
dungeon_feature_type blocking_feat;
if (_blocked_ray(mon->pos(), &blocking_feat))
{
- text += "Your line of fire to " + lowercase_string(pronoun)
+ text += "Your line of fire to " + mon->pronoun(PRONOUN_OBJECTIVE)
+ " is blocked by "
+ feature_description(blocking_feat, NUM_TRAPS, false,
DESC_NOCAP_A)
diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h
index c29d578af2..976ff874cb 100644
--- a/crawl-ref/source/enum.h
+++ b/crawl-ref/source/enum.h
@@ -2435,7 +2435,8 @@ enum pronoun_type
PRONOUN_NOCAP, // 1
PRONOUN_CAP_POSSESSIVE, // 2
PRONOUN_NOCAP_POSSESSIVE, // 3
- PRONOUN_REFLEXIVE // 4 (reflexive is always lowercase)
+ PRONOUN_REFLEXIVE, // 4 (reflexive is always lowercase)
+ PRONOUN_OBJECTIVE // 5 (objective is always lowercase)
};
enum randart_prop_type
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index f7fd0bc1b9..3e2b319020 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -3335,7 +3335,11 @@ const char *mons_pronoun(monster_type mon_type, pronoun_type variant,
case PRONOUN_REFLEXIVE: // Awkward at start of sentence, always lower.
return ((gender == 0) ? "itself" :
(gender == 1) ? "himself" : "herself");
- }
+
+ case PRONOUN_OBJECTIVE: // Awkward at start of sentence, always lower.
+ return ((gender == 0) ? "it" :
+ (gender == 1) ? "him" : "her");
+ }
return ("");
}
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index d0422f0a75..f0c4d437c7 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -6380,6 +6380,7 @@ std::string player::pronoun(pronoun_type pro, bool) const
case PRONOUN_CAP_POSSESSIVE: return "Your";
case PRONOUN_NOCAP_POSSESSIVE: return "your";
case PRONOUN_REFLEXIVE: return "yourself";
+ case PRONOUN_OBJECTIVE: return "you";
}
}