summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-17 07:42:11 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-17 07:42:11 +0000
commitaab5319a5fa4c685f00722c69a3357c64b37ac85 (patch)
tree4b45805cf4bda87f7e41d44b774957028b63b0f6
parent841912a64cbeb5e4d798a7df3d4c7ee881aaf5fa (diff)
downloadcrawl-ref-aab5319a5fa4c685f00722c69a3357c64b37ac85.tar.gz
crawl-ref-aab5319a5fa4c685f00722c69a3357c64b37ac85.zip
Added "rare_interesting" game option. Like ood_interesting, but for the
value retruned by mons_rarity(). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5917 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/docs/options_guide.txt7
-rw-r--r--crawl-ref/source/externs.h1
-rw-r--r--crawl-ref/source/initfile.cc7
-rw-r--r--crawl-ref/source/monplace.cc27
4 files changed, 28 insertions, 14 deletions
diff --git a/crawl-ref/docs/options_guide.txt b/crawl-ref/docs/options_guide.txt
index a25cecb21a..04b1228ff8 100644
--- a/crawl-ref/docs/options_guide.txt
+++ b/crawl-ref/docs/options_guide.txt
@@ -1619,6 +1619,13 @@ ood_interesting = 8
Unique monsters are always noted, regardless of this setting.
OOD monsters are only noted in the main dungeon.
+rare_interesting = 9
+ Monsters which are rare for the location they're in will be
+ noted. Increasing the number causes more common monsters to
+ be noted, while decreasing it causes only the most rare of
+ monsters to be noted; setting it to 0 will turn noting of rare
+ monsters off.
+
note_hp_percent = 5
If your HP falls below a certain note_hp_percentage of your max
hit points, a note will be taken. There is some code to avoid
diff --git a/crawl-ref/source/externs.h b/crawl-ref/source/externs.h
index 366aebf676..8603111f87 100644
--- a/crawl-ref/source/externs.h
+++ b/crawl-ref/source/externs.h
@@ -1663,6 +1663,7 @@ public:
std::string user_note_prefix;// Prefix for user notes
int note_hp_percent; // percentage hp for notetaking
int ood_interesting; // how many levels OOD is noteworthy?
+ int rare_interesting; // what monster rarity is noteworthy?
int easy_confirm; // make yesno() confirming easier
int easy_quit_item_prompts; // make item prompts quitable on space
int colour[16]; // macro fg colours to other colours
diff --git a/crawl-ref/source/initfile.cc b/crawl-ref/source/initfile.cc
index 969962c757..9b437a83b3 100644
--- a/crawl-ref/source/initfile.cc
+++ b/crawl-ref/source/initfile.cc
@@ -685,6 +685,7 @@ void game_options::reset_options()
note_all_spells = false;
note_hp_percent = 5;
ood_interesting = 8;
+ rare_interesting = 9;
// [ds] Grumble grumble.
auto_list = true;
@@ -2126,10 +2127,8 @@ void game_options::read_option_line(const std::string &str, bool runscript)
field.c_str() );
}
}
- else if (key == "ood_interesting")
- {
- ood_interesting = atoi( field.c_str() );
- }
+ INT_OPTION(ood_interesting, 0, 500);
+ INT_OPTION(rare_interesting, 0, 99);
else if (key == "note_monsters")
{
append_vector(note_monsters, split_string(",", field));
diff --git a/crawl-ref/source/monplace.cc b/crawl-ref/source/monplace.cc
index 2d804281e6..46b8f41630 100644
--- a/crawl-ref/source/monplace.cc
+++ b/crawl-ref/source/monplace.cc
@@ -1769,6 +1769,23 @@ void mark_interesting_monst(struct monsters* monster, beh_type behaviour)
// If it's never going to attack us, then not interesting
else if (behaviour == BEH_FRIENDLY)
interesting = false;
+ else if (you.where_are_you == BRANCH_MAIN_DUNGEON
+ && you.level_type == LEVEL_DUNGEON
+ && mons_level(monster->type) >= you.your_level + _ood_limit()
+ && mons_level(monster->type) < 99
+ && !(monster->type >= MONS_EARTH_ELEMENTAL
+ && monster->type <= MONS_AIR_ELEMENTAL)
+ && !mons_class_flag( monster->type, M_NO_EXP_GAIN ))
+ {
+ interesting = true;
+ }
+ else if ((you.level_type == LEVEL_DUNGEON ||
+ you.level_type == LEVEL_ABYSS)
+ && mons_rarity(monster->type) <= Options.rare_interesting
+ && mons_rarity(monster->type) > 0)
+ {
+ interesting = true;
+ }
// Don't waste time on moname() if user isn't using this option
else if (Options.note_monsters.size() > 0)
{
@@ -1782,16 +1799,6 @@ void mark_interesting_monst(struct monsters* monster, beh_type behaviour)
}
}
}
- else if (you.where_are_you == BRANCH_MAIN_DUNGEON
- && you.level_type == LEVEL_DUNGEON
- && mons_level(monster->type) >= you.your_level + _ood_limit()
- && mons_level(monster->type) < 99
- && !(monster->type >= MONS_EARTH_ELEMENTAL
- && monster->type <= MONS_AIR_ELEMENTAL)
- && !mons_class_flag( monster->type, M_NO_EXP_GAIN ))
- {
- interesting = true;
- }
if (interesting)
monster->flags |= MF_INTERESTING;