summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-13 22:42:36 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-13 22:42:36 +0000
commit51e9a455676bd4e59ccc2b0cd0854f129c26d92c (patch)
tree5700b670b99b04070c9910f0f22f0bb1eb055de2 /crawl-ref
parent24cddbf9bcf0e971bee47d358e314aa953af2b14 (diff)
downloadcrawl-ref-51e9a455676bd4e59ccc2b0cd0854f129c26d92c.tar.gz
crawl-ref-51e9a455676bd4e59ccc2b0cd0854f129c26d92c.zip
Bug 1983398: turns out the royal jelly wasn't regenerating by eating
mechanical trap items, but rather because update_level() wasn't respecting the M_NO_REGEN flag when healing monsters upon returning to a level, so the royal jelly was healing on Slime:6 while I was resting on Slime:5. Also, add a debug diagnostic message for which monster is eating which item. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5794 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/effects.cc2
-rw-r--r--crawl-ref/source/monstuff.cc6
2 files changed, 7 insertions, 1 deletions
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc
index bf88181561..5640d8f096 100644
--- a/crawl-ref/source/effects.cc
+++ b/crawl-ref/source/effects.cc
@@ -2886,7 +2886,7 @@ void update_level( double elapsedTime )
{
heal_monster( mon, turns, false );
}
- else
+ else if (!mons_class_flag(mon->type, M_NO_REGEN))
{
// Set a lower ceiling of 0.1 on the regen rate.
const int regen_rate =
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index fa4561caaf..8fdd3ac17c 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -6087,6 +6087,12 @@ static bool _handle_pickup(monsters *monster)
if (!_is_item_jelly_edible(mitm[item]))
continue;
+#if DEBUG_DIAGNOSTICS || DEBUG_EATERS
+ mprf(MSGCH_DIAGNOSTICS,
+ "%s eating %s", monster->name(DESC_PLAIN, true).c_str(),
+ mitm[item].name(DESC_PLAIN).c_str());
+#endif
+
if (mitm[igrd[monster->x][monster->y]].base_type != OBJ_GOLD)
{
if (quant > max_eat - eaten)