kahn.c
demise/src/kahn.c · 47.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 "merc.h"
#define PUNC_OTHER(c,v,d) hurt_person(c, v, d, agg_dam);
/*
* Mia's First Class With Help from her (his :P) beloved Xairen
*/
void
do_kahnmastery (CHAR_DATA * ch, char *argument)
{
char arg1[MIL];
char arg2[MIL];
char buf[MSL];
int level = 0;
argument = one_argument (argument, arg1);
argument = one_argument (argument, arg2);
if (IS_NPC (ch))
return;
if (!IS_KAHN (ch))
{
send_to_char ("Huh?\n\r", ch);
return;
}
if (arg1[0] == '\0' && arg2[0] == '\0')
{
sprintf (buf, "Forms [%d], Ranks [%d], Combat [%d], Tiger [%d].\n\r",
ch->pcdata->powers[KAHN_FORMS],
ch->pcdata->powers[KAHN_RANKS],
ch->pcdata->powers[KAHN_COMBAT],
ch->pcdata->powers[KAHN_TIGER]);
send_to_char (buf, ch);
return;
}
if (arg2[0] == '\0')
{
if (!str_cmp (arg1, "forms"))
{
level = ch->pcdata->powers[KAHN_FORMS];
sprintf (buf,
"You have learnt your Forms mastery to [%d], granting you these powers.\n\r",
level);
stc (buf, ch);
if (level < 1)
{
stc ("You dont currently have any Form powers.\n\r", ch);
return;
}
if (level > 0)
{
stc ("Warmth: Let gaias warmth heal you.\n\r", ch);
}
if (level > 1)
{
stc ("Fangs: Pointy and Sharp.\n\r", ch);
}
if (level > 2)
{
stc
("Kahnform: The true kahn, enhancing your combat performance.\n\r",
ch);
}
if (level > 3)
{
stc
("Clawhold: Latch onto prey and don't let them flee.\n\r",
ch);
}
if (level > 4)
{
stc
("SavageShred: Leap onto your foe trying to rip limbs off.\n\r",
ch);
}
if (level > 5)
{
stc
("Mwarp: Use your mental energys to attack an opponent.\n\r",
ch);
}
if (level > 6)
{
stc
("Burrow: You can burrow, and move while burrowed.\n\r",
ch);
}
if (level > 7)
{
stc ("Trueform: Grow into the true Rakshasa form.\n\r", ch);
}
if (level > 8)
{
stc
("Rakswitch: You can switch into: <Mage/Kahn/Monk/Werewolf/Djinn/Vampire/None>.\n\r",
ch);
}
if (level > 9)
{
stc ("Rakafy: Form extra arms from your own flesh.\n\r",
ch);
}
return;
}
if (!str_cmp (arg1, "ranks"))
{
level = ch->pcdata->powers[KAHN_RANKS];
if (level < 1)
{
stc ("You dont currently have any Ranks powers.\n\r", ch);
return;
}
sprintf (buf,
"You have learnt your Ranks mastery to [%d], granting you these powers.\n\r",
level);
stc (buf, ch);
if (level > 0)
{
stc ("Kahnpower: Increase your power(auto).\n\r", ch);
}
if (level > 1)
{
stc
("DarkRoar: Roar making your opponent weak with fright.\n\r",
ch);
stc ("Gaiatouch: Improves equipment.\n\r", ch);
}
if (level > 2)
{
stc
("PrimalSense: You can see else where with the help of gaia.(scry/readaura/instinct)\n\r",
ch);
}
if (level > 3)
{
stc
("Gaiabless: Ask Gaia for her blessing in your quest.\n\r",
ch);
}
if (level > 4)
{
stc
("Blitz: Hack and Slash at all the monsters around.\n\r",
ch);
}
if (level > 5)
{
stc ("Feral Sence: Parrying you becomes almost impossable.\n\r",
ch);
}
if (level > 6)
{
stc ("Tiger rage: Increased hr/dr/ac\n\r", ch);
}
if (level > 7)
{
stc ("Flurry of claws: auto attack\n\r", ch);
}
if (level > 8)
{
stc ("cmist: create a celestial mist\n\r", ch);
}
if (level > 9)
{
// stc ("\n\r", ch);
}
return;
}
if (!str_cmp (arg1, "combat"))
{
level = ch->pcdata->powers[KAHN_COMBAT];
if (level < 1)
{
stc ("You dont currently have any Combat powers.\n\r", ch);
return;
}
sprintf (buf,
"You have learnt your Combat mastery to [%d], granting you these powers.\n\r",
level);
stc (buf, ch);
if (level > 0)
{
stc
("Gaiasight: Gaias power fills you, granting you improved sight.\n\r",
ch);
}
if (level > 1)
{
stc
("Ambush: Ambush your prey for bonus attacks (auto).\n\r",
ch);
}
if (level > 2)
{
stc
("Stalk: Your improved senses let you stalk your prey.\n\r",
ch);
}
if (level > 3)
{
stc ("Clawslash: A slashing attack.\n\r", ch);
}
if (level > 4)
{
stc
("Icetouch: Let the artic chill gather on your hands to harm your foe.\n\r",
ch);
}
if (level > 5)
{
stc
("Tracer: A magical tracer covers your claws, enemies wounded can not hide from you (auto).\n\r",
ch);
stc ("Flame Hand: Flames covers your claws (handofflame).\n\r",
ch);
}
if (level > 6)
{
stc
("Cannon: A shoulder mounted cannon (cannon/target/fire)\n\r",
ch);
}
if (level > 7)
{
stc
("Laser: Exchange your Cannon for a Laser Cannon (auto).\n\r",
ch);
}
if (level > 8)
{
stc
("Plasma: Exchange your Cannon for a Plasma Cannon (auto).\n\r",
ch);
}
if (level > 9)
{
stc
("Bolas: Fire bolas with your Cannon entraping your foes (target/bola).\n\r",
ch);
}
return;
}
if (!str_cmp (arg1, "tiger"))
{
level = ch->pcdata->powers[KAHN_TIGER];
if (level < 1)
{
stc ("You dont currently have any Tiger powers.\n\r", ch);
return;
}
sprintf (buf,
"You have learnt your Tiger mastery to [%d], granting you these powers.\n\r",
level);
stc (buf, ch);
if (level > 0)
{
stc ("Speed: Speed of the Tiger (auto speed bonus).\n\r",
ch);
}
if (level > 1)
{
stc
("Shadowsight: The ability to see into the shadows (umbral).\n\r",
ch);
}
if (level > 2)
{
stc
("Claws: The ability to extend or retract your claws.\n\r",
ch);
}
if (level > 3)
{
stc ("Nightsight: The ability to see during darkness.\n\r",
ch);
}
if (level > 4)
{
stc
("Flame claws: The ability to cover your claws with burning flames. (handsofflame)\n\r",
ch);
}
if (level > 5)
{
stc ("Tigerform: Take on the form of a holy tiger.\n\r", ch);
}
if (level > 6)
{
// stc ("\n\r", ch);
}
if (level > 7)
{
// stc ("\n\r", ch);
}
if (level > 8)
{
// stc ("\n\r", ch);
}
if (level > 9)
{
// stc ("\n\r", ch);
}
return;
}
return;
}
if (!str_cmp (arg2, "learn"))
{
int learn;
int cost;
int max;
int maxlevel;
if (ch->class == CLASS_KAHN)
maxlevel = 5;
else
maxlevel = 3;
if (!str_cmp (arg1, "forms"))
{
learn = KAHN_FORMS;
if (IS_RAKSHASA (ch))
max = 10;
else
max = maxlevel;
}
else if (!str_cmp (arg1, "ranks"))
{
learn = KAHN_RANKS;
if (IS_SHAAHOUL (ch))
max = 10;
else
max = maxlevel;
}
else if (!str_cmp (arg1, "combat"))
{
learn = KAHN_COMBAT;
if (IS_ABERRATION (ch))
max = 10;
else
max = maxlevel;
}
else if (!str_cmp (arg1, "tiger"))
{
learn = KAHN_TIGER;
if (IS_TIGRASHA (ch))
max = 10;
else
max = maxlevel;
}
else
{
send_to_char ("You can learn: Forms, Ranks, Combat and Tiger.\n\r",
ch);
return;
}
cost = (ch->pcdata->powers[learn] + 1) * 2500;
arg1[0] = UPPER (arg1[0]);
if (ch->pcdata->powers[learn] >= max)
{
sprintf (buf,
"You have already gained all the powers of the %s mastery.\n\r",
arg1);
send_to_char (buf, ch);
return;
}
if (cost > ch->pcdata->power[POWER_CURRENT])
{
sprintf (buf,
"It costs you %d kahn points to improve your %s study.\n\r",
cost, arg1);
send_to_char (buf, ch);
return;
}
ch->pcdata->powers[learn] += 1;
ch->pcdata->power[POWER_CURRENT] -= cost;
sprintf (buf, "You improve your ability in the %s study.\n\r", arg1);
send_to_char (buf, ch);
}
else
send_to_char
("To improve a mastery, type: kahnmaster <category> learn.\n\r", ch);
return;
}
void
do_bola (CHAR_DATA * ch, char *argument)
{
CHAR_DATA *victim;
char buf[MSL];
ROOM_INDEX_DATA *chroom;
ROOM_INDEX_DATA *victimroom;
int dam = number_range (1500, 3000);
if (IS_NPC (ch))
return;
if (!IS_CREATOR (ch)
&& (!IS_KAHN (ch) || ch->pcdata->powers[KAHN_COMBAT] < 10))
{
do_huh (ch, "");
return;
}
if (!HAS_CANNON (ch))
{
stc ("You dont have your cannon extended.\n\r", ch);
return;
}
if (strlen (ch->pcdata->targeted) < 3)
{
stc
("You need to target someone before you can discharge your bola's.\n\r",
ch);
return;
}
if ((victim = get_pc_area (ch, ch->pcdata->targeted)) == NULL)
{
stc ("They aren't here.\n\r", ch);
free_string (ch->pcdata->targeted);
ch->pcdata->targeted = str_dup ("");
return;
}
if (IS_NYM (victim, NYM_BOLAS))
{
stc ("They have already been knocked down by some bola's.", ch);
free_string (ch->pcdata->targeted);
ch->pcdata->targeted = str_dup ("");
return;
}
if (global_safe (ch, victim))
return;
sprintf (buf, "You discharge your bola's at $N.");
act (buf, ch, NULL, victim, TO_CHAR);
sprintf (buf,
"Your bola's wrap around $N blasting $M off $S feet #r[#R%d#r]#n.",
dam);
act (buf, ch, NULL, victim, TO_CHAR);
sprintf (buf,
"Three bola's wrap around you blasting you off your feet #r[#R%d#r]#n.",
dam);
act (buf, ch, NULL, victim, TO_VICT);
sprintf (buf, "Three bola's wrap around $N dropping $M to the ground.");
act (buf, ch, NULL, victim, TO_NOTVICT);
hurt_person (ch, victim, dam, 0);
stop_fighting (ch, TRUE);
SET_BIT (victim->nymbits, NYM_BOLAS);
ch->fight_timer = 0;
victim->fight_timer = 0;
victim->position = POS_STUNNED;
free_string (ch->pcdata->targeted);
ch->pcdata->targeted = str_dup ("");
waiting (ch, 12);
return;
}
void
do_fire (CHAR_DATA * ch, char *argument)
{
CHAR_DATA *victim;
OBJ_DATA *obj;
ROOM_INDEX_DATA *chroom;
ROOM_INDEX_DATA *victimroom;
char buf[MSL];
char cannon[50];
char bullet[50];
int dam = 0;
int critical;
bool light = FALSE;
bool blast = FALSE;
if (IS_NPC (ch))
return;
if (!IS_CREATOR (ch)
&& (!IS_KAHN (ch) || ch->pcdata->powers[KAHN_COMBAT] < 7))
{
do_huh (ch, "");
return;
}
if (!HAS_CANNON (ch))
{
stc ("You dont have your cannon extended.\n\r", ch);
return;
}
if (ch->pcdata->recharge > 0)
{
sprintf (buf, "Your cannon will be recharged in %s.",
get_time (ch->pcdata->recharge, ""));
stc (buf, ch);
return;
}
if (strlen (ch->pcdata->targeted) < 3)
{
stc
("You need to target someone before you can discharge your cannon.\n\r",
ch);
return;
}
dam = ch->max_mana / 10;
dam += number_range (150, 899);
if (dam > 9000)
{
dam = 9000 + number_range (160, 1999);
}
if ((victim = get_pc_area (ch, ch->pcdata->targeted)) == NULL)
{
stc ("They aren't here.\n\r", ch);
free_string (ch->pcdata->targeted);
ch->pcdata->targeted = str_dup ("");
return;
}
if (global_safe (ch, victim))
return;
if (IS_NYM (ch, NYM_PLASMACANNON))
{
sprintf (cannon, "#gPl#Gas#gma#c Cannon#n");
sprintf (bullet, "#gPl#Gas#gma#c Grenade#n");
light = TRUE;
blast = TRUE;
dam += number_range (2000, 3500);
}
else if (IS_NYM (ch, NYM_LASERCANNON))
{
sprintf (cannon, "#rL#pase#rr#c Cannon#n");
sprintf (bullet, "#rL#pase#rr#c Beam#n");
light = TRUE;
dam += number_range (1000, 2500);
}
else
{
sprintf (cannon, "#cCannon#n");
sprintf (bullet, "#oH#yig#oh#o Po#yw#oer#C P#crojectile#n");
}
sprintf (buf, "You discharge your %s at $N.", cannon);
act (buf, ch, NULL, victim, TO_CHAR);
sprintf (buf, "Your %s strikes $N hard #r[#R%d#r]#n.", bullet, dam);
act (buf, ch, NULL, victim, TO_CHAR);
sprintf (buf, "A %s strikes you hard in the chest #r[#R%d#r]#n.", bullet,
dam);
act (buf, ch, NULL, victim, TO_VICT);
sprintf (buf, "A %s strikes $N hard in the chest.", bullet);
act (buf, ch, NULL, victim, TO_NOTVICT);
if (light)
{
if (!IS_AFFECTED (victim, AFF_FLAMING))
{
sprintf (buf, "You are engulfed in flames as the %s strikes you!",
bullet);
act (buf, ch, NULL, victim, TO_VICT);
sprintf (buf, "$n is engulfed in flames as the %s strikes $n!",
bullet);
act (buf, victim, NULL, NULL, TO_ROOM);
SET_BIT (victim->affected_by, AFF_FLAMING);
}
}
if (blast && !limbsafe (ch, victim))
{
critical = number_range (1, 4);
if (number_percent () <= 75)
{
if (critical == 1)
{
if (IS_ARM_R (victim, LOST_ARM))
return;
if (!IS_ARM_R (victim, LOST_ARM))
SET_BIT (victim->loc_hp[3], LOST_ARM);
if (!IS_BLEEDING (victim, BLEEDING_ARM_R))
SET_BIT (victim->loc_hp[6], BLEEDING_ARM_R);
if (IS_BLEEDING (victim, BLEEDING_HAND_R))
REMOVE_BIT (victim->loc_hp[6], BLEEDING_HAND_R);
sprintf (buf, "The %s blows your right arm off.", bullet);
act (buf, ch, NULL, victim, TO_VICT);
sprintf (buf, "The %s blows $N's right arm off.", bullet);
act (buf, ch, NULL, victim, TO_CHAR);
sprintf (buf, "The %s blows $N's right arm off.", bullet);
act (buf, ch, NULL, victim, TO_NOTVICT);
make_part (victim, "arm");
if ((obj = get_eq_char (victim, WEAR_ARMS)) != NULL)
take_item (victim, obj);
if ((obj = get_eq_char (victim, WEAR_WIELD)) != NULL)
take_item (victim, obj);
if ((obj = get_eq_char (victim, WEAR_HANDS)) != NULL)
take_item (victim, obj);
if ((obj = get_eq_char (victim, WEAR_WRIST_R)) != NULL)
take_item (victim, obj);
if ((obj = get_eq_char (victim, WEAR_FINGER_R)) != NULL)
take_item (victim, obj);
}
else if (critical == 2)
{
if (IS_ARM_L (victim, LOST_ARM))
return;
if (!IS_ARM_L (victim, LOST_ARM))
SET_BIT (victim->loc_hp[2], LOST_ARM);
if (!IS_BLEEDING (victim, BLEEDING_ARM_L))
SET_BIT (victim->loc_hp[6], BLEEDING_ARM_L);
if (IS_BLEEDING (victim, BLEEDING_HAND_L))
REMOVE_BIT (victim->loc_hp[6], BLEEDING_HAND_L);
sprintf (buf, "The %s blows your left arm off.", bullet);
act (buf, ch, NULL, victim, TO_VICT);
sprintf (buf, "The %s blows $N's left arm off.", bullet);
act (buf, ch, NULL, victim, TO_CHAR);
sprintf (buf, "The %s blows $N's left arm off.", bullet);
act (buf, ch, NULL, victim, TO_NOTVICT);
make_part (victim, "arm");
if ((obj = get_eq_char (victim, WEAR_ARMS)) != NULL)
take_item (victim, obj);
if ((obj = get_eq_char (victim, WEAR_HOLD)) != NULL)
take_item (victim, obj);
if ((obj = get_eq_char (victim, WEAR_HANDS)) != NULL)
take_item (victim, obj);
if ((obj = get_eq_char (victim, WEAR_WRIST_L)) != NULL)
take_item (victim, obj);
if ((obj = get_eq_char (victim, WEAR_FINGER_L)) != NULL)
take_item (victim, obj);
}
else if (critical == 3)
{
if (IS_LEG_L (victim, LOST_LEG))
return;
SET_BIT (victim->loc_hp[4], LOST_LEG);
if (IS_BLEEDING (victim, BLEEDING_FOOT_L))
REMOVE_BIT (victim->loc_hp[6], BLEEDING_FOOT_L);
sprintf (buf, "The %s blows your left leg off.", bullet);
act (buf, ch, NULL, victim, TO_VICT);
sprintf (buf, "The %s blows $N's left leg off.", bullet);
act (buf, ch, NULL, victim, TO_CHAR);
sprintf (buf, "The %s blows $N's left leg off.", bullet);
act (buf, ch, NULL, victim, TO_NOTVICT);
make_part (victim, "leg");
if (IS_LEG_L (victim, LOST_LEG) && IS_LEG_R (victim, LOST_LEG))
{
if ((obj = get_eq_char (victim, WEAR_LEGS)) != NULL)
take_item (victim, obj);
}
if ((obj = get_eq_char (victim, WEAR_FEET)) != NULL)
take_item (victim, obj);
}
else if (critical == 4)
{
if (IS_LEG_R (victim, LOST_LEG))
return;
SET_BIT (victim->loc_hp[5], LOST_LEG);
if (IS_BLEEDING (victim, BLEEDING_FOOT_R))
REMOVE_BIT (victim->loc_hp[6], BLEEDING_FOOT_R);
sprintf (buf, "The %s blows your right leg off.", bullet);
act (buf, ch, NULL, victim, TO_VICT);
sprintf (buf, "The %s blows $N's right leg off.", bullet);
act (buf, ch, NULL, victim, TO_CHAR);
sprintf (buf, "The %s blows $N's right leg off.", bullet);
act (buf, ch, NULL, victim, TO_NOTVICT);
make_part (victim, "leg");
if (IS_LEG_L (victim, LOST_LEG) && IS_LEG_R (victim, LOST_LEG))
{
if ((obj = get_eq_char (victim, WEAR_LEGS)) != NULL)
take_item (victim, obj);
}
if ((obj = get_eq_char (victim, WEAR_FEET)) != NULL)
take_item (victim, obj);
}
}
}
hurt_person (ch, victim, dam, TRUE);
stop_fighting (ch, TRUE);
ch->fight_timer = 0;
victim->fight_timer = 0;
ch->pcdata->recharge = 100;
free_string (ch->pcdata->targeted);
ch->pcdata->targeted = str_dup ("");
waiting (ch, 12);
return;
}
void
do_target (CHAR_DATA * ch, char *argument)
{
CHAR_DATA *victim;
CHAR_DATA *victim2;
ROOM_INDEX_DATA *chroom;
ROOM_INDEX_DATA *victimroom;
char arg[MIL];
argument = one_argument (argument, arg);
if (IS_NPC (ch))
return;
if (!IS_CREATOR (ch)
&& (!IS_KAHN (ch) || ch->pcdata->powers[KAHN_COMBAT] < 7))
{
do_huh (ch, "");
return;
}
if (!HAS_CANNON (ch))
{
stc ("You dont have your cannon extended.\n\r", ch);
return;
}
if (arg[0] == '\0')
{
stc ("Whom do you wish to target?\n\r", ch);
return;
}
if ((victim = get_pc_area (ch, arg)) == NULL)
{
stc ("They aren't here.\n\r", ch);
return;
}
if (IS_NPC (victim))
{
stc ("Why bother, No challenge in that.\n\r", ch);
return;
}
if (IS_IMMORTAL (victim))
{
stc ("No can do.\n\r", ch);
return;
}
if (IS_IMMORTAL (ch))
{
stc ("HEY! No blasting while you have Immortal powers.\n\r", ch);
return;
}
if (ch->in_room == victim->in_room)
{
stc
("Why snipe someone in the same room as you, why dont you just kill them ?.\n\r",
ch);
return;
}
chroom = ch->in_room;
if (strlen (ch->pcdata->targeted) > 2)
{
if (!str_cmp (ch->pcdata->targeted, victim->name))
{
act ("You are already targeting $N.", ch, NULL, victim, TO_CHAR);
return;
}
if ((victim2 = get_char_area (ch, ch->pcdata->targeted)) != NULL)
{
victimroom = victim2->in_room;
char_from_room (ch);
char_to_room (ch, victimroom);
act ("You stop targeting $N.", ch, NULL, victim2, TO_CHAR);
act ("The #Rred#n triangle suddenly disappears.", ch, NULL, victim2,
TO_VICT);
act ("The #Rred#n triangle on $N's chest suddenly disappears.", ch,
NULL, victim2, TO_NOTVICT);
char_from_room (ch);
char_to_room (ch, chroom);
}
free_string (ch->pcdata->targeted);
ch->pcdata->targeted = str_dup ("");
}
victimroom = victim->in_room;
char_from_room (ch);
char_to_room (ch, victimroom);
act ("You target $N with your laser Triangulation.", ch, NULL, victim,
TO_CHAR);
act ("You notice a tiny #Rred#n triangle moving across your chest.", ch,
NULL, victim, TO_VICT);
act ("You notice a tiny #Rred#n triangle moving across $N's chest.", ch,
NULL, victim, TO_NOTVICT);
char_from_room (ch);
char_to_room (ch, chroom);
free_string (ch->pcdata->targeted);
ch->pcdata->targeted = str_dup (victim->name);
waiting (ch, 9);
return;
}
void
do_cannon (CHAR_DATA * ch, char *argument)
{
char buf[MSL];
char cannon[50];
if (IS_NPC (ch))
return;
if ((!IS_KAHN (ch) || ch->pcdata->powers[KAHN_COMBAT] < 7)
&& !IS_CREATOR (ch))
{
do_huh (ch, "");
return;
}
if (HAS_CANNON (ch))
{
if (IS_NYM (ch, NYM_PLASMACANNON))
{
sprintf (cannon, "#gPl#Gas#gma#c Cannon#n");
REMOVE_BIT (ch->nymbits, NYM_PLASMACANNON);
}
else if (IS_NYM (ch, NYM_LASERCANNON))
{
sprintf (cannon, "#rL#pase#rr#c Cannon#n");
REMOVE_BIT (ch->nymbits, NYM_LASERCANNON);
}
else
{
sprintf (cannon, "#cCannon#n");
}
REMOVE_BIT (ch->nymbits, NYM_SHOULDERCANNON);
sprintf (buf, "Your %s retracts back into your shoulder.\n\r", cannon);
stc (buf, ch);
sprintf (buf, "$n %s retracts back into $s shoulder.", cannon);
act (buf, ch, NULL, NULL, TO_ROOM);
free_string (ch->pcdata->targeted);
ch->pcdata->targeted = str_dup ("");
return;
}
else
{
if (ch->pcdata->powers[KAHN_COMBAT] > 8 || IS_CREATOR (ch))
{
sprintf (cannon, "#gPl#Gas#gma#c Cannon#n");
SET_BIT (ch->nymbits, NYM_PLASMACANNON);
}
else if (ch->pcdata->powers[KAHN_COMBAT] > 7)
{
sprintf (cannon, "#rL#pase#rr#c Cannon#n");
SET_BIT (ch->nymbits, NYM_LASERCANNON);
}
else
{
sprintf (cannon, "#cCannon#n");
}
SET_BIT (ch->nymbits, NYM_SHOULDERCANNON);
sprintf (buf,
"A %s emerges from your shoulder, and locks into position ready to fire.\n\r",
cannon);
stc (buf, ch);
sprintf (buf,
"A wicked looking %s emerges from $n's shoulder, and locks into firing position.",
cannon);
act (buf, ch, NULL, NULL, TO_ROOM);
free_string (ch->pcdata->targeted);
ch->pcdata->targeted = str_dup ("");
return;
}
return;
}
void
do_clawslash (CHAR_DATA * ch, char *argument)
{
char arg[MIL];
CHAR_DATA *victim;
char buf[MSL];
one_argument (argument, arg);
if (IS_NPC (ch))
return;
if (!IS_KAHN (ch))
{
send_to_char ("Huh?\n\r", ch);
return;
}
if (ch->pcdata->powers[KAHN_COMBAT] < 4)
{
send_to_char ("You need level 4 combat to clawslash!\n\r", ch);
return;
}
if (arg[0] == '\0' && ch->fighting == NULL)
{
send_to_char ("Who do you wish to clawslash?\n\r", ch);
return;
}
if ((victim = ch->fighting) == NULL)
{
if ((victim = get_char_room (ch, arg)) == NULL)
{
send_to_char ("They aren't here.\n\r", ch);
return;
}
}
if (!IS_VAMPAFF (ch, VAM_CLAWS))
{
stc ("You havent even got your claws out\n\r", ch);
return;
}
if (IS_ITEMAFF (ch, ITEMA_PEACE))
do_majesty (ch, "");
if (is_safe (ch, victim))
return;
act ("\n\rYou roar savagely as you slash your claws into $N's flesh.", ch,
NULL, victim, TO_CHAR);
act ("\n\r$n roars savagely as $e slashs $s claws into $N's flesh.", ch,
NULL, victim, TO_ROOM);
sprintf (buf, "%s roars and slashes you savagely with their claws.\n\r",
ch->name);
stc (buf, victim);
if (!IS_SET (ch->more, MORE_HAND_FLAME))
{
one_hit (ch, victim, gsn_claws, 0, 0, FALSE);
one_hit (ch, victim, gsn_claws, 0, 0, FALSE);
}
if (IS_SET (ch->more, MORE_HAND_FLAME))
{
if (!IS_NPC (victim))
{
one_hit (ch, victim, gsn_flamingclaws, 0, DAM_FIRE, TRUE);
one_hit (ch, victim, gsn_flamingclaws, 0, DAM_FIRE, TRUE);
one_hit (ch, victim, gsn_flamingclaws, 0, DAM_FIRE, TRUE);
}
else
{
more_hit (ch, victim, gsn_flamingclaws, DAM_FIRE,
number_range (3, 6), TRUE);
}
}
waiting (ch, 12);
return;
}
void
do_kahnform (CHAR_DATA * ch, char *argument)
{
char buf[MSL];
if (IS_NPC (ch))
return;
if (!IS_KAHN (ch))
{
send_to_char ("Huh?\n\r", ch);
return;
}
if ((ch->pcdata->powers[KAHN_FORMS] < 3))
{
send_to_char
("You need to be at 3 in the forms mastery to use that power.\n\r",
ch);
return;
}
if (ch->stance[0] != -1)
do_stance (ch, "");
if (ch->mounted == IS_RIDING)
do_dismount (ch, "");
if (IS_AFFECTED (ch, AFF_POLYMORPH) && !IS_VAMPAFF (ch, VAM_DISGUISED))
{
send_to_char ("Not while polymorphed.\n\r", ch);
return;
}
if (!IS_SET (ch->polyaff, POLY_KAHNFORM))
{
send_to_char ("Your body grows and distorts.\n\r", ch);
act ("$n's body grows and distorts.", ch, NULL, NULL, TO_ROOM);
SET_BIT (ch->affected_by, AFF_POLYMORPH);
SET_BIT (ch->vampaff, VAM_DISGUISED);
SET_BIT (ch->polyaff, POLY_KAHNFORM);
free_string (ch->morph);
ch->morph = str_dup (get_form (ch));
return;
}
else if (IS_SET (ch->polyaff, POLY_KAHNFORM))
{
send_to_char ("Your body shrinks and distorts.\n\r", ch);
act ("$n's body shrinks and distorts.", ch, NULL, NULL, TO_ROOM);
REMOVE_BIT (ch->polyaff, POLY_KAHNFORM);
free_string (ch->morph);
ch->morph = str_dup (get_form (ch));
if (strlen (ch->morph) < 2)
{
REMOVE_BIT (ch->affected_by, AFF_POLYMORPH);
REMOVE_BIT (ch->vampaff, VAM_DISGUISED);
}
return;
}
return;
}
void
do_rakshasaform (CHAR_DATA * ch, char *argument)
{
char buf[MSL];
if (IS_NPC (ch))
return;
if (!IS_RAKSHASA (ch))
{
send_to_char ("Huh?\n\r", ch);
return;
}
if (ch->pcdata->powers[KAHN_FORMS] < 8)
{
send_to_char
("You need to be at 8 in the forms mastery to use that power.\n\r",
ch);
return;
}
if (!IS_SET (ch->polyaff, POLY_DEMONFORM)
&& !IS_SET (ch->polyaff, POLY_KAHNFORM))
{
stc
("You need to be in demon and kahn form to grow into your true form.\n\r",
ch);
return;
}
if (!IS_SET (ch->polyaff, POLY_DEMONFORM))
{
stc ("You need to be in demon form to grow into your true form.\n\r",
ch);
return;
}
if (!IS_SET (ch->polyaff, POLY_KAHNFORM))
{
stc ("You need to be in kahn form to grow into your true form.\n\r",
ch);
return;
}
if (IS_AFFECTED (ch, AFF_POLYMORPH) && !IS_VAMPAFF (ch, VAM_DISGUISED))
{
send_to_char ("Not while polymorphed.\n\r", ch);
return;
}
if (!IS_SET (ch->polyaff, POLY_RAKSHASA))
{
send_to_char ("Your body grows and distorts.\n\r", ch);
act ("$n's body grows and distorts.", ch, NULL, NULL, TO_ROOM);
SET_BIT (ch->affected_by, AFF_POLYMORPH);
SET_BIT (ch->vampaff, VAM_DISGUISED);
SET_BIT (ch->polyaff, POLY_RAKSHASA);
free_string (ch->morph);
ch->morph = str_dup (get_form (ch));
return;
}
else if (IS_SET (ch->polyaff, POLY_RAKSHASA))
{
send_to_char ("Your body shrinks and distorts.\n\r", ch);
act ("$n's body shrinks and distorts.", ch, NULL, NULL, TO_ROOM);
REMOVE_BIT (ch->polyaff, POLY_RAKSHASA);
free_string (ch->morph);
ch->morph = str_dup (get_form (ch));
if (strlen (ch->morph) < 2)
{
REMOVE_BIT (ch->affected_by, AFF_POLYMORPH);
REMOVE_BIT (ch->vampaff, VAM_DISGUISED);
}
return;
}
return;
}
void
do_gaiasight (CHAR_DATA * ch, char *argument)
{
if (IS_NPC (ch))
return;
if (!IS_KAHN (ch))
{
send_to_char ("Huh?\n\r", ch);
return;
}
if (ch->pcdata->powers[KAHN_COMBAT] < 0)
{
send_to_char ("You need at least 1 in Combat first.\n\r", ch);
return;
}
if (IS_SET (ch->act, PLR_HOLYLIGHT))
{
REMOVE_BIT (ch->act, PLR_HOLYLIGHT);
send_to_char ("You're eyes turn back to normal.\n\r", ch);
}
else
{
SET_BIT (ch->act, PLR_HOLYLIGHT);
send_to_char ("You are gifted with the sight of gaia.\n\r", ch);
ch->move -= 750;
}
return;
}
void
do_stalk (CHAR_DATA * ch, char *argument)
{
char arg[MSL];
CHAR_DATA *victim;
bool tracer = FALSE;
argument = one_argument (argument, arg);
if (IS_NPC (ch))
return;
if (!IS_KAHN (ch))
{
send_to_char ("Huh?\n\r", ch);
return;
}
if (ch->pcdata->powers[KAHN_COMBAT] < 3)
{
send_to_char ("You need at least 3 in the Combat mastery first!\n\r",
ch);
return;
}
if (arg[0] == '\0')
{
send_to_char ("Stalk who?\n\r", ch);
return;
}
if (ch->position == POS_FIGHTING)
{
send_to_char ("No way! You are fighting.\n\r", ch);
return;
}
if ((victim = get_char_world (ch, arg)) == NULL)
{
send_to_char ("Nobody by that name.\n\r", ch);
return;
}
if (ch == victim)
{
send_to_char ("Not on yourself!\n\r", ch);
return;
}
if (victim->in_room == NULL || victim->in_room == ch->in_room)
{
send_to_char ("Nothing happens.\n\r", ch);
return;
}
if (is_inarena (victim))
return;
if (is_inarena (ch))
return;
if (travelsafe (ch, victim))
return;
if (IS_SET (victim->evenmore, EM_JAILED))
{
send_to_char ("What??? You wish to go to jail too?\n\r", ch);
return;
}
if (!IS_NPC (victim) && IS_AFFECTED (victim, AFF_TRACER)
&& ch->pcdata->powers[KAHN_COMBAT] > 5)
{
tracer = TRUE;
}
if (!tracer)
{
if (has_fighttimer (ch))
return;
}
if (!IS_NPC (victim) && !IS_IMMUNE (victim, IMM_SUMMON))
{
if (tracer)
{
act ("#PYou locate $N's tracer scent and leap into the bushes.", ch,
NULL, victim, TO_CHAR);
}
else
{
send_to_char ("You cannot find a starting point to hunt them.\n\r",
ch);
return;
}
}
if (!tracer)
{
act ("#PYou sniff the air and run after $N in a frenzy.", ch, NULL,
victim, TO_CHAR);
}
act ("#P$n sniffs the air and then leaps into the bushes!", ch, NULL, NULL,
TO_ROOM);
char_from_room (ch);
char_to_room (ch, victim->in_room);
act ("#P$n suddenly leaps out of the bushes in front of you!", ch, NULL,
victim, TO_VICT);
act ("#P$n suddenly leaps out of the bushes in front of $N.", ch, NULL,
victim, TO_ROOM);
do_look (ch, "");
return;
}
void
do_warmth (CHAR_DATA * ch, char *argument)
{
if (IS_NPC (ch))
return;
else if (!IS_KAHN (ch))
{
send_to_char ("Huh?\n\r", ch);
return;
}
else if (ch->pcdata->powers[KAHN_FORMS] < 0)
{
send_to_char ("Huh?\n\r", ch);
return;
}
else if (ch->move < 500)
{
send_to_char ("You don't have enough vitality.\n\r", ch);
return;
}
else if (ch->position == POS_FIGHTING)
{
send_to_char ("You cannot do this whilst fighting.\n\r", ch);
return;
}
ch->move = ch->move - 500;
ch->hit = ch->hit + (1000 * ch->pcdata->powers[KAHN_FORMS]);
if (ch->hit > ch->max_hit)
ch->hit = ch->max_hit;
update_pos (ch);
send_to_char ("Gaia's warmth encompasses you.\n\r", ch);
act ("$n is surrounded in the warmth of Gaia.", ch, NULL, NULL, TO_ROOM);
waiting (ch, 12);
return;
}
void
do_clawhold (CHAR_DATA * ch, char *argument)
{
if (IS_NPC (ch))
return;
if (!IS_KAHN (ch))
{
send_to_char ("Huh?\n\r", ch);
return;
}
if (ch->pcdata->powers[KAHN_FORMS] < 4)
{
send_to_char
("You havn't learned how to use your claws in such a manner.\n\r",
ch);
return;
}
if (!IS_SET (ch->evenmore, EM_JAWLOCK))
{
send_to_char
("You roar and latch your claws onto your prey preventing them from escaping.\n\r",
ch);
SET_BIT (ch->evenmore, EM_JAWLOCK);
return;
}
else if (IS_SET (ch->evenmore, EM_JAWLOCK))
{
send_to_char ("You release your grip with a soft growl.\n\r", ch);
REMOVE_BIT (ch->evenmore, EM_JAWLOCK);
return;
}
return;
}
void
do_blitz (CHAR_DATA * ch, char *argument)
{
CHAR_DATA *vch;
CHAR_DATA *vch_next;
int dam;
int number_hit = 0;
char buf[MSL];
if (IS_NPC (ch))
return;
if (!IS_KAHN (ch) && !IS_XX (ch, XX_RAKKAHN))
{
send_to_char ("Huh?\n\r", ch);
return;
}
if (ch->pcdata->powers[KAHN_RANKS] < 5 && !IS_XX (ch, XX_RAKKAHN))
{
send_to_char ("You need level 5 Ranking to blitz.\n\r", ch);
return;
}
if (!IS_VAMPAFF (ch, VAM_CLAWS))
{
stc ("You need your claws out if your going to blitz.\n\r", ch);
return;
}
act ("You roar in outrage and attack all in the room.", ch, NULL, NULL,
TO_CHAR);
act ("$n roars and savagly attacks all in the room.", ch, NULL, NULL,
TO_ROOM);
for (vch = char_list; vch != NULL; vch = vch_next)
{
vch_next = vch->next;
if (vch->in_room == NULL)
continue;
if (!IS_NPC (vch))
continue;
if (ch == vch)
continue;
if (number_hit > 4)
continue;
if (vch->in_room == ch->in_room)
{
if (can_see (ch, vch))
{
if (!IS_SET (ch->more, MORE_HAND_FLAME))
{
one_hit (ch, vch, gsn_claws, 0, 0, FALSE);
one_hit (ch, vch, gsn_claws, 0, 0, FALSE);
if (ch->wpn[0] >= 200)
{
one_hit (ch, vch, gsn_claws, 0, 0, FALSE);
one_hit (ch, vch, gsn_claws, 0, 0, FALSE);
}
}
else if (IS_SET (ch->more, MORE_HAND_FLAME))
{
one_hit (ch, vch, gsn_flamingclaws, 0, 0, FALSE);
one_hit (ch, vch, gsn_flamingclaws, 0, 0, FALSE);
if (ch->wpn[0] >= 200)
{
one_hit (ch, vch, gsn_flamingclaws, 0, 0, FALSE);
one_hit (ch, vch, gsn_flamingclaws, 0, 0, FALSE);
}
}
if (ch->wpn[10] >= 200 && IS_VAMPAFF (ch, VAM_FANGS))
{
one_hit (ch, vch, gsn_fangs, 0, 0, FALSE);
one_hit (ch, vch, gsn_fangs, 0, 0, FALSE);
}
number_hit++;
}
}
}
waiting (ch, 15);
return;
}
void
do_icetouch (CHAR_DATA * ch, char *argument)
{
CHAR_DATA *victim = NULL;
int dam = number_range (800, 1500);
char buf[MSL];
char arg[MIL];
one_argument (argument, arg);
if (IS_NPC (ch))
return;
if (!IS_KAHN (ch))
{
send_to_char ("Huh?\n\r", ch);
return;
}
dam *= ch->pcdata->powers[KAHN_COMBAT];
if (ch->pcdata->powers[KAHN_COMBAT] < 5)
{
send_to_char ("You need level 5 combat to icetouch!\n\r", ch);
return;
}
if (arg[0] == '\0' && ch->fighting == NULL)
{
send_to_char ("Who do you wish to icetouch?\n\r", ch);
return;
}
if ((victim = ch->fighting) == NULL)
{
if ((victim = get_char_room (ch, arg)) == NULL)
{
send_to_char ("They aren't here.\n\r", ch);
return;
}
}
if (IS_ITEMAFF (ch, ITEMA_PEACE))
do_majesty (ch, "");
if (is_safe (ch, victim))
return;
if (ch->mana < 300)
{
send_to_char ("You don't have enough mystical power for that.\n\r", ch);
return;
}
act ("\n\rYou say, '#yGaia guide my freezing touch!#n'\n\r", ch, NULL, NULL,
TO_CHAR);
act ("\n\r$n says, '#yGaia guide my freezing touch!#n'\n\r", ch, NULL, NULL,
TO_ROOM);
act ("Your claws glow blue as you slash towards $N's body.\n\r", ch, NULL,
victim, TO_CHAR);
act ("$n swings their claws down towards you.\n\r", ch, NULL, victim,
TO_VICT);
act ("$n swings their claws down towards $N.\n\r", ch, NULL, victim,
TO_ROOM);
act ("A loud howl is heard, and a mysterious fog fills the land.\n\r", ch,
NULL, NULL, TO_ROOM);
act ("Your claws are surround by an icy aura.\n\r", ch, NULL, NULL,
TO_CHAR);
act ("You scream loudly as the icy haze slices into your body.\n\r", victim,
NULL, NULL, TO_CHAR);
act ("$n screams loudly as the icy haze slices into $s's body.\n\r", victim,
NULL, NULL, TO_ROOM);
damage (ch, victim, dam, gsn_ftouch, DAM_COLD, FALSE, FALSE, FALSE);
ch->mana -= 300;
waiting (ch, 12);
return;
}
void
do_primalsense (CHAR_DATA * ch, char *argument)
{
if (IS_NPC (ch))
return;
if (!IS_KAHN (ch))
{
send_to_char ("Huh?\n\r", ch);
return;
}
if (ch->pcdata->powers[KAHN_RANKS] < 3)
{
send_to_char
("You are a meer kitten and cannot use your primal instincts.\n\r",
ch);
return;
}
if (IS_MORE (ch, MORE_GUARDIAN))
{
guardian_message (ch);
send_to_char ("You feel blind as your instincts leave you.\n\r", ch);
send_to_char ("The security of your instincts leaves you.\n\r", ch);
act ("$n looks dazed as their instincts leave them.", ch, NULL, NULL,
TO_ROOM);
REMOVE_BIT (ch->more, MORE_GUARDIAN);
return;
}
send_to_char ("Your instincts return to you providing security.\n\r", ch);
act ("$n loses their dazed look as their instincts return to them.", ch,
NULL, NULL, TO_ROOM);
guardian_message (ch);
send_to_char ("Your instincts have arrived.\n\r", ch);
SET_BIT (ch->more, MORE_GUARDIAN);
return;
}
void
do_darkroar (CHAR_DATA * ch, char *argument)
{
CHAR_DATA *victim;
AFFECT_DATA af;
char arg[MSL];
int sn;
argument = one_argument (argument, arg);
if (IS_NPC (ch))
return;
if (!IS_KAHN (ch))
{
send_to_char ("Huh?\n\r", ch);
return;
}
if (ch->pcdata->powers[KAHN_RANKS] < 2)
{
send_to_char ("You need level 2 in Ranks first!\n\r", ch);
return;
}
if (arg[0] == '\0')
{
send_to_char ("Roar at who?\n\r", ch);
return;
}
if ((victim = get_char_room (ch, arg)) == NULL)
{
send_to_char ("They are not here.\n\r", ch);
return;
}
if (is_safe (ch, victim))
return;
if (is_affected (victim, gsn_equilibrium))
{
send_to_char ("You cannot roar at them anymore!\n\r", ch);
return;
}
if ((sn = skill_lookup ("equilibrium")) < 0)
return;
af.type = sn;
af.duration = ch->spl[PURPLE_MAGIC];
af.location = APPLY_HITROLL;
af.modifier = -250;
af.bitvector = 0;
affect_to_char (victim, &af);
send_to_char ("You roar loudly at your victim!\n\r", ch);
act ("$n roars loudly at you shattering your eardrums!", ch, NULL, victim,
TO_VICT);
waiting (ch, 9);
}
void
do_gaiatouch (CHAR_DATA * ch, char *argument)
{
OBJ_DATA *obj;
char arg[MIL];
char buf[MSL];
argument = one_argument (argument, arg);
if (IS_NPC (ch))
return;
if (!IS_KAHN (ch))
{
send_to_char ("Huh?\n\r", ch);
return;
}
if (ch->pcdata->powers[KAHN_RANKS] < 2)
{
send_to_char ("Nothing Happens.\n\r", ch);
return;
}
if (arg[0] == '\0')
{
send_to_char ("What object do you wish gaia to touch?\n\r", ch);
return;
}
if (!(obj = get_obj_carry (ch, arg)))
{
send_to_char ("You don't have that.\n\r", ch);
return;
}
if (IS_SET (obj->quest, QUEST_ARTIFACT))
{
stc ("Not on Artifacts.\n\r", ch);
return;
}
if (obj->chobj != NULL)
{
send_to_char ("Somehow the object seems to resist gaia's touch.\n\r",
ch);
return;
}
if (IS_SET (obj->extra_flags, ITEM_VANISH))
{
stc ("Not on Illusions.\n\r", ch);
return;
}
if (IS_SET (obj->spectype, SITEM_GAIATOUCHED))
{
act ("$p is already filled with the power of gaia.", ch, obj, NULL,
TO_CHAR);
return;
}
if (IS_SET (obj->spectype, SITEM_MASTERY))
{
act ("$p is a mastery item.", ch, obj, NULL, TO_CHAR);
return;
}
if (ch->pcdata->power[POWER_CURRENT] < 5000)
{
sprintf
(buf,
"You must have 5000 %s power points to infuse items with gaia's energy.\n\r",
get_class (ch));
stc (buf, ch);
return;
}
if (ch->pcdata->crystal < 5)
{
send_to_char ("You dont have the required 5 power crystals\n\r", ch);
return;
}
ch->pcdata->power[POWER_CURRENT] -= 5000;
ch->pcdata->crystal -= 5;
SET_BIT (obj->spectype, SITEM_GAIATOUCHED);
add_affect (obj, APPLY_HITROLL,
(number_fuzzy (9) * ch->pcdata->powers[KAHN_RANKS]));
add_affect (obj, APPLY_DAMROLL,
(number_fuzzy (9) * ch->pcdata->powers[KAHN_RANKS]));
add_affect (obj, APPLY_AC,
(-number_fuzzy (20) * ch->pcdata->powers[KAHN_RANKS]));
act ("$p glows with gaia's power.", ch, obj, NULL, TO_CHAR);
act ("$p is glowing with gaia's power in $n's hands.", ch, obj, NULL,
TO_ROOM);
return;
}
void
do_savageshred (CHAR_DATA * ch, char *argument)
{
CHAR_DATA *victim;
OBJ_DATA *obj;
char arg[MIL];
int dam = number_range (2500, 3000);
int limb;
char buf[MSL];
argument = one_argument (argument, arg);
if (IS_NPC (ch))
return;
if (!IS_KAHN (ch) && !IS_WEREWOLF (ch))
{
if (IS_RNPC (ch))
do_say (ch, "hmm...");
send_to_char ("Huh?\n\r", ch);
return;
}
if (IS_KAHN (ch))
{
if (ch->pcdata->powers[KAHN_FORMS] < 5)
{
send_to_char ("Your forms are not mastered enough.\n\r", ch);
return;
}
if (!IS_VAMPAFF (ch, VAM_CLAWS))
{
stc ("You havent even got your claws out\n\r", ch);
return;
}
}
else
{
if (get_tribe (ch, TRIBE_RED_TALONS) < 4)
{
stc
("You need atleast 4 on the Red Talons tribe gift before you can use savage shred.\n\r",
ch);
return;
}
if (!IS_VAMPAFF (ch, VAM_CLAWS))
{
stc ("You havent even got your claws out\n\r", ch);
return;
}
}
if (get_eq_char (ch, WEAR_WIELD) != NULL
&& get_eq_char (ch, WEAR_HOLD) != NULL)
{
stc ("Your claws are not free to do this.\n\r", ch);
return;
}
if (arg[0] == '\0' && ch->fighting == NULL)
{
send_to_char ("Who do you wish to shred to tiny ribbons?\n\r", ch);
return;
}
if ((victim = ch->fighting) == NULL)
{
if ((victim = get_char_room (ch, arg)) == NULL)
{
send_to_char ("They aren't here.\n\r", ch);
return;
}
}
if (is_safe (ch, victim))
return;
act ("\n\rYou leap upon $N and savagly shred them to tiny ribbons.", ch,
NULL, victim, TO_CHAR);
act ("\n\r$n leaps upon you and #Rshreds#n you to ribbons.", ch, NULL,
victim, TO_VICT);
act ("\n\r$n leaps on $N and shreds them into tiny ribbons.", ch, NULL,
victim, TO_NOTVICT);
sprintf (buf,
"%s's savage claw shred hits you incredibly hard #R[#r%i#R]#n.\n\r",
ch->name, dam);
stc (buf, victim);
if (!IS_NPC (victim))
{
sprintf (buf,
"Your savage claw shred hits %s incredibly hard #R[#r%i#R]#n.\n\r",
victim->name, dam);
stc (buf, ch);
}
if (IS_NPC (victim))
{
sprintf (buf,
"Your savage claw shred hits %s incredibly hard #R[#r%i#R]#n.\n\r",
victim->short_descr, dam);
stc (buf, ch);
}
limb = number_range (1, 2);
if (!limbsafe (ch, victim))
{
if (number_percent () <= 75)
{
make_part (victim, "arm");
if (limb == 1)
{
if (!IS_ARM_R (victim, LOST_ARM))
SET_BIT (victim->loc_hp[3], LOST_ARM);
if (!IS_BLEEDING (victim, BLEEDING_ARM_R))
SET_BIT (victim->loc_hp[6], BLEEDING_ARM_R);
if (IS_BLEEDING (victim, BLEEDING_HAND_R))
REMOVE_BIT (victim->loc_hp[6], BLEEDING_HAND_R);
SET_BIT (victim->loc_hp[6], BLEEDING_ARM_R);
if ((obj = get_eq_char (victim, WEAR_ARMS)) != NULL)
take_item (victim, obj);
if ((obj = get_eq_char (victim, WEAR_WIELD)) != NULL)
take_item (victim, obj);
if ((obj = get_eq_char (victim, WEAR_HANDS)) != NULL)
take_item (victim, obj);
if ((obj = get_eq_char (victim, WEAR_WRIST_R)) != NULL)
take_item (victim, obj);
if ((obj = get_eq_char (victim, WEAR_FINGER_R)) != NULL)
take_item (victim, obj);
}
else if (limb > 1)
{
if (!IS_ARM_L (victim, LOST_ARM))
SET_BIT (victim->loc_hp[2], LOST_ARM);
if (!IS_BLEEDING (victim, BLEEDING_ARM_L))
SET_BIT (victim->loc_hp[6], BLEEDING_ARM_L);
if (IS_BLEEDING (victim, BLEEDING_HAND_L))
REMOVE_BIT (victim->loc_hp[6], BLEEDING_HAND_L);
if ((obj = get_eq_char (victim, WEAR_ARMS)) != NULL)
take_item (victim, obj);
if ((obj = get_eq_char (victim, WEAR_HOLD)) != NULL)
take_item (victim, obj);
if ((obj = get_eq_char (victim, WEAR_HANDS)) != NULL)
take_item (victim, obj);
if ((obj = get_eq_char (victim, WEAR_WRIST_L)) != NULL)
take_item (victim, obj);
if ((obj = get_eq_char (victim, WEAR_FINGER_L)) != NULL)
take_item (victim, obj);
}
}
}
hurt_person (ch, victim, dam, 0);
waiting (ch, 12);
return;
}
void
do_kahns (CHAR_DATA * ch, char *argument)
{
char buf[MSL];
CHAR_DATA *gch;
if (IS_NPC (ch))
return;
if (!IS_KAHN (ch))
{
send_to_char ("Huh?\n\r", ch);
return;
}
send_to_char ("The following Kahn are stalking about.\n\r", ch);
send_to_char
("#G[ #gName #G] [ #gLife #G] [ #gMp #G] [ #gVital #G] [ #gExp#G ]\n\r",
ch);
for (gch = char_list; gch != NULL; gch = gch->next)
{
if (IS_NPC (gch))
continue;
if (!IS_KAHN (gch))
continue;
if (!can_see (ch, gch))
continue;
sprintf (buf,
"#8[#3%-12s#8] [#3%10d#8] [#3%10d#8] [#3%10d#8] [#3%11ld#8]#n\n\r",
capitalize (gch->name),
gch->hit, gch->mana, gch->move, gch->exp);
send_to_char (buf, ch);
}
return;
}
void
do_gaiabless (CHAR_DATA * ch, char *argument)
{
CHAR_DATA *victim;
char arg[MIL];
AFFECT_DATA af;
int mcost = 200, gen, sn;
int level;
gen = ch->pcdata->powers[KAHN_RANKS];
one_argument (argument, arg);
if (IS_NPC (ch))
return;
if (!IS_KAHN (ch))
{
send_to_char ("Huh?\n\r", ch);
return;
}
if (ch->pcdata->powers[KAHN_RANKS] < 4)
{
send_to_char ("You haven't learned this skill yet.\n\r", ch);
return;
}
if (ch->mana < mcost)
{
send_to_char
("You need more mystical power before you can use this skill.\n\r",
ch);
return;
}
if (arg[0] == '\0')
{
send_to_char ("Wish the bless of Gaia on whom?\n\r", ch);
return;
}
if ((victim = get_char_room (ch, arg)) == NULL)
{
send_to_char ("They aren't here.\n\r", ch);
return;
}
if ((sn = skill_lookup ("gaia bless")) < 0)
return;
if (is_affected (victim, sn))
{
send_to_char ("They are already blessed by gaia.\n\r", ch);
return;
}
(*skill_table[sn].spell_fun) (sn, level, ch, victim);
waiting (ch, 9);
ch->mana -= mcost;
return;
}
void
do_rakmwarp (CHAR_DATA * ch, char *argument)
{
CHAR_DATA *victim;
char arg[MIL];
int damage;
argument = one_argument (argument, arg);
if (IS_NPC (ch))
return;
if (!IS_RAKSHASA (ch))
{
send_to_char ("Huh?\n\r", ch);
return;
}
if (ch->pcdata->powers[KAHN_FORMS] < 6)
{
send_to_char ("You require level 6 forms to use mindwarp.\n\r", ch);
return;
}
if (arg[0] == '\0')
{
send_to_char ("Who do you want to Mind Warp?\n\r", ch);
return;
}
if ((victim = get_char_room (ch, arg)) == NULL)
{
send_to_char ("They are not here.\n\r", ch);
return;
}
if (victim->position != POS_FIGHTING
&& victim->hit < (victim->max_hit * 0.85))
{
send_to_char ("Nothing happens.\n\r", ch);
if (!IS_NPC (victim) && ch != victim && IS_MORE (victim, MORE_GUARDIAN))
{
guardian_message (victim);
act ("$n just failed to use Mind Warp on you.", ch, NULL, victim,
TO_VICT);
}
return;
}
if (is_safe (ch, victim))
{
if (!IS_NPC (victim) && ch != victim && IS_MORE (victim, MORE_GUARDIAN))
{
guardian_message (victim);
act ("$n just failed to use Mind Warp on you.", ch, NULL, victim,
TO_VICT);
}
return;
}
damage = victim->max_hit * 0.15;
act ("A look of concentration crosses $n's face.", ch, NULL, NULL, TO_ROOM);
send_to_char ("You feel dizzy as your mind is warped!\n\r", victim);
act ("$n lookes dazed as $s mind is warped!", victim, NULL, NULL, TO_ROOM);
if (!IS_NPC (victim) && ch != victim && IS_MORE (victim, MORE_GUARDIAN))
{
guardian_message (victim);
act ("$n just used Mind warp on you.", ch, NULL, victim, TO_VICT);
}
hurt_person (ch, victim, damage, 0);
stop_fighting (victim, TRUE);
if (victim->position > POS_STUNNED)
victim->position = POS_STUNNED;
waiting (ch, 12);
return;
}
void
do_cmist (CHAR_DATA * ch, char *argument)
{
if (IS_NPC (ch))
return;
if (!IS_SHAAHOUL (ch))
{
do_huh (ch, "");
return;
}
if (IS_SET (ch->in_room->added_flags, ROOM2_CMIST))
{
stc ("You banish the mist in the room!\n\r", ch);
act ("$n banishes the mist in the room.", ch, NULL, NULL, TO_ROOM);
REMOVE_BIT (ch->in_room->added_flags, ROOM2_CMIST);
ch->in_room->wardtime = 0;
return;
}
SET_BIT (ch->in_room->added_flags, ROOM2_CMIST);
stc ("You create a mist in the room making it near impossible to see.\n\r",
ch);
ch->in_room->wardtime = 120;
act ("$n creates a mist in the room making it near impossible to see.\n\r",
ch, NULL, NULL, TO_ROOM);
return;
}