summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/describe.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-24 13:41:56 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-24 13:41:56 +0000
commit9bec932ccdd73db4bab274c36acf0cb9de818b88 (patch)
tree0e112fbec6a1e894f63828ead92d90aadfd8a246 /crawl-ref/source/describe.cc
parent80c2e92a48255ff21bb397442fd75f03f47ac1f1 (diff)
downloadcrawl-ref-9bec932ccdd73db4bab274c36acf0cb9de818b88.tar.gz
crawl-ref-9bec932ccdd73db4bab274c36acf0cb9de818b88.zip
Change reciting speech code to use seed_rng(turn counter) instead, to
yield more varied choices. Also add dozens of synonyms to godspeak.txt. Tweak religious favour descriptions for good gods to only say that their "wrath is upon you" if you now worship a god they hate (evil god, or Xom, for Zin). Ely will now also heal/protect holy beings, and only protect allies the player can see. Otherwise they can't do anything to prevent its death anyway. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3857 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/describe.cc')
-rw-r--r--crawl-ref/source/describe.cc42
1 files changed, 33 insertions, 9 deletions
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc
index 71af3e2b9a..7fa4f9b43e 100644
--- a/crawl-ref/source/describe.cc
+++ b/crawl-ref/source/describe.cc
@@ -2304,9 +2304,9 @@ std::string describe_favour(god_type which_god)
{
const int penance = you.penance[which_god];
return (penance >= 50) ? "Godly wrath is upon you!" :
- (penance >= 20) ? "You've transgressed heavily! Be penitent!" :
- (penance >= 5 ) ? "You are under penance."
- : "You should show more discipline.";
+ (penance >= 20) ? "You've transgressed heavily! Be penitent!" :
+ (penance >= 5 ) ? "You are under penance."
+ : "You should show more discipline.";
}
return (which_god == GOD_XOM)?
@@ -2367,6 +2367,19 @@ static std::string religion_help( god_type god )
return result;
}
+static bool _god_hates_your_god( god_type which_god )
+{
+ // non-good gods always hate your current god
+ if (!is_good_god(which_god))
+ return (true);
+
+ // Zin hates Xom and Makhleb
+ if (which_god == GOD_ZIN && is_chaotic_god(you.religion))
+ return (true);
+
+ return (is_evil_god(you.religion));
+}
+
void describe_god( god_type which_god, bool give_title )
{
int colour; // mv: colour used for some messages
@@ -2501,12 +2514,23 @@ void describe_god( god_type which_god, bool give_title )
if (you.religion != which_god)
{
textcolor (colour);
- cprintf( (you.penance[which_god] >= 50) ? "%s's wrath is upon you!" :
- (you.penance[which_god] >= 20) ? "%s is annoyed with you." :
- (you.penance[which_god] >= 5) ? "%s well remembers your sins." :
- (you.penance[which_god] > 0) ? "%s is ready to forgive your sins." :
- (you.worshipped[which_god]) ? "%s is ambivalent towards you."
- : "%s is neutral towards you.",
+ int which_god_penance = you.penance[which_god];
+
+ // give more appropriate for the good gods
+ if (which_god_penance > 0 && is_good_god(which_god))
+ {
+ if (is_good_god(you.religion))
+ which_god_penance = 0;
+ else if (!_god_hates_your_god(which_god) && which_god_penance >= 5)
+ which_god_penance = 2; // == "Come back to the one true church!"
+ }
+
+ cprintf( (which_god_penance >= 50) ? "%s's wrath is upon you!" :
+ (which_god_penance >= 20) ? "%s is annoyed with you." :
+ (which_god_penance >= 5) ? "%s well remembers your sins." :
+ (which_god_penance > 0) ? "%s is ready to forgive your sins." :
+ (you.worshipped[which_god]) ? "%s is ambivalent towards you."
+ : "%s is neutral towards you.",
god_name(which_god).c_str() );
}
else