From 237d92fffc9462084126a2f1f6d299ad984c1eff Mon Sep 17 00:00:00 2001 From: dolorous Date: Tue, 8 Apr 2008 17:02:56 +0000 Subject: Generalize god_hates_your_god() for use in divine retribution. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4135 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/describe.cc | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) (limited to 'crawl-ref/source/describe.cc') diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc index 953bc24f37..56efa5657b 100644 --- a/crawl-ref/source/describe.cc +++ b/crawl-ref/source/describe.cc @@ -2403,19 +2403,6 @@ 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 @@ -2549,7 +2536,7 @@ void describe_god( god_type which_god, bool give_title ) //display favour and will go out if (you.religion != which_god) { - textcolor (colour); + textcolor(colour); int which_god_penance = you.penance[which_god]; // give more appropriate for the good gods @@ -2557,7 +2544,7 @@ void describe_god( god_type which_god, bool give_title ) { if (is_good_god(you.religion)) which_god_penance = 0; - else if (!_god_hates_your_god(which_god) && which_god_penance >= 5) + else if (!god_hates_your_god(which_god) && which_god_penance >= 5) which_god_penance = 2; // == "Come back to the one true church!" } @@ -2568,7 +2555,7 @@ void describe_god( god_type which_god, bool give_title ) (you.worshipped[which_god]) ? "%s is ambivalent towards you." : "%s is neutral towards you.", god_name(which_god).c_str() ); - } + } else { cprintf(describe_favour(which_god).c_str()); -- cgit v1.2.3-54-g00ecf