summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monstuff.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-10-04 18:18:15 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-10-04 18:18:15 +0000
commitffe366a5e2fcd7bdbae1e0fb7848ae3799b4a6b4 (patch)
tree1646df34129a798d20ffb2446f88c73f7e05c3cf /crawl-ref/source/monstuff.cc
parent35d09d284050fe0e0bc1cc12d9f327380844f986 (diff)
downloadcrawl-ref-ffe366a5e2fcd7bdbae1e0fb7848ae3799b4a6b4.tar.gz
crawl-ref-ffe366a5e2fcd7bdbae1e0fb7848ae3799b4a6b4.zip
Fix 2063470: =f inscription preventing wielding of stones
Improve exclusion los behaviour. * now takes into account what the player knows of the map * don't autoremove exclusions if you don't know the monster died * the los gets updated as the player explores the area For some reason this doesn't work when you dig into an excluded area. FR 2006559: Sort monsters in description menu (?\) using the same measure as the monster list does. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7132 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/monstuff.cc')
-rw-r--r--crawl-ref/source/monstuff.cc21
1 files changed, 11 insertions, 10 deletions
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index caa77f743d..53c2c9dd5c 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -762,7 +762,7 @@ static void _mummy_curse(monsters* monster, killer_type killer, int index)
}
void monster_die(monsters *monster, killer_type killer,
- int killer_index, bool silent)
+ int killer_index, bool silent, bool wizard)
{
if (invalid_monster(monster))
return;
@@ -775,8 +775,9 @@ void monster_die(monsters *monster, killer_type killer,
// Update list of monsters beholding player.
update_beholders(monster, true);
- // Clear auto exclusion now the monster is killed.
- remove_auto_exclude(monster);
+ // Clear auto exclusion now the monster is killed -- if we know about it.
+ if (mons_near(monster) || wizard)
+ remove_auto_exclude(monster);
const int monster_killed = monster_index(monster);
const bool hard_reset = testbits(monster->flags, MF_HARD_RESET);
@@ -6398,8 +6399,8 @@ void mons_check_pool(monsters *mons, killer_type killer, int killnum)
if (grid == DNGN_LAVA && mons_res_fire(mons) >= 2)
grid = DNGN_DEEP_WATER;
- // Even fire resistant monsters perish in lava, but undead can survive
- // deep water.
+ // Even fire resistant monsters perish in lava, but inanimate monsters
+ // can survive deep water.
if (grid == DNGN_LAVA || mons->can_drown())
{
if (message)
@@ -7592,17 +7593,17 @@ static spell_type _map_wand_to_mspell(int wand_type)
void seen_monster(monsters *monster)
{
+ // If the monster is in the auto_exclude list, automatically
+ // set an exclusion.
+ if (need_auto_exclude(monster) && !is_exclude_root(monster->pos()))
+ toggle_exclude(monster->pos());
+
if (monster->flags & MF_SEEN)
return;
// First time we've seen this particular monster.
monster->flags |= MF_SEEN;
- // If the monster is in the auto_exclude list, automatically
- // set an exclusion.
- if (need_auto_exclude(monster) && !is_exclude_root(monster->pos()))
- toggle_exclude(monster->pos());
-
if (!mons_is_mimic(monster->type)
&& MONST_INTERESTING(monster)
&& monster->type != MONS_PANDEMONIUM_DEMON