From 1a3922fd4a76605598293aff58591a77f37c0bb1 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Fri, 6 Mar 2009 09:29:24 +0000 Subject: Tiles again: * Store index of last cell clicked on in inventory and suppress item description if you just clicked on it, so you can see the messages describing whatever you just did (should fix 2660578). * Allow right-click as a synonym for '!' when toggling ^, A, m. * Let shift left-click on avatar standing on altar = prayer. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9343 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/religion.cc | 17 +++++++++++++++-- 1 file changed, 15 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 dcb6d64fe3..a04111cf06 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -6518,6 +6518,20 @@ void offer_items() } } +bool player_can_join_god(god_type which_god) +{ + if (you.species == SP_DEMIGOD) + return (false); + + if (player_is_unholy() && is_good_god(which_god)) + return (false); + + if (which_god == GOD_BEOGH && you.species != SP_HILL_ORC) + return (false); + + return (true); +} + void god_pitch(god_type which_god) { mprf("You %s the altar of %s.", @@ -6530,8 +6544,7 @@ void god_pitch(god_type which_god) // return, or not allow worshippers from other religions. -- bwr // Gods can be racist... - if (player_is_unholy() && is_good_god(which_god) - || which_god == GOD_BEOGH && you.species != SP_HILL_ORC) + if (!player_can_join_god(which_god)) { you.turn_is_over = false; simple_god_message(" does not accept worship from those such as you!", -- cgit v1.2.3-54-g00ecf