the speech files. For atheistic characters, "you" is used instead, so that the result looks like this: I like/hate Xom. –– I like/hate you. Xom is mighty/stupid. –– You are mighty/stupid.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3486 c06c8d41-db1a-0410-9941-cceddc491573
S7KC3IFKCUNBO3XO4TV3KEQEIDZWSRJSKXY65DPONKMG54VHU3UQC
B3FDHXVBFR7YQF56JLQT2EYWRTWV6Y4N44GI6EWVWUU2KBNMZDCAC
G7CTMQ3VNTAB73ZI3LNZHKTAJ5LEQEGG772MVFQQ5XXLCMJVORTQC
K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC
DDU4A3JGN5IUIPP5IASOODKPR2WBHSDSV4FITZ6HNXNSXXQACWAQC
J6APXOT4QOGQFONWB7G546VTVF6QG42HVOROMHF7YBDJPR4K26OAC
AIIVH43Z5X3GTPFY4FXQRZPG6Y7QPH2KJ47VM2Q43PCGGD5MTMOAC
// replaces @player_god@ and @god_is@ with player's god name
// special handling for atheists: use "you"/"You" instead
static std::string replace_god_name(bool need_verb = false, bool capital = false)
{
std::string result =
(you.religion == GOD_NO_GOD ? (capital? "You" : "you")
: god_name(you.religion, false));
if (need_verb)
{
result +=
(you.religion == GOD_NO_GOD? " are" : " is");
}
return (result);
}
// replace with "you are" for atheists
msg = replace_all(msg, "@god_is@", replace_god_name(true, false));
msg = replace_all(msg, "@God_is@", replace_god_name(true, true));
// no verb needed
msg = replace_all(msg, "@player_god@", replace_god_name(false, false));
msg = replace_all(msg, "@Player_god@", replace_god_name(false, true));