From 53c9ff1a2e5697add5f6597a0725613fa9102e4b Mon Sep 17 00:00:00 2001 From: Matthew Cline Date: Tue, 10 Nov 2009 18:25:20 -0800 Subject: beam.cc: seeing clouds polymorphed Seeing a cloud changed by a polymorph beam will give a message (with a different message for one you're standing in), and will also make the effect of the beam obvious. --- crawl-ref/source/beam.cc | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'crawl-ref/source/beam.cc') 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(1 + random2(8)); + { + cloud_type new_type = static_cast(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 -- cgit v1.2.3-54-g00ecf