From 78ed182cbb25a262df02c6e8fb6b9d85d7fca85a Mon Sep 17 00:00:00 2001 From: dolorous Date: Mon, 24 Mar 2008 01:40:27 +0000 Subject: 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 --- crawl-ref/source/religion.cc | 35 +++++++++++++++++++++++++++++++++-- crawl-ref/source/religion.h | 1 + 2 files changed, 34 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; diff --git a/crawl-ref/source/religion.h b/crawl-ref/source/religion.h index 765bdec408..d4bcddece5 100644 --- a/crawl-ref/source/religion.h +++ b/crawl-ref/source/religion.h @@ -80,6 +80,7 @@ bool god_hates_attacking_friend(god_type god, const actor *fr); bool is_evil_god(god_type god); bool is_good_god(god_type god); +bool is_chaotic_god(god_type god); // Calls did_god_conduct when the object goes out of scope. struct god_conduct_trigger -- cgit v1.2.3-54-g00ecf