diff options
author | Jude Brown <bookofjude@users.sourceforge.net> | 2009-11-09 14:10:32 +1000 |
---|---|---|
committer | Jude Brown <bookofjude@users.sourceforge.net> | 2009-11-09 14:12:18 +1000 |
commit | 5b6f31a4ebe1d57324ab28775e1b2908bdfafbfd (patch) | |
tree | 0164b8cf18a9398354b6ab81af6d2753135a608c /crawl-ref/source/mon-act.cc | |
parent | 1a44a619bba65a4faf31476dcd572c40b9469b21 (diff) | |
download | crawl-ref-5b6f31a4ebe1d57324ab28775e1b2908bdfafbfd.tar.gz crawl-ref-5b6f31a4ebe1d57324ab28775e1b2908bdfafbfd.zip |
Death oozes leave clouds of miasma upon eating corpses and chunks (dpeg).
Diffstat (limited to 'crawl-ref/source/mon-act.cc')
-rw-r--r-- | crawl-ref/source/mon-act.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/crawl-ref/source/mon-act.cc b/crawl-ref/source/mon-act.cc index ca5c4cd2dc..a72fb6703e 100644 --- a/crawl-ref/source/mon-act.cc +++ b/crawl-ref/source/mon-act.cc @@ -18,6 +18,7 @@ #include "delay.h" #include "directn.h" #include "map_knowledge.h" +#include "food.h" #include "fprop.h" #include "fight.h" #include "itemname.h" @@ -2181,6 +2182,7 @@ static bool _monster_eat_item(monsters *monster, bool nearby) int eaten = 0; bool eaten_net = false; bool death_ooze_ate_good = false; + bool death_ooze_ate_corpse = false; for (stack_iterator si(monster->pos()); si && eaten < max_eat && hps_changed < 50; ++si) @@ -2199,6 +2201,11 @@ static bool _monster_eat_item(monsters *monster, bool nearby) death_ooze_ate_good = (monster->type == MONS_DEATH_OOZE && (get_weapon_brand(*si) == SPWPN_HOLY_WRATH || get_ammo_brand(*si) == SPMSL_SILVER)); + death_ooze_ate_corpse = (monster->type == MONS_DEATH_OOZE + && ((si->base_type == OBJ_CORPSES + && si->sub_type == CORPSE_BODY) + || si->base_type == OBJ_FOOD + && si->sub_type == FOOD_CHUNK)); if (si->base_type != OBJ_GOLD) { @@ -2317,6 +2324,12 @@ static bool _monster_eat_item(monsters *monster, bool nearby) nearby ? "" : " distant"); } + if (death_ooze_ate_corpse) + { + place_cloud ( CLOUD_MIASMA, monster->pos(), + 4 + random2(5), monster->kill_alignment() ); + } + if (death_ooze_ate_good) simple_monster_message(monster, " twists violently!"); else if (eaten_net) |