summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monplace.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-03-15 20:10:20 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-03-15 20:10:20 +0000
commit621bd9ce58cc45ce9cfcc3cf1f576882b40a426d (patch)
treeadc2b3b4faed06c535b2bec690cf362af40c7fa5 /crawl-ref/source/monplace.cc
parent83559fff8232481cbc68731b7527dd2154c0bd88 (diff)
downloadcrawl-ref-621bd9ce58cc45ce9cfcc3cf1f576882b40a426d.tar.gz
crawl-ref-621bd9ce58cc45ce9cfcc3cf1f576882b40a426d.zip
Cleaned up ghost and Pandemonium demon handling.
Can now have multiple ghosts or Pandemonium demons on a level. Ghosts and Pan demons can coexist. (D:9 and later are eligible for >1 ghost.) Enabled loading ghosts in Pandemonium. Pandemonium demons can now be created outside Pan. Not that you'd want to do it, but you can. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1043 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/monplace.cc')
-rw-r--r--crawl-ref/source/monplace.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/crawl-ref/source/monplace.cc b/crawl-ref/source/monplace.cc
index 9c70d802a2..0057b36025 100644
--- a/crawl-ref/source/monplace.cc
+++ b/crawl-ref/source/monplace.cc
@@ -571,7 +571,6 @@ static int place_monster_aux( int mon_type, char behaviour, int target,
}
}
-
// give manticores 8 to 16 spike volleys.
// they're not spellcasters so this doesn't screw anything up.
if (mon_type == MONS_MANTICORE)
@@ -604,6 +603,15 @@ static int place_monster_aux( int mon_type, char behaviour, int target,
menv[id].foe = target;
+ // Initialise pandemonium demons
+ if (menv[id].type == MONS_PANDEMONIUM_DEMON)
+ {
+ ghost_demon ghost;
+ ghost.init_random_demon();
+ menv[id].set_ghost(ghost);
+ menv[id].pandemon_init();
+ }
+
mark_interesting_monst(&menv[id], behaviour);
if (player_monster_visible(&menv[id]) && mons_near(&menv[id]))