diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-04-16 13:33:32 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-04-16 13:33:32 +0000 |
commit | 1a6c94ae92a619e3612a0359d97d4498f2adeba8 (patch) | |
tree | 00bba720527cf6966d0d6a1cd0a4e96bb7e8cd29 /crawl-ref/source/view.cc | |
parent | 3c8efd591ced0fbdad0da577af07011700df7562 (diff) | |
download | crawl-ref-1a6c94ae92a619e3612a0359d97d4498f2adeba8.tar.gz crawl-ref-1a6c94ae92a619e3612a0359d97d4498f2adeba8.zip |
Fix 1943303: Prevention of barding generation in monsters equipment.
And while I was at it... improved monster pickup handling.
* Ranged spellcasters won't pick up missiles anymore (except throwing nets).
* Allow monsters with behaviour != BEH_WANDER to pick up items again.
(Restricted to scrolls, potions, wands and weapons, since these could be
useful in a fight.)
* Restrict monster pickup to items they may actually use (3 types of
scrolls, six types of potions), though they may still pick up all types
of wands, if only to annoy the player.
As before, pickup only takes place if a monster happens to be on a square
with items and only the top items of stashes are checked - monsters won't
make a beeline for items or search stashes for goodies.
Also, neutrals and friendlies still won't pick up anything at all; this might
have to be changed.
Unrelated: fixed an ASSERT for divine retribution during penance.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4255 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/view.cc')
-rw-r--r-- | crawl-ref/source/view.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc index ae09d2ca8e..5eff25aa60 100644 --- a/crawl-ref/source/view.cc +++ b/crawl-ref/source/view.cc @@ -3600,6 +3600,14 @@ bool mons_near(const monsters *monster, unsigned int foe) return (false); } // end mons_near() +bool mon_enemies_around(const monsters *monster) +{ + if (mons_friendly(monster)) + return (!mons_near(monster) || !i_feel_safe()); + else + return (mons_near(monster)); +} + bool see_grid( const env_show_grid &show, const coord_def &c, const coord_def &pos ) |