summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/godabil.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/godabil.cc')
-rw-r--r--crawl-ref/source/godabil.cc21
1 files changed, 13 insertions, 8 deletions
diff --git a/crawl-ref/source/godabil.cc b/crawl-ref/source/godabil.cc
index 8bac2d4ee0..69986ec4be 100644
--- a/crawl-ref/source/godabil.cc
+++ b/crawl-ref/source/godabil.cc
@@ -23,8 +23,9 @@
#include "misc.h"
#include "mon-act.h"
#include "mon-behv.h"
-#include "monplace.h"
-#include "monstuff.h"
+#include "mon-iter.h"
+#include "mon-place.h"
+#include "mon-stuff.h"
#include "mon-util.h"
#include "mutation.h"
#include "options.h"
@@ -203,22 +204,21 @@ static bool _yred_enslaved_souls_on_level_disappear()
{
bool success = false;
- for (int i = 0; i < MAX_MONSTERS; ++i)
+ for (monster_iterator mi; mi; ++mi)
{
- monsters *monster = &menv[i];
- if (_is_yred_enslaved_soul(monster))
+ if (_is_yred_enslaved_soul(*mi))
{
#ifdef DEBUG_DIAGNOSTICS
mprf(MSGCH_DIAGNOSTICS, "Undead soul disappearing: %s on level %d, branch %d",
- monster->name(DESC_PLAIN).c_str(),
+ mi->name(DESC_PLAIN).c_str(),
static_cast<int>(you.your_level),
static_cast<int>(you.where_are_you));
#endif
- simple_monster_message(monster, " is freed.");
+ simple_monster_message(*mi, " is freed.");
// The monster disappears.
- monster_die(monster, KILL_DISMISSED, NON_MONSTER);
+ monster_die(*mi, KILL_DISMISSED, NON_MONSTER);
success = true;
}
@@ -386,6 +386,7 @@ int fungal_bloom()
const int mushroom = create_monster(
mgen_data(MONS_TOADSTOOL,
BEH_FRIENDLY,
+ &you,
0,
0,
pos,
@@ -458,6 +459,7 @@ static int _create_plant(coord_def & target)
const int plant = create_monster(mgen_data
(MONS_PLANT,
BEH_FRIENDLY,
+ &you,
0,
0,
target,
@@ -560,6 +562,7 @@ bool sunlight()
// Create a plant.
const int plant = create_monster(mgen_data(MONS_PLANT,
BEH_HOSTILE,
+ &you,
0,
0,
target,
@@ -876,6 +879,7 @@ int rain(const coord_def &target)
const int plant = create_monster(mgen_data
(coinflip() ? MONS_PLANT : MONS_FUNGUS,
BEH_GOOD_NEUTRAL,
+ &you,
0,
0,
*rad,
@@ -953,6 +957,7 @@ int corpse_spores(beh_type behavior)
int rc = create_monster(mgen_data(MONS_GIANT_SPORE,
behavior,
+ &you,
0,
0,
*rad,