From 9eec89ad1e4c5b1d743e12132e28bea0e16fb56d Mon Sep 17 00:00:00 2001 From: zelgadis Date: Sat, 31 May 2008 04:51:56 +0000 Subject: Have all gods where praying makes no difference ignore your prayers, rather than just Xom. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5361 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/religion.cc | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'crawl-ref/source/religion.cc') diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index 347e230057..13a14b16c4 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -1695,6 +1695,25 @@ std::string god_prayer_reaction() return result; } +static bool _god_accepts_prayer(god_type type) +{ + switch(type) + { + case GOD_VEHUMET: + case GOD_XOM: + case GOD_SHINING_ONE: + case GOD_SIF_MUNA: + case GOD_KIKUBAAQUDGHA: + case GOD_NO_GOD: + return false; + + default: + break; + } + + return true; +} + void pray() { if (silenced(you.x_pos, you.y_pos)) @@ -1745,9 +1764,10 @@ void pray() you.turn_is_over = false; return; } - else if (you.religion == GOD_XOM) + else if (!_god_accepts_prayer(you.religion)) { - god_speaks(you.religion, "Xom ignores you."); + std::string msg = god_name(you.religion) + " ignores you."; + god_speaks(you.religion, msg.c_str()); return; } -- cgit v1.2.3-54-g00ecf