act_info.c
demise/src/act_info.c · 234.3 KB
From the archive dodbackup-final.tar.gz
Download the archive « Back to the archive contents
#include <sys/types.h>
#include <ctype.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "merc.h"
char *const where_name[] = {
"#R[#0Glued to Forehead #R]#n ",
"#R[#0On Left Hand Finger #R]#n ",
"#R[#0On Right Hand Finger #R]#n ",
"#R[#0On Third Hand Finger #R]#n ",
"#R[#0On Fourth Hand Finger#R]#n ",
"#R[#0Around Neck #R]#n ",
"#R[#0Around Neck #R]#n ",
"#R[#0On Body #R]#n ",
"#R[#0On Head #R]#n ",
"#R[#0On ForHead #R]#n ",
"#R[#0On Legs #R]#n ",
"#R[#0On Left Leg #R]#n ",
"#R[#0On Right Leg #R]#n ",
"#R[#0On Left Knee #R]#n ",
"#R[#0On Right Knee #R]#n ",
"#R[#0On Left Shin #R]#n ",
"#R[#0On Right Shin #R]#n ",
"#R[#0On Feet #R]#n ",
"#R[#0On Left Foot #R]#n ",
"#R[#0On Right Foot #R]#n ",
"#R[#0On Hands #R]#n ",
"#R[#0On Left Hand #R]#n ",
"#R[#0On Right Hand #R]#n ",
"#R[#0On Second Left Hand #R]#n ",
"#R[#0On Second Right Hand #R]#n ",
"#R[#0On Arms #R]#n ",
"#R[#0On Left Shoulder #R]#n ",
"#R[#0On Right Shoulder #R]#n ",
"#R[#0On Left Arm #R]#n ",
"#R[#0On Right Arm #R]#n ",
"#R[#0On Left Elbow #R]#n ",
"#R[#0On Right Elbow #R]#n ",
"#R[#0Around Left Wrist #R]#n ",
"#R[#0Around Right Wrist #R]#n ",
"#R[#0On Second Left Arm #R]#n ",
"#R[#0On Second Right Arm #R]#n ",
"#R[#0On Second Left Elbow #R]#n ",
"#R[#0On Second Right Elbow#R]#n ",
"#R[#0Second Left Wrist #R]#n ",
"#R[#0Second Right Wrist #R]#n ",
"#R[#0Off Hand #R]#n ",
"#R[#0Around Body #R]#n ",
"#R[#0Around Waist #R]#n ",
"#R[#0Right Hand #R]#n ",
"#R[#0Left Hand #R]#n ",
"#R[#0Third Hand #R]#n ",
"#R[#0Fourth Hand #R]#n ",
"#R[#0On Face #R]#n ",
"#R[#0In Left Ear #R]#n ",
"#R[#0In Right Ear #R]#n ",
"#R[#0Left Scabbard #R]#n ",
"#R[#0Right Scabbard #R]#n ",
"#R[#0Through Chest #R]#n ",
"#R[#0Mastery #R]#n ",
"#R[#0Orbital #R]#n ",
"#R[#0On Hip #R]#n ",
"#R[#0Back Scabbard #R]#n ",
};
/*
* Local functions.
*/
char *format_obj_to_char args ((OBJ_DATA * obj, CHAR_DATA * ch, bool fShort));
void show_char_to_char_0 args ((CHAR_DATA * victim, CHAR_DATA * ch));
void show_char_to_char_1 args ((CHAR_DATA * victim, CHAR_DATA * ch));
void show_char_to_char args ((CHAR_DATA * list, CHAR_DATA * ch));
bool check_blind args ((CHAR_DATA * ch));
void evil_eye args ((CHAR_DATA * victim, CHAR_DATA * ch));
void check_left_arm args ((CHAR_DATA * ch, CHAR_DATA * victim));
void check_right_arm args ((CHAR_DATA * ch, CHAR_DATA * victim));
void check_left_leg args ((CHAR_DATA * ch, CHAR_DATA * victim));
void check_right_leg args ((CHAR_DATA * ch, CHAR_DATA * victim));
void obj_score args ((CHAR_DATA * ch, OBJ_DATA * obj));
void ban args ((CHAR_DATA * ch));
char *align_who args ((char *txt, int width));
int
colcnt (char *txt)
{
char *s;
int i = 0;
s = txt;
while (*s != '\0')
{
if (*s == '#' && *(s + 1) != '#')
i++;
s++;
}
return i;
}
char *
align_who (char *txt, int width)
{
static char buf[200];
int col;
buf[0] = '\0';
col = colcnt (txt) * 2;
col += width;
sprintf (buf, "%-*.*s", col, col, txt);
return buf;
}
char *
plane_name (CHAR_DATA * wch)
{
static char plane[100];
plane[0] = '\0';
if (wch->in_room->area->plane == PLANE_NEXUS)
sprintf (plane, "#gN#Ge#Cx#Gu#gs#n");
else if (wch->in_room->area->plane == PLANE_PAND)
sprintf (plane, "#pPa#rnd#ye#om#yo#rni#pum#n#n");
else if (wch->in_room->area->plane == PLANE_TRANQ)
sprintf (plane, "#7Tr#can#Cqui#cli#7ty#n");
else if (wch->in_room->area->plane == PLANE_VALHALLA)
sprintf (plane, "#7V#na#Rl#rha#Rl#nl#7a#n");
else if (wch->in_room->area->plane == PLANE_HELL)
sprintf (plane, "#rH#Re#rl#Rl#n");
else if (wch->in_room->area->plane == PLANE_HEAVEN)
sprintf (plane, "#7He#yav#7en#n");
else if (wch->in_room->area->plane == PLANE_LIMBO)
sprintf (plane, "#0L#ni#0m#nb#0o#n");
else if (wch->in_room->area->plane == PLANE_OMNI)
sprintf (plane, "#oO#ym#7niscie#on#yt#n");
else
sprintf (plane, "#p???#RLOST#p???#n");
return plane;
}
char *
plane_name2 (int num)
{
static char plane2[100];
plane2[0] = '\0';
if (num == PLANE_NEXUS)
sprintf (plane2, "#gN#Ge#Cx#Gu#gs#n");
else if (num == PLANE_PAND)
sprintf (plane2, "#pPa#rnd#ye#om#yo#rni#pum#n#n");
else if (num == PLANE_TRANQ)
sprintf (plane2, "#7Tr#can#Cqui#cli#7ty#n");
else if (num == PLANE_VALHALLA)
sprintf (plane2, "#7V#na#Rl#rha#Rl#nl#7a#n");
else if (num == PLANE_HELL)
sprintf (plane2, "#rH#Re#rl#Rl#n");
else if (num == PLANE_HEAVEN)
sprintf (plane2, "#7He#yav#7en#n");
else if (num == PLANE_LIMBO)
sprintf (plane2, "#0L#ni#0m#nb#0o#n");
else if (num == PLANE_OMNI)
sprintf (plane2, "#oO#ym#7niscie#on#yt#n");
else
sprintf (plane2, "#p???#RLOST#p???#n");
return plane2;
}
char *
plane_name3 (int num)
{
static char plane3[100];
plane3[0] = '\0';
if (num == PLANE_NEXUS)
sprintf (plane3, "Nexus");
else if (num == PLANE_PAND)
sprintf (plane3, "Pandemonium");
else if (num == PLANE_TRANQ)
sprintf (plane3, "Tranquility");
else if (num == PLANE_VALHALLA)
sprintf (plane3, "Valhalla");
else if (num == PLANE_HELL)
sprintf (plane3, "Hell");
else if (num == PLANE_HEAVEN)
sprintf (plane3, "Heaven");
else if (num == PLANE_LIMBO)
sprintf (plane3, "Limbo");
else if (num == PLANE_OMNI)
sprintf (plane3, "Omniscient");
else
sprintf (plane3, "LOST");
return plane3;
}
char *
plane_name4 (int num)
{
static char plane4[100];
plane4[0] = '\0';
if (num == PLANE_NEXUS)
sprintf (plane4, "#0Nexus#n");
else if (num == PLANE_PAND)
sprintf (plane4, "#gPandemonium#n");
else if (num == PLANE_TRANQ)
sprintf (plane4, "#RTranquility#n");
else if (num == PLANE_VALHALLA)
sprintf (plane4, "#7Valhalla#n");
else if (num == PLANE_HELL)
sprintf (plane4, "#PHell#n");
else if (num == PLANE_HEAVEN)
sprintf (plane4, "#LHeaven#n");
else if (num == PLANE_LIMBO)
sprintf (plane4, "#CLimbo#n");
else if (num == PLANE_OMNI)
sprintf (plane4, "#yOmniscient#n");
else
sprintf (plane4, "LOST");
return plane4;
}
char *
format_obj_to_char (OBJ_DATA * obj, CHAR_DATA * ch, bool fShort)
{
static char buf[400];
char vnum[12];
buf[0] = '\0';
if (IS_IMMORTAL (ch))
{
sprintf (vnum, "#y%d", obj->pIndexData->vnum);
strcat (buf, "#7(#n");
strcat (buf, vnum);
strcat (buf, "#7)#n ");
}
if (IS_SET (obj->quest, QUEST_ARTIFACT))
strcat (buf, "#o(#yArtifact#o)#n ");
if (IS_SET (obj->spectype, SITEM_LEGEND))
strcat (buf, "#o(#CF#ca#Cb#cl#Ce#cd#o)#n ");
if (IS_SET (obj->quest, QUEST_RELIC))
strcat (buf, "#o(#0R#re#0l#ri#0c#o)#n ");
if (IS_OBJ_STAT (obj, ITEM_TRIFORCE_ONE))
strcat (buf, "#o(#yPart 1#o)#n ");
if (IS_OBJ_STAT (obj, ITEM_TRIFORCE_TWO))
strcat (buf, "#o(#yPart 2#o)#n ");
if (IS_OBJ_STAT (obj, ITEM_TRIFORCE_ORIG))
strcat (buf, "#o(#yMagical Powered#o)#n ");
if (IS_IMMORTAL (ch) && IS_SET (obj->weapflags, WEAPON_SOULJAR))
strcat (buf, "#o(#rSoulJar#o)#n ");
else if (obj->points > 0)
{
if (IS_SET (obj->quest, QUEST_TEMPERED))
strcat (buf, "#o(#cM#7i#cr#7a#cc#7u#cl#7o#cu#7s#o)#n ");
else if (IS_SET (obj->quest, QUEST_IMPROVED))
strcat (buf, "#o(#LM#7y#Lt#7h#Li#7c#La#7l#o)#n ");
else
strcat (buf, "#o(#GL#7e#Gg#7e#Gn#7d#Ga#7r#Gy#o)#n ");
}
if (IS_SET (obj->spectype, SITEM_HIGHLANDER))
strcat (buf, "#o(#LA#ln#Lc#li#Le#ln#Lt#o)#n ");
if (IS_SET (obj->weapflags, WEAPON_GAIAINQ))
strcat (buf, "#o(#CHoly#o)#n ");
if (IS_SET (obj->quest, QUEST_BLOODAGONY)
|| IS_SET (obj->weapflags, WEAPON_IKIRYU))
strcat (buf, "#o(#rBleeding#o)#n ");
if (IS_OBJ_STAT (obj, ITEM_INVIS))
strcat (buf, "#o(#nInvis#o)#n ");
if (IS_AFFECTED (ch, AFF_DETECT_EVIL)
&& !IS_OBJ_STAT (obj, ITEM_ANTI_GOOD)
&& IS_OBJ_STAT (obj, ITEM_ANTI_EVIL))
strcat (buf, "#o(#LB#ll#Lu#le#L A#lu#Lr#la#o)#n ");
else if (IS_AFFECTED (ch, AFF_DETECT_EVIL)
&& IS_OBJ_STAT (obj, ITEM_ANTI_GOOD)
&& !IS_OBJ_STAT (obj, ITEM_ANTI_EVIL))
strcat (buf, "#o(#RR#re#Rd#r A#Ru#rr#Ra#o)#n ");
else if (IS_AFFECTED (ch, AFF_DETECT_EVIL)
&& IS_OBJ_STAT (obj, ITEM_ANTI_GOOD)
&& !IS_OBJ_STAT (obj, ITEM_ANTI_NEUTRAL)
&& IS_OBJ_STAT (obj, ITEM_ANTI_EVIL))
strcat (buf, "#o(#yYellow Aura#o)#n ");
if (IS_AFFECTED (ch, AFF_DETECT_MAGIC) && IS_OBJ_STAT (obj, ITEM_MAGIC))
strcat (buf, "#o(#GMagical#o)#n ");
if (IS_OBJ_STAT (obj, ITEM_GLOW))
strcat (buf, "#o(#7G#yl#7o#yw#7i#yn#7g#o)#n ");
if (IS_OBJ_STAT (obj, ITEM_HUM))
strcat (buf, "#o(#PHumming#o)#n ");
if (IS_OBJ_STAT (obj, ITEM_QUESTITEM) && IS_IMMORTAL (ch))
strcat (buf, "#C(#7Quest Item#C)#n ");
if (IS_OBJ_STAT (obj, ITEM_SHADOWPLANE) &&
obj->in_room != NULL && !IS_AFFECTED (ch, AFF_SHADOWPLANE))
strcat (buf, "#o(#cUmbra#o)#n ");
if (!IS_OBJ_STAT (obj, ITEM_SHADOWPLANE) &&
obj->in_room != NULL && IS_AFFECTED (ch, AFF_SHADOWPLANE))
strcat (buf, "#o(#CNormal plane#o)#n ");
if (IS_OBJ_STAT (obj, ITEM_DEATHPLANE) &&
obj->in_room != NULL && !IS_NYM (ch, NYM_DEATHPLANE))
strcat (buf, "#o(#cD#0eat#ch#g p#0lan#ge#o)#n ");
if (!IS_OBJ_STAT (obj, ITEM_DEATHPLANE) &&
obj->in_room != NULL && IS_NYM (ch, NYM_DEATHPLANE))
strcat (buf, "#o(#CMaterial plane#o)#n ");
if (!IS_NPC (ch) && IS_VAMPIRE (ch) &&
IS_OBJ_STAT (obj, ITEM_VANISH) && get_disc (ch, DISC_CHIMERSTRY) > 0)
strcat (buf, "#o(#GI#gl#Gl#gu#Gs#gi#Go#gn#o)#n ");
if (!IS_NPC (ch) && IS_WEREWOLF (ch) &&
IS_SET (obj->spectype, SITEM_SILVER) &&
get_auspice (ch, AUSPICE_AHROUN) > 1)
strcat (buf, "#o(#7S#0i#7l#0v#7e#0r#o)#n ");
if (fShort)
{
if (obj->short_descr != NULL)
strcat (buf, obj->short_descr);
if (obj->condition < 100)
{
if (IS_OBJ_STAT (obj, ITEM_BROKEN))
strcat (buf, " #r(broken)#n");
else
strcat (buf, " #r(damaged)#n");
}
}
else
{
if (obj->description != NULL)
strcat (buf, obj->description);
}
return buf;
}
int
get_celerity (CHAR_DATA * ch)
{
if (IS_NPC (ch))
return 0;
/* Old werewolves are fast, but Abominations have to burn Celerity */
if (ch->class == CLASS_WEREWOLF
&& ch->pcdata->rank > get_disc (ch, DISC_CELERITY))
return ch->pcdata->rank;
if (ch->pcdata->celerity > 0 || (!IS_VAMPIRE (ch) && !IS_GHOUL (ch)))
return get_disc (ch, DISC_CELERITY);
return 0;
}
int
get_disc (CHAR_DATA * ch, int disc)
{
int max = 10;
int total_disc;
int min_disc = 0;
if (disc < DISC_ANIMALISM || disc > DISC_MAX)
{
bug ("Get_disc: Out of discipline range.", 0);
return 0;
}
if (IS_NPC (ch))
return 0;
if (ch->pcdata->powers_set[disc] > 0)
min_disc = ch->pcdata->powers_set[disc];
if (min_disc > max)
min_disc = max;
if (ch->pcdata->powers_set[disc] > min_disc)
min_disc = ch->pcdata->powers_set[disc];
if (ch->pcdata->powers_mod[disc] < 1)
{
if (ch->pcdata->powers[disc] > min_disc)
{
if (ch->pcdata->powers[disc] > max)
return max;
else
return ch->pcdata->powers[disc];
}
else
return min_disc;
}
if (ch->pcdata->powers[disc] < 1)
total_disc = 0;
else
total_disc = ch->pcdata->powers[disc];
if (ch->pcdata->powers_mod[disc] > 0)
total_disc += ch->pcdata->powers_mod[disc];
if (total_disc > max)
total_disc = max;
if (total_disc < min_disc)
return min_disc;
return total_disc;
}
int
get_truedisc (CHAR_DATA * ch, int disc)
{
int total_disc;
int min_disc = 0;
if (disc < DISC_ANIMALISM || disc > DISC_MAX)
{
bug ("Get_truedisc: Out of discipline range.", 0);
return 0;
}
if (IS_NPC (ch))
return 0;
if (ch->pcdata->powers_set[disc] > 0)
min_disc = ch->pcdata->powers_set[disc];
if (ch->pcdata->powers_mod[disc] < 1)
{
if (ch->pcdata->powers[disc] > min_disc)
return ch->pcdata->powers[disc];
else
return min_disc;
}
if (ch->pcdata->powers[disc] < 1)
total_disc = 0;
else
total_disc = ch->pcdata->powers[disc];
if (ch->pcdata->powers_mod[disc] > 0)
total_disc += ch->pcdata->powers_mod[disc];
if (total_disc < min_disc)
return min_disc;
return total_disc;
}
int
get_breed (CHAR_DATA * ch, int disc)
{
int max = 10;
if (disc < BREED_HOMID || disc > BREED_METIS)
{
bug ("Get_breed: Out of breed range.", 0);
return 0;
}
if (IS_NPC (ch))
return 0;
if (ch->pcdata->breed[disc] > max)
return max;
else if (ch->pcdata->breed[disc] < 0)
return 0;
return ch->pcdata->breed[disc];
}
int
get_auspice (CHAR_DATA * ch, int disc)
{
int max = 10;
if (disc < AUSPICE_RAGABASH || disc > AUSPICE_AHROUN)
{
bug ("Get_auspice: Out of auspice range.", 0);
return 0;
}
if (IS_NPC (ch))
return 0;
if (ch->pcdata->auspice[disc] > max)
return max;
else if (ch->pcdata->auspice[disc] < 0)
return 0;
return ch->pcdata->auspice[disc];
}
int
get_tribe (CHAR_DATA * ch, int disc)
{
int max = 10;
if (disc < TRIBE_BLACK_FURIES || disc > TRIBE_WENDIGOS)
{
bug ("Get_tribe: Out of tribe range.", 0);
return 0;
}
if (IS_NPC (ch))
return 0;
// if (ch->pcdata->tribes[disc] > max)
// return max;
else if (ch->pcdata->tribes[disc] < 0)
return 0;
return ch->pcdata->tribes[disc];
}
int
char_hitroll (CHAR_DATA * ch)
{
int hr = GET_HITROLL (ch);
int min;
bool hellstorm = FALSE;
if (IS_SET (mudconfig->world_affects, WORLD_HELLSTORM))
hellstorm = TRUE;
if (!IS_NPC (ch))
{
int stance = ch->stance[0];
if (stance == STANCE_SUPER1)
{
if (IS_SET (ch->pcdata->qstats[0], QS_HIT_LESSER))
hr += ch->stance[stance] * 0.5;
else if (IS_SET (ch->pcdata->qstats[0], QS_HIT_GREATER))
hr += ch->stance[stance];
else if (IS_SET (ch->pcdata->qstats[0], QS_HIT_SUPREME))
hr += ch->stance[stance] * 2;
}
if (stance == STANCE_SUPER2)
{
if (IS_SET (ch->pcdata->qstats[1], QS_HIT_LESSER))
hr += ch->stance[stance] * 0.5;
else if (IS_SET (ch->pcdata->qstats[1], QS_HIT_GREATER))
hr += ch->stance[stance];
else if (IS_SET (ch->pcdata->qstats[1], QS_HIT_SUPREME))
hr += ch->stance[stance] * 2;
}
if (stance == STANCE_SUPER3)
{
if (IS_SET (ch->pcdata->qstats[2], QS_HIT_LESSER))
hr += ch->stance[stance] * 0.5;
else if (IS_SET (ch->pcdata->qstats[2], QS_HIT_GREATER))
hr += ch->stance[stance];
else if (IS_SET (ch->pcdata->qstats[2], QS_HIT_SUPREME))
hr += ch->stance[stance] * 2;
}
if (stance == STANCE_SUPER4)
{
if (IS_SET (ch->pcdata->qstats[3], QS_HIT_LESSER))
hr += ch->stance[stance] * 0.5;
else if (IS_SET (ch->pcdata->qstats[3], QS_HIT_GREATER))
hr += ch->stance[stance];
else if (IS_SET (ch->pcdata->qstats[3], QS_HIT_SUPREME))
hr += ch->stance[stance] * 2;
}
if (stance == STANCE_SUPER5)
{
if (IS_SET (ch->pcdata->qstats[4], QS_HIT_LESSER))
hr += ch->stance[stance] * 0.5;
else if (IS_SET (ch->pcdata->qstats[4], QS_HIT_GREATER))
hr += ch->stance[stance];
else if (IS_SET (ch->pcdata->qstats[4], QS_HIT_SUPREME))
hr += ch->stance[stance] * 2;
}
if ((IS_VAMPIRE (ch) || IS_GHOUL (ch)) && get_celerity (ch) > 0)
hr += (get_celerity (ch) * 150);
if (IS_XBITS (ch, X_YANG_MIGHT))
hr += 250;
if (IS_NINJA (ch))
{
if (ch->pcdata->npowers[NINJA_RAGE] > 0)
hr += ch->pcdata->npowers[NINJA_RAGE];
if (ch->pcdata->npowers[NPOWER_NINGENNO] == 7)
hr += 200;
if (ch->pcdata->npowers[NPOWER_CHIKYU] >= 6
&& ch->pcdata->npowers[HARA_KIRI] > 0)
hr += 175;
}
hr += (ch->max_move / 100);
if (IS_KENSAI (ch))
{
hr += ch->battlefury;
if (IS_COR (ch, COR_DISCIPLINE))
hr += 1500;
}
if (IS_SHAAHOUL (ch) && ch->pcdata->powers[KAHN_RANKS] >= 7)
hr += 1500;
if (IS_BETRAYER (ch) && IS_XX (ch, XX_FSTAND))
hr += 1250;
if (IS_VAMPIRE (ch) && ch->pcdata->vamprage > 0)
hr += ch->pcdata->vamprage;
if (IS_SET (ch->act, PLR_WOLFMAN) && ch->pcdata->wolf > 0)
hr += ch->pcdata->wolf;
else if (ch->pcdata->wolfform[1] > FORM_HOMID && ch->pcdata->wolf > 0)
hr += ch->pcdata->wolf;
hr += 50 * (11 - ch->vampgen);
if (IS_DEMON (ch) && ch->pcdata->demonic > 0)
{
/* Pure demons get double the bonus */
if (ch->class == CLASS_DEMON || ch->class == CLASS_ANGEL)
hr += ((ch->pcdata->demonic * ch->pcdata->demonic) << 1);
else
hr += (ch->pcdata->demonic * ch->pcdata->demonic);
}
if (!IS_NPC (ch) && ch->legendeq > 0)
{
if (IS_HL (ch))
hr += ((ch->legendeq * ch->legendeq) << 1) * 2;
else
hr += ((ch->legendeq * ch->legendeq) << 1);
}
if (!IS_NPC (ch) && IS_DRACONIAN (ch))
{
hr += ch->pcdata->cpowers[DRAC_MIGHT] * 200;
if (ch->pcdata->cpowers[DRAC_COMBAT] > 0)
{
hr += ch->pcdata->cpowers[DRAC_COMBAT] * 150;
}
if (ch->pcdata->cpowers[DRAC_AVATAR] > 0)
{
hr += 150;
}
}
if (!IS_NPC (ch) && IS_SET (ch->evenmore, EM_MASTERY))
hr += 750;
if (IS_WRAITH (ch))
{
hr += 500;
}
if (IS_ANGELW (ch))
{
if (IS_SET (ch->apowers, APOWER_CRUSADER))
hr += 250;
if (IS_COR (ch, COR_PRAYER))
hr += 400;
if (ch->saintly > 0)
hr += 500;
}
if (IS_MONK (ch))
{
if (ch->monkab[COMBAT] > 0)
hr += ch->monkab[COMBAT] * 200;
if (ch->chi[CURRENT] > 0)
hr += ch->chi[CURRENT] * 150;
if (IS_SET (ch->corbits, COR_NEW_POWER))
hr += 500;
}
if (IS_HIGHLANDER (ch))
{
hr += ch->wpn[1] * 2.7;
if (IS_ITEMAFF (ch, ITEMA_HIGHLANDER))
hr += 150;
}
if (ch->pcdata->wisdoms[ELF_HASTE] > 0)
hr += 2750;
if (ch->lstatus > 0)
hr += (ch->lstatus * 75);
if (IS_WEREWOLF (ch) && get_tribe (ch, TRIBE_STARGAZERS) > 1)
{
if (get_tribe (ch, TRIBE_STARGAZERS) > 3)
hr += 250;
else
hr += 125;
}
if (IS_WOLFBIT (ch, WW_BEASTED))
hr += 3000;
if (IS_SET (ch->mflags, MAGE_BETTERBODY))
hr += 200;
if (IS_POLYAFF (ch, POLY_WOLF))
hr += 200;
if (IS_POLYAFF (ch, POLY_SERPENT))
hr += 150;
if (IS_POLYAFF (ch, POLY_ZULO))
hr += 200;
if (IS_POLYAFF (ch, POLY_DJINNFORM))
hr += 200;
if (IS_POLYAFF (ch, POLY_DEMONFORM))
hr += 200;
if (IS_POLYAFF (ch, POLY_KAHNFORM))
hr += 1000;
if (IS_POLYAFF (ch, POLY_RAKSHASA))
hr += (100 * ch->pcdata->powers[KAHN_FORMS]);
if (IS_POLYAFF (ch, POLY_WWZULO))
hr += 250;
if (IS_POLYAFF (ch, POLY_ANGELFORM))
hr += 500;
if (IS_POLYAFF (ch, POLY_TIGERFORM))
hr += (50 * ch->pcdata->powers[KAHN_TIGER]);
if (IS_POLYAFF (ch, POLY_SAINTFORM))
hr += (75 * ch->monkab[HOLY]);
if (IS_POLYAFF (ch, POLY_ELFFORM))
hr += 250;
if (IS_POLYAFF (ch, POLY_DRACOFORM))
hr += 150;
if (IS_POLYAFF (ch, POLY_MASTERFORM))
hr += 300;
if (IS_POLYAFF (ch, POLY_NINJAFORM))
{
if (IS_XBITS (ch, X_YANG_MIGHT))
hr += 250;
else
hr += 150;
}
}
if (IS_KAHN (ch))
hr += ch->pcdata->powers[KAHN_RANKS] * 25;
if (!IS_BETRAYER (ch) && IS_DEMON (ch) && ch->in_room != NULL
&& ch->in_room->area->plane != PLANE_HELL
&& ch->in_room->area->plane != PLANE_HEAVEN && hellstorm)
hr *= 1.5;
if (!IS_BETRAYER (ch) && IS_DEMON (ch) && ch->in_room != NULL
&& ch->in_room->area->plane == PLANE_HELL)
hr *= 2;
if (IS_BETRAYER (ch) && ch->in_room != NULL
&& ch->in_room->area->plane == PLANE_LIMBO)
hr *= 2;
if (!IS_BETRAYER (ch) && IS_ANGELW (ch) && ch->in_room != NULL
&& ch->in_room->area->plane == PLANE_HEAVEN)
hr *= 2;
if (!IS_NPC (ch) && ch->pcdata->exercise[EXE_RECOVER] > 0)
hr *= 0.75;
else if (ch->move < ch->max_move)
{
min = hr * 0.75;
if (ch->move < 1 || ch->max_move < 1)
hr *= 0.75;
else
{
hr = hr * ch->move / ch->max_move;
if (hr < min)
hr = min;
}
}
if (!IS_NPC (ch) && ch->pcdata->empireeq[2] > 0)
hr += ch->pcdata->empireeq[2] * 50;
if (ch->hit < ch->max_hit && !IS_MORE (ch, MORE_NOPAIN))
{
if (!IS_NPC (ch) && IS_HL (ch) && IS_QUICK (ch, QUICKENING_MIND))
return hr;
if (!IS_NPC (ch) && IS_WEREWOLF (ch)
&& get_auspice (ch, AUSPICE_PHILODOX) > 0)
return hr;
min = hr * 0.75;
if (ch->hit < 1 || ch->max_hit < 1)
hr *= 0.75;
else
{
hr = hr * ch->hit / ch->max_hit;
if (hr < min)
hr = min;
}
}
if (IS_NEWWW (ch))
return calc_newwwhrdr (ch, hr);
return hr;
}
int
char_damroll (CHAR_DATA * ch)
{
int dr = GET_DAMROLL (ch);
int min;
bool hellstorm = FALSE;
if (IS_SET (mudconfig->world_affects, WORLD_HELLSTORM))
hellstorm = TRUE;
if (!IS_NPC (ch))
{
int stance = ch->stance[0];
if (stance == STANCE_SUPER1)
{
if (IS_SET (ch->pcdata->qstats[0], QS_DAM_LESSER))
dr += ch->stance[stance] * 0.5;
else if (IS_SET (ch->pcdata->qstats[0], QS_DAM_GREATER))
dr += ch->stance[stance];
else if (IS_SET (ch->pcdata->qstats[0], QS_DAM_SUPREME))
dr += ch->stance[stance] * 2;
}
if (stance == STANCE_SUPER2)
{
if (IS_SET (ch->pcdata->qstats[1], QS_DAM_LESSER))
dr += ch->stance[stance] * 0.5;
else if (IS_SET (ch->pcdata->qstats[1], QS_DAM_GREATER))
dr += ch->stance[stance];
else if (IS_SET (ch->pcdata->qstats[1], QS_DAM_SUPREME))
dr += ch->stance[stance] * 2;
}
if (stance == STANCE_SUPER3)
{
if (IS_SET (ch->pcdata->qstats[2], QS_DAM_LESSER))
dr += ch->stance[stance] * 0.5;
else if (IS_SET (ch->pcdata->qstats[2], QS_DAM_GREATER))
dr += ch->stance[stance];
else if (IS_SET (ch->pcdata->qstats[2], QS_DAM_SUPREME))
dr += ch->stance[stance] * 2;
}
if (stance == STANCE_SUPER4)
{
if (IS_SET (ch->pcdata->qstats[3], QS_DAM_LESSER))
dr += ch->stance[stance] * 0.5;
else if (IS_SET (ch->pcdata->qstats[3], QS_DAM_GREATER))
dr += ch->stance[stance];
else if (IS_SET (ch->pcdata->qstats[3], QS_DAM_SUPREME))
dr += ch->stance[stance] * 2;
}
if (stance == STANCE_SUPER5)
{
if (IS_SET (ch->pcdata->qstats[4], QS_DAM_LESSER))
dr += ch->stance[stance] * 0.5;
else if (IS_SET (ch->pcdata->qstats[4], QS_DAM_GREATER))
dr += ch->stance[stance];
else if (IS_SET (ch->pcdata->qstats[4], QS_DAM_SUPREME))
dr += ch->stance[stance] * 2;
}
if (IS_ANGELW (ch))
{
if (IS_SET (ch->apowers, APOWER_CRUSADER))
dr += 250;
if (IS_COR (ch, COR_PRAYER))
dr += 400;
if (ch->saintly > 0)
dr += 500;
}
if (get_disc (ch, DISC_POTENCE) > 0)
dr += (get_disc (ch, DISC_POTENCE) * 150);
if (IS_VAMPIRE (ch) && ch->pcdata->vamprage > 0)
dr += ch->pcdata->vamprage;
dr += (ch->max_move / 100);
if (IS_KENSAI (ch))
{
dr += ch->battlefury;
if (IS_COR (ch, COR_DISCIPLINE))
dr += 1500;
}
if (IS_NINJA (ch))
{
if (ch->pcdata->npowers[NINJA_RAGE] > 0)
dr += ch->pcdata->npowers[NINJA_RAGE];
if (ch->pcdata->powers[NPOWER_CHIKYU] >= 6
&& ch->pcdata->npowers[HARA_KIRI] > 0)
dr += 175;
if (ch->pcdata->npowers[NPOWER_NINGENNO] == 7)
dr += 200;
}
if (!IS_NPC (ch) && IS_DRACONIAN (ch))
{
dr += ch->pcdata->cpowers[DRAC_MIGHT] * 200;
if (ch->pcdata->cpowers[DRAC_COMBAT] > 0)
{
dr += ch->pcdata->cpowers[DRAC_COMBAT] * 150;
}
if (ch->pcdata->cpowers[DRAC_AVATAR] > 0)
{
dr += 150;
}
}
if (IS_SHAAHOUL (ch) && ch->pcdata->powers[KAHN_RANKS] >= 7)
dr += 1500;
if (IS_XBITS (ch, X_YANG_MIGHT))
dr += 250;
dr += 50 * (11 - ch->vampgen);
if (!IS_NPC (ch) && IS_SET (ch->evenmore, EM_MASTERY))
dr += 750;
if (IS_SET (ch->act, PLR_WOLFMAN) && ch->pcdata->wolf > 0)
dr += ch->pcdata->wolf;
else if (ch->pcdata->wolfform[1] > FORM_HOMID && ch->pcdata->wolf > 0)
dr += ch->pcdata->wolf;
if (IS_DEMON (ch) && ch->pcdata->demonic > 0)
{
/* Pure demons get double the bonus */
if (ch->class == CLASS_DEMON || ch->class == CLASS_ANGEL)
dr += ((ch->pcdata->demonic * ch->pcdata->demonic) << 1);
else
dr += (ch->pcdata->demonic * ch->pcdata->demonic);
}
if (!IS_NPC (ch) && ch->legendeq > 0)
{
if (IS_HL (ch))
dr += ((ch->legendeq * ch->legendeq) << 1) * 2;
else
dr += ((ch->legendeq * ch->legendeq) << 1);
}
if (IS_BETRAYER (ch) && IS_XX (ch, XX_FSTAND))
dr += 1250;
if (IS_MONK (ch))
{
if (ch->monkab[COMBAT] > 0)
dr += ch->monkab[COMBAT] * 200;
if (ch->chi[CURRENT] > 0)
dr += ch->chi[CURRENT] * 100;
if (IS_SET (ch->corbits, COR_NEW_POWER))
dr += 500;
}
if (IS_HIGHLANDER (ch))
{
dr += ch->wpn[1] * 2.7;
if (IS_ITEMAFF (ch, ITEMA_HIGHLANDER))
dr += 150;
}
if (IS_WRAITH (ch))
dr += 500;
if (IS_KAHN (ch))
dr += ch->pcdata->powers[KAHN_RANKS] * 250;
if (IS_DRAGON (ch) && IS_POLYAFF (ch, POLY_DRAGONFORM))
dr += dform_data[(ch->pcdata->dpowers[DRAGON_AGE])].damplus;
if (ch->pcdata->wisdoms[ELF_MIGHT] > 0)
dr += 2750;
if (ch->lstatus > 0)
dr += (ch->lstatus * 75);
if (IS_WEREWOLF (ch) && get_tribe (ch, TRIBE_STARGAZERS) > 1)
{
if (get_tribe (ch, TRIBE_STARGAZERS) > 3)
dr += 250;
else
dr += 125;
}
if (IS_WOLFBIT (ch, WW_BEASTED))
dr += 3000;
if (IS_SET (ch->mflags, MAGE_BETTERBODY))
dr += 150;
if (IS_POLYAFF (ch, POLY_WOLF))
dr += 200;
if (IS_POLYAFF (ch, POLY_SERPENT))
dr += 150;
if (IS_POLYAFF (ch, POLY_ZULO))
dr += 200;
if (IS_POLYAFF (ch, POLY_DJINNFORM))
dr += 200;
if (IS_POLYAFF (ch, POLY_DEMONFORM))
dr += 200;
if (IS_POLYAFF (ch, POLY_RAKSHASA))
dr += (100 * ch->pcdata->powers[KAHN_FORMS]);
if (IS_POLYAFF (ch, POLY_KAHNFORM))
dr += 150;
if (IS_POLYAFF (ch, POLY_WWZULO))
dr += 250;
if (IS_POLYAFF (ch, POLY_ANGELFORM))
dr += 500;
if (IS_POLYAFF (ch, POLY_TIGERFORM))
dr += (50 * ch->pcdata->powers[KAHN_TIGER]);
if (IS_POLYAFF (ch, POLY_SAINTFORM))
dr += (75 * ch->monkab[HOLY]);
if (IS_POLYAFF (ch, POLY_ELFFORM))
dr += 250;
if (IS_POLYAFF (ch, POLY_DRACOFORM))
dr += 150;
if (IS_POLYAFF (ch, POLY_MASTERFORM))
dr += 300;
if (IS_POLYAFF (ch, POLY_NINJAFORM))
{
if (IS_XBITS (ch, X_YANG_MIGHT))
dr += 250;
else
dr += 150;
}
}
if (!IS_BETRAYER (ch) && IS_DEMON (ch) && ch->in_room != NULL
&& ch->in_room->area->plane != PLANE_HELL
&& ch->in_room->area->plane != PLANE_HEAVEN && hellstorm)
dr *= 1.5;
if (IS_BETRAYER (ch) && ch->in_room != NULL
&& ch->in_room->area->plane == PLANE_LIMBO)
dr *= 2;
if (!IS_BETRAYER (ch) && IS_DEMON (ch) && ch->in_room != NULL
&& ch->in_room->area->plane == PLANE_HELL)
dr *= 2;
if (!IS_BETRAYER (ch) && IS_ANGELW (ch) && ch->in_room != NULL
&& ch->in_room->area->plane == PLANE_HELL)
dr *= 2;
if (!IS_NPC (ch) && ch->pcdata->exercise[EXE_RECOVER] > 0)
dr *= 0.75;
if (!IS_NPC (ch) && ch->pcdata->empireeq[2] > 0)
dr += ch->pcdata->empireeq[2] * 50;
else if (ch->move < ch->max_move)
{
min = dr * 0.75;
if (ch->move < 1 || ch->max_move < 1)
dr *= 0.75;
else
{
dr = dr * ch->move / ch->max_move;
if (dr < min)
dr = min;
}
}
if (ch->hit < ch->max_hit && !IS_MORE (ch, MORE_NOPAIN))
{
if (!IS_NPC (ch) && IS_HL (ch) && IS_QUICK (ch, QUICKENING_MIND))
return dr;
if (!IS_NPC (ch) && IS_WEREWOLF (ch)
&& get_auspice (ch, AUSPICE_PHILODOX) > 0)
return dr;
min = dr * 0.75;
if (ch->hit < 1 || ch->max_hit < 1)
dr *= 0.75;
else
{
dr = dr * ch->hit / ch->max_hit;
if (dr < min)
dr = min;
}
}
if (IS_NEWWW (ch))
return calc_newwwhrdr (ch, dr);
return dr;
}
int
char_ac (CHAR_DATA * ch)
{
int a_c = GET_AC (ch);
bool hellstorm = FALSE;
if (IS_SET (mudconfig->world_affects, WORLD_HELLSTORM))
hellstorm = TRUE;
if (!IS_NPC (ch) && ch->pcdata->empireeq[3] > 0) {
a_c -= ch->pcdata->empireeq[3] * 50;
}
if (!IS_NPC (ch) && ch->pcdata->empireeq[4] > 0) {
a_c -= ch->pcdata->empireeq[4] * 50;
}
if (!IS_NPC (ch))
{
int stance = ch->stance[0];
if (stance == STANCE_SUPER1)
{
if (IS_SET (ch->pcdata->qstats[0], QS_ARM_LESSER))
a_c -= ch->stance[stance];
else if (IS_SET (ch->pcdata->qstats[0], QS_ARM_GREATER))
a_c -= ch->stance[stance] * 2;
else if (IS_SET (ch->pcdata->qstats[0], QS_ARM_SUPREME))
a_c -= ch->stance[stance] * 3;
}
if (stance == STANCE_SUPER2)
{
if (IS_SET (ch->pcdata->qstats[1], QS_ARM_LESSER))
a_c -= ch->stance[stance];
else if (IS_SET (ch->pcdata->qstats[1], QS_ARM_GREATER))
a_c -= ch->stance[stance] * 2;
else if (IS_SET (ch->pcdata->qstats[1], QS_ARM_SUPREME))
a_c -= ch->stance[stance] * 3;
}
if (stance == STANCE_SUPER3)
{
if (IS_SET (ch->pcdata->qstats[2], QS_ARM_LESSER))
a_c -= ch->stance[stance];
else if (IS_SET (ch->pcdata->qstats[2], QS_ARM_GREATER))
a_c -= ch->stance[stance] * 2;
else if (IS_SET (ch->pcdata->qstats[2], QS_ARM_SUPREME))
a_c -= ch->stance[stance] * 3;
}
if (stance == STANCE_SUPER4)
{
if (IS_SET (ch->pcdata->qstats[3], QS_ARM_LESSER))
a_c -= ch->stance[stance];
else if (IS_SET (ch->pcdata->qstats[3], QS_ARM_GREATER))
a_c -= ch->stance[stance] * 2;
else if (IS_SET (ch->pcdata->qstats[3], QS_ARM_SUPREME))
a_c -= ch->stance[stance] * 3;
}
if (stance == STANCE_SUPER5)
{
if (IS_SET (ch->pcdata->qstats[4], QS_ARM_LESSER))
a_c -= ch->stance[stance];
else if (IS_SET (ch->pcdata->qstats[4], QS_ARM_GREATER))
a_c -= ch->stance[stance] * 2;
else if (IS_SET (ch->pcdata->qstats[4], QS_ARM_SUPREME))
a_c -= ch->stance[stance] * 3;
}
if (get_disc (ch, DISC_FORTITUDE) > 0)
a_c -= (get_disc (ch, DISC_FORTITUDE) * 500);
if (IS_KENSAI (ch))
{
a_c -= ch->battlefury * 2;
if (IS_COR (ch, COR_TOUGHNESS))
a_c -= 2000;
}
if (IS_BETRAYER (ch) && IS_XX (ch, XX_FSTAND))
a_c -= 2500;
if (IS_ANGELW (ch))
{
if (ch->saintly > 0)
a_c -= 1000;
}
if (!IS_NPC (ch) && IS_DRACONIAN (ch))
{
a_c -= ch->pcdata->cpowers[DRAC_MIGHT] * 200;
if (ch->pcdata->cpowers[DRAC_AVATAR] > 0)
{
a_c -= 800;
}
}
if (IS_HIGHLANDER (ch))
{
a_c -= ch->wpn[1] * 3.3;
if (IS_ITEMAFF (ch, ITEMA_HIGHLANDER))
a_c -= 300;
}
if (IS_SHAAHOUL (ch) && ch->pcdata->powers[KAHN_RANKS] >= 7)
a_c -= -3000;
if (IS_COR (ch, COR_PRAYER))
a_c -= 800;
if (IS_XBITS (ch, X_YANG_MIGHT))
a_c -= 250;
if (IS_WEREWOLF (ch) && get_tribe (ch, TRIBE_CHILDREN_OF_GAIA) > 1)
a_c -= 250;
if (IS_POLYAFF (ch, POLY_WOLF))
a_c -= 200;
if (IS_POLYAFF (ch, POLY_SERPENT))
a_c -= 400;
if (IS_POLYAFF (ch, POLY_BAT))
a_c -= 600;
if (IS_POLYAFF (ch, POLY_ZULO))
a_c -= 400;
if (IS_POLYAFF (ch, POLY_DEMONFORM))
a_c -= 400;
if (IS_POLYAFF (ch, POLY_KAHNFORM))
a_c -= 200;
if (IS_POLYAFF (ch, POLY_RAKSHASA))
a_c -= (200 * ch->pcdata->powers[KAHN_FORMS]);
if (IS_POLYAFF (ch, POLY_WWZULO))
a_c -= 500;
if (IS_POLYAFF (ch, POLY_ANGELFORM))
a_c -= 750;
if (IS_POLYAFF (ch, POLY_TIGERFORM))
a_c -= (85 * ch->pcdata->powers[KAHN_TIGER]);
if (IS_POLYAFF (ch, POLY_SAINTFORM))
a_c -= (100 * ch->monkab[HOLY]);
if (IS_POLYAFF (ch, POLY_DRACOFORM))
a_c -= 200;
if (IS_POLYAFF (ch, POLY_ELFFORM))
a_c -= 500;
if (IS_POLYAFF (ch, POLY_MASTERFORM))
a_c -= 600;
if (IS_POLYAFF (ch, POLY_NINJAFORM))
{
if (IS_XBITS (ch, X_YANG_MIGHT))
a_c -= 500;
else
a_c -= 300;
}
}
if (!IS_NPC (ch))
{
if (ch->pcdata->wisdoms[ELF_HASTE] > 0)
a_c -= 1500;
if (IS_DRAGON (ch) && IS_POLYAFF (ch, POLY_DRAGONFORM))
a_c -= dform_data[(ch->pcdata->dpowers[DRAGON_AGE])].acmin;
}
if (IS_MONK (ch))
{
if (ch->monkab[COMBAT] > 0)
a_c -= ch->monkab[COMBAT] * 200;
if (ch->chi[CURRENT] > 0)
a_c -= ch->chi[CURRENT] * 100;
if (ch->monkab[BODY] >= 2)
a_c -= 1000;
}
if (!IS_BETRAYER (ch) && IS_DEMON (ch) && ch->in_room != NULL
&& ch->in_room->area->plane == PLANE_HELL
&& ch->in_room->area->plane != PLANE_HEAVEN && hellstorm)
a_c *= 2;
if (!IS_BETRAYER (ch) && IS_DEMON (ch) && ch->in_room != NULL
&& ch->in_room->area->plane == PLANE_HELL)
a_c *= 4;
if (!IS_BETRAYER (ch) && IS_ANGELW (ch) && ch->in_room != NULL
&& ch->in_room->area->plane == PLANE_HEAVEN)
a_c *= 4;
a_c -= 100 * (11 - ch->vampgen);
if (!IS_NPC (ch) && ch->pcdata->exercise[EXE_RECOVER] > 0)
a_c += 250;
else if (ch->move < ch->max_move)
{
if (ch->move < 1 || ch->max_move < 1)
a_c += 250;
else
a_c += (ch->move / ch->max_move * 250);
}
if (ch->hit < ch->max_hit && !IS_MORE (ch, MORE_NOPAIN))
{
if (!IS_NPC (ch) && IS_HL (ch) && IS_QUICK (ch, QUICKENING_MIND))
return a_c;
if (!IS_NPC (ch) && IS_WEREWOLF (ch)
&& get_auspice (ch, AUSPICE_PHILODOX) > 0)
return a_c;
if (ch->hit < 1 || ch->max_hit < 1)
a_c += 250;
else
a_c += (ch->hit / ch->max_hit * 250);
}
return a_c;
}
/*
* Show a list to a character.
* Can coalesce duplicated items.
*/
void
show_list_to_char (OBJ_DATA * list, CHAR_DATA * ch, bool fShort,
bool fShowNothing)
{
char buf[MSL];
char **prgpstrShow;
int *prgnShow;
char *pstrShow;
OBJ_DATA *obj;
int nShow;
int iShow;
int count;
bool fCombine;
if (ch->desc == NULL)
return;
/*
* Alloc space for output lines.
*/
count = 0;
for (obj = list; obj != NULL; obj = obj->next_content)
count++;
prgpstrShow = alloc_mem (count * sizeof (char *));
prgnShow = alloc_mem (count * sizeof (int));
nShow = 0;
/*
* Format the list of objects.
*/
for (obj = list; obj != NULL; obj = obj->next_content)
{
if (!IS_NPC (ch) && ch->pcdata->chobj != NULL && obj->chobj != NULL
&& obj->chobj == ch)
continue;
if (obj->description != NULL && strlen (obj->description) < 2)
continue;
if (obj->wear_loc == WEAR_NONE && can_see_obj (ch, obj))
{
pstrShow = format_obj_to_char (obj, ch, fShort);
fCombine = FALSE;
// if ( IS_NPC(ch) || IS_SET(ch->act, PLR_COMBINE) )
// {
/*
* Look for duplicates, case sensitive.
* Matches tend to be near end so run loop backwards.
*/
for (iShow = nShow - 1; iShow >= 0; iShow--)
{
if (!strcmp (prgpstrShow[iShow], pstrShow))
{
prgnShow[iShow]++;
fCombine = TRUE;
break;
}
}
// }
/*
* Couldn't combine, or didn't want to.
*/
if (!fCombine)
{
prgpstrShow[nShow] = str_dup (pstrShow);
prgnShow[nShow] = 1;
nShow++;
}
}
}
/*
* Output the formatted list.
*/
for (iShow = 0; iShow < nShow; iShow++)
{
// if ( IS_NPC(ch) || IS_SET(ch->act, PLR_COMBINE) )
// {
if (prgnShow[iShow] != 1)
{
sprintf (buf, "(%2d) ", prgnShow[iShow]);
send_to_char (buf, ch);
}
else
{
send_to_char (" ", ch);
}
// }
send_to_char (prgpstrShow[iShow], ch);
send_to_char ("\n\r", ch);
free_string (prgpstrShow[iShow]);
}
if (fShowNothing && nShow == 0)
{
// if ( IS_NPC(ch) || IS_SET(ch->act, PLR_COMBINE) )
send_to_char (" ", ch);
send_to_char ("Nothing.\n\r", ch);
}
/*
* Clean up.
*/
free_mem (prgpstrShow, count * sizeof (char *));
free_mem (prgnShow, count * sizeof (int));
return;
}
char *
get_bridclan (CHAR_DATA * ch)
{
static char clan[200];
clan[0] = '\0';
char buf[MIL];
switch (ch->class)
{
default:
sprintf (clan, "BUGGY CLAN");
break;
case CLASS_DRACONIAN:
case CLASS_DRAGON:
sprintf (clan, "%s", get_dprof (ch));
break;
case CLASS_ABOMINATION:
sprintf (clan, "#GA#Rb#Go#Rm#Gi#Rn#Ga#Rt#Gi#Ro#Gn#n");
break;
case CLASS_LICH:
sprintf (clan, "#cP#Cs#7ion#Ci#cc#n");
break;
case CLASS_SKINDANCER:
sprintf (clan, "#GS#Ck#Gi#Cn#Gd#Ca#Gn#Cc#Ge#Cr#n");
break;
case CLASS_BLACK_SPIRAL_DANCER:
sprintf (clan,
"#yB#Gl#ya#Gc#yk#G S#yp#Gi#yr#Ga#yl#G D#ya#Gn#yc#Ge#yr#n");
break;
case CLASS_NEPHANDI:
sprintf (clan, "#CN#ye#Cp#yh#Ca#yn#Cd#yi#n");
break;
case CLASS_DEFYLER:
sprintf (clan, "#gD#0e#Gf#0y#Gl#0e#gr#n");
break;
case CLASS_SHAAHOUL:
sprintf (clan, "#rS#oh#ra#g'#oA#rh#Ro#ru#ol#n");
break;
case CLASS_SAINT:
sprintf (clan, "#7Sa#oi#7nt#n");
break;
case CLASS_SHIDOSHI:
sprintf (clan, "#7S#0hi#rdo#0sh#7i#n");
break;
case CLASS_NECRONOM:
sprintf (clan, "#0Ne#pc#Pro#pn#0om#n");
break;
case CLASS_IKIRYU:
sprintf (clan, "#0Ikiryu#n");
break;
case CLASS_EFRETI:
sprintf (clan, "#RE#rf#yre#rt#Ri#n");
break;
case CLASS_TAKARRA:
sprintf (clan, "#PT#pak#oa#prr#Pa#n");
break;
case CLASS_SHINOBI:
sprintf (clan, "#yS#ohi#yn#oob#yi#n");
break;
case CLASS_CEVOYIA:
strcat (clan, "#rC#Re#ov#Ro#oy#Ri#ra#n");
break;
case CLASS_KRENSHAR:
strcat (clan, "#0K#Rre#rns#Rha#0r#n");
break;
case CLASS_WISHENCHANT:
sprintf (clan, "#CW#cis#Ch #RE#rnc#Rh#rant#Re#rr#n");
break;
case CLASS_GYPSY:
sprintf (clan, "#CG#0yps#Cy#n");
break;
case CLASS_ABERRATION:
sprintf (clan, "#oA#gb#per#gra#pti#go#on#n");
break;
case CLASS_BETRAYER:
sprintf (clan, "#7B#Re#rt#7r#Ra#ry#7e#Rr#n");
break;
case CLASS_PLANARSOHEI:
sprintf (clan, "#CP#clana#Cr#y S#7ohe#yi#n");
break;
case CLASS_RAKSHASA:
sprintf (clan, "#RR#rak#0sh#ras#Ra#n");
break;
case CLASS_TIGRASHA:
// sprintf (clan, "#rTi#Gg#gra#Gs#rha#n");
sprintf (clan, "#7Ti#Gg#gra#Gs#7ha#n");
break;
case CLASS_GAIAINQ:
sprintf (clan, "#GG#ga#Gi#ga#7 In#yqu#ois#yit#7or#n");
break;
case CLASS_NECROMANCER:
sprintf (clan, "Nec#0roman#ncer");
break;
case CLASS_BALEHOUND:
sprintf (clan, "#rB#0al#ge#rh#go#0un#rd#n");
break;
case CLASS_PARAGON:
sprintf (clan, "Par#0ag#non");
break;
case CLASS_GRIMALKIN:
sprintf (clan, "#nGri#0mal#nkin");
break;
case CLASS_REVENANT:
sprintf (clan, "#nRev#0en#nant");
break;
}
return clan;
}
void
show_char_to_char_0 (CHAR_DATA * victim, CHAR_DATA * ch)
{
char buf[MSL];
char buf2[MSL];
char buf3[MSL];
char buf4[MSL];
char tij[MSL];
char sex[MSL];
char mount2[MSL];
char *vname;
char *ename;
CHAR_DATA *mount;
buf[0] = '\0';
buf2[0] = '\0';
buf3[0] = '\0';
buf4[0] = '\0';
if (!IS_NPC (victim) && victim->pcdata->chobj != NULL)
return;
if ((mount = victim->mount) != NULL && IS_SET (victim->mounted, IS_MOUNT))
return;
if (IS_HEAD (victim, LOST_HEAD) && IS_AFFECTED (victim, AFF_POLYMORPH))
strcat (buf, " ");
else
{
if (IS_NPC (victim) && ch->questmob > 0
&& victim->pIndexData->vnum == ch->questmob)
strcat (buf, "#R(#0Quest Target#R)#n ");
if (IS_NPC (victim) && IS_IMMORTAL (ch))
{
char vnum[12];
sprintf (vnum, "#y%d#n", victim->pIndexData->vnum);
strcat (buf, "#7(");
strcat (buf, vnum);
strcat (buf, "#7) ");
}
/*
if (IS_LINKSYS (ch))
{
char mobname[MIL];
sprintf (mobname, "%s", victim->name);
strcat (buf, mobname);
}
*/
if (!IS_RNPC (victim) && victim->desc == NULL)
strcat (buf, "#R(#PLink-Dead#R)#n ");
if (IS_MORE (victim, MORE_SPIRIT))
strcat (buf, "#R(#7Spirit World#R)#n ");
if (IS_GHOST (victim))
strcat (buf, "#R(#yG#0hos#yt#R)#n ");
if (IS_AFFECTED (victim, AFF_TRACER) && (!IS_NPC (ch) && IS_KAHN (ch)
&& ch->pcdata->
powers[KAHN_COMBAT] > 5
|| IS_IMMORTAL (ch)))
strcat (buf, "#7(#PTracer#7)#n ");
if (IS_IMMORTAL (victim) && IS_SET (victim->act, PLR_WIZINVIS))
strcat (buf, "#R(#7Wizinvis#R)#n ");
if (IS_EXTRA (victim, EXTRA_INCOG))
strcat (buf, "#R(#7Incog#R)#n ");
if (IS_AFFECTED (victim, AFF_INVISIBLE))
strcat (buf, "#R(#nInvis#R)#n ");
if (IS_AFFECTED (victim, AFF_HIDE))
strcat (buf, "#R(#GHide#R)#n ");
if (IS_AFFECTED (victim, AFF_CHARM))
strcat (buf, "#R(#rCha#Rr#rmed#R)#n ");
if (IS_AFFECTED (victim, AFF_PASS_DOOR) ||
IS_AFFECTED (victim, AFF_ETHEREAL))
strcat (buf, "#R(#GTran#gslu#Gcent#R)#n ");
if (IS_AFFECTED (victim, AFF_FAERIE_FIRE))
strcat (buf, "#R(#PPink Aura#R)#n ");
if (IS_EVIL (victim) && IS_AFFECTED (ch, AFF_DETECT_EVIL))
strcat (buf, "#R(#rRed Aura#R)#n ");
if (IS_AFFECTED (victim, AFF_SANCTUARY))
strcat (buf, "#R(#7White Aura#R)#n ");
if (!IS_NPC (ch) && IS_VAMPIRE (ch) &&
IS_EXTRA (victim, EXTRA_ILLUSION) &&
get_disc (ch, DISC_CHIMERSTRY) > 0)
strcat (buf, "#R(#0Illusion#R)#n ");
if (!IS_NPC (ch) && IS_WEREWOLF (ch) &&
(IS_ITEMAFF (victim, ITEMA_LEFT_SILVER) ||
IS_ITEMAFF (victim, ITEMA_RIGHT_SILVER)) &&
get_auspice (ch, AUSPICE_AHROUN) > 1)
strcat (buf, "#R(#7Si#0lv#7er#R)#n ");
if (victim->saintly > 0)
strcat (buf, "#R(#cH#Co#cl#Cy#R)#n ");
if (IS_ANGELW (ch) && IS_SET (ch->apowers, APOWER_VISION)
|| IS_DEMON (ch) && ch->pcdata->powers[DISC_AUSPEX] >= 5)
{
if (IS_EVIL (victim))
strcat (buf, "#7(#RR#re#Rd#r A#Ru#rr#Ra#7)#n ");
else if (IS_GOOD (victim))
strcat (buf, "#7(#LB#ll#Lu#le#L A#lu#Lr#la#7)#n ");
else
strcat (buf, "#7(#yY#oe#yl#ol#yo#ow#y A#ou#yr#oa#7)#n ");
}
}
if (IS_AFFECTED (ch, AFF_SHADOWPLANE)
&& !IS_AFFECTED (victim, AFF_SHADOWPLANE))
strcat (buf, "#R(#nNormal plane#R)#n ");
else if (!IS_AFFECTED (ch, AFF_SHADOWPLANE)
&& IS_AFFECTED (victim, AFF_SHADOWPLANE))
strcat (buf, "#R(#CUm#Gb#Cra#R)#n ");
if (IS_NYM (ch, NYM_DEATHPLANE) && !IS_NYM (victim, NYM_DEATHPLANE))
strcat (buf, "#R(#nMaterial plane#R)#n ");
else if (!IS_NYM (ch, NYM_DEATHPLANE) && IS_NYM (victim, NYM_DEATHPLANE))
strcat (buf, "#R(#cD#0eat#ch#g p#0lan#ge#R)#n ");
if (!IS_NPC (ch) &&
(get_disc (ch, DISC_AUSPEX) > 0
|| get_auspice (ch, AUSPICE_PHILODOX) > 1))
{
switch (victim->class)
{
default:
break;
case CLASS_ABOMINATION:
strcat (buf, "#R(#GA#Rb#Go#Rm#Gi#Rn#Ga#Rt#Gi#Ro#Gn#R)#n ");
break;
case CLASS_LICH:
strcat (buf, "#R(#cP#Cs#7ion#Ci#cc#n#R)#n ");
break;
case CLASS_SKINDANCER:
strcat (buf, "#R(#GS#Ck#Gi#Cn#Gd#Ca#Gn#Cc#Ge#Cr#R)#n ");
break;
case CLASS_BLACK_SPIRAL_DANCER:
strcat (buf,
"#R(#yB#Gl#ya#Gc#yk#G S#yp#Gi#yr#Ga#yl#G D#ya#Gn#yc#Ge#yr#R)#n ");
break;
case CLASS_DEFYLER:
strcat (buf, "#R(#gD#0e#Gf#0y#Gl#0e#gr#R)#n ");
break;
case CLASS_NEPHANDI:
strcat (buf, "#R(#CN#ye#Cp#yh#Ca#yn#Cd#yi#R)#n ");
break;
case CLASS_SAINT:
strcat (buf, "#R(#7Sa#oi#7nt#R)#n ");
break;
case CLASS_SHIDOSHI:
strcat (buf, "#R(#7S#0hi#rdo#0sh#7i#R)#n ");
break;
case CLASS_NECRONOM:
strcat (buf, "#R(#0Ne#pc#Pro#pn#0om#R)#n ");
break;
case CLASS_EFRETI:
strcat (buf, "#R(#RE#rf#yre#rt#Ri#R)#n ");
break;
case CLASS_TAKARRA:
strcat (buf, "#R(#PT#pak#oa#prr#Pa#R)#n ");
break;
case CLASS_SHINOBI:
strcat (buf, "#R(#yS#ohi#yn#oob#yi#R)#n ");
break;
case CLASS_CEVOYIA:
strcat (buf, "#R(#rC#Re#ov#Ro#oy#Ri#ra#R)#n ");
break;
case CLASS_KRENSHAR:
strcat (buf, "#R(#0K#Rre#rns#Rha#0r#R)#n ");
break;
case CLASS_WISHENCHANT:
strcat (buf, "#R(#CW#cis#Ch #RE#rnc#Rh#rant#Re#rr#R)#n ");
break;
case CLASS_GYPSY:
strcat (buf, "#R(#CG#0yps#Cy#R)#n ");
break;
case CLASS_ABERRATION:
strcat (buf, "#R(#oA#gb#per#gra#pti#go#on#R)#n ");
break;
case CLASS_BETRAYER:
strcat (buf, "#R(#7B#Re#rt#7r#Ra#ry#7e#Rr#R)#n ");
break;
case CLASS_PLANARSOHEI:
strcat (buf, "#R(#CP#clana#Cr#y S#7ohe#yi#R)#n ");
break;
case CLASS_RAKSHASA:
strcat (buf, "#R(#RR#rak#0sh#ras#Ra#R)#n ");
break;
case CLASS_GAIAINQ:
strcat (buf, "#R(#GG#ga#Gi#ga#7 In#yqu#ois#yit#7or#R)#n ");
break;
case CLASS_VAMPIRE:
strcat (buf, "#R(#rV#Ra#rm#Rp#ri#Rr#re#R)#n ");
break;
case CLASS_WEREWOLF:
strcat (buf, "#R(#GW#ge#Gr#ge#Gw#go#Gl#gf#R)#n ");
break;
case CLASS_DEMON:
strcat (buf, "#R(#yDemon#R)#n ");
break;
case CLASS_MAGE:
strcat (buf, "#R(#CMage#R)#n ");
break;
case CLASS_HIGHLANDER:
strcat (buf, "#R(#yHighlander#R)#n ");
break;
case CLASS_WEAPONMASTER:
strcat (buf, "#R(#0Kensai#R)#n ");
break;
case CLASS_GHOUL:
strcat (buf, "#R(#nGhoul#R)#n ");
break;
case CLASS_ANGELW:
strcat (buf, "#R(#7Angel#R)#n ");
break;
case CLASS_NINJA:
strcat (buf, "#R(#gNinja#R)#n ");
break;
case CLASS_DRAGON:
strcat (buf, "#R(#0Dragon#R)#n ");
break;
case CLASS_KAHN:
strcat (buf, "#R(#PKahn#R)#n ");
break;
case CLASS_MONK:
strcat (buf, "#R(#GMonk#R)#n ");
break;
case CLASS_ELF:
strcat (buf, "#R(#yElf#R)#n ");
break;
}
}
/* if (IS_WEREWOLF(victim) && IS_SET(victim->act, PLR_WOLFMAN) &&
!IS_POLYAFF(victim, POLY_ZULO) && IS_WEREWOLF(ch))
{
strcat( buf, "(");
strcat( buf, victim->name);
strcat( buf, ") ");
}
else if ( !IS_NPC(ch) && !IS_NPC(victim) && IS_VAMPIRE(victim)
&& IS_VAMPAFF(victim, VAM_DISGUISED) && !IS_EXTRA(victim, EXTRA_VICISSITUDE))
{
if ((IS_VAMPIRE(ch) && get_disc(ch,DISC_AUSPEX) >=
get_disc(victim,DISC_OBFUSCATE))
|| (IS_WEREWOLF(ch) && get_auspice(ch, AUSPICE_PHILODOX) > 1))
{
if (!IS_EXTRA(victim, EXTRA_VICISSITUDE) && !IS_SET(victim->act, PLR_WOLFMAN))
{
strcat( buf, "(");
strcat( buf, victim->name);
strcat( buf, ") ");
}
}
}*/
// strcat(buf, "#g");
if (IS_AFFECTED (victim, AFF_FLAMING))
{
if (IS_NYM (victim, NYM_NEPHFURY))
{
if (IS_NPC (victim))
sprintf (buf2, "\n\r...%s is engulfed in infernal shadow flames!",
victim->short_descr);
else if (!IS_NPC (victim) && IS_AFFECTED (victim, AFF_POLYMORPH))
sprintf (buf2, "\n\r...%s is engulfed in infernal shadow flames!",
victim->morph);
else
sprintf (buf2, "\n\r...%s is engulfed in infernal shadow flames!",
victim->name);
}
else if (IS_MORE (victim, MORE_FLAMES))
{
if (IS_NPC (victim))
sprintf (buf2, "\n\r...%s is engulfed in infernal flames!",
victim->short_descr);
else if (!IS_NPC (victim) && IS_AFFECTED (victim, AFF_POLYMORPH))
sprintf (buf2, "\n\r...%s is engulfed in infernal flames!",
victim->morph);
else
sprintf (buf2, "\n\r...%s is engulfed in infernal flames!",
victim->name);
}
else
{
if (IS_NPC (victim))
sprintf (buf2, "\n\r...%s is engulfed in blazing flames!",
victim->short_descr);
else if (!IS_NPC (victim) && IS_AFFECTED (victim, AFF_POLYMORPH))
sprintf (buf2, "\n\r...%s is engulfed in blazing flames!",
victim->morph);
else
sprintf (buf2, "\n\r...%s is engulfed in blazing flames!",
victim->name);
}
}
if (!IS_NPC (victim) && IS_HEAD (victim, LOST_HEAD)
&& IS_AFFECTED (victim, AFF_POLYMORPH))
{
if (IS_EXTRA (victim, GAGGED) && IS_EXTRA (victim, BLINDFOLDED))
sprintf (buf3, "\n\r...%s is gagged and blindfolded!", victim->morph);
else if (IS_EXTRA (victim, GAGGED))
sprintf (buf3, "\n\r...%s is gagged!", victim->morph);
else if (IS_EXTRA (victim, BLINDFOLDED))
sprintf (buf3, "\n\r...%s is blindfolded!", victim->morph);
}
if (IS_HEAD (victim, LOST_HEAD) && IS_AFFECTED (victim, AFF_POLYMORPH))
{
strcat (buf, victim->morph);
strcat (buf, " is lying here.\n\r");
strcat (buf, buf2);
strcat (buf, buf3);
strcat (buf, "\n\r");
buf[5] = UPPER (buf[5]);
send_to_char (buf, ch);
return;
}
if (IS_EXTRA (victim, TIED_UP))
{
if (IS_NPC (victim))
sprintf (buf3, "\n\r...%s is tied up", victim->short_descr);
else if (!IS_NPC (victim) && IS_AFFECTED (victim, AFF_POLYMORPH))
sprintf (buf3, "\n\r...%s is tied up", victim->morph);
else
sprintf (buf3, "\n\r...%s is tied up", victim->name);
if (IS_EXTRA (victim, GAGGED) && IS_EXTRA (victim, BLINDFOLDED))
strcat (buf3, ", gagged and blindfolded!");
else if (IS_EXTRA (victim, GAGGED))
strcat (buf3, " and gagged!");
else if (IS_EXTRA (victim, BLINDFOLDED))
strcat (buf3, " and blindfolded!");
else
strcat (buf3, "!");
}
if (IS_AFFECTED (victim, AFF_WEBBED))
{
if (IS_NPC (victim))
sprintf (buf4, "\n\r...%s is coated in a sticky web.",
victim->short_descr);
else if (!IS_NPC (victim) && IS_AFFECTED (victim, AFF_POLYMORPH))
sprintf (buf4, "\n\r...%s is coated in a sticky web.", victim->morph);
else
sprintf (buf4, "\n\r...%s is coated in a sticky web.", victim->name);
strcat (buf3, buf4);
}
if (IS_SET (victim->mflags, MAGE_EMBRACED2)
|| IS_SET (victim->mflags, MAGE_EMBRACED1))
{
if (IS_NPC (victim))
sprintf (buf4, "\n\r...%s is surrounded by earth.",
victim->short_descr);
else if (!IS_NPC (victim) && IS_AFFECTED (victim, AFF_POLYMORPH))
sprintf (buf4, "\n\r...%s is surrounded by earth.", victim->morph);
else
sprintf (buf4, "\n\r...%s is surrounded by earth.", victim->name);
strcat (buf3, buf4);
}
if (IS_AFFECTED (victim, AFF_SHADOW))
{
if (IS_NPC (victim))
sprintf (buf4, "\n\r...%s is entrapped by tendrils of darkness.",
victim->short_descr);
else if (!IS_NPC (victim) && IS_AFFECTED (victim, AFF_POLYMORPH))
sprintf (buf4, "\n\r...%s is entrapped by tendrils of darkness.",
victim->morph);
else
sprintf (buf4, "\n\r...%s is entrapped by tendrils of darkness.",
victim->name);
strcat (buf3, buf4);
}
if (IS_AFFECTED (victim, AFF_JAIL))
{
if (IS_NPC (victim))
sprintf (buf4, "\n\r...%s is surrounded with bands of water.",
victim->short_descr);
else if (!IS_NPC (victim) && IS_AFFECTED (victim, AFF_POLYMORPH))
sprintf (buf4, "\n\r...%s is surrounded with bands of water.",
victim->morph);
else
sprintf (buf4, "\n\r...%s is surrounded with bands of water.",
victim->name);
strcat (buf3, buf4);
}
if (victim->embraced == ARE_EMBRACING && victim->embrace != NULL)
{
CHAR_DATA *emb = victim->embrace;
if (IS_NPC (victim))
vname = str_dup (victim->short_descr);
else if (IS_AFFECTED (victim, AFF_POLYMORPH))
vname = str_dup (victim->morph);
else
vname = str_dup (victim->name);
if (IS_NPC (emb))
ename = str_dup (emb->short_descr);
else if (IS_AFFECTED (emb, AFF_POLYMORPH))
ename = str_dup (emb->morph);
else
ename = str_dup (emb->name);
if (ch == victim)
sprintf (buf4, "\n\r...You are holding %s in a close embrace.",
ename);
else if (ch == emb)
sprintf (buf4, "\n\r...%s is holding you in a close embrace.", vname);
else
sprintf (buf4, "\n\r...%s is holding %s in a close embrace.", vname,
ename);
strcat (buf3, buf4);
}
else if (victim->embraced == ARE_EMBRACED && victim->embrace != NULL)
{
CHAR_DATA *emb = victim->embrace;
if (IS_NPC (victim))
vname = str_dup (victim->short_descr);
else if (IS_AFFECTED (victim, AFF_POLYMORPH))
vname = str_dup (victim->morph);
else
vname = str_dup (victim->name);
if (IS_NPC (emb))
ename = str_dup (emb->short_descr);
else if (IS_AFFECTED (emb, AFF_POLYMORPH))
ename = str_dup (emb->morph);
else
ename = str_dup (emb->name);
if (ch == victim)
sprintf (buf4, "\n\r...You are being held by %s in a close embrace.",
ename);
else if (ch == emb)
sprintf (buf4, "\n\r...%s is being held by you in a close embrace.",
vname);
else
sprintf (buf4, "\n\r...%s is being held by %s in a close embrace.",
vname, ename);
strcat (buf3, buf4);
}
if (victim->position > POS_FIGHTING && victim->long_descr[0] != '\0' &&
strlen (victim->long_descr) > 5 && (mount = victim->mount) == NULL &&
victim->stance[0] < 1)
{
strcpy (buf4, "#g");
strcpy (buf4, victim->long_descr);
buf4[strlen (buf4) - 2] = '\0';
strcat (buf, buf4);
strcat (buf, buf2);
strcat (buf, buf3);
/*
if (buf2[0] != '\0') strcat( buf, "\n\r" );
*/
strcat (buf, "\n\r");
buf[0] = UPPER (buf[0]);
send_to_char (buf, ch);
if (!IS_NPC (ch) && IS_SET (ch->act, PLR_BRIEF))
return;
if (IS_NPC (ch) || !IS_SET (ch->act, PLR_BRIEF))
{
if (IS_POLYAFF (victim, POLY_DJINNFORM))
act ("...$N is surrounded by a raging #ptornado#n.", ch, NULL,
victim, TO_CHAR);
if (IS_XXX (victim, XXX_FLAMESHIELD))
act
("...$N is surrounded by a shielding globe of #Rf#yl#ram#ye#Rs#n.",
ch, NULL, victim, TO_CHAR);
if (IS_XXX (victim, XXX_BARRIER))
act ("...$N is surrounded by a faint barrier.", ch, NULL, victim,
TO_CHAR);
if (IS_COR (victim, COR_RIBBONS))
{
switch (victim->chi[CURRENT])
{
default:
act
("...$N has several #Cglowing #yr#oi#yb#ob#yo#on#ys#n hanging limply around $M.",
ch, NULL, victim, TO_CHAR);
break;
case 1:
act
("...$N has several #Cglowing #yr#oi#yb#ob#yo#on#ys#n moving around $M lazily.",
ch, NULL, victim, TO_CHAR);
break;
case 2:
act
("...$N has several #Cglowing #yr#oi#yb#ob#yo#on#ys#n twisting around $M almost like snakes.",
ch, NULL, victim, TO_CHAR);
break;
case 3:
act
("...$N has several #Cglowing #yr#oi#yb#ob#yo#on#ys#n swirling about $M lashing at everything that gets to close.",
ch, NULL, victim, TO_CHAR);
break;
}
}
if (IS_ITEMAFF (victim, ITEMA_SHOCKSHIELD))
act
("...$N is surrounded by a crackling shield of #ylightning#n.",
ch, NULL, victim, TO_CHAR);
if (IS_ITEMAFF (victim, ITEMA_FIRESHIELD))
act ("...$N is surrounded by a burning shield of #Rfire#n.", ch,
NULL, victim, TO_CHAR);
if (IS_ITEMAFF (victim, ITEMA_ICESHIELD))
act ("...$N is surrounded by a shimmering shield of #Lice#n.", ch,
NULL, victim, TO_CHAR);
if (IS_ITEMAFF (victim, ITEMA_ACIDSHIELD))
act ("...$N is surrounded by a bubbling shield of #gacid#n.", ch,
NULL, victim, TO_CHAR);
if (IS_ITEMAFF (victim, ITEMA_CHAOSSHIELD))
act
("...$N is surrounded by a swirling shield of #.c#.h#.a#.o#.s#n.",
ch, NULL, victim, TO_CHAR);
if (IS_ITEMAFF (victim, ITEMA_REFLECT))
act
("...$N is surrounded by a flickering shield of #0darkness#n.",
ch, NULL, victim, TO_CHAR);
if (IS_ITEMAFF (victim, ITEMA_SUNSHIELD))
act ("...$N is surrounded by a glowing halo of #7sunlight#n.", ch,
NULL, victim, TO_CHAR);
if (IS_EM (victim, EM_ARMOR))
act ("...$N is surrounded by a #yg#oo#yl#od#ye#on#n bubble.", ch,
NULL, victim, TO_CHAR);
if (IS_XBITS (victim, X_DEATH_SHIELD))
act
("...$N is surrounded by a hissing shield of #cdark spirits#n.",
ch, NULL, victim, TO_CHAR);
if (IS_XXX (victim, XXX_DEATHSHIELD))
act
("...$N is surrounded by a shield of Death!#n.",
ch, NULL, victim, TO_CHAR);
if (!IS_NPC (victim))
{
if (IS_DRACWEAP (victim, DRAC_DHAMMER))
act
("...$N has a glowing #cbattle hammer#n floating in the air beside $M.",
ch, NULL, victim, TO_CHAR);
}
if (IS_XX (victim, XX_SHADOWBLAZE))
act
("...$N is covered by a pulsating #0s#nh#0ad#no#0w#n blaze.",
ch, NULL, victim, TO_CHAR);
if (IS_XX (victim, XX_EARTHSHIELD))
{
if (IS_XX (victim, XX_BROKENSHIELD))
act
("...$N is surrounded by a broken Shield of #gEa#Gr#Gth#n.",
ch, NULL, victim, TO_CHAR);
else
act ("...$N is surrounded by a Shield of #gEa#Gr#Gth#n.", ch,
NULL, victim, TO_CHAR);
}
}
return;
}
else if (!IS_NPC (victim) && IS_AFFECTED (victim, AFF_POLYMORPH))
// strcat( buf, victim->morph );
{
sprintf (tij, "%s", PERS2 (victim, ch));
strcat (buf, tij);
}
else
{
sprintf (tij, "%s", PERS2 (victim, ch));
// strcat( buf, PERS2( victim, ch ) );
strcat (buf, tij);
}
if ((mount = victim->mount) != NULL && victim->mounted == IS_RIDING)
{
if (IS_NPC (mount))
sprintf (mount2, " is here riding %s", mount->short_descr);
else
sprintf (mount2, " is here riding %s", mount->name);
strcat (buf, mount2);
if (victim->position == POS_FIGHTING)
{
strcat (buf, ", fighting ");
if (victim->fighting == NULL)
strcat (buf, "thin air??");
else if (victim->fighting == ch)
strcat (buf, "YOU!");
else if (victim->in_room == victim->fighting->in_room)
{
strcat (buf, PERS (victim->fighting, ch));
strcat (buf, ".");
}
else
strcat (buf, "someone who left??");
}
else
strcat (buf, ".");
}
else if (victim->position > POS_FIGHTING
&& IS_AFFECTED (victim, AFF_FLYING))
strcat (buf, " is hovering here.");
else if (victim->position > POS_FIGHTING
&& (!IS_NPC (victim) && IS_DRACWEAP (victim, DRAC_UNFOLDED)
&& IS_DRACWEAP (victim, DRAC_WINGS)))
strcat (buf, " is hovering here.");
else if (victim->position > POS_FIGHTING
&& (!IS_NPC (victim) && (IS_VAMPAFF (victim, VAM_FLYING))))
strcat (buf, " is hovering here.");
else
{
switch (victim->position)
{
case POS_DEAD:
strcat (buf, " is DEAD!!");
break;
case POS_MORTAL:
if (IS_VAMPIRE (victim))
strcat (buf, " is lying here torpored.");
else
strcat (buf, " is lying here #Rfatally#n injured.");
break;
case POS_INCAP:
strcat (buf, " is lying here debilitated.");
break;
case POS_STUNNED:
{
if (victim->sex == 2)
sprintf (sex, "her");
else if (victim->sex == 1)
sprintf (sex, "his");
else
sprintf (sex, "its");
sprintf (buf4, " is knocked on %s ass.", sex);
strcat (buf, buf4);
break;
}
case POS_SLEEPING:
if (victim->sat != NULL)
{
sprintf (buf4, " is sleeping on %s here.",
victim->sat->short_descr);
strcat (buf, buf4);
}
else
strcat (buf, " is sleeping here.");
break;
case POS_RESTING:
if (victim->sat != NULL)
{
sprintf (buf4, " is resting on %s here.",
victim->sat->short_descr);
strcat (buf, buf4);
}
else
strcat (buf, " is resting here.");
break;
case POS_MEDITATING:
if (!IS_NPC (victim) && victim->pcdata->exercise[EXE_TYPE] > 0)
{
switch (victim->pcdata->exercise[EXE_TYPE])
{
default:
strcat (buf, " is exercising here.");
break;
case EXE_PUSHUPS:
strcat (buf, " is doing pushups on the floor here.");
break;
case EXE_SKIPPING:
strcat (buf, " is doing skipping here.");
break;
case EXE_LEGRAISES:
strcat (buf, " is doing leg-raises here.");
break;
}
}
else if (victim->sat != NULL)
{
sprintf (buf4, " is meditating on %s here.",
victim->sat->short_descr);
strcat (buf, buf4);
}
else
strcat (buf, " is meditating here.");
break;
case POS_SITTING:
if (victim->sat != NULL)
{
sprintf (buf4, " is sitting on %s here.",
victim->sat->short_descr);
strcat (buf, buf4);
}
else
strcat (buf, " is sitting here.");
break;
case POS_AGITATED:
case POS_STANDING:
if (!IS_NPC (victim) && victim->stance[0] == STANCE_NORMAL)
strcat (buf, " is here, crouched in a fighting stance.");
else if (victim->stance[0] == STANCE_VIPER)
strcat (buf, " is here, crouched in a viper fighting stance.");
else if (victim->stance[0] == STANCE_CRANE)
strcat (buf, " is here, crouched in a crane fighting stance.");
else if (victim->stance[0] == STANCE_CRAB)
strcat (buf, " is here, crouched in a crab fighting stance.");
else if (victim->stance[0] == STANCE_MONGOOSE)
strcat (buf, " is here, crouched in a mongoose fighting stance.");
else if (victim->stance[0] == STANCE_BULL)
strcat (buf, " is here, crouched in a bull fighting stance.");
else if (victim->stance[0] == STANCE_MANTIS)
strcat (buf, " is here, crouched in a mantis fighting stance.");
else if (victim->stance[0] == STANCE_DRAGON)
strcat (buf, " is here, crouched in a dragon fighting stance.");
else if (victim->stance[0] == STANCE_TIGER)
strcat (buf, " is here, crouched in a tiger fighting stance.");
else if (victim->stance[0] == STANCE_MONKEY)
strcat (buf, " is here, crouched in a monkey fighting stance.");
else if (victim->stance[0] == STANCE_SWALLOW)
strcat (buf, " is here, crouched in a swallow fighting stance.");
else if (!IS_NPC (victim) && victim->stance[0] >= 11 &&
victim->stance[0] <= 15)
{
if (strlen (victim->pcdata->stancename) > 1
&& strlen (victim->pcdata->stancename) < 20)
{
sprintf (buf4,
" is here, crouched in a %s fighting stance.",
victim->pcdata->stancename);
strcat (buf, buf4);
}
else
strcat (buf,
" is here, crouched in a strange fighting stance.");
}
else
strcat (buf, " is here.");
break;
case POS_FIGHTING:
strcat (buf, " is here, fighting ");
if (victim->fighting == NULL)
strcat (buf, "thin air??");
else if (victim->fighting == ch)
strcat (buf, "YOU!");
else if (victim->in_room == victim->fighting->in_room)
{
strcat (buf, PERS (victim->fighting, ch));
strcat (buf, ".");
}
else
strcat (buf, "someone who left??");
break;
}
}
if (buf2[0] != '\0')
strcat (buf, "\n\r");
strcat (buf, buf2);
strcat (buf, buf3);
strcat (buf, "\n\r");
buf[0] = UPPER (buf[0]);
send_to_char (buf, ch);
if (!IS_NPC (ch) && IS_SET (ch->act, PLR_BRIEF))
return;
if (IS_POLYAFF (victim, POLY_DJINNFORM))
act ("...$N is surrounded by a raging tornado.", ch, NULL, victim,
TO_CHAR);
if (IS_XXX (victim, XXX_FLAMESHIELD))
act ("...$N is surrounded by a shielding globe of flames.", ch, NULL,
victim, TO_CHAR);
if (IS_XXX (victim, XXX_BARRIER))
act ("...$N is surrounded by a faint barrier.", ch, NULL, victim,
TO_CHAR);
if (IS_COR (victim, COR_RIBBONS))
{
switch (victim->chi[CURRENT])
{
default:
act ("...$N has several glowing ribbons hanging limply around $M.",
ch, NULL, victim, TO_CHAR);
break;
case 1:
act ("...$N has several glowing ribbons moving around $M lazily.",
ch, NULL, victim, TO_CHAR);
break;
case 2:
act
("...$N has several glowing ribbons twisting around $M almost like snakes.",
ch, NULL, victim, TO_CHAR);
break;
case 3:
act
("...$N has several glowing ribbons swirling about $M lashing at everything that gets to close.",
ch, NULL, victim, TO_CHAR);
break;
}
}
if (IS_ITEMAFF (victim, ITEMA_SHOCKSHIELD))
act ("...$N is surrounded by a crackling shield of lightning.", ch, NULL,
victim, TO_CHAR);
if (IS_ITEMAFF (victim, ITEMA_FIRESHIELD))
act ("...$N is surrounded by a burning shield of fire.", ch, NULL, victim,
TO_CHAR);
if (IS_ITEMAFF (victim, ITEMA_ICESHIELD))
act ("...$N is surrounded by a shimmering shield of ice.", ch, NULL,
victim, TO_CHAR);
if (IS_ITEMAFF (victim, ITEMA_ACIDSHIELD))
act ("...$N is surrounded by a bubbling shield of acid.", ch, NULL,
victim, TO_CHAR);
if (IS_ITEMAFF (victim, ITEMA_CHAOSSHIELD))
act ("...$N is surrounded by a swirling shield of chaos.", ch, NULL,
victim, TO_CHAR);
if (IS_ITEMAFF (victim, ITEMA_REFLECT))
act ("...$N is surrounded by a flickering shield of darkness.", ch, NULL,
victim, TO_CHAR);
if (IS_ITEMAFF (victim, ITEMA_SUNSHIELD))
act ("...$N is surrounded by a glowing halo of sunlight.", ch, NULL,
victim, TO_CHAR);
if (IS_EM (victim, EM_ARMOR))
act ("...$N is surrounded by a golden bubble.", ch, NULL, victim,
TO_CHAR);
if (IS_XBITS (victim, X_DEATH_SHIELD))
act
("...$N is surrounded by a hissing shield of dark spirits.",
ch, NULL, victim, TO_CHAR);
if (IS_XXX (victim, XXX_DEATHSHIELD))
act
("...$N is surrounded by a shield of Death!#n.",
ch, NULL, victim, TO_CHAR);
if (!IS_NPC (victim))
{
if (IS_DRACWEAP (victim, DRAC_DHAMMER))
act
("...$N has a glowing battle hammer floating in the air beside $M.",
ch, NULL, victim, TO_CHAR);
}
if (IS_XX (victim, XX_SHADOWBLAZE))
act
("...$N is covered by a pulsating shadow blaze.",
ch, NULL, victim, TO_CHAR);
if (IS_XX (victim, XX_EARTHSHIELD))
{
if (IS_XX (victim, XX_BROKENSHIELD))
act ("...$N is surrounded by a broken shield of Earth.", ch, NULL,
victim, TO_CHAR);
else
act ("...$N is surrounded by a shield of earth.", ch, NULL,
victim, TO_CHAR);
}
return;
}
void
evil_eye (CHAR_DATA * victim, CHAR_DATA * ch)
{
char buf[MSL];
int tabletype;
if (IS_NPC (victim))
return;
if (victim == ch)
return;
if (IS_IMMORTAL (ch) || IS_IMMORTAL (victim))
return;
if (!IS_MORE (victim, MORE_EVILEYE))
return;
if (victim->pcdata->evileye > 0)
return;
victim->pcdata->evileye = 10;
if (victim->powertype != NULL && strlen (victim->powertype) > 1)
{
sprintf (buf, "\n\r%s\n\r", victim->powertype);
send_to_char (buf, ch);
}
if (IS_SET (victim->spectype, EYE_SELFACTION) &&
strlen (victim->poweraction) > 1)
{
if (IS_NPC (victim))
SET_BIT (victim->act, ACT_COMMANDED);
interpret (victim, victim->poweraction);
if (IS_NPC (victim))
REMOVE_BIT (victim->act, ACT_COMMANDED);
}
if (IS_SET (victim->spectype, EYE_ACTION) &&
strlen (victim->poweraction) > 1)
interpret (ch, victim->poweraction);
if (IS_SET (victim->spectype, EYE_SPELL) && victim->specpower > 0)
{
tabletype = skill_table[victim->specpower].target;
(*skill_table[victim->specpower].spell_fun) (victim->specpower,
victim->spl[tabletype],
victim, ch);
}
return;
}
void
show_char_to_char_1 (CHAR_DATA * victim, CHAR_DATA * ch)
{
char buf[MSL];
OBJ_DATA *obj;
int iWear;
int percent;
bool found;
if (can_see (victim, ch))
{
act ("$n looks at you.", ch, NULL, victim, TO_VICT);
act ("$n looks at $N.", ch, NULL, victim, TO_NOTVICT);
}
if (!IS_NPC (ch) && IS_HEAD (victim, LOST_HEAD))
{
act ("$N is lying here.", ch, NULL, victim, TO_CHAR);
return;
}
if (victim->description[0] != '\0')
{
send_to_char (victim->description, ch);
}
else
{
act ("You see nothing special about $M.", ch, NULL, victim, TO_CHAR);
}
if (victim->max_hit > 0)
percent = (100 * victim->hit) / victim->max_hit;
else
percent = -1;
strcpy (buf, PERS (victim, ch));
if (percent >= 100)
strcat (buf, " is in perfect health.\n\r");
else if (percent >= 90)
strcat (buf, " is slightly scratched.\n\r");
else if (percent >= 80)
strcat (buf, " has a few bruises.\n\r");
else if (percent >= 70)
strcat (buf, " has some cuts.\n\r");
else if (percent >= 60)
strcat (buf, " has several wounds.\n\r");
else if (percent >= 50)
strcat (buf, " has many nasty wounds.\n\r");
else if (percent >= 40)
strcat (buf, " is bleeding freely.\n\r");
else if (percent >= 30)
strcat (buf, " is covered in blood.\n\r");
else if (percent >= 20)
strcat (buf, " is leaking guts.\n\r");
else if (percent >= 10)
strcat (buf, " is almost dead.\n\r");
else
strcat (buf, " is DYING.\n\r");
buf[0] = UPPER (buf[0]);
send_to_char (buf, ch);
if (!IS_NPC (victim) && IS_SET (victim->act, PLR_WOLFMAN))
{
if (IS_MORE (victim, MORE_BRISTLES))
act ("$N's body is covered in thick fur and quill-like spines.", ch,
NULL, victim, TO_CHAR);
else
act ("$N's body is covered in thick fur.", ch, NULL, victim, TO_CHAR);
}
else if (IS_AFFECTED (victim, AFF_INFRARED)
|| IS_VAMPAFF (victim, VAM_NIGHTSIGHT))
act ("$N's eyes are glowing bright red.", ch, NULL, victim, TO_CHAR);
if (IS_WEREWOLF (victim) && IS_VAMPAFF (victim, VAM_NIGHTSIGHT))
act ("$N's eyes are glowing bright green.", ch, NULL, victim, TO_CHAR);
else if (IS_ANGELW (victim) && IS_VAMPAFF (victim, VAM_NIGHTSIGHT))
act ("$N's eyes are glowing bright blue.", ch, NULL, victim, TO_CHAR);
else if (victim->class == CLASS_KAHN && IS_VAMPAFF (victim, VAM_NIGHTSIGHT))
act ("$N's eyes are glowing bright yellow.", ch, NULL, victim, TO_CHAR);
if (IS_VAMPAFF (victim, VAM_FANGS))
act ("$N has a pair of long, pointed fangs.", ch, NULL, victim, TO_CHAR);
if (!IS_NPC (victim)
&& (IS_DRACWEAP (victim, DRAC_WINGS)
&& IS_DRACWEAP (victim, DRAC_UNFOLDED)))
act ("$N is hovering in the air.", ch, NULL, victim, TO_CHAR);
else if (IS_AFFECTED (victim, AFF_FLYING))
act ("$N is hovering in the air.", ch, NULL, victim, TO_CHAR);
if (!IS_NPC (victim) && IS_VAMPIRE (victim) &&
IS_VAMPAFF (victim, VAM_CLAWS) && !IS_ABOMINATION (victim))
{
if (IS_POLYAFF (victim, POLY_ZULO))
{
if (IS_ANGELW (ch))
act ("$N has long golden talons extending from $S fingers.", ch,
NULL, victim, TO_CHAR);
else
act ("$N has long black talons extending from $S fingers.", ch,
NULL, victim, TO_CHAR);
}
else if (IS_POLYAFF (victim, POLY_WOLF))
act ("$N has razor sharp talons extending from $S paws.", ch, NULL,
victim, TO_CHAR);
else if (IS_POLYAFF (victim, POLY_BAT))
act ("$N has tiny, razor sharp claws extending from $S wing tips.",
ch, NULL, victim, TO_CHAR);
else
act
("$N has razor sharp claws protruding from under $S finger nails.",
ch, NULL, victim, TO_CHAR);
}
else if (!IS_NPC (victim) && IS_VAMPAFF (victim, VAM_CLAWS))
{
if (IS_WEREWOLF (victim) && get_auspice (victim, AUSPICE_AHROUN) > 3)
{
if (get_tribe (victim, TRIBE_BLACK_FURIES) > 1)
act
("$N has venom-dripping silver talons extending from $S fingers.",
ch, NULL, victim, TO_CHAR);
else
act ("$N has gleaming silver talons extending from $S fingers.",
ch, NULL, victim, TO_CHAR);
}
else
{
if (IS_WEREWOLF (victim)
&& get_tribe (victim, TRIBE_BLACK_FURIES) > 1)
act ("$N has venom-dripping talons extending from $S fingers.",
ch, NULL, victim, TO_CHAR);
else if (IS_POLYAFF (victim, POLY_ZULO))
act ("$N has long black talons extending from $S fingers.", ch,
NULL, victim, TO_CHAR);
else if (IS_MONK (victim))
act
("$N hands are made of pure #Ca#cd#Ca#cm#Ca#cn#Ct#ci#Cu#cm#n.",
ch, NULL, victim, TO_CHAR);
else
act ("$N has razor sharp talons extending from $S fingers.", ch,
NULL, victim, TO_CHAR);
}
}
if (IS_POLYAFF (victim, POLY_DJINNFORM))
{
act ("$N is surrounded by a raging whirlwind.", ch, NULL, victim,
TO_CHAR);
}
if (!IS_NPC (victim) && IS_QUICK (victim, QUICKENING_COLDKICK))
{
act ("$N's feet are enveloped by a cold blue nimbus.", ch,
NULL, victim, TO_CHAR);
}
if (!IS_NPC (victim) && IS_MORE (victim, MORE_HAND_FLAME))
{
if (IS_ANGELW (victim))
act ("$N's hands are surrounded with a glowing blue nimbus.", ch,
NULL, victim, TO_CHAR);
else
act ("$N's hands are engulfed in blazing flames.", ch, NULL, victim,
TO_CHAR);
}
if (!IS_NPC (victim) && IS_MORE (victim, MORE_OBEAH))
{
if (victim->pcdata->obeah > 0)
act ("$N has a brightly glowing eye in the center of $S forehead.",
ch, NULL, victim, TO_CHAR);
else
act ("$N has an eye in the center of $S forehead.", ch, NULL, victim,
TO_CHAR);
}
if (!IS_NPC (victim))
{
if (IS_MOD (victim, MOD_TUSKS))
act ("$N has a pair of tusks extending from $S mouth.", ch, NULL,
victim, TO_CHAR);
if (IS_MOD (victim, MOD_HORNS))
act ("$N has a pair of pointed horns extending from $S head.", ch,
NULL, victim, TO_CHAR);
if (IS_DRACONIAN (victim) && IS_DRACWEAP (victim, DRAC_WINGS))
{
char wing[MSL];
if (IS_SET (victim->pcdata->cpowers[DRAC_WEAPONRY], DRAC_UNFOLDED))
sprintf (wing,
"$N has a pair of huge scaly %s wings spread out behind $S back.",
dcolor[victim->pcdata->dpowers[DRAGON_COLOR]]);
else
sprintf (wing,
"$N has a pair of huge scaly %s wings folded behind $S back.",
dcolor[victim->pcdata->dpowers[DRAGON_COLOR]]);
act (wing, ch, NULL, victim, TO_CHAR);
}
if (IS_DRACONIAN (victim) && IS_DRACWEAP (victim, DRAC_TAIL))
{
char tail[MSL];
sprintf (tail, "$N has a long %s tail, covered in sharp spikes.",
dcolor[victim->pcdata->dpowers[DRAGON_COLOR]]);
act (tail, ch, NULL, victim, TO_CHAR);
}
if (IS_DRACONIAN (victim) && IS_DRACWEAP (victim, DRAC_JAW))
{
if (victim->pcdata->cpowers[DRAC_OFFENSIVE] > 6)
act ("$N has large gleaming razor teeth protruding from $S jaws.",
ch, NULL, victim, TO_CHAR);
else
act ("$N has large razor sharp teeth protruding from $S jaws.",
ch, NULL, victim, TO_CHAR);
}
if (IS_DRACONIAN (victim) && IS_DRACWEAP (victim, DRAC_SPIKES))
{
char spike[MSL];
sprintf (spike, "$N has long %s spikes covering $S spine.",
dcolor[victim->pcdata->dpowers[DRAGON_COLOR]]);
act (spike, ch, NULL, victim, TO_CHAR);
}
if (IS_DRACONIAN (victim) && IS_DRACWEAP (victim, DRAC_CLAWS))
{
char claws[MSL];
sprintf (claws,
"$N has long razor sharp %s talons extending from $S fingers.",
dcolor[victim->pcdata->dpowers[DRAGON_COLOR]]);
act (claws, ch, NULL, victim, TO_CHAR);
}
if (IS_DRACONIAN (victim) && IS_DRACWEAP (victim, DRAC_HORNS))
{
char horn[MSL];
sprintf (horn,
"$N has a pair of long %s horns sticking out of $S head.",
dcolor[victim->pcdata->dpowers[DRAGON_COLOR]]);
act (horn, ch, NULL, victim, TO_CHAR);
}
if (IS_DRACONIAN (victim) && IS_DRACWEAP (victim, DRAC_POISON))
{
char skin[MSL];
sprintf (skin, "$N's %s skin is covered in a slimy poison.",
dcolor[victim->pcdata->dpowers[DRAGON_COLOR]]);
act (skin, ch, NULL, victim, TO_CHAR);
}
if (!IS_NPC (victim))
{
if (IS_POLYAFF (victim, POLY_DEMONFORM)
&& IS_DEMPOWER (victim, DEM_TENTACLE))
act ("$N has several whip like tentacles under $s arms.", ch,
NULL, victim, TO_CHAR);
}
if (IS_DEMON (victim) && !IS_NPC (victim))
{
if (victim->pcdata->shockballs > 0)
{
char number[MIL];
int sphere = victim->pcdata->shockballs;
if (sphere >= 9)
sprintf (number, "A throng of");
else if (sphere >= 6)
sprintf (number, "Several");
else if (sphere >= 4)
sprintf (number, "A few");
else if (sphere == 3)
sprintf (number, "A triad of");
else if (sphere == 2)
sprintf (number, "A couple of");
else if (sphere == 1)
sprintf (number, "A single");
sprintf (buf,
"$N has %s Lightning Sphere%s floating around $M.",
number, sphere == 1 ? "" : "s");
act (buf, ch, NULL, victim, TO_CHAR);
}
}
if (IS_DEMON (victim) && IS_DEMAFF (victim, DEM_WINGS))
{
if (IS_ANGEL (victim))
{
if (IS_DEMAFF (victim, DEM_UNFOLDED))
act
("$N has a pair of white feathered wings spread out behind $S back.",
ch, NULL, victim, TO_CHAR);
else
act
("$N has a pair of white feathered wings folded behind $S back.",
ch, NULL, victim, TO_CHAR);
}
else
{
if (IS_DEMAFF (victim, DEM_UNFOLDED))
act
("$N has a pair of batlike wings spread out behind $S back.",
ch, NULL, victim, TO_CHAR);
else
act ("$N has a pair of batlike wings folded behind $S back.",
ch, NULL, victim, TO_CHAR);
}
}
else if (IS_MOD (victim, MOD_WINGS))
{
if (IS_MOD (victim, MOD_UNFOLDED))
{
if (IS_ANGEL (victim))
act
("$N has a pair of white feathered wings spread out behind $S back.",
ch, NULL, victim, TO_CHAR);
else
act
("$N has a pair of batlike wings spread out behind $S back.",
ch, NULL, victim, TO_CHAR);
}
else
{
if (IS_ANGEL (victim))
act
("$N has a pair of white feathered wings folded behind $S back.",
ch, NULL, victim, TO_CHAR);
else
act ("$N has a pair of batlike wings folded behind $S back.",
ch, NULL, victim, TO_CHAR);
}
}
if (!IS_NPC (victim) && IS_NINJA (victim)
&& victim->pcdata->npowers[NPATH_DARK] > 9)
act
("$N has a pair of nasty looking scythes attached to $S overarms.",
ch, NULL, victim, TO_CHAR);
if (IS_MOD (victim, MOD_FINS))
act ("$N has a pair of fins extending from the sides of $S body.", ch,
NULL, victim, TO_CHAR);
if (IS_MOD (victim, MOD_TAIL))
act ("$N has a long tail hanging from $S backside.", ch, NULL, victim,
TO_CHAR);
if (IS_MOD (victim, MOD_EXOSKELETON))
act ("$N is covered with an armoured exoskeleton.", ch, NULL, victim,
TO_CHAR);
if (HAS_CANNON (victim))
{
if (IS_NYM (victim, NYM_PLASMACANNON))
act ("$N has a #gPl#Gas#gma#c Cannon#n mounted on $S shoulder.",
ch, NULL, victim, TO_CHAR);
else if (IS_NYM (victim, NYM_LASERCANNON))
act ("$N has a #rL#pase#rr#c Cannon#n mounted on $S shoulder.",
ch, NULL, victim, TO_CHAR);
else
act ("$N has a #cCannon#n mounted on $S shoulder.", ch, NULL,
victim, TO_CHAR);
}
if (!IS_NPC (victim) && IS_MORE (victim, MORE_GUARDIAN))
{
if (IS_ANGELW (victim))
act ("$N has a little cherub perched on $S shoulder.", ch, NULL,
victim, TO_CHAR);
else if (IS_DEMON (victim))
act ("$N has a little imp perched on $S shoulder.", ch, NULL,
victim, TO_CHAR);
else if (IS_ELF (victim))
act ("$N has a noble eagle perched on $S shoulder.", ch, NULL,
victim, TO_CHAR);
}
if (!IS_NPC (victim) && victim->pcdata->hamstrung > 0)
{
act ("$N has been hamstrung and can't stand on $S feet.", ch, NULL,
victim, TO_CHAR);
}
}
found = FALSE;
for (iWear = 0; iWear < MAX_WEAR; iWear++)
{
if ((obj = get_eq_char (victim, iWear)) != NULL
&& can_see_obj (ch, obj))
{
if (!found)
{
send_to_char ("\n\r", ch);
act ("$N is using:", ch, NULL, victim, TO_CHAR);
found = TRUE;
}
send_to_char (where_name[iWear], ch);
if (IS_NPC (ch) || ch->pcdata->chobj == NULL
|| ch->pcdata->chobj != obj)
{
send_to_char (format_obj_to_char (obj, ch, TRUE), ch);
send_to_char ("\n\r", ch);
}
else
send_to_char ("you\n\r", ch);
}
}
/*
if ( victim != ch
&& !IS_NPC(ch)
&& !IS_HEAD(victim, LOST_HEAD)
&& number_percent( ) < ch->pcdata->learned[gsn_peek] )
{
send_to_char( "\n\rYou peek at the inventory:\n\r", ch );
show_list_to_char( victim->carrying, ch, TRUE, TRUE );
}
*/
return;
}
void
show_char_to_char (CHAR_DATA * list, CHAR_DATA * ch)
{
CHAR_DATA *rch;
for (rch = list; rch != NULL; rch = rch->next_in_room)
{
if (rch == ch)
continue;
if (IS_IMMORTAL (ch) || IS_IMMORTAL (rch))
{
if (!IS_NPC (rch)
&& IS_SET (rch->act, PLR_WIZINVIS)
&& get_trust (ch) < get_trust (rch))
continue;
}
else if (!IS_IMMORTAL (ch) && IS_XXX (rch, XXX_SE))
continue;
else
{
if (!IS_NPC (rch)
&& (IS_SET (rch->act, PLR_WIZINVIS)
|| IS_ITEMAFF (rch, ITEMA_VANISH))
&& !IS_SET (ch->act, PLR_HOLYLIGHT)
&& !IS_ITEMAFF (ch, ITEMA_VISION) && !IS_XXX (rch, XXX_SE))
continue;
}
if (!IS_NPC (rch))
{
if (IS_HEAD (rch, LOST_HEAD)
|| IS_EXTRA (rch, EXTRA_OSWITCH)
|| IS_VAMPAFF (rch, VAM_EARTHMELDED))
continue;
}
if (can_see (ch, rch) || IS_XXX (rch, XXX_SE))
show_char_to_char_0 (rch, ch);
else if (room_is_dark (ch->in_room)
&& (IS_AFFECTED (rch, AFF_INFRARED)
|| IS_VAMPAFF (rch, VAM_NIGHTSIGHT)))
{
if (IS_WEREWOLF (rch) && IS_VAMPAFF (rch, VAM_NIGHTSIGHT))
send_to_char ("You see some emerald green eyes watching YOU!\n\r",
ch);
else if (IS_ANGELW (rch) && IS_VAMPAFF (rch, VAM_NIGHTSIGHT))
send_to_char
("You see some brilliantly blue eyes watching YOU!\n\r", ch);
else if (IS_KAHN (rch) && IS_VAMPAFF (rch, VAM_NIGHTSIGHT))
send_to_char
("You see some sparkling yellow eyes watching YOU!\n\r", ch);
else
send_to_char ("You see some fiery red eyes watching YOU!\n\r",
ch);
}
}
return;
}
bool
check_blind (CHAR_DATA * ch)
{
if (!IS_NPC (ch) && IS_SET (ch->act, PLR_HOLYLIGHT))
return TRUE;
if (IS_ITEMAFF (ch, ITEMA_VISION))
return TRUE;
if (IS_HEAD (ch, LOST_EYE_L) && IS_HEAD (ch, LOST_EYE_R))
{
send_to_char ("You have no eyes to see with!\n\r", ch);
return FALSE;
}
if (IS_EXTRA (ch, BLINDFOLDED))
{
send_to_char ("You can't see a thing through the blindfold!\n\r", ch);
return FALSE;
}
if (IS_AFFECTED (ch, AFF_BLIND) && !IS_AFFECTED (ch, AFF_SHADOWSIGHT))
{
send_to_char ("You can't see a thing!\n\r", ch);
return FALSE;
}
return TRUE;
}
void
do_look (CHAR_DATA * ch, char *argument)
{
char buf[MSL];
char arg1[MIL];
char arg2[MIL];
char arg3[MIL];
EXIT_DATA *pexit;
CHAR_DATA *victim;
CHAR_DATA *vch;
CHAR_DATA *vch_next;
CHAR_DATA *wizard;
OBJ_DATA *obj;
OBJ_DATA *portal;
OBJ_DATA *portal_next;
ROOM_INDEX_DATA *pRoomIndex;
ROOM_INDEX_DATA *location;
char *pdesc;
int door;
bool found;
if (ch->desc == NULL && (wizard = ch->wizard) == NULL)
return;
if (ch->in_room == NULL)
return;
if (!IS_NPC (ch) && IS_VAMPIRE (ch) &&
get_disc (ch, DISC_PROTEAN) > 7 && ch->position < POS_SLEEPING)
waiting (ch, 12);
else if (ch->position < POS_SLEEPING)
{
send_to_char ("You can't see anything but stars!\n\r", ch);
return;
}
if (ch->position == POS_SLEEPING)
{
send_to_char ("You can't see anything, you're sleeping!\n\r", ch);
return;
}
if (IS_EXTRA (ch, BLINDFOLDED) && !IS_CREATOR (ch))
{
send_to_char ("You can't see anything, you're blindfolded!\n\r", ch);
return;
}
if (!check_blind (ch))
return;
if (!IS_NPC (ch) && ch->in_room != NULL &&
IS_SET (ch->in_room->room_flags, ROOM_TOTAL_DARKNESS) &&
!IS_ITEMAFF (ch, ITEMA_VISION) && !IS_IMMORTAL (ch))
{
if (!IS_VAMPIRE (ch) || get_disc (ch, DISC_OBTENEBRATION) == 0)
{
if (!IS_WEREWOLF (ch) || get_tribe (ch, TRIBE_UKTENA) < 1)
{
if (IS_NPC (ch) || !IS_DEMON (ch)
|| !IS_SET (ch->pcdata->disc[C_POWERS], DEM_SHADOWSIGHT))
{
send_to_char ("It is pitch black ... \n\r", ch);
return;
}
}
}
}
if (!IS_NPC (ch) && ch->in_room != NULL &&
IS_SET (ch->in_room->room_flags, ROOM_DJINN_DARKNESS) &&
!IS_ITEMAFF (ch, ITEMA_VISION) && !IS_IMMORTAL (ch))
{
if (!IS_DJINN (ch) || !IS_VAMPAFF (ch, VAM_NIGHTSIGHT))
{
if (!IS_XX (ch, XX_RAKDJINN))
{
if (!IS_LICH (ch) || get_disc (ch, DISC_OBTENEBRATION) == 0)
{
if (!IS_WEREWOLF (ch) || get_tribe (ch, TRIBE_UKTENA) < 1)
{
send_to_char ("It is pitch black ... \n\r", ch);
return;
}
}
}
}
}
/*if (IS_LINKSYS (ch))
{
sprintf (buf, "mobvnum: %d mobkilled: %d", ch->in_room->mobvnum, ch->in_room->mobkilled);
stc (buf, ch);
}*/
if (!IS_NPC (ch)
&& !IS_SET (ch->act, PLR_HOLYLIGHT)
&& !IS_ITEMAFF (ch, ITEMA_VISION)
&& !IS_VAMPAFF (ch, VAM_NIGHTSIGHT)
&& !IS_AFFECTED (ch, AFF_SHADOWPLANE)
&& !(ch->in_room != NULL && ch->in_room->vnum == ROOM_VNUM_IN_OBJECT
&& !IS_NPC (ch) && ch->pcdata->chobj != NULL
&& ch->pcdata->chobj->in_obj != NULL)
&& room_is_dark (ch->in_room))
{
send_to_char ("It is pitch black ... \n\r", ch);
show_char_to_char (ch->in_room->people, ch);
return;
}
argument = one_argument (argument, arg1);
argument = one_argument (argument, arg2);
argument = one_argument (argument, arg3);
if (arg1[0] == '\0' || !str_cmp (arg1, "auto"))
{
/* 'look' or 'look auto' */
if (ch->in_room != NULL && ch->in_room->vnum == ROOM_VNUM_IN_OBJECT
&& !IS_NPC (ch) && ch->pcdata->chobj != NULL
&& ch->pcdata->chobj->in_obj != NULL)
act ("$p", ch, ch->pcdata->chobj->in_obj, NULL, TO_CHAR);
else if (IS_AFFECTED (ch, AFF_SHADOWPLANE))
send_to_char ("The Umbra\n\r", ch);
else if (IS_XX (ch, XX_DREAMWORLD))
send_to_char ("The Dream World\n\r", ch);
else if (IS_NYM (ch, NYM_DEATHPLANE))
send_to_char ("The Death Plane\n\r", ch);
else if (!IS_NPC (ch) && IS_IMMORTAL (ch))
{
sprintf (buf, "#c[#n%s#n#c]#n\n\r", plane_name (ch));
send_to_char (buf, ch);
sprintf (buf, "#R%s#c [#7%d#c]#n\n\r", ch->in_room->name,
ch->in_room->vnum);
send_to_char (buf, ch);
}
else
{
if (!IS_NPC (ch))
{
sprintf (buf, "#c[#n%s#n#c]#n\n\r", plane_name (ch));
send_to_char (buf, ch);
}
sprintf (buf, "#R%s#n\n\r", ch->in_room->name);
send_to_char (buf, ch);
}
if (!IS_NPC (ch) && IS_SET (ch->act, PLR_AUTOEXIT))
do_exits (ch, "auto");
if (ch->in_room != NULL && ch->in_room->vnum == ROOM_VNUM_IN_OBJECT
&& !IS_NPC (ch) && ch->pcdata->chobj != NULL
&& ch->pcdata->chobj->in_obj != NULL)
{
act ("You are inside $p.", ch, ch->pcdata->chobj->in_obj, NULL,
TO_CHAR);
show_list_to_char (ch->pcdata->chobj->in_obj->contains, ch, FALSE,
FALSE);
}
else if ((arg1[0] == '\0' || !str_cmp (arg1, "auto"))
&& IS_AFFECTED (ch, AFF_SHADOWPLANE))
send_to_char ("You are standing in the spirit plane.\n\r", ch);
else if ((!IS_NPC (ch) && !IS_XXX (ch, XXX_BRIEFFIVE)) &&
(arg1[0] == '\0' || !str_cmp (arg1, "auto")))
{
sprintf (buf, "%s", ch->in_room->description);
send_to_char (buf, ch);
if (ch->in_room->blood == 1000)
sprintf (buf,
"You notice that the room is completely drenched in blood.\n\r");
else if (ch->in_room->blood > 750)
sprintf (buf,
"You notice that there is a very large amount of blood around the room.\n\r");
else if (ch->in_room->blood > 500)
sprintf (buf,
"You notice that there is a large quantity of blood around the room.\n\r");
else if (ch->in_room->blood > 250)
sprintf (buf,
"You notice a fair amount of blood on the floor.\n\r");
else if (ch->in_room->blood > 100)
sprintf (buf,
"You notice several blood stains on the floor.\n\r");
else if (ch->in_room->blood > 50)
sprintf (buf, "You notice a few blood stains on the floor.\n\r");
else if (ch->in_room->blood > 25)
sprintf (buf,
"You notice a couple of blood stains on the floor.\n\r");
else if (ch->in_room->blood > 0)
sprintf (buf,
"You notice a few drops of blood on the floor.\n\r");
else
sprintf (buf, "You notice nothing special in the room.\n\r");
ADD_COLOUR (ch, buf, L_RED);
if (ch->in_room->blood > 0)
send_to_char (buf, ch);
if (IS_SET (ch->in_room->added_flags, ROOM2_CALTROPS))
stc
("You notice several small caltrops spread across the ground.\n\r",
ch);
if (IS_SET (ch->in_room->added_flags, ROOM2_LICHCIRCLE))
stc ("You notice a circle of blood in the room.\n\r", ch);
}
show_list_to_char (ch->in_room->contents, ch, FALSE, FALSE);
show_char_to_char (ch->in_room->people, ch);
return;
}
if (!str_cmp (arg1, "i") || !str_cmp (arg1, "in"))
{
/* 'look in' */
if (arg2[0] == '\0')
{
send_to_char ("Look in what?\n\r", ch);
return;
}
if ((obj = get_obj_here (ch, arg2)) == NULL)
{
send_to_char ("You do not see that here.\n\r", ch);
return;
}
switch (obj->item_type)
{
default:
send_to_char ("That is not a container.\n\r", ch);
break;
case ITEM_SCRYBOWL:
do_planescry (ch, obj, arg3);
break;
case ITEM_PORTAL:
pRoomIndex = get_room_index (obj->value[0]);
location = ch->in_room;
if (pRoomIndex == NULL)
{
send_to_char ("It doesn't seem to lead anywhere.\n\r", ch);
return;
}
if (obj->value[2] == 1 || obj->value[2] == 3)
{
send_to_char ("It seems to be closed.\n\r", ch);
return;
}
char_from_room (ch);
char_to_room (ch, pRoomIndex);
found = FALSE;
for (portal = ch->in_room->contents; portal != NULL;
portal = portal_next)
{
portal_next = portal->next_content;
if ((obj->value[0] == portal->value[3])
&& (obj->value[3] == portal->value[0]))
{
found = TRUE;
if (IS_AFFECTED (ch, AFF_SHADOWPLANE) &&
!IS_SET (portal->extra_flags, ITEM_SHADOWPLANE))
{
REMOVE_BIT (ch->affected_by, AFF_SHADOWPLANE);
do_look (ch, "auto");
SET_BIT (ch->affected_by, AFF_SHADOWPLANE);
break;
}
else if (!IS_AFFECTED (ch, AFF_SHADOWPLANE) &&
IS_SET (portal->extra_flags, ITEM_SHADOWPLANE))
{
SET_BIT (ch->affected_by, AFF_SHADOWPLANE);
do_look (ch, "auto");
REMOVE_BIT (ch->affected_by, AFF_SHADOWPLANE);
break;
}
else
{
do_look (ch, "auto");
break;
}
}
}
char_from_room (ch);
char_to_room (ch, location);
break;
case ITEM_DRINK_CON:
if (obj->value[1] <= 0)
{
send_to_char ("It is empty.\n\r", ch);
break;
}
if (obj->value[1] < obj->value[0] / 5)
sprintf (buf, "There is a little %s liquid left in it.\n\r",
liq_table[obj->value[2]].liq_color);
else if (obj->value[1] < obj->value[0] / 4)
sprintf (buf, "It contains a small about of %s liquid.\n\r",
liq_table[obj->value[2]].liq_color);
else if (obj->value[1] < obj->value[0] / 3)
sprintf (buf, "It's about a third full of %s liquid.\n\r",
liq_table[obj->value[2]].liq_color);
else if (obj->value[1] < obj->value[0] / 2)
sprintf (buf, "It's about half full of %s liquid.\n\r",
liq_table[obj->value[2]].liq_color);
else if (obj->value[1] < obj->value[0])
sprintf (buf, "It is almost full of %s liquid.\n\r",
liq_table[obj->value[2]].liq_color);
else if (obj->value[1] == obj->value[0])
sprintf (buf, "It's completely full of %s liquid.\n\r",
liq_table[obj->value[2]].liq_color);
else
sprintf (buf, "Somehow it is MORE than full of %s liquid.\n\r",
liq_table[obj->value[2]].liq_color);
send_to_char (buf, ch);
break;
case ITEM_CONTAINER:
case ITEM_CORPSE_NPC:
case ITEM_CORPSE_PC:
if (IS_SET (obj->value[1], CONT_CLOSED))
{
send_to_char ("It is closed.\n\r", ch);
break;
}
act ("$p contains:", ch, obj, NULL, TO_CHAR);
show_list_to_char (obj->contains, ch, TRUE, TRUE);
break;
case ITEM_QUIVER:
if (obj->arrows[0] < 1 && obj->arrows[1] < 1 && obj->arrows[2] < 1
&& obj->arrows[3] < 1 && obj->arrows[4] < 1
&& obj->arrows[5] < 1 && obj->arrows[6] < 1
&& obj->arrows[7] < 1 && obj->arrows[8] < 1
&& obj->arrows[9] < 1)
{
act ("$p is empty.", ch, obj, NULL, TO_CHAR);
break;
}
show_quiver (ch, obj);
break;
}
return;
}
if ((victim = get_char_room (ch, arg1)) != NULL)
{
show_char_to_char_1 (victim, ch);
evil_eye (victim, ch);
return;
}
for (vch = char_list; vch != NULL; vch = vch_next)
{
vch_next = vch->next;
if (vch->in_room == NULL)
continue;
if (vch->in_room == ch->in_room)
{
if (!IS_NPC (vch) && !str_cmp (arg1, vch->morph))
{
show_char_to_char_1 (vch, ch);
evil_eye (vch, ch);
return;
}
continue;
}
}
if (!IS_NPC (ch) && ch->pcdata->chobj != NULL
&& ch->pcdata->chobj->in_obj != NULL)
{
obj = get_obj_in_obj (ch, arg1);
if (obj != NULL)
{
send_to_char (obj->description, ch);
send_to_char ("\n\r", ch);
return;
}
}
for (obj = ch->carrying; obj != NULL; obj = obj->next_content)
{
if (!IS_NPC (ch) && ch->pcdata->chobj != NULL && obj->chobj != NULL
&& obj->chobj == ch)
continue;
if (can_see_obj (ch, obj))
{
pdesc = get_extra_descr (arg1, obj->extra_descr);
if (pdesc != NULL)
{
send_to_char (pdesc, ch);
return;
}
pdesc = get_extra_descr (arg1, obj->pIndexData->extra_descr);
if (pdesc != NULL)
{
send_to_char (pdesc, ch);
return;
}
}
if (is_name (arg1, obj->name))
{
send_to_char (obj->description, ch);
send_to_char ("\n\r", ch);
return;
}
}
for (obj = ch->in_room->contents; obj != NULL; obj = obj->next_content)
{
if (!IS_NPC (ch) && ch->pcdata->chobj != NULL && obj->chobj != NULL
&& obj->chobj == ch)
continue;
if (can_see_obj (ch, obj))
{
pdesc = get_extra_descr (arg1, obj->extra_descr);
if (pdesc != NULL)
{
send_to_char (pdesc, ch);
return;
}
pdesc = get_extra_descr (arg1, obj->pIndexData->extra_descr);
if (pdesc != NULL)
{
send_to_char (pdesc, ch);
return;
}
}
if (is_name (arg1, obj->name))
{
send_to_char (obj->description, ch);
send_to_char ("\n\r", ch);
return;
}
}
pdesc = get_extra_descr (arg1, ch->in_room->extra_descr);
if (pdesc != NULL)
{
send_to_char (pdesc, ch);
return;
}
if (!str_cmp (arg1, "n") || !str_cmp (arg1, "north"))
door = 0;
else if (!str_cmp (arg1, "e") || !str_cmp (arg1, "east"))
door = 1;
else if (!str_cmp (arg1, "s") || !str_cmp (arg1, "south"))
door = 2;
else if (!str_cmp (arg1, "w") || !str_cmp (arg1, "west"))
door = 3;
else if (!str_cmp (arg1, "u") || !str_cmp (arg1, "up"))
door = 4;
else if (!str_cmp (arg1, "d") || !str_cmp (arg1, "down"))
door = 5;
else
{
send_to_char ("You do not see that here.\n\r", ch);
return;
}
/* 'look direction' */
if ((pexit = ch->in_room->exit[door]) == NULL)
{
send_to_char ("Nothing special there.\n\r", ch);
return;
}
/*
if ( pexit->description != NULL && pexit->description[0] != '\0' )
send_to_char( pexit->description, ch );
else
send_to_char( "Nothing special there.\n\r", ch );
*/
if (pexit->keyword != NULL
&& pexit->keyword[0] != '\0' && pexit->keyword[0] != ' ')
{
if (IS_SET (pexit->exit_info, EX_CLOSED))
{
act ("The $d is closed.", ch, NULL, pexit->keyword, TO_CHAR);
}
else if (IS_SET (pexit->exit_info, EX_ISDOOR))
{
act ("The $d is open.", ch, NULL, pexit->keyword, TO_CHAR);
if ((pexit = ch->in_room->exit[door]) == NULL)
return;
if ((pRoomIndex = pexit->to_room) == NULL)
return;
location = ch->in_room;
char_from_room (ch);
char_to_room (ch, pRoomIndex);
do_look (ch, "auto");
char_from_room (ch);
char_to_room (ch, location);
}
else
{
if ((pexit = ch->in_room->exit[door]) == NULL)
return;
if ((pRoomIndex = pexit->to_room) == NULL)
return;
location = ch->in_room;
char_from_room (ch);
char_to_room (ch, pRoomIndex);
do_look (ch, "auto");
char_from_room (ch);
char_to_room (ch, location);
}
}
else
{
if ((pexit = ch->in_room->exit[door]) == NULL)
return;
if ((pRoomIndex = pexit->to_room) == NULL)
return;
location = ch->in_room;
char_from_room (ch);
char_to_room (ch, pRoomIndex);
do_look (ch, "auto");
char_from_room (ch);
char_to_room (ch, location);
}
return;
}
void
do_examine (CHAR_DATA * ch, char *argument)
{
char buf[MSL];
char arg[MIL];
OBJ_DATA *obj;
one_argument (argument, arg);
if (arg[0] == '\0')
{
send_to_char ("Examine what?\n\r", ch);
return;
}
do_look (ch, arg);
if ((obj = get_obj_here (ch, arg)) != NULL)
{
if (obj->condition >= 100)
sprintf (buf, "You notice that %s is in perfect condition.\n\r",
obj->short_descr);
else if (obj->condition >= 75)
sprintf (buf, "You notice that %s is in good condition.\n\r",
obj->short_descr);
else if (obj->condition >= 50)
sprintf (buf, "You notice that %s is in average condition.\n\r",
obj->short_descr);
else if (obj->condition >= 25)
sprintf (buf, "You notice that %s is in poor condition.\n\r",
obj->short_descr);
else
sprintf (buf, "You notice that %s is in awful condition.\n\r",
obj->short_descr);
send_to_char (buf, ch);
switch (obj->item_type)
{
default:
break;
case ITEM_DRINK_CON:
case ITEM_CONTAINER:
case ITEM_CORPSE_NPC:
case ITEM_CORPSE_PC:
send_to_char ("When you look inside, you see:\n\r", ch);
sprintf (buf, "in %s", arg);
do_look (ch, buf);
}
}
return;
}
/*
* Thanks to Zrin for auto-exit part.
*/
void
do_exits (CHAR_DATA * ch, char *argument)
{
extern char *const dir_name[];
char buf[MSL];
EXIT_DATA *pexit;
bool found;
bool fAuto;
int door;
buf[0] = '\0';
fAuto = !str_cmp (argument, "auto");
if (!check_blind (ch))
return;
strcpy (buf, fAuto ? "#r[#yExits#r:#y" : "#yObvious exits#r:#n\n\r");
found = FALSE;
for (door = 0; door <= 5; door++)
{
if ((pexit = ch->in_room->exit[door]) != NULL && pexit->to_room != NULL) // && !IS_SET (pexit->exit_info, EX_CLOSED))
{
found = TRUE;
if (fAuto)
{
strcat (buf, " ");
strcat (buf, dir_name[door]);
}
else
{
if (IS_SET (mudconfig->world_affects, WORLD_FOG))
{
sprintf (buf + strlen (buf),
"%-5s - Too foggy to tell.\n\r",
capitalize (dir_name[door]));
}
else if (!IS_NPC (ch) && IS_VAMPAFF (ch, VAM_NIGHTSIGHT))
{
sprintf (buf + strlen (buf), "#y%-5s #r-#n %s\n\r",
capitalize (dir_name[door]), pexit->to_room->name);
}
else if (IS_IMMORTAL (ch))
{
sprintf (buf + strlen (buf),
"#y%-5s #r-#n %s #c[#7%d#c]#n\n\r",
capitalize (dir_name[door]), pexit->to_room->name,
pexit->to_room->vnum);
}
else
sprintf (buf + strlen (buf), "#y%-5s #r-#n %s\n\r",
capitalize (dir_name[door]),
room_is_dark (pexit->to_room)
? "Too dark to tell" : pexit->to_room->name);
}
}
}
if (!found)
strcat (buf, fAuto ? " #ynone" : "None.\n\r");
if (fAuto)
strcat (buf, "#r]#n\n\r");
send_to_char (buf, ch);
return;
}
/*
void do_score( CHAR_DATA *ch, char *argument )
{
char buf[MSL];
char ss1[MSL];
char ss2[MSL];
int a_c = char_ac(ch);
if (!IS_NPC(ch) && (IS_EXTRA(ch,EXTRA_OSWITCH) || IS_HEAD(ch,LOST_HEAD)))
{obj_score(ch,ch->pcdata->chobj);return;}
send_to_char("#L-----------------------------[#yA c r a n i a#L]-----------------------------#n\n\r",ch);
sprintf( buf,
"%s%s#n is here.\n\r",
ch->name,
IS_NPC(ch) ? "" : ch->pcdata->title);
send_to_char( buf, ch );
sprintf( buf, "You have been playing for #7%d#n hours.\n\r", (get_age(ch) - 17) * 2 );
send_to_char( buf, ch );
if (!IS_NPC(ch)) birth_date(ch, TRUE);
if (!IS_NPC(ch) && IS_EXTRA(ch, EXTRA_PREGNANT)) birth_date(ch, FALSE);
send_to_char("#L-------------------------------------------------------------------------#n\n\r",ch);
if ( get_trust( ch ) != ch->level )
{
sprintf( buf, "You are trusted at level #7%d#n.\n\r",
get_trust( ch ) );
send_to_char( buf, ch );
send_to_char("#L-------------------------------------------------------------------------#n\n\r",ch);
}
sprintf( buf,
"Str: #7%-7d#n Int: #7%-7d#n Wis: #7%-7d#n Dex: #7%-7d#n Con: #7%-7d#n\n\r",
get_curr_str(ch),
get_curr_int(ch),
get_curr_wis(ch),
get_curr_dex(ch),
get_curr_con(ch) );
send_to_char( buf, ch );
send_to_char("\n\r", ch);
sprintf( buf,
"Life Essence: #7%5d#n/#7%-5d#n Experience: #7%ld#n\n\r",
ch->hit, ch->max_hit, ch->exp);
send_to_char( buf, ch );
sprintf( buf,
"Mystical Power: #7%5d#n/#7%-5d#n Primal: #7%d#n\n\r",
ch->mana, ch->max_mana, ch->practice);
send_to_char( buf, ch );
sprintf( buf,
"Vitality: #7%5d#n/#7%-5d#n Credits: #7%d#n Wimpy: #7%d#n\n\r",
ch->move, ch->max_move, ch->pcdata->quest, ch->wimpy);
send_to_char( buf, ch );
sprintf( buf, " Damcap: #7%d#n\n\r", ch->damcap[0] );
send_to_char( buf, ch );
if ( !IS_NPC(ch) && ch->pcdata->condition[COND_DRUNK] > 10 )
send_to_char( "You are drunk.\n\r", ch );
if ( !IS_NPC(ch) && ch->pcdata->condition[COND_THIRST] == 0 )
send_to_char( "You are thirsty.\n\r", ch );
if ( !IS_NPC(ch) && ch->pcdata->condition[COND_FULL] == 0 )
send_to_char( "You are hungry.\n\r", ch );
if ( !IS_NPC(ch) && ch->pcdata->stage[0] >= 100 )
send_to_char( "You are feeling extremely horny.\n\r", ch );
else if ( !IS_NPC(ch) && ch->pcdata->stage[0] >= 50 )
send_to_char( "You are feeling pretty randy.\n\r", ch );
else if ( !IS_NPC(ch) && ch->pcdata->stage[0] >= 1 )
send_to_char( "You are feeling rather kinky.\n\r", ch );
if ( !IS_NPC(ch) && ch->pcdata->stage[1] > 0 && (ch->position == POS_SITTING
|| ch->position > POS_FIGHTING || ch->position == POS_RESTING))
{
if (ch->pcdata->partner != NULL && ch->pcdata->partner->in_room != NULL
&& ch->pcdata->partner->in_room == ch->in_room)
{
send_to_char( "You are having sexual intercourse.\n\r", ch );
if (!IS_NPC(ch) && (ch->pcdata->stage[2] + 25) >= ch->pcdata->stage[1])
send_to_char( "You are on the verge of having an orgasm.\n\r",ch );
}
}
else switch ( ch->position )
{
case POS_DEAD:
send_to_char( "You are DEAD!!\n\r", ch );
break;
case POS_MORTAL:
if (IS_VAMPIRE(Showing the first 100 KB of 234.3 KB. Download the archive for the full file.