summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/religion.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-24 01:40:27 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-24 01:40:27 +0000
commit78ed182cbb25a262df02c6e8fb6b9d85d7fca85a (patch)
tree18ae780827679ca712984f0d00e968be739632a1 /crawl-ref/source/religion.cc
parentf1c97c5dd9697e0dfe594655b202e9a1f4919966 (diff)
downloadcrawl-ref-78ed182cbb25a262df02c6e8fb6b9d85d7fca85a.tar.gz
crawl-ref-78ed182cbb25a262df02c6e8fb6b9d85d7fca85a.zip
Make Zin take retribution on you if you switch to a chaotic god as well
as an evil god (i.e. Xom), and display a message when switching from a good god to an evil god to indicate pending retribution. TSO still has his usual "you will pay" speech, of course. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3846 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/religion.cc')
-rw-r--r--crawl-ref/source/religion.cc35
1 files changed, 33 insertions, 2 deletions
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index 85dc1abae9..ca060dbc78 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -398,6 +398,13 @@ bool is_priest_god(god_type god)
god == GOD_BEOGH;
}
+bool is_chaotic_god(god_type god)
+{
+ return
+ god == GOD_MAKHLEB ||
+ god == GOD_XOM;
+}
+
void dec_penance(god_type god, int val)
{
if (you.penance[god] > 0)
@@ -2487,8 +2494,8 @@ static bool zin_retribution()
const god_type god = GOD_ZIN;
// angels/creeping doom theme
- // doesn't care unless you've gone over to evil
- if (!is_evil_god(you.religion))
+ // doesn't care unless you've gone over to evil or chaos
+ if (!is_evil_god(you.religion) && !is_chaotic_god(you.religion))
return false;
int punishment = random2(8);
@@ -3738,6 +3745,12 @@ void excommunication(god_type new_god)
break;
case GOD_SHINING_ONE:
+ if (is_evil_god(new_god))
+ {
+ simple_god_message( " does not appreciate desertion for evil!",
+ old_god );
+ }
+
if (you.duration[DUR_DIVINE_SHIELD])
{
mpr("Your divine shield disappears!");
@@ -3755,12 +3768,30 @@ void excommunication(god_type new_god)
break;
case GOD_ZIN:
+ if (is_evil_god(new_god))
+ {
+ simple_god_message( " does not appreciate desertion for evil!",
+ old_god );
+ }
+ else if (is_chaotic_god(new_god))
+ {
+ simple_god_message( " does not appreciate desertion for chaos!",
+ old_god );
+ }
+
if (env.sanctuary_time)
remove_sanctuary();
+
inc_penance( old_god, 25 );
break;
case GOD_ELYVILON:
+ if (is_evil_god(new_god))
+ {
+ simple_god_message( " does not appreciate desertion for evil!",
+ old_god );
+ }
+
inc_penance( old_god, 30 );
break;