Re: diagnose

From: MUD-master (pro08@dec51.tietgen.dk)
Date: 10/05/95


Regarding the displaying of Mob conditions in fight.

Below is my imlementation af this routine. The Condition of the Mob is shown
in the prompt of the players, and can be turned off if, for some strange 
reason, they do not wish to receive this information.

Hope this is usefull.

    Amiga

  Imp on TietgenMUD   (130.226.136.4 4711)


    if (PRF_FLAGGED(d->character, PRF_VICCON))
    {
      if (!FIGHTING(d->character))
      {
        sprintf(prompt, "%sC:* ",prompt);
      }
      else
      {
	  int percent;

	  if (GET_MAX_HIT(FIGHTING(d->character)) > 0)
	    percent = (100 * GET_HIT(FIGHTING(d->character))) / GET_MAX_HIT(FIGHTING(d->character));
	  else
	    percent = -1;		/* How could MAX_HIT be < 1?? */

	  if (percent >= 100)
            sprintf(prompt, "%sC:excellent ",prompt);
	  else if (percent >= 90)
            sprintf(prompt, "%s C:few scratches ",prompt);
	  else if (percent >= 75)
            sprintf(prompt, "%s C:small wounds ",prompt);
	  else if (percent >= 50)
            sprintf(prompt, "%s C:quite a few wounds ",prompt);
	  else if (percent >= 30)
            sprintf(prompt, "%s C:big nasty wounds ",prompt);
	  else if (percent >= 15)
            sprintf(prompt, "%s C:pretty hurt ",prompt);
	  else if (percent >= 0)
            sprintf(prompt, "%s C:awful ",prompt);
	  else
            sprintf(prompt, "%s C:bleeding awfully ",prompt);
      }
    }



This archive was generated by hypermail 2b30 : 12/07/00 PST