summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/enum.h6
-rw-r--r--crawl-ref/source/mon-util.cc11
-rw-r--r--crawl-ref/source/spells3.cc3
3 files changed, 9 insertions, 11 deletions
diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h
index 4e0a609b8b..dca549073d 100644
--- a/crawl-ref/source/enum.h
+++ b/crawl-ref/source/enum.h
@@ -1974,7 +1974,11 @@ enum monster_flag_type
// and orcs (Beogh worshippers -> friendly)
MF_WAS_IN_VIEW = 0x1000, // Was in view during previous turn
MF_BAND_MEMBER = 0x2000, // Created as a member of a band
- MF_GOT_HALF_XP = 0x4000 // Player already got half xp value earlier
+ MF_GOT_HALF_XP = 0x4000, // Player already got half xp value earlier
+ MF_HONORARY_UNDEAD = 0x8000 // Consider this monster to have MH_UNDEAD
+ // holiness, regardless of its actual type;
+ // currently used for abominations created
+ // via Twisted Resurrection
};
// Adding slots breaks saves. YHBW.
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index 3a51ce879c..2ca6d2addc 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -359,18 +359,9 @@ static int _scan_mon_inv_randarts( const monsters *mon,
return (ret);
}
-// Returns true if a given monster is an abomination created by
-// Twisted Resurrection.
-static bool _mons_your_abomination(const monsters *mon)
-{
- return ((mon->type == MONS_ABOMINATION_SMALL
- || mon->type == MONS_ABOMINATION_LARGE)
- && testbits(mon->flags, MF_CREATED_FRIENDLY));
-}
-
mon_holy_type mons_holiness(const monsters *mon)
{
- if (_mons_your_abomination(mon))
+ if (testbits(mon->flags, MF_HONORARY_UNDEAD))
return (MH_UNDEAD);
return (mons_class_holiness(mon->type));
diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc
index 85add52f2d..8d1f5d8410 100644
--- a/crawl-ref/source/spells3.cc
+++ b/crawl-ref/source/spells3.cc
@@ -1106,6 +1106,9 @@ bool cast_twisted_resurrection(int pow, god_type god)
return (false);
}
+ // Mark this abomination as undead.
+ menv[monster].flags |= MF_HONORARY_UNDEAD;
+
mpr("The heap of corpses melds into an agglomeration of writhing flesh!");
if (mon == MONS_ABOMINATION_LARGE)