diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-11-23 17:50:46 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-11-23 17:50:46 +0000 |
commit | 1392155c0cb7acb6224a39611102e46460a06e5b (patch) | |
tree | f33c6e7afe29b1d94ac515392db1f16bcd3cc9cb /crawl-ref/source | |
parent | 2837f061c56edb4410700be7cc8f552e8e7acfda (diff) | |
download | crawl-ref-1392155c0cb7acb6224a39611102e46460a06e5b.tar.gz crawl-ref-1392155c0cb7acb6224a39611102e46460a06e5b.zip |
Generalize the cannibalism checks.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7552 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/delay.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/religion.cc | 9 | ||||
-rw-r--r-- | crawl-ref/source/religion.h | 1 |
3 files changed, 10 insertions, 2 deletions
diff --git a/crawl-ref/source/delay.cc b/crawl-ref/source/delay.cc index 5112e5e7ec..75e1950f73 100644 --- a/crawl-ref/source/delay.cc +++ b/crawl-ref/source/delay.cc @@ -1107,7 +1107,7 @@ static void _finish_delay(const delay_queue_item &delay) : "chopping", mitm[delay.parm1].name(DESC_PLAIN).c_str()); - if (is_good_god(you.religion) + if (god_hates_cannibalism(you.religion) && is_player_same_species(item.plus)) { simple_god_message(" expects more respect for your departed " diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index ebc4502011..bb73352186 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -679,10 +679,12 @@ std::string get_god_dislikes(god_type which_god, bool /*verbose*/) if (god_hates_butchery(which_god)) dislikes.push_back("you butcher corpses while praying"); + if (god_hates_cannibalism(which_god)) + dislikes.push_back("you perform cannibalism"); + if (is_good_god(which_god)) { dislikes.push_back("you drink blood"); - dislikes.push_back("you perform cannibalism"); dislikes.push_back("you use necromancy"); dislikes.push_back("you use unholy magic or items"); dislikes.push_back("you attack holy beings"); @@ -6051,6 +6053,11 @@ std::string god_hates_your_god_reaction(god_type god, return ""; } +bool god_hates_cannibalism(god_type god) +{ + return (is_good_god(god)); +} + bool god_hates_killing(god_type god, const monsters* mon) { bool retval = false; diff --git a/crawl-ref/source/religion.h b/crawl-ref/source/religion.h index e8d0f89468..25cdf3103f 100644 --- a/crawl-ref/source/religion.h +++ b/crawl-ref/source/religion.h @@ -88,6 +88,7 @@ bool god_hates_your_god(god_type god, god_type your_god = you.religion); std::string god_hates_your_god_reaction(god_type god, god_type your_god = you.religion); +bool god_hates_cannibalism(god_type god); bool god_hates_killing(god_type god, const monsters* mon); bool god_likes_butchery(god_type god); bool god_hates_butchery(god_type god); |