Could someone PLEASE look at this and tell me WHY it does not show "missing"
attacks... all i want it to do is if you hit, tells you what you hit for and
that you hit.. none of that ***** ERADICATES **** crap... and if you miss,
tells you that you / them miss. I also have autodamage as if you look at the
code, what it will do....
any help would be appriciated..
Thank You
CODE SNIP
-----------------------------
void dam_message (CHAR_DATA * ch, CHAR_DATA * victim, int dam, int dt,
bool immune)
{
char buf1[256], buf2[256], buf3[256];
const char *attack;
if (ch == NULL || victim == NULL)
return;
if (dt >= 0 && dt < maxSkill)
attack = skill_table[dt].noun_damage;
else if (dt >= TYPE_HIT && dt < TYPE_HIT + MAX_DAMAGE_MESSAGE)
attack = attack_table[dt - TYPE_HIT].noun;
else
{
bug ("Dam_message: bad dt %d.", dt);
dt = TYPE_HIT;
attack = attack_table[0].name;
}
if (immune)
{
if (ch == victim)
{
sprintf (buf1, "$n is unaffected by $s own %s.",
attack);
sprintf (buf2, "Luckily, you are immune to that.");
}
else
{
sprintf (buf1, "$N is unaffected by $n's %s!", attack);
sprintf (buf2, "$N is unaffected by your %s!", attack);
sprintf (buf3, "$n's %s is powerless against you.",
attack);
}
}
if (ch == victim)
{
sprintf (buf1, "$n's %s hits $m.", attack);
sprintf (buf2, "Your %s hits you.", attack);
}
else
{
if (dam == 0)
{
sprintf (buf1, "{g$n misses $N.{x");
sprintf (buf2, "{gYour %s misses $N.{x",attack);
sprintf (buf3, "{g$n's attack misses you.{x");
}else
if (IS_SET(ch->act, PLR_AUTODAMAGE) && dam >=1 )
{
sprintf (buf1, "{r$n's %s hits $N for {R%d{r hp of
damage.{x", attack,dam);
sprintf (buf2, "{rYour %s does {R%d{r hp of damage to
$N.{x", attack, dam);
sprintf (buf3, "{R$n's %s hits you for {y%d{R hit
points of damage.{x", attack,dam);
}
else
{
sprintf (buf1, "$n's %s hits $N.",attack);
sprintf (buf2, "Your %s hits $N.", attack);
sprintf (buf3, "$n's %s hits you.", attack);
}
}
if (ch == victim)
{
act (buf1, ch, NULL, NULL, TO_ROOM);
act (buf2, ch, NULL, NULL, TO_CHAR);
}
else
{
act (buf1, ch, NULL, victim, TO_NOTVICT);
act (buf2, ch, NULL, victim, TO_CHAR);
act (buf3, ch, NULL, victim, TO_VICT);
}
return;
}
--------------
CODE END
_____________________________________________________________
Get 25MB, POP3, Spam Filtering with LYCOS MAIL PLUS for $19.95/year.
http://login.mail.lycos.com/brandPage.shtml?pageId=plus&ref=lmtplus