diff options
author | Adam Borowski <kilobyte@angband.pl> | 2009-11-14 01:19:17 +0100 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2009-11-14 01:21:48 +0100 |
commit | 3854b12e446192147cb4e5ec6723185ebe797269 (patch) | |
tree | c43ae1e8143e292327a873deaa318f1f8c334b95 /crawl-ref | |
parent | 8784d423f3ba3834d8d75310dc06202f458fa3f9 (diff) | |
download | crawl-ref-3854b12e446192147cb4e5ec6723185ebe797269.tar.gz crawl-ref-3854b12e446192147cb4e5ec6723185ebe797269.zip |
Fix zombies/skeletons/... casting spells they could do during life.
This was caused by bind_spell_flags() marking them as spellcasters when
mcls was temporarily changed to the base type to get the stats.
Diffstat (limited to 'crawl-ref')
-rw-r--r-- | crawl-ref/source/mon-place.cc | 3 | ||||
-rw-r--r-- | crawl-ref/source/monster.cc | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/crawl-ref/source/mon-place.cc b/crawl-ref/source/mon-place.cc index 4881b7e5f3..c3d437b147 100644 --- a/crawl-ref/source/mon-place.cc +++ b/crawl-ref/source/mon-place.cc @@ -1619,6 +1619,9 @@ static void _define_zombie(int mid, monster_type ztype, monster_type cs, define_monster(mid); + // Turn off all spellcasting flags. + menv[mid].flags &= ~MF_SPELLCASTER & ~MF_ACTUAL_SPELLS & ~MF_PRIEST; + menv[mid].hit_points = hit_points(menv[mid].hit_dice, 6, 5); menv[mid].max_hit_points = menv[mid].hit_points; diff --git a/crawl-ref/source/monster.cc b/crawl-ref/source/monster.cc index 459b9914d0..7aec36106c 100644 --- a/crawl-ref/source/monster.cc +++ b/crawl-ref/source/monster.cc @@ -648,6 +648,9 @@ void monsters::bind_spell_flags() { // Bind spellcaster / priest flags from the base type. These may be // overridden by vault defs for individual monsters. + + // Alas, we don't know if the mon is zombified at the moment, if it is, + // the flags will be removed later. if (mons_class_flag(type, M_SPELLCASTER)) flags |= MF_SPELLCASTER; if (mons_class_flag(type, M_ACTUAL_SPELLS)) |