diff options
author | gammafunk <gammafunk@gmail.com> | 2014-05-23 23:59:41 -0500 |
---|---|---|
committer | gammafunk <gammafunk@gmail.com> | 2014-05-26 23:17:43 -0500 |
commit | 2371adb45923b9b02faa5c4fff65df3c535f7de4 (patch) | |
tree | b5c251c2ab13655b90ac81848f00d68d871fd0d1 /crawl-ref/source/godprayer.cc | |
parent | 113be5ec1658845d372a7702d3ccbbfa890dc012 (diff) | |
download | crawl-ref-2371adb45923b9b02faa5c4fff65df3c535f7de4.tar.gz crawl-ref-2371adb45923b9b02faa5c4fff65df3c535f7de4.zip |
Make corpses and skeletons stationary items (minmay)
Moving corpses and skeletons to other levels or to other locations
within a level is tedious but may be optimal for corpse rot and god
abilities like Kiku's corpse prayer. This commit prevents the player
from picking up or apporting carrion. It generalizes the code used for
nets being stationary, and cleans up and documents various bits of
related item pickup code.
Diffstat (limited to 'crawl-ref/source/godprayer.cc')
-rw-r--r-- | crawl-ref/source/godprayer.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/crawl-ref/source/godprayer.cc b/crawl-ref/source/godprayer.cc index 7ef208a33e..be7c052a52 100644 --- a/crawl-ref/source/godprayer.cc +++ b/crawl-ref/source/godprayer.cc @@ -815,6 +815,11 @@ piety_gain_t sacrifice_item_stack(const item_def& item, int *js, int quantity) return relative_gain; } +/* + * Sacrifice the items at the player's location to the player's god. + * + * @returns True if an item was sacrificed, false otherwise. +*/ static bool _offer_items() { if (!god_likes_items(you.religion)) @@ -837,7 +842,7 @@ static bool _offer_items() const int next = item.link; // in case we can't get it later. const bool disliked = !god_likes_item(you.religion, item); - if (item_is_stationary(item) || disliked) + if (item_is_stationary_net(item) || disliked) { i = next; if (disliked) |