rev_score.c

demise/src/rev_score.c · 1.8 KB

From the archive dodbackup-final.tar.gz

Download the archive   « Back to the archive contents

#if defined(macintosh)
#include <types.h>
#else
#include <sys/types.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>		/* unlink() */
#include "merc.h"

char *
actype (CHAR_DATA * ch)
{
  static char ac[30];
  int a_c = char_ac (ch);

  ac[0] = '\0';

  if (a_c >= 101)
    sprintf (ac, "Naked!");
  else if (a_c >= 80)
    sprintf (ac, "Barely Clothed.");
  else if (a_c >= 60)
    sprintf (ac, "Wearing Clothes.");
  else if (a_c >= 40)
    sprintf (ac, "Slightly Armored.");
  else if (a_c >= 20)
    sprintf (ac, "Somewhat Armored.");
  else if (a_c >= 0)
    sprintf (ac, "Armored.");
  else if (a_c >= -50)
    sprintf (ac, "Well Armored.");
  else if (a_c >= -100)
    sprintf (ac, "Strongly Armored.");
  else if (a_c >= -250)
    sprintf (ac, "Heavily Armored.");
  else if (a_c >= -500)
    sprintf (ac, "Superbly Armored.");
  else if (a_c >= -749)
    sprintf (ac, "Divinely Armored.");
  else
    sprintf (ac, "Ultimately Armored!");

  return ac;
}

#define KEY( literal, field, value )					\
				if ( !str_cmp( word, literal ) )	\
				{					\
				    field  = value;			\
				    			\
				    break;				\
				}
void
do_revscore (CHAR_DATA * ch, char *argument)
{

  char buf[MSL];

  ban (ch);
  sprintf (buf,
	   "Your name is %s, You have played for %d hours. Your current life is %d, out of\n\ryour max %d, your current mystical power is %d, out of the max of %d, and your \n\rcurrent vitality is %d, out of its max of %d. Your strength is currently %d, your\n\rintelligence is %d, your wisdom is %d, your dexterity is %d, and your constitution is %d.\n\r",
	   ch->name, (get_age (ch) - 17) * 2, ch->hit, ch->max_hit, ch->mana,
	   ch->max_mana, ch->move, ch->max_move, get_curr_str (ch),
	   get_curr_int (ch), get_curr_wis (ch), get_curr_dex (ch),
	   get_curr_con (ch));
  stc (buf, ch);
  ban (ch);
  return;
}

Site Stats

Snippets: 1791
Codebases: 571