diff options
author | gammafunk <gammafunk@gmail.com> | 2014-03-13 00:53:42 -0500 |
---|---|---|
committer | gammafunk <gammafunk@gmail.com> | 2014-03-13 01:33:48 -0500 |
commit | 5c89200ae60cbd66809c35112ba9085dc0c21405 (patch) | |
tree | bca53dfcced77073b4c4f308c8f152a7643bd016 /crawl-ref/source/mutation.cc | |
parent | 9acb974c36e13d6e1e53acfe12559f82a054166a (diff) | |
download | crawl-ref-5c89200ae60cbd66809c35112ba9085dc0c21405.tar.gz crawl-ref-5c89200ae60cbd66809c35112ba9085dc0c21405.zip |
Use the correct radius when sensing invisible monsters in LOS (MarvinPA).
Before we were letting the player detect all invisible enemies in LOS
if they had antennae, regardless of mutation level, and were not
checking either Ashenzari's detection radius nor that from the boots
of the assassin at all. This commit also cleans up and documents a few
related functions.
Diffstat (limited to 'crawl-ref/source/mutation.cc')
-rw-r--r-- | crawl-ref/source/mutation.cc | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/crawl-ref/source/mutation.cc b/crawl-ref/source/mutation.cc index a58226f2bb..0e63063941 100644 --- a/crawl-ref/source/mutation.cc +++ b/crawl-ref/source/mutation.cc @@ -2596,18 +2596,15 @@ void check_demonic_guardian() } } -void check_antennae_detect() +/** + * Update the map knowledge based on any monster detection sources the player + * has. + */ +void check_monster_detect() { - int radius = player_mutation_level(MUT_ANTENNAE) * 2; - - if (player_equip_unrand(UNRAND_BOOTS_ASSASSIN)) - radius = max(radius, 4); - if (you_worship(GOD_ASHENZARI) && !player_under_penance()) - radius = max(radius, you.piety / 20); + int radius = player_monster_detect_radius(); if (radius <= 0) return; - radius = min(radius, LOS_RADIUS); - for (radius_iterator ri(you.pos(), radius, C_ROUND); ri; ++ri) { discover_mimic(*ri, false); |