diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-03-24 00:49:10 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-03-24 00:49:10 +0000 |
commit | 2330c22e9b90eebff3beceec3384545348c95148 (patch) | |
tree | eafe3f76bf6bbe32fc34a0e536514c05586045b7 /crawl-ref/source/misc.cc | |
parent | 756e0c6fd117eb6d3df42a5ddec5d0fb75ce400c (diff) | |
download | crawl-ref-2330c22e9b90eebff3beceec3384545348c95148.tar.gz crawl-ref-2330c22e9b90eebff3beceec3384545348c95148.zip |
Implement a basic version of "list monsters in LOS".
New command on 'F' (one of the few free keys, not documented yet).
What it does: List all monsters in sight, sorted first by attitude
(hostile, neutral, friendly), then by monster type (number currently,
but we could use any other measure instead).
My four current wiz-mode testing games produced the following output:
a) You can see three orcs, and two neutral orcs.
b) You can see a friendly orc, and a friendly elf.
c) There are no monsters in sight!
d) You can see a red devil, a hairy devil, an iron devil, a lemure, three
ufetubi, a midge, a neutral deep elf summoner, and a friendly rat.
Also:
* remove prompt for abilities with high food cost at near starving
(just not possible now)
* Fix 1864331: message_colour not working in message history
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3844 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/misc.cc')
-rw-r--r-- | crawl-ref/source/misc.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc index b9d4d7e152..64dd7bfa3a 100644 --- a/crawl-ref/source/misc.cc +++ b/crawl-ref/source/misc.cc @@ -1767,8 +1767,8 @@ std::string cloud_name(cloud_type type) bool mons_is_safe(const struct monsters *mon, bool want_move) { - bool is_safe = mons_friendly(mon) || - mons_class_flag(mon->type, M_NO_EXP_GAIN); + bool is_safe = mons_friendly(mon) + || mons_class_flag(mon->type, M_NO_EXP_GAIN); #ifdef CLUA_BINDINGS bool moving = ((!you.delay_queue.empty() && @@ -1783,7 +1783,9 @@ bool mons_is_safe(const struct monsters *mon, bool want_move) if (clua.callfn("ch_mon_is_safe", "Mbbd>b", mon, is_safe, moving, dist, &result)) + { is_safe = result; + } #endif return is_safe; |