summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/beam.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/beam.cc')
-rw-r--r--crawl-ref/source/beam.cc23
1 files changed, 22 insertions, 1 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc
index 2942a600d8..8a10cc4531 100644
--- a/crawl-ref/source/beam.cc
+++ b/crawl-ref/source/beam.cc
@@ -3174,7 +3174,28 @@ void bolt::affect_place_clouds()
cloud_type& ctype = env.cloud[cloudidx].type;
// Polymorph randomly changes clouds in its path
if (flavour == BEAM_POLYMORPH)
- ctype = static_cast<cloud_type>(1 + random2(8));
+ {
+ cloud_type new_type = static_cast<cloud_type>(1 + random2(8));
+
+ if (new_type == ctype)
+ return;
+
+ if (p == you.pos())
+ {
+ mprf("The %s you are in turns into %s!",
+ cloud_name(ctype).c_str(), cloud_name(new_type).c_str());
+ obvious_effect = true;
+ }
+ else if (you.see_cell(p))
+ {
+ mprf("A cloud of %s turns into %s.",
+ cloud_name(ctype).c_str(), cloud_name(new_type).c_str());
+ obvious_effect = true;
+ }
+
+ ctype = new_type;
+ return;
+ }
// fire cancelling cold & vice versa
if ((ctype == CLOUD_COLD