summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-place.cc
diff options
context:
space:
mode:
authorCharles Otto <ottochar@gmail.com>2010-01-17 17:36:51 -0500
committerCharles Otto <ottochar@gmail.com>2010-01-17 17:36:51 -0500
commitf903462645b80653998fe987732752038be862d4 (patch)
tree9131a4fec9252e1f2eb872874948bfb9cb9c8cac /crawl-ref/source/mon-place.cc
parent13ba95e8a77fc50cf9fe1e7438a13a17c349d390 (diff)
downloadcrawl-ref-f903462645b80653998fe987732752038be862d4.tar.gz
crawl-ref-f903462645b80653998fe987732752038be862d4.zip
Allow toadstools on tiles Fedhas worshipers are standing on
Mostly this is so that decomposition can work on corpses the player is standing on. Update the decomposition ability description accordingly.
Diffstat (limited to 'crawl-ref/source/mon-place.cc')
-rw-r--r--crawl-ref/source/mon-place.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/crawl-ref/source/mon-place.cc b/crawl-ref/source/mon-place.cc
index 2c329e544a..dd949281c6 100644
--- a/crawl-ref/source/mon-place.cc
+++ b/crawl-ref/source/mon-place.cc
@@ -18,6 +18,7 @@
#include "directn.h"
#include "dungeon.h"
#include "fprop.h"
+#include "godabil.h"
#include "externs.h"
#include "options.h"
#include "ghost.h"
@@ -715,7 +716,9 @@ static int _is_near_stairs(coord_def &p)
static bool _valid_monster_generation_location( const mgen_data &mg,
const coord_def &mg_pos)
{
- if (!in_bounds(mg_pos) || actor_at(mg_pos))
+ if (!in_bounds(mg_pos)
+ || monster_at(mg_pos)
+ || you.pos() == mg_pos && !fedhas_passthrough_class(mg.cls))
return (false);
const monster_type montype = (mons_class_is_zombified(mg.cls) ? mg.base_type
@@ -1097,7 +1100,8 @@ static int _place_monster_aux(const mgen_data &mg,
// If the space is occupied, try some neighbouring square instead.
if (first_band_member && in_bounds(mg.pos)
&& (mg.behaviour == BEH_FRIENDLY || !is_sanctuary(mg.pos))
- && actor_at(mg.pos) == NULL
+ && !monster_at(mg.pos)
+ && (you.pos() != mg.pos || fedhas_passthrough_class(mg.cls))
&& (force_pos || monster_habitable_grid(montype, grd(mg.pos))))
{
fpos = mg.pos;
@@ -2878,7 +2882,8 @@ int create_monster(mgen_data mg, bool fail_msg)
if (!mg.force_place()
|| !in_bounds(mg.pos)
- || actor_at(mg.pos)
+ || monster_at(mg.pos)
+ || you.pos() == mg.pos && !fedhas_passthrough_class(mg.cls)
|| !mons_class_can_pass(montype, grd(mg.pos)))
{
mg.pos = find_newmons_square(montype, mg.pos);