summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monstuff.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-16 14:04:41 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-16 14:04:41 +0000
commit1f328a8c326b0a2ff99dbf776b17b7375cb8061b (patch)
tree0a27b29014d204da48f254f7915fbe8a562659c1 /crawl-ref/source/monstuff.cc
parent1a6c94ae92a619e3612a0359d97d4498f2adeba8 (diff)
downloadcrawl-ref-1f328a8c326b0a2ff99dbf776b17b7375cb8061b.tar.gz
crawl-ref-1f328a8c326b0a2ff99dbf776b17b7375cb8061b.zip
Fix compile, a few minor changes (mostly commenting), and
fix 1856365: wandering mushrooms "turns to fight". git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4256 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/monstuff.cc')
-rw-r--r--crawl-ref/source/monstuff.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index 66e634673e..15c51418c6 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -2048,10 +2048,14 @@ void behaviour_event( monsters *mon, int event, int src,
break;
case ME_SCARE:
- // Berserking monsters don't flee
+ // Berserking monsters don't flee.
if (mon->has_ench(ENCH_BERSERK))
break;
+ // Neither do wandering mushrooms.
+ if (mon->type == MONS_WANDERING_MUSHROOM)
+ break;
+
mon->foe = src;
mon->behaviour = BEH_FLEE;
// assume monsters know where to run from, even
@@ -2062,6 +2066,9 @@ void behaviour_event( monsters *mon, int event, int src,
break;
case ME_CORNERED:
+ if (mon->type == MONS_WANDERING_MUSHROOM)
+ break;
+
// just set behaviour.. foe doesn't change.
if (mon->behaviour != BEH_CORNERED && !mon->has_ench(ENCH_FEAR))
simple_monster_message(mon, " turns to fight!");
@@ -6241,7 +6248,7 @@ forget_it:
}
if (monster->type == MONS_ROTTING_DEVIL
- || monster->type == MONS_CURSE_TOE)
+ || monster->type == MONS_CURSE_TOE)
{
place_cloud( CLOUD_MIASMA, monster->x, monster->y,
2 + random2(3), monster->kill_alignment() );