Murk++ own and opponent's worsening health messages during fights
character.hpp 70:
sh_int combat_health_message;
sh_int prior_combat_health_message;
character.cpp 68:
combat_health_message(0), prior_combat_health_message(0),
murk.cpp 4042 tack onto the end of dam_message before the final return:
if (victim->combat_health_message != victim->prior_combat_health_message)
{
if IS_SET (ch->actflags, PLR_COMBAT_HEALTH_MSGS)
{
switch (victim->combat_health_message)
{
case 9:
ch->act ("$N is slightly scratched.", NULL, victim, TO_CHAR);
break;
case 8:
ch->act ("$N has a few bruises.", NULL, victim, TO_CHAR);
break;
case 7:
ch->act ("$N has some cuts.", NULL, victim, TO_CHAR);
break;
case 6:
ch->act ("$N has several wounds.", NULL, victim, TO_CHAR);
break;
case 5:
ch->act ("$N has many nasty wounds.", NULL, victim, TO_CHAR);
break;
case 4:
ch->act ("$N is bleeding freely.", NULL, victim, TO_CHAR);
break;
case 3:
ch->act ("$N is covered in blood.", NULL, victim, TO_CHAR);
break;
case 2:
ch->act ("$N is leaking guts.", NULL, victim, TO_CHAR);
break;
case 1:
ch->act ("$N is almost dead.", NULL, victim, TO_CHAR);
break;
default:
if (victim->hit > 0)
{
ch->act ("$N is DYING.", NULL, victim, TO_CHAR);
}
break;
}
}
if IS_SET (victim->actflags, PLR_COMBAT_HEALTH_MSGS)
{
switch (victim->combat_health_message)
{
case 9:
victim->send_to_char ("You are slightly scratched.\r\n");
break;
case 8:
victim->send_to_char ("You have a few bruises.\r\n");
break;
case 7:
victim->send_to_char ("You have some cuts.\r\n");
break;
case 6:
victim->send_to_char ("You have several wounds.\r\n");
break;
case 5:
victim->send_to_char ("You have many nasty wounds.\r\n");
break;
case 4:
victim->send_to_char ("You are bleeding freely.\r\n");
break;
case 3:
victim->send_to_char ("You are covered in blood.\r\n");
break;
case 2:
victim->send_to_char ("You are leaking guts.\r\n");
break;
case 1:
victim->send_to_char ("You are almost dead.\r\n");
break;
default:
if (victim->hit > 0)
{
victim->send_to_char ("You are DYING.\r\n");
}
break;
}
}
}
// return; // dam_message final return
//} // dam_message closing brace
murk.cpp 4230-4231:
[delete blank line]
[delete] dam_message (ch, victim, dam, dt);
murk.cpp 4236:
victim->prior_combat_health_message = 10 * victim->hit/victim->max_hit;
victim->hit -= dam;
victim->combat_health_message = 10 * victim->hit/victim->max_hit;
dam_message (ch, victim, dam, dt); // show damage after it occurs
Now for the toggle in the player config menu:
cmd_list.hpp 185:
COMMAND (combat_health_messages)
commands.cpp end:
void Character::combat_health_messages (std::string argument)
{
(IS_SET (actflags, PLR_COMBAT_HEALTH_MSGS)
? do_config ("-healthmsg")
: do_config ("+healthmsg"));
}
murk.cpp 365:
{"healthmsg", &Character::combat_health_messages, POS_DEAD, 0},
commands.cpp 2724:
send_to_char (IS_SET (actflags, PLR_COMBAT_HEALTH_MSGS)
? "[+HEALTHMSG] You receive combat health messages.\r\n"
: "[-healthmsg] You don't receive combat health messages.\r\n");
commands.cpp 2757:
else if (!str_cmp (arg.substr(1), "healthmsg"))
bit = PLR_COMBAT_HEALTH_MSGS;