whose sole purpose is to not interrupt resting if it's a friend doing the spellcasting or enchanting.
Unspam the message handling for orcs going in a battle frenzy, and allow the message back into normal game.
Fix 1953632: Named monsters' names are shown for unseen invisible monsters.
Change general monster name handling to refer to friendly monsters as "your monster" rather than "the monster", like was already the case for monster speech.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4769 c06c8d41-db1a-0410-9941-cceddc491573
5JS3QSE3EIXSBVI4DATH2EIFD7QN3POAFEUM7MK4NRMPH5JOPAAQC
5DTIUKGTVV66QTZE2DFRBGGBCS57NVM4H6DRQRYEJNWJ2LYFRARQC
SJSIGISB5V6DOPFBA3IWLVEVYRXGPVJU3V7CVMTYH75OQOOD32JQC
PYS7ZCTOPYGLE6YQ6BJKHV7UI43U7GFVVFVSXBQAYMG5AIJL5VDQC
6TEISZD7HYSSL24EOKIBNURU66KGSQX7B7SNAHBP4DQSAOTGH2MQC
DJZK6ZJ42EUTFF2OBOL5YYFPMLXCTDNGE2RF73ZJ4N54FEIHBGPQC
NLQNXH3SVJ52CWXEV35FSSZP32VHC4QFGN3HINF4KO5GZHZMOBKQC
GGDX26OLH2EBB2ZBJCBIE3UDPHWEMTMSOEJBJIWCBLUK3HEY3PKQC
K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC
LM764EO6YIFOKMRXWZ5S4GYZB4BHZQDTEFP7MEVYO4NN4EDOFGNQC
PEXHYCLRKDG2PVOJ3DDCMUZUK2HTSPU5WKH4MODFL4FTBQRQTY5QC
F7QFSXE22UPQTBLYJLY26HJ3QPHFNBJMUOFJRV35R5YCHSGKTBYQC
OC4O235ESV5UO3LREKILJWWIXYFVTYGF2RXQEB5AWPJUKLF5T3YAC
NVSFIV2ZKP44XHCSCXG6OZVGL67OIFINC34J2EMKTA4KULCERUEAC
SG76BPJKTQGDFNP5QFMAVR6H72FMMAYCECVGSWWSCLMAVQX7E3FQC
BUSA7O6EFBZVAG2RL5T7MD2WT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QC
2XG4UYEUFFZV4ARZJXQ36KQBK3XEAY77KEJOJ4X27NP5IBSF27YQC
GPECNNNQZ47Z47WNSMMLHGOM3MRR77HIWE33TIIS5Z5EMIFB376AC
SDLKLUNFGVKDS55DDJZCBAVIB7NL3RRYPTACAY65SCUQKV6APFSAC
IWMCGZ57ZVHE6WSPYD2CZNSG7ZDKGRBNZVY3KLR53TGEM3OQJLBAC
WL5WZXFJ6TONUQRSHUY4GQ5USU47ILWNN5X2JDQZO4CRJJZSRQIAC
EHSY6DVGUMI6C67WKET3GDJVLWJWGYBYQONNDK5JVT7BCTHBEZVAC
RVST2QHYJ757ZHK4AUJ5NGPDZ44AD6RVFVXYPKQIBJXZBDNUCHXQC
#ifdef ANNOUNCE_BATTLE_FRENZY
std::map<std::string, int> names;
for (int i = 0, size = affected.size(); i < size; ++i)
if (you.can_see(affected[i]))
names[affected[i]->name(DESC_PLAIN)]++;
const msg_channel_type channel =
mons_friendly(chief) ? MSGCH_MONSTER_ENCHANT
: MSGCH_FRIEND_ENCHANT;
const std::string s = i->second > 1 ? pluralise(i->first)
: i->first;
mprf("The %s go%s into a battle-frenzy!",
s.c_str(), i->second == 1? "es" : "");
std::string who;
if (seen_affected.size() == 1)
{
who = seen_affected[0]->name(DESC_CAP_THE);
mprf(channel, "%s goes into a battle-frenzy!", who.c_str());
}
else
{
int type = seen_affected[0]->type;
for (unsigned int i = 0; i < seen_affected.size(); i++)
{
if (seen_affected[i]->type != type)
{
// just mention plain orcs
type = MONS_ORC;
break;
}
}
who = get_monster_data(type)->name;
mprf(channel, "%s %s go into a battle-frenzy!",
mons_friendly(chief) ? "Your" : "The",
pluralise(who).c_str());
}
MSGCH_PLAIN, // regular text
MSGCH_PROMPT, // various prompts
MSGCH_GOD, // god/religion (param is god)
MSGCH_PRAY, // praying messages (param is god)
MSGCH_DURATION, // effect down/warnings
MSGCH_DANGER, // serious life threats (ie very large HP attacks)
MSGCH_WARN, // much less serious threats
MSGCH_FOOD, // hunger notices
MSGCH_RECOVERY, // recovery from disease/stat/poison condition
MSGCH_SOUND, // messages about things the player hears
MSGCH_TALK, // monster talk (param is monster type)
MSGCH_TALK_VISUAL, // silent monster "talk" (not restricted by silence)
MSGCH_INTRINSIC_GAIN, // player level/stat/species-power gains
MSGCH_MUTATION, // player gain/lose mutations
MSGCH_MONSTER_SPELL, // monsters casting spells
MSGCH_MONSTER_ENCHANT,// monsters enchantments up and down
MSGCH_MONSTER_DAMAGE, // monster damage reports (param is level)
MSGCH_MONSTER_TARGET, // message marking the monster as a target
MSGCH_ROTTEN_MEAT, // messages about chunks/corpses becoming rotten
MSGCH_EQUIPMENT, // equipment listing messages
MSGCH_FLOOR_ITEMS, // like equipment, but lists of floor items
MSGCH_MULTITURN_ACTION, // delayed action messages
MSGCH_EXAMINE, // messages describing monsters, features, items
MSGCH_EXAMINE_FILTER, // "less important" instances of the above
MSGCH_DIAGNOSTICS, // various diagnostic messages
MSGCH_TUTORIAL, // messages for tutorial
NUM_MESSAGE_CHANNELS // always last
MSGCH_PLAIN, // regular text
MSGCH_PROMPT, // various prompts
MSGCH_GOD, // god/religion (param is god)
MSGCH_PRAY, // praying messages (param is god)
MSGCH_DURATION, // effect down/warnings
MSGCH_DANGER, // serious life threats (ie very large HP attacks)
MSGCH_WARN, // much less serious threats
MSGCH_FOOD, // hunger notices
MSGCH_RECOVERY, // recovery from disease/stat/poison condition
MSGCH_SOUND, // messages about things the player hears
MSGCH_TALK, // monster talk (param is monster type)
MSGCH_TALK_VISUAL, // silent monster "talk" (not restricted by silence)
MSGCH_INTRINSIC_GAIN, // player level/stat/species-power gains
MSGCH_MUTATION, // player gain/lose mutations
MSGCH_MONSTER_SPELL, // monsters casting spells
MSGCH_MONSTER_ENCHANT, // monsters'*' enchantments up and down
MSGCH_FRIEND_SPELL, // allied monsters casting spells
MSGCH_FRIEND_ENCHANT, // allied monsters' enchantments up and down
MSGCH_MONSTER_DAMAGE, // monster damage reports (param is level)
MSGCH_MONSTER_TARGET, // message marking the monster as a target
MSGCH_ROTTEN_MEAT, // messages about chunks/corpses becoming rotten
MSGCH_EQUIPMENT, // equipment listing messages
MSGCH_FLOOR_ITEMS, // like equipment, but lists of floor items
MSGCH_MULTITURN_ACTION, // delayed action messages
MSGCH_EXAMINE, // messages describing monsters, features, items
MSGCH_EXAMINE_FILTER, // "less important" instances of the above
MSGCH_DIAGNOSTICS, // various diagnostic messages
MSGCH_TUTORIAL, // messages for tutorial
NUM_MESSAGE_CHANNELS // always last
|| attk_flavour == AF_POISON_NASTY
|| attk_flavour == AF_POISON_MEDIUM
|| attk_flavour == AF_POISON_STRONG
|| attk_flavour == AF_POISON_STR);
|| attk_flavour == AF_POISON_NASTY
|| attk_flavour == AF_POISON_MEDIUM
|| attk_flavour == AF_POISON_STRONG
|| attk_flavour == AF_POISON_STR);
case DESC_CAP_THE: result = "The "; break;
case DESC_NOCAP_THE: result = "the "; break;
case DESC_CAP_A: result = "A "; break;
case DESC_NOCAP_A: result = "a "; break;
case DESC_PLAIN: default: break;
case DESC_CAP_THE:
(mons_friendly(&mon)) ? result = "Your "
: result = "The ";
break;
case DESC_NOCAP_THE:
(mons_friendly(&mon)) ? result = "your "
: result = "the ";
break;
case DESC_CAP_A:
result = "A ";
break;
case DESC_NOCAP_A:
result = "a ";
break;
case DESC_PLAIN:
default:
break;
"recovery", "sound", "talk", "talk_visual", "intrinsic_gain",
"mutation", "monster_spell", "monster_enchant", "monster_damage",
"monster_target", "rotten_meat", "equipment", "floor", "multiturn",
"examine", "examine_filter", "diagnostic","tutorial"
"recovery", "sound", "talk", "talk_visual", "intrinsic_gain", "mutation",
"monster_spell", "monster_enchant", "friend_spell", "friend_enchant",
"monster_damage", "monster_target", "rotten_meat", "equipment", "floor",
"multiturn", "examine", "examine_filter", "diagnostic","tutorial"