summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monplace.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/monplace.cc')
-rw-r--r--crawl-ref/source/monplace.cc13
1 files changed, 12 insertions, 1 deletions
diff --git a/crawl-ref/source/monplace.cc b/crawl-ref/source/monplace.cc
index c461144c9a..b703147753 100644
--- a/crawl-ref/source/monplace.cc
+++ b/crawl-ref/source/monplace.cc
@@ -1191,7 +1191,7 @@ static int _place_monster_aux(const mgen_data &mg,
// Dancing weapons *always* have a weapon. Fail to create them
// otherwise.
- const item_def* wpn = mons.weapon();
+ const item_def* wpn = mons.mslot_item(MSLOT_WEAPON);
if (!wpn)
{
mons.destroy_inventory();
@@ -1283,6 +1283,17 @@ static int _place_monster_aux(const mgen_data &mg,
mons.set_ghost(ghost);
mons.pandemon_init();
}
+ else if (mons.type == MONS_DANCING_WEAPON)
+ {
+ ghost_demon ghost;
+ // We can't use monsters::weapon here because it wants to look
+ // at attack types, which are in the ghost structure we're
+ // building.
+ ASSERT( mons.mslot_item(MSLOT_WEAPON) );
+ ghost.init_dancing_weapon(*(mons.mslot_item(MSLOT_WEAPON)), 100);
+ mons.set_ghost(ghost);
+ mons.dancing_weapon_init();
+ }
mark_interesting_monst(&mons, mg.behaviour);