summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/ghost.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-09-19 18:58:40 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-09-19 18:58:40 +0000
commit00b182be477bb0999a03eab16deb4fc5dd210a6c (patch)
tree6d6431f1b8989982ac3cabffd2d25eaee35fb8d0 /crawl-ref/source/ghost.cc
parentd91ad5d1d25e3d587192994fc42f229804804991 (diff)
downloadcrawl-ref-00b182be477bb0999a03eab16deb4fc5dd210a6c.tar.gz
crawl-ref-00b182be477bb0999a03eab16deb4fc5dd210a6c.zip
Make (very) ugly things no longer heal all damage when they mutate.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10734 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/ghost.cc')
-rw-r--r--crawl-ref/source/ghost.cc19
1 files changed, 12 insertions, 7 deletions
diff --git a/crawl-ref/source/ghost.cc b/crawl-ref/source/ghost.cc
index 29f8cb4970..aea2141319 100644
--- a/crawl-ref/source/ghost.cc
+++ b/crawl-ref/source/ghost.cc
@@ -475,7 +475,7 @@ static mon_attack_flavour _ugly_thing_flavour_upgrade(mon_attack_flavour u_att_f
return (u_att_flav);
}
-void ghost_demon::init_ugly_thing(bool very_ugly, bool mutate)
+void ghost_demon::init_ugly_thing(bool very_ugly, bool only_mutate)
{
// Midpoint: 10, as in mon-data.h.
speed = 9 + random2(3);
@@ -489,11 +489,16 @@ void ghost_demon::init_ugly_thing(bool very_ugly, bool mutate)
// Midpoint: 12, as in mon-data.h.
damage = 11 + random2(3);
- // Experience level: 8, the same as in mon-data.h.
- xl = 8;
+ // If we're mutating an ugly thing, leave its experience level, hit
+ // dice and hit points as they are.
+ if (!only_mutate)
+ {
+ // Experience level: 8, the same as in mon-data.h.
+ xl = 8;
- // Hit dice: {8, 3, 5, 0}, the same as in mon-data.h.
- max_hp = hit_points(xl, 3, 5);
+ // Hit dice: {8, 3, 5, 0}, the same as in mon-data.h.
+ max_hp = hit_points(xl, 3, 5);
+ }
resists.elec = 0;
resists.poison = 0;
@@ -516,8 +521,8 @@ void ghost_demon::init_ugly_thing(bool very_ugly, bool mutate)
// An ugly thing always gets a low-intensity colour. If we're
// mutating it, it always gets a different colour from what it had
// before.
- colour = _ugly_thing_random_colour(mutate ? make_low_colour(colour)
- : BLACK);
+ colour = _ugly_thing_random_colour(only_mutate ? make_low_colour(colour)
+ : BLACK);
// Pick a compatible attack flavour for this colour.
att_flav = _ugly_thing_colour_to_flavour(colour);