summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monplace.cc
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-22 12:25:18 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-22 12:25:18 +0000
commita12d1862eb07459daf4192933af0d84f6e3e0b83 (patch)
treeba17ec516751774b8ec50623e8ce4c476f2e216c /crawl-ref/source/monplace.cc
parentec5b5dfca31a3c2ec1a101e38f57f47c3952acb8 (diff)
downloadcrawl-ref-a12d1862eb07459daf4192933af0d84f6e3e0b83.tar.gz
crawl-ref-a12d1862eb07459daf4192933af0d84f6e3e0b83.zip
Oops, a monster might be hit with a mutation attack or a Polymorph Other beam
while MF_JUST_SUMMONED is still set, so handle polymorphing just-placed shifters slightly differently. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8695 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/monplace.cc')
-rw-r--r--crawl-ref/source/monplace.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/crawl-ref/source/monplace.cc b/crawl-ref/source/monplace.cc
index 703c39b41a..f0abe5b778 100644
--- a/crawl-ref/source/monplace.cc
+++ b/crawl-ref/source/monplace.cc
@@ -20,6 +20,7 @@ REVISION("$Rev$");
#include "ghost.h"
#include "lev-pand.h"
#include "makeitem.h"
+#include "message.h"
#include "monstuff.h"
#include "mon-pick.h"
#include "mon-util.h"
@@ -1099,8 +1100,15 @@ static int _place_monster_aux(const mgen_data &mg,
// Don't leave shifters in their starting shape.
if (mg.cls == MONS_SHAPESHIFTER || mg.cls == MONS_GLOWING_SHAPESHIFTER)
+ {
+ no_messages nm;
monster_polymorph(&menv[id], RANDOM_MONSTER);
+ // It's not actually a known shapeshifter if it happened to be
+ // placed in LOS of the player.
+ menv[id].flags &= ~MF_KNOWN_MIMIC;
+ }
+
// dur should always be 1-6 for monsters that can be abjured.
const bool summoned = mg.abjuration_duration >= 1
&& mg.abjuration_duration <= 6;