From f903462645b80653998fe987732752038be862d4 Mon Sep 17 00:00:00 2001 From: Charles Otto Date: Sun, 17 Jan 2010 17:36:51 -0500 Subject: 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. --- crawl-ref/source/mon-place.cc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'crawl-ref/source/mon-place.cc') 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); -- cgit v1.2.3-54-g00ecf