summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/food.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2007-08-18 18:51:47 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2007-08-18 18:51:47 +0000
commit31998f2e74c5d677c4880447131a45ef7d4abc73 (patch)
tree8dc89e1ff1ec67f7b887d5970fba9b4fae942fc6 /crawl-ref/source/food.cc
parentbeda9fdab07ff6bf15cc3c635835b0685a185151 (diff)
downloadcrawl-ref-31998f2e74c5d677c4880447131a45ef7d4abc73.tar.gz
crawl-ref-31998f2e74c5d677c4880447131a45ef7d4abc73.zip
While levitating you can't quaff from fountains.
Non-saprovore characters are now prompted when trying to eat rotten chunks. I'd really prefer completely refusing to eat that stuff but David did point out that someone might like to gamble with the mutations - even though it's only bad ones? Really don't know about that one. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2015 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/food.cc')
-rw-r--r--crawl-ref/source/food.cc18
1 files changed, 18 insertions, 0 deletions
diff --git a/crawl-ref/source/food.cc b/crawl-ref/source/food.cc
index fbdc31aaa9..a306a6ce41 100644
--- a/crawl-ref/source/food.cc
+++ b/crawl-ref/source/food.cc
@@ -647,6 +647,15 @@ void eat_from_inventory(int which_inventory_slot)
const int chunk_type = mons_corpse_effect( mons_type );
const bool rotten = (you.inv[which_inventory_slot].special < 100);
+ if (rotten && you.species != SP_GHOUL && you.species != SP_KOBOLD
+ && you.species != SP_TROLL && you.species != SP_OGRE
+ && you.species != SP_HILL_ORC
+ && !yesno("Are you sure you want to eat this rotten meat?", false, 'n'))
+ {
+ canned_msg(MSG_OK);
+ return;
+ }
+
eat_chunk( determine_chunk_effect( chunk_type, rotten ) );
}
else
@@ -691,6 +700,15 @@ void eat_floor_item(int item_link)
const int chunk_type = mons_corpse_effect( mitm[item_link].plus );
const bool rotten = (mitm[item_link].special < 100);
+
+ if (rotten && you.species != SP_GHOUL && you.species != SP_KOBOLD
+ && you.species != SP_TROLL && you.species != SP_OGRE
+ && you.species != SP_HILL_ORC
+ && !yesno("Are you sure you want to eat this rotten meat?", false, 'n'))
+ {
+ canned_msg(MSG_OK);
+ return;
+ }
eat_chunk( determine_chunk_effect( chunk_type, rotten ) );
}
else