/* This patch will make it so that reporting no longer shows your * actual numbers, instead it gives a short statement based upon * the percentage of your normal max amount. * An example would be: * Kylen reports, "I seem to be bleeding all over the place, I have * quite a lot of mana, and I couldn't move another step if my life * depended on it." * Of course, you'll want to alter the messages to be appropriate to your * theme, maybe even make a set of different mana messages for non-casters, * mages, and priests, etc. * * I put everything in act.other.c before ACMD(do_report), but to really * do it right, these chars should go in constants.c */ /* Add these three sets before the do_report command */ const char *hit_rept_msgs[] = { "I think I'm going to pass out... ", /* 0 */ "I have many grevious wounds! ", /* 10% */ "I seem to be bleeding all over the place, ", /* 20% */ "I've lost track of all the places I've been hit, ", /* 30% */ "Some of these wounds look pretty bad, ", /* 40% */ "I could use a healer, ", /* 50% */ "Am I supposed to be bleeding this much? ", /* 60% */ "My body aches all over, ", /* 70% */ "I seem to have a few scratches, ", /* 80% */ "I am feeling quite well, ", /* 90% */ "I am in excellent health, " /* 100% */ }; const char *mana_rept_msgs[] = { "I have no mystical energy to speak of, ", /* 0 */ "my mystical reserves are almost depleted, ", /* 10% */ "my mystical energies feel extremely weak, ", /* 20% */ "I need to channel my reserves, ", /* 30% */ "I have less mystical energy left than I thought, ", /* 40% */ "I could use a chance to restore my mana, ", /* 50% */ "I'm fine so quit asking, ", /* 60% */ "I'm feeling the strain on my powers a bit, ", /* 70% */ "I have a good deal of mana, ", /* 80% */ "I have a quite a lot of mana, ", /* 90% */ "my reserves of mana are full, " /* 100% */ }; const char *move_rept_msgs[] = { "and I have almost no energy left.'\r\n", /* 0 */ "I really could use a rest.'\r\n", /* 10% */ "I could stumble a short way.'\r\n", /* 20% */ "I think I could hike a short distance.'\r\n", /* 30% */ "I'm feeling quite winded.'\r\n", /* 40% */ "I could walk for a while a way.'\r\n", /* 50% */ "My feet are a bit to weary.'\r\n", /* 60% */ "I could walk for quite a while.'\r\n", /* 70% */ "I am good to go.'\r\n", /* 80% */ "I have a lot of energy.'\r\n", /* 90% */ "I could walk forever.'\r\n" /* 100% */ }; /* This is the altered do_report command. Insert the lines marked with the + */ ACMD(do_report) { struct char_data *k; struct follow_type *f; int percent; if (!AFF_FLAGGED(ch, AFF_GROUP)) { send_to_char("But you are not a member of any group!\r\n", ch); return; } /* This was the original report message - rem'd 7/10/2000 DHL sprintf(buf, "%s reports: %d/%dH, %d/%dM, %d/%dV\r\n", GET_NAME(ch), GET_HIT(ch), GET_MAX_HIT(ch), GET_MANA(ch), GET_MAX_MANA(ch), GET_MOVE(ch), GET_MAX_MOVE(ch)); */ + sprintf(buf, "%s reports, '", GET_NAME(ch)); + + /* Health */ + if (GET_HIT(ch) <= 0) + sprintf(buf + strlen(buf), "I should already be dead! "); + else if (GET_HIT(ch) < 3) + sprintf(buf + strlen(buf), "I am barely holding on to life, "); + else if (GET_HIT(ch) >= GET_MAX_HIT(ch)) + sprintf(buf + strlen(buf), "I am in perfect health, "); + else { + percent = MIN(10, ((float)((float)GET_HIT(ch) / (float)GET_MAX_HIT(ch)) * 10)); + sprintf(buf + strlen(buf), "%s", hit_rept_msgs[percent]); + } + + /* Mana */ + if (GET_MANA(ch) <= 0) + sprintf(buf + strlen(buf), "my mana has been fully depleted, "); + else if (GET_MANA(ch) < 3) + sprintf(buf + strlen(buf), "I have a teensy bit of mana left, "); + else if (GET_MANA(ch) >= GET_MAX_MANA(ch)) + sprintf(buf + strlen(buf), "I have plenty of magical energy, "); + else { + percent = MIN(10, ((float)((float)GET_MANA(ch) / (float)GET_MAX_MANA(ch)) * 10)); + sprintf(buf + strlen(buf), "%s", mana_rept_msgs[percent]); + } + + /* Move */ + if (GET_MOVE(ch) <= 0) + sprintf(buf + strlen(buf), "and I couldn't walk anywhere if my life depended on it.'\r\n"); + else if (GET_MOVE(ch) < 3) + sprintf(buf + strlen(buf), "and I think I could stumble another step.'\r\n"); + else if (GET_MOVE(ch) >= GET_MAX_MOVE(ch)) + sprintf(buf + strlen(buf), "and I am fully rested.'\r\n"); + else { + percent = MIN(10, ((float)((float)GET_MOVE(ch) / (float)GET_MAX_MOVE(ch)) * 10)); + sprintf(buf + strlen(buf), "%s", move_rept_msgs[percent]); + } CAP(buf); k = (ch->master ? ch->master : ch); for (f = k->followers; f; f = f->next) if (AFF_FLAGGED(f->follower, AFF_GROUP) && f->follower != ch) send_to_char(buf, f->follower); if (k != ch) send_to_char(buf, k); send_to_char("You report to the group.\r\n", ch); }