diff options
author | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-29 06:53:52 +0000 |
---|---|---|
committer | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-29 06:53:52 +0000 |
commit | 8cffb32e8c61a88ce23b389c5d1e4255e21e59d9 (patch) | |
tree | fee921f947ec465a58a91b65fa53dc21ad8fbecd /crawl-ref/source/monplace.cc | |
parent | dcf9fc82a633b9541eae069e209088bcaa557cc8 (diff) | |
download | crawl-ref-8cffb32e8c61a88ce23b389c5d1e4255e21e59d9.tar.gz crawl-ref-8cffb32e8c61a88ce23b389c5d1e4255e21e59d9.zip |
Only place a newly created monster (summons) on a sanctuary square if it
is friendly.
Only allow friendly and neutral-good monsters to blink or teleport onto
a sanctuary square.
Don't allow corpses on sanctuary squares to be rotted or animated.
Restrict monster cantrip messages to self-buff types if the player is
in sanctuary.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6211 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/monplace.cc')
-rw-r--r-- | crawl-ref/source/monplace.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crawl-ref/source/monplace.cc b/crawl-ref/source/monplace.cc index ec18719873..d17b46d5e4 100644 --- a/crawl-ref/source/monplace.cc +++ b/crawl-ref/source/monplace.cc @@ -807,6 +807,7 @@ static int _place_monster_aux( const mgen_data &mg, // Setup habitat and placement. // 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.x, mg.pos.y)) && (force_pos || mgrd(mg.pos) == NON_MONSTER && mg.pos != you.pos() && monster_habitable_grid(htype, grd(mg.pos)))) { @@ -833,6 +834,9 @@ static int _place_monster_aux( const mgen_data &mg, if (!grid_compatible(grid_wanted, grd(fpos), true)) continue; + if (mg.behaviour != BEH_FRIENDLY && is_sanctuary(fpos.x, fpos.y)) + continue; + // Don't generate monsters on top of teleport traps. // (How do they get there?) int trap = trap_at_xy(fpos.x, fpos.y); |