summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/externs.h1
-rw-r--r--crawl-ref/source/mon-util.cc19
-rw-r--r--crawl-ref/source/mon-util.h1
-rw-r--r--crawl-ref/source/stuff.cc21
4 files changed, 24 insertions, 18 deletions
diff --git a/crawl-ref/source/externs.h b/crawl-ref/source/externs.h
index c479855a49..57fb104bef 100644
--- a/crawl-ref/source/externs.h
+++ b/crawl-ref/source/externs.h
@@ -1153,6 +1153,7 @@ public:
bool is_travelling() const;
bool is_patrolling() const;
+ bool can_use_stairs() const;
bool needs_transit() const;
void set_transit(const level_id &destination);
bool find_place_to_live(bool near_player = false);
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index 915994021e..386003529f 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -955,6 +955,15 @@ bool mons_enslaved_soul(const monsters *mon)
|| mons_enslaved_intact_soul(mon));
}
+bool mons_twisted_resurrection_abomination(const monsters *mon)
+{
+ return (mons_holiness(mon) == MH_UNDEAD
+ && (mon->type == MONS_ABOMINATION_SMALL
+ || mon->type == MONS_ABOMINATION_LARGE)
+ && !mons_enslaved_twisted_soul(mon)
+ && !mons_is_summoned(mon));
+}
+
int downscale_zombie_damage(int damage)
{
// These are cumulative, of course: {dlb}
@@ -5446,6 +5455,13 @@ bool monsters::is_patrolling() const
return (!patrol_point.origin());
}
+bool monsters::can_use_stairs() const
+{
+ return (!mons_twisted_resurrection_abomination(this)
+ && (!mons_is_zombified(this)
+ || mons_enslaved_intact_soul(this)));
+}
+
bool monsters::needs_transit() const
{
return ((mons_is_unique(type)
@@ -5453,8 +5469,7 @@ bool monsters::needs_transit() const
|| type == MONS_ROYAL_JELLY
|| you.level_type == LEVEL_DUNGEON
&& hit_dice > 8 + random2(25)
- && (!mons_is_zombified(this)
- || mons_enslaved_intact_soul(this)))
+ && can_use_stairs())
&& !mons_is_summoned(this));
}
diff --git a/crawl-ref/source/mon-util.h b/crawl-ref/source/mon-util.h
index e4df5ddd19..e26bc5b776 100644
--- a/crawl-ref/source/mon-util.h
+++ b/crawl-ref/source/mon-util.h
@@ -611,6 +611,7 @@ bool mons_enslaved_body_and_soul(const monsters *mon);
bool mons_enslaved_twisted_soul(const monsters *mon);
bool mons_enslaved_intact_soul(const monsters *mon);
bool mons_enslaved_soul(const monsters *mon);
+bool mons_twisted_resurrection_abomination(const monsters *mon);
// last updated 12may2000 {dlb}
diff --git a/crawl-ref/source/stuff.cc b/crawl-ref/source/stuff.cc
index 82e646b6e5..d1880e6e9d 100644
--- a/crawl-ref/source/stuff.cc
+++ b/crawl-ref/source/stuff.cc
@@ -341,8 +341,9 @@ static bool tag_follower_at(const coord_def &pos)
if (fmenv->type == MONS_PLAYER_GHOST
|| !fmenv->alive()
- || mons_is_stationary(fmenv)
- || fmenv->incapacitated())
+ || !fmenv->can_use_stairs()
+ || fmenv->incapacitated()
+ || mons_is_stationary(fmenv))
{
return (false);
}
@@ -361,11 +362,6 @@ static bool tag_follower_at(const coord_def &pos)
return (false);
}
- // Zombified undead (not including enslaved souls) will not follow
- // you.
- if (mons_is_zombified(fmenv) && !mons_enslaved_intact_soul(fmenv))
- return (false);
-
// Monsters that are not directly adjacent are subject to more
// stringent checks.
if ((pos - you.pos()).abs() > 2)
@@ -373,18 +369,11 @@ static bool tag_follower_at(const coord_def &pos)
if (!mons_friendly(fmenv))
return (false);
- // Non-zombified undead (including enslaved souls) will follow
- // Yredelemnul worshippers, and orcs will follow Beogh
- // worshippers.
+ // Undead will follow Yredelemnul worshippers, and orcs will
+ // follow Beogh worshippers.
if (you.religion != GOD_YREDELEMNUL && you.religion != GOD_BEOGH)
return (false);
- if (you.religion == GOD_YREDELEMNUL
- && mons_is_zombified(fmenv) && !mons_enslaved_intact_soul(fmenv))
- {
- return (false);
- }
-
if (!is_follower(fmenv))
return (false);
}