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>2008-07-17 07:47:50 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-17 07:47:50 +0000
commit0a69a524938f8c559947685b901abdb22043925b (patch)
treeb54afdee8f5b7d1669fdd2453cd5f6fe733bb687 /crawl-ref/source/food.cc
parentae735f39601423c88be471340dfe88dc3d3d103d (diff)
downloadcrawl-ref-0a69a524938f8c559947685b901abdb22043925b.tar.gz
crawl-ref-0a69a524938f8c559947685b901abdb22043925b.zip
Apply r6579 to 0.4.1, and revert my local makefile change (oops!)
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6581 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/food.cc')
-rw-r--r--crawl-ref/source/food.cc14
1 files changed, 11 insertions, 3 deletions
diff --git a/crawl-ref/source/food.cc b/crawl-ref/source/food.cc
index 0723e53728..15577ae30e 100644
--- a/crawl-ref/source/food.cc
+++ b/crawl-ref/source/food.cc
@@ -2084,7 +2084,7 @@ bool can_ingest(int what_isit, int kindof_thing, bool suppress_msg, bool reqid,
if (ur_herbivorous)
{
if (!suppress_msg)
- mpr("You can't eat raw meat!");
+ mpr("Blech - you need greens!");
return (false);
}
else if (kindof_thing == FOOD_CHUNK)
@@ -2319,8 +2319,16 @@ static bool _vampire_consume_corpse(const int slot, bool invent)
int chunk_amount = 1 + max_chunks/2;
chunk_amount = stepdown_value( chunk_amount, 4, 4, 12, 12 );
- start_delay( DELAY_FEED_VAMPIRE, 1 + chunk_amount/2,
- (int) invent, slot );
+ // Get some nutrition right away, in case we're interrupted.
+ // (-1 for the starting message.)
+ vampire_nutrition_per_turn(corpse, -1);
+ if (chunk_amount/2 > 0)
+ {
+ // The draining delay doesn't have a start action, and we only need
+ // the continue/finish messages if it takes longer than 1 turn.
+ start_delay( DELAY_FEED_VAMPIRE, chunk_amount/2,
+ (int) invent, slot );
+ }
return (true);
}