summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/beam.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-09-20 15:39:41 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-09-20 15:39:41 +0000
commit27620797903222c8615161ac9b5434e89163307e (patch)
tree692958d808cc0902192aa46f3ab0a96775b66a75 /crawl-ref/source/beam.cc
parent5f61dbb68e6c6b16638e611413ac6491fec602be (diff)
downloadcrawl-ref-27620797903222c8615161ac9b5434e89163307e.tar.gz
crawl-ref-27620797903222c8615161ac9b5434e89163307e.zip
Make (very) ugly things appreciate polymorph beams.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10745 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/beam.cc')
-rw-r--r--crawl-ref/source/beam.cc19
1 files changed, 16 insertions, 3 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc
index fc042aa19f..d61e4cd1f8 100644
--- a/crawl-ref/source/beam.cc
+++ b/crawl-ref/source/beam.cc
@@ -5732,9 +5732,22 @@ bool bolt::nasty_to(const monsters *mon) const
// actively positive.
bool bolt::nice_to(const monsters *mon) const
{
- return (flavour == BEAM_HASTE
- || flavour == BEAM_HEALING
- || flavour == BEAM_INVISIBILITY);
+ if (flavour == BEAM_HASTE
+ || flavour == BEAM_HEALING
+ || flavour == BEAM_INVISIBILITY)
+ {
+ return (true);
+ }
+
+ // Polymorphing a (very) ugly thing will mutate it into a different
+ // (very) ugly thing.
+ if (flavour == BEAM_POLYMORPH)
+ {
+ return (mon->type == MONS_UGLY_THING
+ || mon->type == MONS_VERY_UGLY_THING);
+ }
+
+ return (false);
}
////////////////////////////////////////////////////////////////////////////