summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/docs/crawl_options.txt2
-rw-r--r--crawl-ref/source/hiscores.cc3
-rw-r--r--crawl-ref/source/mon-util.cc27
3 files changed, 19 insertions, 13 deletions
diff --git a/crawl-ref/docs/crawl_options.txt b/crawl-ref/docs/crawl_options.txt
index 4b264d8df3..636d1c2308 100644
--- a/crawl-ref/docs/crawl_options.txt
+++ b/crawl-ref/docs/crawl_options.txt
@@ -713,7 +713,7 @@ menu_colour = <colour>:<regex>
menu_colour = lightred:potions? of (degeneration|decay)
If you like to see rotten chunks and corpses at a glance, use
- menu_colour = red: rotten.
+ menu_colour = red: rotting
menu_colour can also be applied to colour the in-game notes (to be
read with '?:'). The following line will show level ups in white:
diff --git a/crawl-ref/source/hiscores.cc b/crawl-ref/source/hiscores.cc
index 5a8405ac6d..0ed1d06dc4 100644
--- a/crawl-ref/source/hiscores.cc
+++ b/crawl-ref/source/hiscores.cc
@@ -725,6 +725,9 @@ void scorefile_entry::set_base_xlog_fields() const
fields->add_field("uid", "%d", uid);
fields->add_field("race", "%s", species_name(race, lvl));
fields->add_field("cls", "%s", get_class_name(cls));
+ fields->add_field("char", "%s%s",
+ get_species_abbrev(race),
+ get_class_abbrev(cls));
fields->add_field("xl", "%d", lvl);
fields->add_field("sk", "%s", skill_name(best_skill));
fields->add_field("sklev", "%d", best_skill_lvl);
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index a6b34f08e4..bb16c18c50 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -3273,19 +3273,21 @@ void monsters::lose_ench_levels(const mon_enchant &e, int levels)
//---------------------------------------------------------------
void monsters::timeout_enchantments(int levels)
{
- for (mon_enchant_list::iterator i = enchantments.begin();
- i != enchantments.end(); )
+ if (enchantments.empty())
+ return;
+
+ const mon_enchant_list ec = enchantments;
+ for (mon_enchant_list::const_iterator i = ec.begin();
+ i != ec.end(); ++i)
{
- mon_enchant_list::iterator cur = i++;
-
- switch (cur->ench)
+ switch (i->ench)
{
case ENCH_POISON: case ENCH_ROT: case ENCH_BACKLIGHT:
case ENCH_STICKY_FLAME: case ENCH_ABJ: case ENCH_SHORT_LIVED:
case ENCH_SLOW: case ENCH_HASTE: case ENCH_FEAR:
case ENCH_INVIS: case ENCH_CHARM: case ENCH_SLEEP_WARY:
case ENCH_SICK: case ENCH_SLEEPY:
- lose_ench_levels(*cur, levels);
+ lose_ench_levels(*i, levels);
break;
case ENCH_TP:
@@ -3593,13 +3595,14 @@ void monsters::apply_enchantment(mon_enchant me, int spd)
void monsters::apply_enchantments(int spd)
{
- for (mon_enchant_list::iterator i = enchantments.begin();
- i != enchantments.end(); )
+ if (enchantments.empty())
+ return;
+
+ const mon_enchant_list ec = enchantments;
+ for (mon_enchant_list::const_iterator i = ec.begin();
+ i != ec.end(); )
{
- mon_enchant_list::iterator cur = i++;
- apply_enchantment(*cur, spd);
-
- // If the monster died, the iterator will be invalid!
+ apply_enchantment(*i, spd);
if (!alive())
break;
}