summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-03 03:50:24 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-03 03:50:24 +0000
commitab7669a0a19d1fcb3464837512f83e44dc2f6f16 (patch)
tree9eaec53fbe40a03b011a2ea445d39a2f1e477f07 /crawl-ref
parent49414c2dc37b9868dfbd7fcafdc8443fcbeab9eb (diff)
downloadcrawl-ref-ab7669a0a19d1fcb3464837512f83e44dc2f6f16.tar.gz
crawl-ref-ab7669a0a19d1fcb3464837512f83e44dc2f6f16.zip
Added option "verbose_monster_pane", which when set to true makes the monster
pane give more detailed information than just "resting" or "distracted". I probably put the option in the wrong section in options_guide.txt and init.txt, but I couldn't figure out the right section for it. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8158 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/docs/options_guide.txt5
-rw-r--r--crawl-ref/settings/init.txt2
-rw-r--r--crawl-ref/source/externs.h2
-rw-r--r--crawl-ref/source/initfile.cc3
-rw-r--r--crawl-ref/source/output.cc42
5 files changed, 54 insertions, 0 deletions
diff --git a/crawl-ref/docs/options_guide.txt b/crawl-ref/docs/options_guide.txt
index 365b4e1e1b..b2c04169be 100644
--- a/crawl-ref/docs/options_guide.txt
+++ b/crawl-ref/docs/options_guide.txt
@@ -665,6 +665,11 @@ trap_item_brand = none
use this brand, the items on the square are hidden by the trap
symbol (^) and the trap symbol is branded.
+verbose_monster_pane = false
+ If set to true when using the console version of Crawl (rather than
+ the tiles version), the pane listing the monsters in sight will give
+ more detailed information than just "distracted" or "resting".
+
4-e Level Map Functions.
----------------------------
diff --git a/crawl-ref/settings/init.txt b/crawl-ref/settings/init.txt
index c884c3383f..26329261a6 100644
--- a/crawl-ref/settings/init.txt
+++ b/crawl-ref/settings/init.txt
@@ -154,6 +154,8 @@ trap_item_brand = reverse
# scroll_margin_x = 2
# scroll_margin_y = 2
# scroll_margin = 2
+#
+# verbose_monster_pane = true
##### 4-g Travel and Exploration #################
#
diff --git a/crawl-ref/source/externs.h b/crawl-ref/source/externs.h
index 78dd421b5f..af8295ad48 100644
--- a/crawl-ref/source/externs.h
+++ b/crawl-ref/source/externs.h
@@ -1925,6 +1925,8 @@ public:
int scroll_margin_x;
int scroll_margin_y;
+ bool verbose_monster_pane;
+
bool autopickup_on;
int default_friendly_pickup;
bool show_more_prompt;
diff --git a/crawl-ref/source/initfile.cc b/crawl-ref/source/initfile.cc
index 87ad623857..0eb4305592 100644
--- a/crawl-ref/source/initfile.cc
+++ b/crawl-ref/source/initfile.cc
@@ -638,6 +638,8 @@ void game_options::reset_options()
scroll_margin_x = 2;
scroll_margin_y = 2;
+ verbose_monster_pane = false;
+
autopickup_on = true;
default_friendly_pickup = FRIENDLY_PICKUP_FRIEND;
show_more_prompt = true;
@@ -2347,6 +2349,7 @@ void game_options::read_option_line(const std::string &str, bool runscript)
}
else BOOL_OPTION(center_on_scroll);
else BOOL_OPTION(symmetric_scroll);
+ else BOOL_OPTION(verbose_monster_pane);
else if (key == "scroll_margin_x")
{
scroll_margin_x = atoi(field.c_str());
diff --git a/crawl-ref/source/output.cc b/crawl-ref/source/output.cc
index b9ebfd1c6a..56fda39e33 100644
--- a/crawl-ref/source/output.cc
+++ b/crawl-ref/source/output.cc
@@ -1277,6 +1277,46 @@ bool monster_pane_info::less_than(const monster_pane_info& m1,
return (false);
}
+static std::string _verbose_info(const monsters* m)
+{
+ if (mons_is_caught(m))
+ return (" (caught)");
+
+ if (mons_behaviour_perceptible(m))
+ {
+ if (mons_is_petrified(m))
+ return(" (petrified)");
+ if (mons_is_paralysed(m))
+ return(" (paralysed)");
+ if (mons_is_petrifying(m))
+ return(" (petrifying)");
+ if (mons_is_confused(m))
+ return(" (confused)");
+ if (mons_is_fleeing(m))
+ return(" (fleeing)");
+ if (mons_is_sleeping(m))
+ return(" (sleeping)");
+ if (mons_is_wandering(m))
+ return(" (wandering)");
+ if (m->foe == MHITNOT && !mons_is_batty(m) && !mons_neutral(m)
+ && !mons_friendly(m))
+ {
+ return (" (unaware)");
+ }
+ }
+
+ if (m->has_ench(ENCH_STICKY_FLAME))
+ return (" (burning)");
+
+ if (m->has_ench(ENCH_ROT))
+ return (" (rotting)");
+
+ if (m->has_ench(ENCH_INVIS))
+ return (" (invisible)");
+
+ return ("");
+}
+
void monster_pane_info::to_string( int count, std::string& desc,
int& desc_color) const
{
@@ -1324,6 +1364,8 @@ void monster_pane_info::to_string( int count, std::string& desc,
{
if (m_mon->has_ench(ENCH_BERSERK))
out << " (berserk)";
+ else if (Options.verbose_monster_pane)
+ out << _verbose_info(m_mon);
else if (mons_looks_stabbable(m_mon))
out << " (resting)";
else if (mons_looks_distracted(m_mon))