diff options
Diffstat (limited to 'crawl-ref/source/mstuff2.cc')
-rw-r--r-- | crawl-ref/source/mstuff2.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/crawl-ref/source/mstuff2.cc b/crawl-ref/source/mstuff2.cc index e2d90b544b..65c9732ec8 100644 --- a/crawl-ref/source/mstuff2.cc +++ b/crawl-ref/source/mstuff2.cc @@ -1319,11 +1319,12 @@ void monster_teleport(monsters *monster, bool instan, bool silent) mgrd(monster->pos()) = monster_index(monster); // Mimics change form/colour when teleported. - if (mons_is_mimic( monster->type )) + if (mons_is_mimic(monster->type)) { - int old_type = monster->type; - monster->type = MONS_GOLD_MIMIC + random2(5); - monster->colour = get_mimic_colour( monster ); + monster_type old_type = monster->type; + monster->type = static_cast<monster_type>( + MONS_GOLD_MIMIC + random2(5)); + monster->colour = get_mimic_colour(monster); // If it's changed form, you won't recognise it. // This assumes that a non-gold mimic turning into another item of |