From 6a14f41c8686a8e31406b4d2c00ec708b45b6762 Mon Sep 17 00:00:00 2001 From: zelgadis Date: Fri, 29 May 2009 22:46:41 +0000 Subject: 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 --- crawl-ref/source/directn.cc | 2 +- crawl-ref/source/enum.h | 3 ++- crawl-ref/source/mon-util.cc | 6 +++++- crawl-ref/source/player.cc | 1 + 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"; } } -- cgit v1.2.3-54-g00ecf