Re: [CODE]Enemies condition in prompt

From: Mike Breuer (
Date: 11/05/01

From: "Brian Jenkins" <brianjenkins@ATT.NET>
> One: can i use
> if (FIGHTING(ch)) {
> to check for the person being in a fight? I tried this and it seemed to
> not work becouse it was displayed all
> the time.
> Second: I can't seem to figure out how to reference the mob that the
> player is fighting or get the hit points

FIGHTING(ch) returns the character that ch is fighting, or NULL if ch is not
fighting.  In make_prompt, of course, you need to use FIGHTING(d->character)
unless you've made some changes.

If you want to show the opponent's hit points (which I would NEVER do,
personally), use the following code in make_prompt (comm.c):

+   if (FIGHTING(d->character))
+     count += sprintf(prompt + count, "%dO ",

    strcat(prompt, "> ");
} else if (STATE(d) == CON_PLAYING && IS_NPC(d->character))


   | FAQ: |
   | Archives: |

This archive was generated by hypermail 2b30 : 12/06/01 PST