summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/attitude-change.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2013-10-11 01:15:03 +0200
committerAdam Borowski <kilobyte@angband.pl>2013-10-11 01:20:04 +0200
commit6bae9edd6d100a14cc3ed1439a7a434e3d227ec6 (patch)
tree9a7934d7bd5cf9b9e2ac1dae936adc3e6e9fcceb /crawl-ref/source/attitude-change.cc
parentb2ca2989d9104e97f5d11beb8b7577e1f84c07e3 (diff)
downloadcrawl-ref-6bae9edd6d100a14cc3ed1439a7a434e3d227ec6.tar.gz
crawl-ref-6bae9edd6d100a14cc3ed1439a7a434e3d227ec6.zip
Heal forcibly converted orcs before registering them as companions.
Also, add some assertions, just in case.
Diffstat (limited to 'crawl-ref/source/attitude-change.cc')
-rw-r--r--crawl-ref/source/attitude-change.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/crawl-ref/source/attitude-change.cc b/crawl-ref/source/attitude-change.cc
index 2b7d49af72..48a83e0cbc 100644
--- a/crawl-ref/source/attitude-change.cc
+++ b/crawl-ref/source/attitude-change.cc
@@ -425,9 +425,6 @@ void beogh_convert_orc(monster* orc, bool emergency,
// become hostile later on, it won't count as a good kill.
orc->flags |= MF_NO_REWARD;
- mons_make_god_gift(orc, GOD_BEOGH);
- add_companion(orc);
-
if (orc->is_patrolling())
{
// Make orcs stop patrolling and forget their patrol point,
@@ -438,6 +435,9 @@ void beogh_convert_orc(monster* orc, bool emergency,
if (!orc->alive())
orc->hit_points = min(random_range(1, 4), orc->max_hit_points);
+ mons_make_god_gift(orc, GOD_BEOGH);
+ add_companion(orc);
+
// Avoid immobile "followers".
behaviour_event(orc, ME_ALERT);