Index: src/monster/monster1.c @@ -1416,7 +1417,7 @@ /* Describe special things */ if (f[1] & RF1_MULTIPLY) - text_out("%^s breeds explosively. ", wd_he[msex]); + text_out_c(TERM_YELLOW,"%^s breeds explosively. ", wd_he[msex]); if (f[1] & RF1_REGENERATE) text_out("%^s regenerates quickly. ", wd_he[msex]); @@ -1819,8 +1820,27 @@ text_out(" at "); text_out_c(TERM_GREEN, "normal speed"); } + /* The code above includes "attack speed" */ + + /* speed advantage */ + { + int rel_speed = extract_energy[r_ptr->speed ]*100 /extract_energy[p_ptr->state.speed]; + text_out("("); + if (rel_speed <= 100) + { + text_out_c(TERM_GREEN, "%d%%", rel_speed); + } + else if (rel_speed < 200) + { + text_out_c(TERM_YELLOW, "%d%%", rel_speed); + } + else + { + text_out_c(TERM_RED, "%d%%", rel_speed); + } + text_out(" of your current speed.)"); + } - /* The code above includes "attack speed" */ if (f[0] & RF0_NEVER_MOVE) text_out(", but does not deign to chase intruders"); @@ -2095,3 +2115,76 @@ return -1; } + +/* return the color for diplay in the monster list */ +byte monster_list_color(const int r_idx){ + /* lots of stuff copied from describe_monster not shure if we need this */ + monster_lore lore; + u32b f[RACE_FLAG_STRICT_UB]; + atk_colors colors; + + /* Get the race and lore */ + const monster_race *r_ptr = &r_info[r_idx]; + monster_lore *l_ptr = &l_list[r_idx]; + + /* Determine the special attack colors */ + get_attack_colors(&colors); + + /* Hack -- create a copy of the monster-memory */ + COPY(&lore, l_ptr, monster_lore); + + /* Assume some "obvious" flags */ + lore.flags[0] |= (RF0_OBVIOUS_MASK); + + /* Killing a monster reveals some properties */ + if (lore.tkills) + { + /* Know "race" flags */ + lore.flags[2] |= (RF2_RACE_MASK); + + /* Know "forced" flags */ + lore.flags[0] |= (RF0_FORCE_DEPTH); + } + /* Now get the known monster flags */ + monster_flags_known(r_ptr, &lore, f); + + + + /* Uniques are purple */ + if (f[0] & RF0_UNIQUE) return TERM_VIOLET; + + /* Summoners are RED */ + if (f[1] & RF1_MULTIPLY) return TERM_RED; + if (l_ptr->spell_flags[2] & RSF2_S_KIN) return TERM_RED; + if (l_ptr->spell_flags[2] & RSF2_S_MONSTERS)return TERM_RED; + if (l_ptr->spell_flags[2] & RSF2_S_MONSTER) return TERM_RED; + if (l_ptr->spell_flags[2] & RSF2_S_ANGEL) return TERM_RED; + if (l_ptr->spell_flags[2] & RSF2_S_ANIMAL) return TERM_RED; + if (l_ptr->spell_flags[2] & RSF2_S_SPIDER) return TERM_RED; + if (l_ptr->spell_flags[2] & RSF2_S_HOUND) return TERM_RED; + if (l_ptr->spell_flags[2] & RSF2_S_HYDRA) return TERM_RED; + if (l_ptr->spell_flags[2] & RSF2_S_DEMON) return TERM_RED; + if (l_ptr->spell_flags[2] & RSF2_S_UNIQUE) return TERM_RED; + if (l_ptr->spell_flags[2] & RSF2_S_UNDEAD) return TERM_RED; + if (l_ptr->spell_flags[2] & RSF2_S_DRAGON) return TERM_RED; + if (l_ptr->spell_flags[2] & RSF2_S_HI_DEMON) return TERM_RED; + if (l_ptr->spell_flags[2] & RSF2_S_HI_UNDEAD)return TERM_RED; + if (l_ptr->spell_flags[2] & RSF2_S_HI_DRAGON)return TERM_RED; + if (l_ptr->spell_flags[2] & RSF2_S_WRAITH) return TERM_RED; + if (l_ptr->spell_flags[2] & RSF2_S_UNIQUE) return TERM_RED; + + /* Speedy guys are orange */ + if (extract_energy[r_ptr->speed]*10/extract_energy[p_ptr->state.speed] >10 ) return TERM_ORANGE; + + /* Unresisted distance attacks should be yellow but that is hard */ + + /* If you haven't killed it before it is yellow */ + if (!l_ptr->pkills) return TERM_YELLOW; + + + /* Some Monsters are tasty */ + if (f[0] & RF0_DROP_GOOD) return TERM_GREEN; + if (f[0] & RF0_DROP_GREAT) return TERM_BLUE; + + return TERM_WHITE; +} Index: src/monster/monster2.c =================================================================== --- src/monster/monster2.c (revision 1877) +++ src/monster/monster2.c (working copy) @@ -705,13 +705,8 @@ r_ptr = &r_info[order[i]]; m_name = r_name + r_ptr->name; - /* Display uniques in a special colour */ - if (r_ptr->flags[0] & RF0_UNIQUE) - attr = TERM_VIOLET; - else if (r_ptr->level > p_ptr->depth) - attr = TERM_RED; - else - attr = TERM_WHITE; + /* get line color */ + attr = monster_list_color(order[i]); /* Build the monster name */ if (list[order[i]].los == 1) @@ -777,13 +772,7 @@ r_ptr = &r_info[order[i]]; m_name = r_name + r_ptr->name; - /* Display uniques in a special colour */ - if (r_ptr->flags[0] & RF0_UNIQUE) - attr = TERM_VIOLET; - else if (r_ptr->level > p_ptr->depth) - attr = TERM_RED; - else - attr = TERM_WHITE; + attr = monster_list_color(order[i]); /* Build the monster name */ if ((list[order[i]].count - list[order[i]].los) == 1) Index: src/externs.h =================================================================== --- src/externs.h (revision 1877) +++ src/externs.h (working copy) @@ -377,6 +377,7 @@ extern void screen_roff(int r_idx); extern void display_roff(int r_idx); extern int lookup_monster(const char *name); +extern byte monster_list_color(const int r_idx); /* monster2.c */ extern bool wake_monster(monster_type *m_ptr);