kensai.c
demise/src/kensai.c · 103.0 KB
From the archive dodbackup-final.tar.gz
Download the archive « Back to the archive contents
/*********************************************************************************************************
* *
* *
* *
* The weaponmaster/kensai, an evolved highlander, *
* Coded by Corim aka Infinity *
* *
* aka Gunnar Trulsrud *
* *
* *
* *
* *
* *
* *
*********************************************************************************************************/
/*
Combos:
1. Flaming Phoenix Blade: Lowslice, Backslash, Cleave.
2. Skewer of Enervation: Neckslice, Whipslash, Swordthrust.
3. Remoraz Frost Razors: Facestab, Sideswipe, Crosscut.
4. Tarasque's Earth Cleaver: Cleave, Highslash, Downstab.
*/
#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"
bool
limbsafe (CHAR_DATA * ch, CHAR_DATA * victim)
{
bool limbsafe = FALSE;
if (IS_NPC (victim))
return FALSE;
if (IS_KENSAI (victim) && IS_COR (victim, COR_TOUGHNESS)
&& number_range (1, 10) > 1)
{
limbsafe = TRUE;
}
if (IS_ELF (victim) && IS_POLYAFF (victim, POLY_ELFFORM)
&& number_percent () <= 65)
{
limbsafe = TRUE;
}
if (IS_BSD (victim) && IS_POLYAFF (victim, POLY_BSDFORM)
&& number_percent () <= 65)
{
limbsafe = TRUE;
}
if (IS_CREATOR (victim))
{
limbsafe = TRUE;
}
if (limbsafe)
{
act ("Your attack failed to dismember $N.", ch, NULL, victim, TO_CHAR);
act ("$n attack failed to dismember you.", ch, NULL, victim, TO_VICT);
return TRUE;
}
return FALSE;
}
bool
limbsafe2 (CHAR_DATA * victim)
{
if (IS_NPC (victim))
return FALSE;
if (IS_KENSAI (victim) && IS_COR (victim, COR_TOUGHNESS)
&& number_range (1, 10) > 1)
return TRUE;
if (IS_BSD (victim) && IS_POLYAFF (victim, POLY_BSDFORM)
&& number_percent () <= 65)
return TRUE;
if (IS_CREATOR (victim))
return TRUE;
return FALSE;
}
int
kensai_dam (CHAR_DATA * ch, CHAR_DATA * victim, int dam, bool weapon,
bool right)
{
OBJ_DATA *blade;
int stance, exdam;
bool doubledam = FALSE;
bool halfdam = FALSE;
char buf[MSL];
if (IS_SET (mudconfig->world_affects, WORLD_DOUBLEDAMCAP))
doubledam = TRUE;
if (IS_SET (mudconfig->world_affects, WORLD_HALFDAMCAP))
halfdam = TRUE;
dam = number_range (10, 20);
exdam = char_damroll (ch);
dam = dam + exdam;
sprintf (buf, "check one: %d", dam);
// do_say (ch, buf);
if (dam <= 0)
dam = 2;
if (!IS_AWAKE (victim))
dam *= 2;
if (IS_NPC (ch) || !IS_KENSAI (ch))
return dam;
if (weapon)
{
if (right)
{
if ((blade = get_eq_char (ch, WEAR_WIELD)) == NULL)
{
return dam;
}
else
{
if (IS_SET (blade->spectype, SITEM_HIGHLANDER)
|| IS_SET (blade->quest, QUEST_ARTIFACT))
dam *= 4.5;
}
}
else if (!right)
{
if ((blade = get_eq_char (ch, WEAR_HOLD)) == NULL)
{
return dam;
}
else
{
if (IS_SET (blade->spectype, SITEM_HIGHLANDER)
|| IS_SET (blade->quest, QUEST_ARTIFACT))
dam *= 4.5;
}
}
}
else
{
if (IS_SET (ch->itemaffect, ITEMA_HIGHLANDER))
dam *= 1.2;
}
dam *= 2;
sprintf (buf, "check two: %d", dam);
// do_say (ch, buf);
if (!IS_NPC (ch))
{
if (!weapon)
{
dam = dam + (dam * ((ch->wpn[0]) / 100));
}
else
{
dam = dam + (dam * ((ch->wpn[1]) / 100));
}
}
sprintf (buf, "check three: %d", dam);
// do_say (ch, buf);
if (!IS_NPC (ch))
{
stance = ch->stance[0];
if (IS_STANCE (ch, STANCE_NORMAL))
dam *= 1.25;
else
dam = dambonus (ch, victim, dam, stance);
}
sprintf (buf, "check four: %d", dam);
// do_say (ch, buf);
if (dam <= 0)
dam = 2;
if (IS_NPC (victim))
{
if (doubledam)
dam *= 2;
if (halfdam)
dam /= 2;
}
sprintf (buf, "check five: %d", dam);
//do_say (ch, buf);
sprintf (buf, "check six: %d", dam / 2);
// do_say (ch, buf);
return dam;
}
void
do_upgrade (CHAR_DATA * ch, char *argument)
{
char buf[MSL];
int stat = 100000;
if (IS_NPC (ch))
return;
if (!IS_HIGHLANDER (ch))
{
if (IS_DRACONIAN (ch) && !IS_DRAGON (ch))
{
do_devolve (ch, "");
return;
}
if (IS_ELF (ch) && !IS_XXX (ch, XXX_CANPICK))
{
do_elfevolve (ch, "");
return;
}
stc ("Huh?\n\r", ch);
return;
}
if (IS_WM (ch))
{
do_huh (ch, "");
return;
}
if (ch->legendeq < 15)
{
stc
("You need all 15 pieces of legend equipment before you can do this.\n\r",
ch);
return;
}
do_remove (ch, "all");
do_mclear (ch, "self");
if (ch->max_hit < stat)
{
sprintf (buf, "You need %d life essence before you can do this.\n\r",
stat);
stc (buf, ch);
return;
}
if (ch->max_mana < stat)
{
sprintf (buf, "You need %d mystical energy before you can do this.\n\r",
stat);
stc (buf, ch);
return;
}
if (ch->max_move < stat)
{
sprintf (buf, "You need %d vitality before you can do this.\n\r", stat);
stc (buf, ch);
return;
}
if (ch->pcdata->quest < 10000)
{
stc ("You dont have the required credits.\n\r", ch);
return;
}
if (!IS_SET (ch->evenmore, EM_CREATED))
{
stc ("You havent attained your mastery.\n\r", ch);
return;
}
if (ch->quickcount < 22)
{
stc ("You need all your quickening powers.\n\r", ch);
return;
}
if (ch->race < 5)
{
stc ("You need atleast 5 Status to Evolve.\n\r", ch);
return;
}
classtable[class_number (ch)].classed--;
ch->class = 0;
ch->class = 8208;
ch->pcdata->quest -= 10000;
SET_BIT (ch->corbits, COR_HYBRID);
SET_BIT (ch->corbits, COR_EVOLVED);
REMOVE_BIT (ch->evenmore, EM_CREATED);
do_remove (ch, "all");
stc
("You have attained the highest honor a Highlander can achieve, you have become a Kensai.\n\r",
ch);
sprintf (buf, "%s has evolved into a Kensai.\n\r", ch->name);
do_info (ch, buf);
return;
}
void
do_techniques (CHAR_DATA * ch, char *argument)
{
char arg1[MIL];
char arg2[MIL];
char buf[MSL];
char buf2[MSL];
int cost = 150000;
int pwr = 1;
argument = one_argument (argument, arg1);
argument = one_argument (argument, arg2);
if (IS_NPC (ch))
return;
if (!IS_WM (ch))
{
do_huh (ch, "");
return;
}
if (IS_WPNM (ch, WPM_UNARMED))
pwr++;
if (IS_WPNM (ch, WPM_SLICE))
pwr++;
if (IS_WPNM (ch, WPM_STAB))
pwr++;
if (IS_WPNM (ch, WPM_SLASH))
pwr++;
if (IS_WPNM (ch, WPM_WHIP))
pwr++;
if (IS_WPNM (ch, WPM_CLAW))
pwr++;
if (IS_WPNM (ch, WPM_BLAST))
pwr++;
if (IS_WPNM (ch, WPM_POUND))
pwr++;
if (IS_WPNM (ch, WPM_CRUSH))
pwr++;
if (IS_WPNM (ch, WPM_GREP))
pwr++;
if (IS_WPNM (ch, WPM_BITE))
pwr++;
if (IS_WPNM (ch, WPM_PIERCE))
pwr++;
if (IS_WPNM (ch, WPM_SUCK))
pwr++;
cost = cost * pwr;
if (arg1[0] == '\0')
{
if (pwr >= 14)
{
do_techniques (ch, "show");
return;
}
cent_to_char
("#r--------------------------------------------------------------#n",
ch);
cent_to_char ("#7Techniques#n", ch);
cent_to_char
("#r--------------------------------------------------------------#n",
ch);
stc ("\n\r", ch);
if (ch->wpn[0] >= 600 && !IS_WPNM (ch, WPM_UNARMED))
cent_to_char ("#RAxeKick#n\n\r", ch);
if (ch->wpn[1] >= 600 && !IS_WPNM (ch, WPM_SLICE))
cent_to_char ("#RLowSlice#n\n\r", ch);
if (ch->wpn[2] >= 600 && !IS_WPNM (ch, WPM_STAB))
cent_to_char ("#RFaceStab#n\n\r", ch);
if (ch->wpn[3] >= 600 && !IS_WPNM (ch, WPM_SLASH))
cent_to_char ("#RHighSlash#n\n\r", ch);
if (ch->wpn[4] >= 600 && !IS_WPNM (ch, WPM_WHIP))
cent_to_char ("#RWhipSlash#n\n\r", ch);
if (ch->wpn[5] >= 600 && !IS_WPNM (ch, WPM_CLAW))
cent_to_char ("#RCrossCut#n\n\r", ch);
if (ch->wpn[6] >= 600 && !IS_WPNM (ch, WPM_BLAST))
cent_to_char ("#RSwordThrust#n\n\r", ch);
if (ch->wpn[7] >= 600 && !IS_WPNM (ch, WPM_POUND))
cent_to_char ("#RSideswipe#n\n\r", ch);
if (ch->wpn[8] >= 600 && !IS_WPNM (ch, WPM_CRUSH))
cent_to_char ("#RHiltSmash#n\n\r", ch);
if (ch->wpn[9] >= 600 && !IS_WPNM (ch, WPM_GREP))
cent_to_char ("#RCleave#n\n\r", ch);
if (ch->wpn[10] >= 600 && !IS_WPNM (ch, WPM_BITE))
cent_to_char ("#RBackSlash#n\n\r", ch);
if (ch->wpn[11] >= 600 && !IS_WPNM (ch, WPM_PIERCE))
cent_to_char ("#RDownStab#n\n\r", ch);
if (ch->wpn[12] >= 600 && !IS_WPNM (ch, WPM_SUCK))
cent_to_char ("#RNeckSlice#n\n\r", ch);
stc ("\n\r", ch);
cent_to_char
("#r--------------------------------------------------------------#n",
ch);
cent_to_char
("#RTo see the techniques you already have: type technique show.#n",
ch);
cent_to_char
("#r--------------------------------------------------------------#n",
ch);
}
else if (!str_cmp (arg1, "axekick"))
{
if (ch->wpn[0] < 600)
{
do_techniques (ch, "");
return;
}
if (IS_WPNM (ch, WPM_UNARMED))
{
do_techniques (ch, "");
return;
}
if (ch->pcdata->power[POWER_CURRENT] < cost)
{
sprintf (buf,
"You need %d more %s power points to learn that technique.\n\r",
(cost - ch->pcdata->power[POWER_CURRENT]), get_class (ch));
stc (buf, ch);
return;
}
stc ("You learn the AxeKick technique.\n\r", ch);
SET_BIT (ch->wpnmaster, WPM_UNARMED);
ch->pcdata->power[POWER_CURRENT] -= cost;
return;
}
else if (!str_cmp (arg1, "lowslice"))
{
if (ch->wpn[1] < 600)
{
do_techniques (ch, "");
return;
}
if (IS_WPNM (ch, WPM_SLICE))
{
do_techniques (ch, "");
return;
}
if (ch->pcdata->power[POWER_CURRENT] < cost)
{
sprintf (buf,
"You need %d more %s power points to learn that technique.\n\r",
(cost - ch->pcdata->power[POWER_CURRENT]), get_class (ch));
stc (buf, ch);
return;
}
stc ("You learn the LowSlice technique.\n\r", ch);
SET_BIT (ch->wpnmaster, WPM_SLICE);
ch->pcdata->power[POWER_CURRENT] -= cost;
return;
}
else if (!str_cmp (arg1, "facestab"))
{
if (ch->wpn[2] < 600)
{
do_techniques (ch, "");
return;
}
if (IS_WPNM (ch, WPM_STAB))
{
do_techniques (ch, "");
return;
}
if (ch->pcdata->power[POWER_CURRENT] < cost)
{
sprintf (buf,
"You need %d more %s power points to learn that technique.\n\r",
(cost - ch->pcdata->power[POWER_CURRENT]), get_class (ch));
stc (buf, ch);
return;
}
stc ("You learn the FaceStab technique.\n\r", ch);
SET_BIT (ch->wpnmaster, WPM_STAB);
ch->pcdata->power[POWER_CURRENT] -= cost;
return;
}
else if (!str_cmp (arg1, "highslash"))
{
if (ch->wpn[3] < 600)
{
do_techniques (ch, "");
return;
}
if (IS_WPNM (ch, WPM_SLASH))
{
do_techniques (ch, "");
return;
}
if (ch->pcdata->power[POWER_CURRENT] < cost)
{
sprintf (buf,
"You need %d more %s power points to learn that technique.\n\r",
(cost - ch->pcdata->power[POWER_CURRENT]), get_class (ch));
stc (buf, ch);
return;
}
stc ("You learn the HighSlash technique.\n\r", ch);
SET_BIT (ch->wpnmaster, WPM_SLASH);
ch->pcdata->power[POWER_CURRENT] -= cost;
return;
}
else if (!str_cmp (arg1, "whipslash"))
{
if (ch->wpn[4] < 600)
{
do_techniques (ch, "");
return;
}
if (IS_WPNM (ch, WPM_WHIP))
{
do_techniques (ch, "");
return;
}
if (ch->pcdata->power[POWER_CURRENT] < cost)
{
sprintf (buf,
"You need %d more %s power points to learn that technique.\n\r",
(cost - ch->pcdata->power[POWER_CURRENT]), get_class (ch));
stc (buf, ch);
return;
}
stc ("You learn the WhipSlash technique.\n\r", ch);
SET_BIT (ch->wpnmaster, WPM_WHIP);
ch->pcdata->power[POWER_CURRENT] -= cost;
return;
}
else if (!str_cmp (arg1, "crosscut"))
{
if (ch->wpn[5] < 600)
{
do_techniques (ch, "");
return;
}
if (IS_WPNM (ch, WPM_CLAW))
{
do_techniques (ch, "");
return;
}
if (ch->pcdata->power[POWER_CURRENT] < cost)
{
sprintf (buf,
"You need %d more %s power points to learn that technique.\n\r",
(cost - ch->pcdata->power[POWER_CURRENT]), get_class (ch));
stc (buf, ch);
return;
}
stc ("You learn the CrossCut technique.\n\r", ch);
ch->pcdata->power[POWER_CURRENT] -= cost;
SET_BIT (ch->wpnmaster, WPM_CLAW);
return;
}
else if (!str_cmp (arg1, "swordthrust"))
{
if (ch->wpn[6] < 600)
{
do_techniques (ch, "");
return;
}
if (IS_WPNM (ch, WPM_BLAST))
{
do_techniques (ch, "");
return;
}
if (ch->pcdata->power[POWER_CURRENT] < cost)
{
sprintf (buf,
"You need %d more %s power points to learn that technique.\n\r",
(cost - ch->pcdata->power[POWER_CURRENT]), get_class (ch));
stc (buf, ch);
return;
}
stc ("You learn the SwordThrust technique.\n\r", ch);
ch->pcdata->power[POWER_CURRENT] -= cost;
SET_BIT (ch->wpnmaster, WPM_BLAST);
return;
}
else if (!str_cmp (arg1, "sideswipe"))
{
if (ch->wpn[7] < 600)
{
do_techniques (ch, "");
return;
}
if (IS_WPNM (ch, WPM_POUND))
{
do_techniques (ch, "");
return;
}
if (ch->pcdata->power[POWER_CURRENT] < cost)
{
sprintf (buf,
"You need %d more %s power points to learn that technique.\n\r",
(cost - ch->pcdata->power[POWER_CURRENT]), get_class (ch));
stc (buf, ch);
return;
}
stc ("You learn the SideSwipe technique.\n\r", ch);
SET_BIT (ch->wpnmaster, WPM_POUND);
ch->pcdata->power[POWER_CURRENT] -= cost;
return;
}
else if (!str_cmp (arg1, "hiltsmash"))
{
if (ch->wpn[8] < 600)
{
do_techniques (ch, "");
return;
}
if (IS_WPNM (ch, WPM_CRUSH))
{
do_techniques (ch, "");
return;
}
if (ch->pcdata->power[POWER_CURRENT] < cost)
{
sprintf (buf,
"You need %d more %s power points to learn that technique.\n\r",
(cost - ch->pcdata->power[POWER_CURRENT]), get_class (ch));
stc (buf, ch);
return;
}
stc ("You learn the HiltSmash technique.\n\r", ch);
ch->pcdata->power[POWER_CURRENT] -= cost;
SET_BIT (ch->wpnmaster, WPM_CRUSH);
return;
}
else if (!str_cmp (arg1, "cleave"))
{
if (ch->wpn[9] < 600)
{
do_techniques (ch, "");
return;
}
if (IS_WPNM (ch, WPM_GREP))
{
do_techniques (ch, "");
return;
}
if (ch->pcdata->power[POWER_CURRENT] < cost)
{
sprintf (buf,
"You need %d more %s power points to learn that technique.\n\r",
(cost - ch->pcdata->power[POWER_CURRENT]), get_class (ch));
stc (buf, ch);
return;
}
stc ("You learn the Cleave technique.\n\r", ch);
ch->pcdata->power[POWER_CURRENT] -= cost;
SET_BIT (ch->wpnmaster, WPM_GREP);
return;
}
else if (!str_cmp (arg1, "backslash"))
{
if (ch->wpn[10] < 600)
{
do_techniques (ch, "");
return;
}
if (IS_WPNM (ch, WPM_BITE))
{
do_techniques (ch, "");
return;
}
if (ch->pcdata->power[POWER_CURRENT] < cost)
{
sprintf (buf,
"You need %d more %s power points to learn that technique.\n\r",
(cost - ch->pcdata->power[POWER_CURRENT]), get_class (ch));
stc (buf, ch);
return;
}
stc ("You learn the BackSlash technique.\n\r", ch);
ch->pcdata->power[POWER_CURRENT] -= cost;
SET_BIT (ch->wpnmaster, WPM_BITE);
return;
}
else if (!str_cmp (arg1, "downstab"))
{
if (ch->wpn[11] < 600)
{
do_techniques (ch, "");
return;
}
if (IS_WPNM (ch, WPM_PIERCE))
{
do_techniques (ch, "");
return;
}
if (ch->pcdata->power[POWER_CURRENT] < cost)
{
sprintf (buf,
"You need %d more %s power points to learn that technique.\n\r",
(cost - ch->pcdata->power[POWER_CURRENT]), get_class (ch));
stc (buf, ch);
return;
}
stc ("You learn the DownStab technique.\n\r", ch);
SET_BIT (ch->wpnmaster, WPM_PIERCE);
ch->pcdata->power[POWER_CURRENT] -= cost;
return;
}
else if (!str_cmp (arg1, "neckslice"))
{
if (ch->wpn[12] < 600)
{
do_techniques (ch, "");
return;
}
if (IS_WPNM (ch, WPM_SUCK))
{
do_techniques (ch, "");
return;
}
if (ch->pcdata->power[POWER_CURRENT] < cost)
{
sprintf (buf,
"You need %d more %s power points to learn that technique.\n\r",
(cost - ch->pcdata->power[POWER_CURRENT]), get_class (ch));
stc (buf, ch);
return;
}
stc ("You learn the NeckSlice technique.\n\r", ch);
SET_BIT (ch->wpnmaster, WPM_SUCK);
ch->pcdata->power[POWER_CURRENT] -= cost;
return;
}
else if (!str_cmp (arg1, "show") && pwr > 1)
{
send_to_char
("#r----------------------------#o* #7Techniques#o *#r----------------------------#n\n\r\n\r",
ch);
if (IS_WPNM (ch, WPM_UNARMED))
stc
("#RAxeKick#o :#R An overhead kick that can be performed with out weapons.\n\r",
ch);
if (IS_WPNM (ch, WPM_SLICE))
stc
("#RLowSlice#o :#R A low right handed slice to your opponents legs.\n\r",
ch);
if (IS_WPNM (ch, WPM_STAB))
stc
("#RFaceStab#o :#R A right handed stab to your opponents face.\n\r",
ch);
if (IS_WPNM (ch, WPM_SLASH))
stc
("#RHighSlash#o :#R A left handed slash to your opponents chest.\n\r",
ch);
if (IS_WPNM (ch, WPM_WHIP))
stc
("#RWhipSlash#o :#R A quick left handed slash to opponents hand.\n\r",
ch);
if (IS_WPNM (ch, WPM_CLAW))
stc
("#RCrossCut#o :#R A dual slash to your opponents chest, requires both weapons.\n\r",
ch);
if (IS_WPNM (ch, WPM_BLAST))
stc
("#RSwordThrust#o :#R A right handed thrust to your opponents abdomen.\n\r",
ch);
if (IS_WPNM (ch, WPM_POUND))
stc
("#RSideSwipe#o :#R A left handed arching swipe to your opponents shoulder.\n\r",
ch);
if (IS_WPNM (ch, WPM_CRUSH))
stc
("#RHiltSmash#o :#R A right handed hilt smash to the back of your opponents head.\n\r",
ch);
if (IS_WPNM (ch, WPM_GREP))
stc
("#RCleave#o :#R A right handed downward cleave to your opponents forehead.\n\r",
ch);
if (IS_WPNM (ch, WPM_BITE))
stc
("#RBackSlash#o :#R A left handed slash to your opponents back.\n\r",
ch);
if (IS_WPNM (ch, WPM_PIERCE))
stc
("#RDownStab#o :#R A right handed stab from the air to your opponents chest.\n\r",
ch);
if (IS_WPNM (ch, WPM_SUCK))
stc
("#RNeckSlice#o :#R A right handed slice to your opponents neck.\n\r",
ch);
stc ("\n\r", ch);
send_to_char
("#r------------------------------------------------------------------------\n\r#n",
ch);
return;
}
else if (!str_cmp (arg1, "show") && pwr == 1)
{
stc ("You dont know any techniques.\n\r", ch);
return;
}
else
{
do_techniques (ch, "");
return;
}
return;
}
void
fumble (CHAR_DATA * ch, int num)
{
OBJ_DATA *obj;
OBJ_DATA *obj2;
bool weapon = FALSE;
bool right = FALSE;
bool silver = FALSE;
int critical = number_range (1, 4);
int dam = number_range (2, 5);
if (IS_NPC (ch))
return;
if (num < 1 || num > 3)
num = number_range (1, 3);
/*1 is right hand, 2 is left hand and 3 is both hands */
switch (num)
{
default:
{
fumble (ch, number_range (1, 3));
break;
}
case 1:
{
switch (critical)
{
default:
case 1:
{
act ("Your strike goes wide, leaving you off balance.", ch,
NULL, NULL, TO_CHAR);
act ("$n's strike goes wide, leaving $m terribly off balance.",
ch, NULL, NULL, TO_ROOM);
waiting (ch, 12);
break;
}
case 2:
{
if ((obj = get_eq_char (ch, WEAR_WIELD)) == NULL)
{
fumble (ch, 1);
break;
}
act
("You lose hold of your right weapon sending it clattering to the ground.",
ch, NULL, NULL, TO_CHAR);
act ("$n fumbles $s right weapon dropping it to the ground.",
ch, NULL, NULL, TO_ROOM);
take_item (ch, obj);
break;
}
case 3:
{
if (ch->fighting != NULL)
{
stop_fighting (ch, TRUE);
}
act
("You stumble and trip, then the lights go out as your head hits the ground.",
ch, NULL, NULL, TO_CHAR);
act
("$n's trips over $s own feet, $s head hits the ground hard and $e stops moving.",
ch, NULL, NULL, TO_ROOM);
ch->position = POS_STUNNED;
break;
}
case 4:
{
if ((obj = get_eq_char (ch, WEAR_WIELD)) != NULL)
{
weapon = TRUE;
right = TRUE;
if (IS_SET (obj->spectype, SITEM_SILVER))
silver = TRUE;
}
dam = kensai_dam (ch, ch, dam, weapon, right);
act ("You strike your self, damn thats pathetic!", ch, NULL,
NULL, TO_CHAR);
act ("$n strikes $mself, how pathetic is that!", ch, NULL,
NULL, TO_ROOM);
if (silver)
{
damage (ch, ch, dam, gsn_fumble, DAM_SILVER, FALSE, TRUE,
TRUE);
}
else
{
damage (ch, ch, dam, gsn_fumble, DAM_NORMAL, FALSE, TRUE,
TRUE);
}
break;
}
}
break;
}
case 2:
{
switch (critical)
{
default:
case 1:
{
act ("Your strike goes wide, leaving you off balance.", ch,
NULL, NULL, TO_CHAR);
act ("$n's strike goes wide, leaving $m terribly off balance.",
ch, NULL, NULL, TO_ROOM);
waiting (ch, 12);
break;
}
case 2:
{
if ((obj = get_eq_char (ch, WEAR_HOLD)) == NULL)
{
fumble (ch, 2);
break;
}
act
("You lose hold of your left weapon sending it clattering to the ground.",
ch, NULL, NULL, TO_CHAR);
act ("$n fumbles $s left weapon dropping it to the ground.", ch,
NULL, NULL, TO_ROOM);
take_item (ch, obj);
break;
}
case 3:
{
if (ch->fighting != NULL)
{
stop_fighting (ch, TRUE);
}
act
("You stumble and trip, then the lights go out as your head hits the ground.",
ch, NULL, NULL, TO_CHAR);
act
("$n's trips over $s own feet, $s head hits the ground hard and $e stops moving.",
ch, NULL, NULL, TO_ROOM);
ch->position = POS_STUNNED;
break;
}
case 4:
{
if ((obj = get_eq_char (ch, WEAR_HOLD)) != NULL)
{
weapon = TRUE;
if (IS_SET (obj->spectype, SITEM_SILVER))
silver = TRUE;
}
dam = kensai_dam (ch, ch, dam, weapon, right);
act ("You strike your self, damn thats pathetic!", ch, NULL,
NULL, TO_CHAR);
act ("$n strikes $mself, how pathetic is that!", ch, NULL,
NULL, TO_ROOM);
if (silver)
{
damage (ch, ch, dam, gsn_fumble, DAM_SILVER, FALSE, TRUE,
TRUE);
}
else
{
damage (ch, ch, dam, gsn_fumble, DAM_NORMAL, FALSE, TRUE,
TRUE);
}
break;
}
}
break;
}
case 3:
{
switch (critical)
{
default:
case 1:
{
act ("Your strike goes wide, leaving you off balance.", ch,
NULL, NULL, TO_CHAR);
act ("$n's strike goes wide, leaving $m terribly off balance.",
ch, NULL, NULL, TO_ROOM);
waiting (ch, 12);
break;
}
case 2:
{
if ((obj = get_eq_char (ch, WEAR_HOLD)) == NULL
&& (obj2 = get_eq_char (ch, WEAR_WIELD)) == NULL)
{
fumble (ch, 3);
break;
}
else if ((obj = get_eq_char (ch, WEAR_HOLD)) != NULL
&& (obj2 = get_eq_char (ch, WEAR_WIELD)) == NULL)
{
act
("You lose hold of your left weapon sending it clattering to the ground.",
ch, NULL, NULL, TO_CHAR);
act ("$n fumbles $s left weapon dropping it to the ground.",
ch, NULL, NULL, TO_ROOM);
take_item (ch, obj);
break;
}
else if ((obj = get_eq_char (ch, WEAR_HOLD)) == NULL
&& (obj2 = get_eq_char (ch, WEAR_WIELD)) != NULL)
{
act
("You lose hold of your right weapon sending it clattering to the ground.",
ch, NULL, NULL, TO_CHAR);
act
("$n fumbles $s right weapon dropping it to the ground.",
ch, NULL, NULL, TO_ROOM);
take_item (ch, obj2);
break;
}
else if ((obj = get_eq_char (ch, WEAR_HOLD)) != NULL
&& (obj2 = get_eq_char (ch, WEAR_WIELD)) != NULL)
{
act
("You lose hold of both your weapons sending them clattering to the ground.",
ch, NULL, NULL, TO_CHAR);
act
("$n fumbles both $s weapons dropping them to the ground.",
ch, NULL, NULL, TO_ROOM);
take_item (ch, obj);
take_item (ch, obj2);
break;
}
else
{
fumble (ch, 3);
break;
}
}
case 3:
{
if (ch->fighting != NULL)
{
stop_fighting (ch, TRUE);
}
act
("You stumble and trip, then the lights go out as your head hits the ground.",
ch, NULL, NULL, TO_CHAR);
act
("$n's trips over $s own feet, $s head hits the ground hard and $e stops moving.",
ch, NULL, NULL, TO_ROOM);
ch->position = POS_STUNNED;
break;
}
case 4:
{
if ((obj = get_eq_char (ch, WEAR_HOLD)) != NULL)
{
weapon = TRUE;
if (IS_SET (obj->spectype, SITEM_SILVER))
silver = TRUE;
}
dam = kensai_dam (ch, ch, dam, weapon, right);
act ("You strike your self, damn thats pathetic!", ch, NULL,
NULL, TO_CHAR);
act ("$n strikes $mself, how pathetic is that!", ch, NULL,
NULL, TO_ROOM);
if (silver)
{
damage (ch, ch, dam, gsn_fumble, DAM_SILVER, FALSE, TRUE,
TRUE);
}
else
{
damage (ch, ch, dam, gsn_fumble, DAM_NORMAL, FALSE, TRUE,
TRUE);
}
weapon = FALSE;
silver = FALSE;
if ((obj2 = get_eq_char (ch, WEAR_WIELD)) != NULL)
{
weapon = TRUE;
right = TRUE;
if (IS_SET (obj->spectype, SITEM_SILVER))
silver = TRUE;
}
dam = number_range (2, 5);
dam = kensai_dam (ch, ch, dam, weapon, right);
if (silver)
{
damage (ch, ch, dam, gsn_fumble, DAM_SILVER, FALSE, TRUE,
TRUE);
}
else
{
damage (ch, ch, dam, gsn_fumble, DAM_NORMAL, FALSE, TRUE,
TRUE);
}
break;
}
}
break;
}
}
ch->combocrap = 0;
ch->battlefury = 0;
ch->damcap[DAM_CHANGE] = 1;
return;
}
void
do_axekick (CHAR_DATA * ch, char *argument)
{
CHAR_DATA *victim;
OBJ_DATA *blade;
bool weapon = FALSE;
bool right = FALSE;
bool silver = FALSE;
char arg[MIL];
int dam, sn, level;
int wait = 6;
argument = one_argument (argument, arg);
if (IS_NPC (ch))
return;
if (!IS_KENSAI (ch))
{
do_huh (ch, "");
return;
}
if (!IS_WPNM (ch, WPM_UNARMED))
{
stc ("You havent learned that technique.\n\r", ch);
return;
}
if (arg[0] == '\0' && ch->fighting == NULL)
{
send_to_char ("Who do you wish to AxeKick?\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;
if (ch == victim)
{
send_to_char ("AxeKick yourself?\n\r", ch);
return;
}
if ((blade = get_eq_char (ch, WEAR_FEET)) != NULL
&& IS_SET (blade->spectype, SITEM_SILVER))
silver = TRUE;
if (IS_QUICK (ch, QUICKENING_SPEEDKICK))
wait -= 2;
waiting (ch, wait);
dam = number_range (1, 6);
dam = kensai_dam (ch, victim, dam, weapon, right);
if (IS_QUICK (ch, QUICKENING_STRONGKICK))
dam *= 1.5;
level = victim->spl[1] << 1;
level *= 2;
act ("You swing your foot over your head, then slam it into $N's face.", ch,
NULL, victim, TO_CHAR);
act ("$n swings $s foot over $s head, than slams it into your face.", ch,
NULL, victim, TO_VICT);
act ("$n swings $s foot over $s head, than slams it into $N's face.", ch,
NULL, victim, TO_NOTVICT);
if (IS_QUICK (ch, QUICKENING_COLDKICK))
{
if (IS_QUICK (ch, QUICKENING_TRIPLE))
sev_hit (ch, victim, dam, gsn_axekick, DAM_COLD, 3, TRUE, TRUE, TRUE);
else
damage (ch, victim, dam, gsn_axekick, DAM_COLD, TRUE, TRUE, TRUE);
if (number_range (1, 3) < 2)
{
if ((sn = skill_lookup ("chill touch")) > 0)
(*skill_table[sn].spell_fun) (sn, level, ch, victim);
}
}
else if (silver)
{
if (IS_QUICK (ch, QUICKENING_TRIPLE))
sev_hit (ch, victim, dam, gsn_axekick, DAM_SILVER, 3, TRUE, TRUE,
TRUE);
else
damage (ch, victim, dam, gsn_axekick, DAM_SILVER, TRUE, TRUE, TRUE);
}
else
{
if (IS_QUICK (ch, QUICKENING_TRIPLE))
sev_hit (ch, victim, dam, gsn_axekick, DAM_NORMAL, 3, TRUE, TRUE,
TRUE);
else
damage (ch, victim, dam, gsn_axekick, DAM_NORMAL, TRUE, TRUE, TRUE);
}
ch->combocrap = 0;
return;
}
void
do_lowslice (CHAR_DATA * ch, char *argument)
{
CHAR_DATA *victim;
OBJ_DATA *blade;
bool weapon = TRUE;
bool right = TRUE;
bool silver = FALSE;
bool failed = FALSE;
char arg[MIL];
int dam;
argument = one_argument (argument, arg);
if (IS_NPC (ch))
return;
if (!IS_KENSAI (ch))
{
do_huh (ch, "");
return;
}
if (!IS_WPNM (ch, WPM_SLICE))
{
stc ("You havent learned that technique.\n\r", ch);
return;
}
if ((blade = get_eq_char (ch, WEAR_WIELD)) == NULL
|| blade->item_type != ITEM_WEAPON)
{
stc ("You dont have a weapon in your right hand.\n\r", ch);
return;
}
if (arg[0] == '\0' && ch->fighting == NULL)
{
send_to_char ("Who do you wish to LowSlice?\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;
if (ch == victim)
{
send_to_char ("LowSlice yourself?\n\r", ch);
return;
}
if (IS_COMBO (ch, COMBO_FAILED))
{
ch->combocrap = 0;
}
if (IS_COMBO (ch, COMBO_SLICE))
{
fumble (ch, 1);
return;
}
else if (ch->combocrap == 0)
{
act ("#rYour#n $p#r starts burning with an inner fire.#n", ch, blade,
victim, TO_CHAR);
act ("$n#r's#n $p#r starts burning with an inner fire.#n", ch, blade,
victim, TO_VICT);
act ("$n#r's#n $p#r starts burning with an inner fire.#n", ch, blade,
victim, TO_NOTVICT);
SET_BIT (ch->combocrap, COMBO_BEGUN);
}
else if (IS_COMBO (ch, COMBO_BEGUN))
{
act ("#cYour#n $p #cturns back to normal.#n", ch, blade, victim,
TO_CHAR);
act ("$n's $p #cturns back to normal.#n", ch, blade, victim, TO_ROOM);
failed = TRUE;
}
else
{
ch->combocrap = 0;
}
if (IS_SET (blade->spectype, SITEM_SILVER))
silver = TRUE;
waiting (ch, 6);
dam = number_range (1, 6);
dam = kensai_dam (ch, victim, dam, weapon, right);
act ("You swing your right blade at $N's legs.", ch, NULL, victim, TO_CHAR);
act ("$n swings $s right blade at your legs .", ch, NULL, victim, TO_VICT);
act ("$n swings $s right blade at $N's legs.", ch, NULL, victim,
TO_NOTVICT);
if (silver)
{
if (IS_QUICK (ch, QUICKENING_TRIPLE))
sev_hit (ch, victim, dam, gsn_lowslice, DAM_SILVER, 3, TRUE, TRUE,
TRUE);
else
damage (ch, victim, dam, gsn_lowslice, DAM_SILVER, TRUE, TRUE, TRUE);
}
else
{
if (IS_QUICK (ch, QUICKENING_TRIPLE))
sev_hit (ch, victim, dam, gsn_lowslice, DAM_NORMAL, 3, TRUE, TRUE,
TRUE);
else
damage (ch, victim, dam, gsn_lowslice, DAM_NORMAL, TRUE, TRUE, TRUE);
}
SET_BIT (ch->combocrap, COMBO_SLICE);
ch->battlefury += number_range (50, 120);
if (ch->battlefury > 1000)
ch->battlefury = 1000 + number_range (1, 31);
ch->damcap[DAM_CHANGE] = 1;
if (failed)
{
ch->combocrap = 0;
}
return;
}
void
do_facestab (CHAR_DATA * ch, char *argument)
{
CHAR_DATA *victim;
OBJ_DATA *blade;
bool weapon = TRUE;
bool right = TRUE;
bool silver = FALSE;
bool failed = FALSE;
char arg[MIL];
int dam;
argument = one_argument (argument, arg);
if (IS_NPC (ch))
return;
if (!IS_KENSAI (ch))
{
do_huh (ch, "");
return;
}
if (!IS_WPNM (ch, WPM_STAB))
{
stc ("You havent learned that technique.\n\r", ch);
return;
}
if ((blade = get_eq_char (ch, WEAR_WIELD)) == NULL
|| blade->item_type != ITEM_WEAPON)
{
stc ("You dont have a weapon in your right hand.\n\r", ch);
return;
}
if (arg[0] == '\0' && ch->fighting == NULL)
{
send_to_char ("Who do you wish to FaceStab?\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;
if (ch == victim)
{
send_to_char ("FaceStab yourself?\n\r", ch);
return;
}
if (IS_COMBO (ch, COMBO_FAILED))
{
ch->combocrap = 0;
}
if (IS_COMBO (ch, COMBO_STAB))
{
fumble (ch, 1);
return;
}
else if (ch->combocrap == 0)
{
act ("#lYour#n $p#l gets a cold blue tint.#n", ch, blade,
victim, TO_CHAR);
act ("$n#l's#n $p#l gets a cold blue tint.#n", ch, blade,
victim, TO_VICT);
act ("$n#l's#n $p#l gets a cold blue tint.#n", ch, blade,
victim, TO_NOTVICT);
SET_BIT (ch->combocrap, COMBO_BEGUN);
}
else if (IS_COMBO (ch, COMBO_BEGUN))
{
act ("#cYour#n $p #cturns back to normal.#n", ch, blade, victim,
TO_CHAR);
act ("$n's $p #cturns back to normal.#n", ch, blade, victim, TO_ROOM);
failed = TRUE;
}
else
{
ch->combocrap = 0;
}
if (IS_SET (blade->spectype, SITEM_SILVER))
silver = TRUE;
waiting (ch, 6);
dam = number_range (1, 6);
dam = kensai_dam (ch, victim, dam, weapon, right);
act ("You stab your right blade into $N's face.", ch, NULL, victim,
TO_CHAR);
act ("$n stabs $s right blade into your face.", ch, NULL, victim, TO_VICT);
act ("$n stabs $s right blade into $N's face.", ch, NULL, victim,
TO_NOTVICT);
if (silver)
{
if (IS_QUICK (ch, QUICKENING_TRIPLE))
sev_hit (ch, victim, dam, gsn_facestab, DAM_SILVER, 3, TRUE, TRUE,
TRUE);
else
damage (ch, victim, dam, gsn_facestab, DAM_SILVER, TRUE, TRUE, TRUE);
}
else
{
if (IS_QUICK (ch, QUICKENING_TRIPLE))
sev_hit (ch, victim, dam, gsn_facestab, DAM_NORMAL, 3, TRUE, TRUE,
TRUE);
else
damage (ch, victim, dam, gsn_facestab, DAM_NORMAL, TRUE, TRUE, TRUE);
}
SET_BIT (ch->combocrap, COMBO_STAB);
ch->battlefury += number_range (50, 120);
if (ch->battlefury > 1000)
ch->battlefury = 1000 + number_range (1, 31);
ch->damcap[DAM_CHANGE] = 1;
if (failed)
{
ch->combocrap = 0;
}
return;
}
void
do_highslash (CHAR_DATA * ch, char *argument)
{
CHAR_DATA *victim;
OBJ_DATA *blade;
bool weapon = TRUE;
bool right = FALSE;
bool silver = FALSE;
bool failed = FALSE;
char arg[MIL];
int dam;
argument = one_argument (argument, arg);
if (IS_NPC (ch))
return;
if (!IS_KENSAI (ch))
{
do_huh (ch, "");
return;
}
if (!IS_WPNM (ch, WPM_SLASH))
{
stc ("You havent learned that technique.\n\r", ch);
return;
}
if ((blade = get_eq_char (ch, WEAR_HOLD)) == NULL
|| blade->item_type != ITEM_WEAPON)
{
stc ("You dont have a weapon in your left hand.\n\r", ch);
return;
}
if (arg[0] == '\0' && ch->fighting == NULL)
{
send_to_char ("Who do you wish to HighSlash?\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;
if (ch == victim)
{
send_to_char ("HighSlash yourself?\n\r", ch);
return;
}
if (IS_COMBO (ch, COMBO_FAILED))
{
ch->combocrap = 0;
}
if (IS_COMBO (ch, COMBO_SLASH))
{
fumble (ch, 2);
return;
}
else if (IS_COMBO (ch, COMBO_BEGUN) && IS_COMBO (ch, COMBO_GREP))
{
act ("#7Your $p #7trembles violently with barely contained power.#n",
ch, blade, victim, TO_CHAR);
act ("$n#7's#n $p #7trembles violently with barely contained power.#n",
ch, blade, victim, TO_VICT);
act ("$n#7's#n $p #7trembles violently with barely contained power.#n",
ch, blade, victim, TO_NOTVICT);
}
else if (IS_COMBO (ch, COMBO_BEGUN))
{
act ("#cYour#n $p #cturns back to normal.#n", ch, blade, victim,
TO_CHAR);
act ("$n's $p #cturns back to normal.#n", ch, blade, victim, TO_ROOM);
failed = TRUE;
}
else
{
ch->combocrap = 0;
}
if (IS_SET (blade->spectype, SITEM_SILVER))
silver = TRUE;
waiting (ch, 6);
dam = number_range (1, 6);
dam = kensai_dam (ch, victim, dam, weapon, right);
act ("You slash your left blade across $N's chest.", ch, NULL, victim,
TO_CHAR);
act ("$n slashes $s left blade across your chest.", ch, NULL, victim,
TO_VICT);
act ("$n slashes $s left blade across $n's chest.", ch, NULL, victim,
TO_NOTVICT);
if (silver)
{
if (IS_QUICK (ch, QUICKENING_TRIPLE))
sev_hit (ch, victim, dam, gsn_highslash, DAM_SILVER, 3, TRUE, TRUE,
TRUE);
else
damage (ch, victim, dam, gsn_highslash, DAM_SILVER, TRUE, TRUE, TRUE);
}
else
{
if (IS_QUICK (ch, QUICKENING_TRIPLE))
sev_hit (ch, victim, dam, gsn_highslash, DAM_NORMAL, 3, TRUE, TRUE,
TRUE);
else
damage (ch, victim, dam, gsn_highslash, DAM_NORMAL, TRUE, TRUE, TRUE);
}
SET_BIT (ch->combocrap, COMBO_SLASH);
ch->battlefury += number_range (50, 120);
if (ch->battlefury > 1000)
ch->battlefury = 1000 + number_range (1, 31);
ch->damcap[DAM_CHANGE] = 1;
if (failed)
{
ch->combocrap = 0;
}
return;
}
void
do_whipslash (CHAR_DATA * ch, char *argument)
{
CHAR_DATA *victim;
OBJ_DATA *blade;
bool weapon = TRUE;
bool right = FALSE;
bool silver = FALSE;
bool failed = FALSE;
char arg[MIL];
int dam;
argument = one_argument (argument, arg);
if (IS_NPC (ch))
return;
if (!IS_KENSAI (ch))
{
do_huh (ch, "");
return;
}
if (!IS_WPNM (ch, WPM_WHIP))
{
stc ("You havent learned that technique.\n\r", ch);
return;
}
if ((blade = get_eq_char (ch, WEAR_HOLD)) == NULL
|| blade->item_type != ITEM_WEAPON)
{
stc ("You dont have a weapon in your left hand.\n\r", ch);
return;
}
if (arg[0] == '\0' && ch->fighting == NULL)
{
send_to_char ("Who do you wish to WhipSlash?\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;
if (ch == victim)
{
send_to_char ("WhipSlash yourself?\n\r", ch);
return;
}
if (IS_COMBO (ch, COMBO_FAILED))
{
ch->combocrap = 0;
}
if (IS_COMBO (ch, COMBO_WHIP))
{
fumble (ch, 2);
return;
}
else if (IS_COMBO (ch, COMBO_BEGUN) && IS_COMBO (ch, COMBO_SUCK))
{
act ("#0Your#n $p#0 is throbing with sh#cad#0ow magic.#n",
ch, blade, victim, TO_CHAR);
act ("$n#0's#n $p#0 is throbing with sh#cad#0ow magic.#n",
ch, blade, victim, TO_VICT);
act ("$n#0's#n $p#0 is throbing with sh#cad#0ow magic.#n",
ch, blade, victim, TO_NOTVICT);
}
else if (IS_COMBO (ch, COMBO_BEGUN))
{
act ("#cYour#n $p #cturns back to normal.#n", ch, blade, victim,
TO_CHAR);
act ("$n's $p #cturns back to normal.#n", ch, blade, victim, TO_ROOM);
failed = TRUE;
}
else
{
ch->combocrap = 0;
}
if (IS_SET (blade->spectype, SITEM_SILVER))
silver = TRUE;
waiting (ch, 6);
dam = number_range (1, 6);
dam = kensai_dam (ch, victim, dam, weapon, right);
act ("You whip your left blade around, quickly slashing at $N's hand.", ch,
NULL, victim, TO_CHAR);
act ("$n whips $s left blade around suddenly, slashing at your hand.", ch,
NULL, victim, TO_VICT);
act ("$n whips $s left blade around suddenly, slashing at $N's hand.", ch,
NULL, victim, TO_NOTVICT);
if (silver)
{
if (IS_QUICK (ch, QUICKENING_TRIPLE))
sev_hit (ch, victim, dam, gsn_whipslash, DAM_SILVER, 3, TRUE, TRUE,
TRUE);
else
damage (ch, victim, dam, gsn_whipslash, DAM_SILVER, TRUE, TRUE, TRUE);
}
else
{
if (IS_QUICK (ch, QUICKENING_TRIPLE))
sev_hit (ch, victim, dam, gsn_whipslash, DAM_NORMAL, 3, TRUE, TRUE,
TRUE);
else
damage (ch, victim, dam, gsn_whipslash, DAM_NORMAL, TRUE, TRUE, TRUE);
}
SET_BIT (ch->combocrap, COMBO_WHIP);
ch->battlefury += number_range (50, 120);
if (ch->battlefury > 1000)
ch->battlefury = 1000 + number_range (1, 31);
ch->damcap[DAM_CHANGE] = 1;
if (failed)
{
ch->combocrap = 0;
}
return;
}
void
do_crosscut (CHAR_DATA * ch, char *argument)
{
CHAR_DATA *victim;
OBJ_DATA *obj;
OBJ_DATA *blade;
OBJ_DATA *blade2;
bool failed = FALSE;
bool weapon = TRUE;
bool right = TRUE;
bool left = FALSE;
bool combo = FALSE;
bool silver = FALSE;
bool silver2 = FALSE;
char arg[MIL];
int dam, dam2;
argument = one_argument (argument, arg);
if (IS_NPC (ch))
return;
if (!IS_KENSAI (ch))
{
do_huh (ch, "");
return;
}
if (!IS_WPNM (ch, WPM_CLAW))
{
stc ("You havent learned that technique.\n\r", ch);
return;
}
if ((blade = get_eq_char (ch, WEAR_WIELD)) == NULL
|| blade->item_type != ITEM_WEAPON)
{
stc ("You dont have a weapon in your right hand.\n\r", ch);
return;
}
if ((blade2 = get_eq_char (ch, WEAR_HOLD)) == NULL
|| blade2->item_type != ITEM_WEAPON)
{
stc ("You dont have a weapon in your left hand.\n\r", ch);
return;
}
if (arg[0] == '\0' && ch->fighting == NULL)
{
send_to_char ("Who do you wish to CrossCut?\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;
if (ch == victim)
{
send_to_char ("CrossCut yourself?\n\r", ch);
return;
}
if (IS_COMBO (ch, COMBO_FAILED))
{
ch->combocrap = 0;
}
if (IS_COMBO (ch, COMBO_CLAW))
{
fumble (ch, 3);
return;
}
else if (IS_COMBO (ch, COMBO_BEGUN) && IS_COMBO (ch, COMBO_STAB)
&& IS_COMBO (ch, COMBO_POUND))
{
combo = TRUE;
ch->combocrap = 0;
}
else if (IS_COMBO (ch, COMBO_BEGUN))
{
act ("#cYour#n $p #cturns back to normal.#n", ch, blade, victim,
TO_CHAR);
act ("$n's $p #cturns back to normal.#n", ch, blade, victim, TO_ROOM);
failed = TRUE;
}
else
{
ch->combocrap = 0;
}
if (IS_SET (blade->spectype, SITEM_SILVER))
silver = TRUE;
if (IS_SET (blade2->spectype, SITEM_SILVER))
silver2 = TRUE;
waiting (ch, 8);
dam = number_range (1, 6);
dam2 = number_range (1, 6);
dam = kensai_dam (ch, victim, dam, weapon, right);
dam2 = kensai_dam (ch, victim, dam2, weapon, left);
if (combo)
{
dam *= 1.5;
dam2 *= 1.5;
do_say (ch, "Remoraz Frost Razors!");
act
("#LYou swing your ice covered blades at $N#L, slicing both $S arms off at the shoulder.#n",
ch, NULL, victim, TO_CHAR);
act
("$n #Lswings $s ice covered blades at you, slicing both your arms off at the shoulder.#n",
ch, NULL, victim, TO_VICT);
act
("$n #Lswings $s ice covered blades at $N, slicing both $S arms off at the shoulder.#n",
ch, NULL, victim, TO_NOTVICT);
damage (ch, victim, dam, gsn_frostrazor, DAM_COLD, FALSE, TRUE, TRUE);
damage (ch, victim, dam2, gsn_frostrazor, DAM_COLD, FALSE, TRUE, TRUE);
if (!IS_NPC (victim) && victim != NULL && victim->position != POS_DEAD)
{
if (limbsafe (ch, victim))
return;
make_part (victim, "arm");
make_part (victim, "arm");
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);
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_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);
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);
}
return;
}
act
("You swing both your blades at $N, carving a bloody cross in $S chest.",
ch, NULL, victim, TO_CHAR);
act
("$n swings both $s blades at you, carving a bloody cross in your chest.",
ch, NULL, victim, TO_VICT);
act ("$n swings both $s blades at $N, carving a bloody cross in $S chest.",
ch, NULL, victim, TO_NOTVICT);
if (silver)
{
if (IS_QUICK (ch, QUICKENING_TRIPLE))
sev_hit (ch, victim, dam, gsn_rcrosscut, DAM_SILVER, 2, TRUE, TRUE,
TRUE);
else
damage (ch, victim, dam, gsn_rcrosscut, DAM_SILVER, TRUE, TRUE, TRUE);
}
else
{
if (IS_QUICK (ch, QUICKENING_TRIPLE))
sev_hit (ch, victim, dam, gsn_rcrosscut, DAM_NORMAL, 2, TRUE, TRUE,
TRUE);
else
damage (ch, victim, dam, gsn_rcrosscut, DAM_NORMAL, TRUE, TRUE, TRUE);
}
if (silver2)
{
if (IS_QUICK (ch, QUICKENING_TRIPLE))
sev_hit (ch, victim, dam, gsn_lcrosscut, DAM_SILVER, 2, TRUE, TRUE,
TRUE);
else
damage (ch, victim, dam2, gsn_lcrosscut, DAM_SILVER, TRUE, TRUE,
TRUE);
}
else
{
if (IS_QUICK (ch, QUICKENING_TRIPLE))
sev_hit (ch, victim, dam, gsn_lcrosscut, DAM_NORMAL, 2, TRUE, TRUE,
TRUE);
else
damage (ch, victim, dam2, gsn_lcrosscut, DAM_NORMAL, TRUE, TRUE,
TRUE);
}
SET_BIT (ch->combocrap, COMBO_CLAW);
ch->battlefury += number_range (110, 200);
if (ch->battlefury > 1000)
ch->battlefury = 1000 + number_range (1, 31);
ch->damcap[DAM_CHANGE] = 1;
if (failed)
{
ch->combocrap = 0;
}
return;
}
void
do_swordthrust (CHAR_DATA * ch, char *argument)
{
CHAR_DATA *victim;
OBJ_DATA *blade;
AFFECT_DATA af;
char buf[MSL];
bool weapon = TRUE;
bool right = TRUE;
bool silver = FALSE;
char arg[MIL];
bool combo = FALSE;
bool failed = FALSE;
int dam, sn, level, drain, drain2, drain3;
int npcdrain;
argument = one_argument (argument, arg);
if (IS_NPC (ch))
return;
if (!IS_KENSAI (ch))
{
do_huh (ch, "");
return;
}
if (!IS_WPNM (ch, WPM_BLAST))
{
stc ("You havent learned that technique.\n\r", ch);
return;
}
if ((blade = get_eq_char (ch, WEAR_WIELD)) == NULL
|| blade->item_type != ITEM_WEAPON)
{
stc ("You dont have a weapon in your right hand.\n\r", ch);
return;
}
if (arg[0] == '\0' && ch->fighting == NULL)
{
send_to_char ("Who do you wish to SwordThrust?\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;
if (ch == victim)
{
send_to_char ("SwordThrust yourself?\n\r", ch);
return;
}
if (IS_COMBO (ch, COMBO_FAILED))
{
ch->combocrap = 0;
}
if (IS_COMBO (ch, COMBO_BLAST))
{
fumble (ch, 1);
return;
}
else if (IS_COMBO (ch, COMBO_BEGUN) && IS_COMBO (ch, COMBO_SUCK)
&& IS_COMBO (ch, COMBO_WHIP))
{
combo = TRUE;
ch->combocrap = 0;
}
else if (IS_COMBO (ch, COMBO_BEGUN))
{
act ("#cYour#n $p #cturns back to normal.#n", ch, blade, victim,
TO_CHAR);
act ("$n's $p #cturns back to normal.#n", ch, blade, victim, TO_ROOM);
failed = TRUE;
}
else
{
ch->combocrap = 0;
}
if (IS_SET (blade->spectype, SITEM_SILVER))
silver = TRUE;
waiting (ch, 6);
dam = number_range (1, 6);
dam = kensai_dam (ch, victim, dam, weapon, right);
if (combo)
{
dam *= 1.2;
do_say (ch, "Skewer of Enervation!");
act
("You skewer $N on your $p, leaching the essence from $S body.",
ch, blade, victim, TO_CHAR);
act
("$n skewers you on $s $p, leaching the essence from your body.",
ch, blade, victim, TO_VICT);
act
("$n skewer $N on $s $p, leaching the essence from $S body.",
ch, blade, victim, TO_NOTVICT);
if (silver)
{
if (IS_QUICK (ch, QUICKENING_TRIPLE))
sev_hit (ch, victim, dam, gsn_swordthrust, DAM_SILVER, 3, TRUE,
TRUE, TRUE);
else
damage (ch, victim, dam, gsn_swordthrust, DAM_SILVER, TRUE, TRUE,
TRUE);
}
else
{
if (IS_QUICK (ch, QUICKENING_TRIPLE))
sev_hit (ch, victim, dam, gsn_swordthrust, DAM_NORMAL, 3, TRUE,
TRUE, TRUE);
else
damage (ch, victim, dam, gsn_swordthrust, DAM_NORMAL, TRUE, TRUE,
TRUE);
}
if (IS_NPC (victim))
{
npcdrain = victim->hit;
}
drain2 = dam + number_range (123, 999);
if (drain2 > 10000)
drain2 = 9000 + number_range (99, 1999);
if (!IS_NPC (victim))
{
if (victim->mana < drain2)
drain2 = victim->mana;
}
else
{
if (npcdrain < drain2)
drain2 = npcdrain;
npcdrain -= drain2;
}
drain3 = dam + number_range (123, 999);
if (drain3 > 10000)
drain3 = 9000 + number_range (99, 1999);
if (!IS_NPC (victim))
{
if (victim->mana < drain3)
drain3 = victim->move;
}
else
{
if (npcdrain < drain3)
drain3 = victim->hit;
npcdrain -= drain3;
}
drain = drain2 + drain3;
drain /= 2;
if (drain < 1)
{
act_brief ("Your Skewer of Enervation fizzles and fails.", ch, NULL,
NULL, TO_CHAR, PLR_BRIEF3);
return;
}
if (!IS_NPC (victim))
{
if (drain2 > 0 && drain3 > 0)
{
sprintf (buf,
"$n#0 leaches #7[#r%d#7]#0 of your magic power and #7[#r%d#7]#0 of your vitality.#n",
drain2, drain3);
act_brief (buf, ch, NULL, victim, TO_VICT, PLR_BRIEF3);
}
else if (drain3 > 0)
{
sprintf (buf, "$n#0 leaches #7[#r%d#7]#0 of your vitality.#n",
drain3);
act_brief (buf, ch, NULL, victim, TO_VICT, PLR_BRIEF3);
}
else if (drain2 > 0)
{
sprintf (buf,
"$n#0 leaches #7[#r%d#7]#0 of your magic power.#n",
drain2);
act_brief (buf, ch, NULL, victim, TO_VICT, PLR_BRIEF3);
}
}
if (drain > 0)
sprintf (buf,
"#0You leach #7[#r%d#7]#0 life essence from #n$N#0's body.#n",
drain);
act_brief (buf, ch, NULL, victim, TO_CHAR, PLR_BRIEF3);
ch->hit += drain;
if (ch->hit > (ch->max_hit + 10000))
ch->hit = ch->max_hit + 10000;
if (!IS_NPC (victim))
{
victim->mana -= drain2;
if (victim->mana < 0)
victim->mana = 0;
victim->move -= drain3;
if (victim->move < 0)
victim->move = 0;
}
else
{
hurt_person (ch, victim, drain, 0);
}
return;
}
act
("You thrust your right blade into $N's abdomen, almost severing $S spine.",
ch, NULL, victim, TO_CHAR);
act
("$n thrusts $s right blade into your abdomen, barely missing your spine.",
ch, NULL, victim, TO_VICT);
act ("$n thrusts $s right blade into $N's abdomen.", ch, NULL, victim,
TO_NOTVICT);
if (silver)
{
if (IS_QUICK (ch, QUICKENING_TRIPLE))
sev_hit (ch, victim, dam, gsn_swordthrust, DAM_SILVER, 3, TRUE, TRUE,
TRUE);
else
damage (ch, victim, dam, gsn_swordthrust, DAM_SILVER, TRUE, TRUE,
TRUE);
}
else
{
if (IS_QUICK (ch, QUICKENING_TRIPLE))
sev_hit (ch, victim, dam, gsn_swordthrust, DAM_NORMAL, 3, TRUE, TRUE,
TRUE);
else
damage (ch, victim, dam, gsn_swordthrust, DAM_NORMAL, TRUE, TRUE,
TRUE);
}
SET_BIT (ch->combocrap, COMBO_BLAST);
ch->battlefury += number_range (50, 120);
if (ch->battlefury > 1000)
ch->battlefury = 1000 + number_range (1, 31);
ch->damcap[DAM_CHANGE] = 1;
if (failed)
{
ch->combocrap = 0;
}
return;
}
void
do_sideswipe (CHAR_DATA * ch, char *argument)
{
CHAR_DATA *victim;
OBJ_DATA *blade;
bool weapon = TRUE;
bool right = FALSE;
bool silver = FALSE;
bool failed = FALSE;
char arg[MIL];
int dam;
argument = one_argument (argument, arg);
if (IS_NPC (ch))
return;
if (!IS_KENSAI (ch))
{
do_huh (ch, "");
return;
}
if (!IS_WPNM (ch, WPM_POUND))
{
stc ("You havent learned that technique.\n\r", ch);
return;
}
if ((blade = get_eq_char (ch, WEAR_HOLD)) == NULL
|| blade->item_type != ITEM_WEAPON)
{
stc ("You dont have a weapon in your left hand.\n\r", ch);
return;
}
if (arg[0] == '\0' && ch->fighting == NULL)
{
send_to_char ("Who do you wish to SideSwipe?\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;
if (ch == victim)
{
send_to_char ("SideSwipe yourself?\n\r", ch);
return;
}
if (IS_COMBO (ch, COMBO_FAILED))
{
ch->combocrap = 0;
}
if (IS_COMBO (ch, COMBO_POUND))
{
fumble (ch, 2);
return;
}
else if (IS_COMBO (ch, COMBO_BEGUN) && IS_COMBO (ch, COMBO_STAB))
{
act ("#LYour $p #Lis coated in a shimmering aura of pure cold.#n",
ch, blade, victim, TO_CHAR);
act ("$n#L's#n $p #Lis coated in a shimmering aura of pure cold.#n",
ch, blade, victim, TO_VICT);
act ("$n#L's#n $p #Lis coated in a shimmering aura of pure cold.#n", ch,
blade, victim, TO_NOTVICT);
}
else if (IS_COMBO (ch, COMBO_BEGUN))
{
act ("#cYour#n $p #cturns back to normal.#n", ch, blade, victim,
TO_CHAR);
act ("$n's $p #cturns back to normal.#n", ch, blade, victim, TO_ROOM);
failed = TRUE;
}
else
{
ch->combocrap = 0;
}
if (IS_SET (blade->spectype, SITEM_SILVER))
silver = TRUE;
waiting (ch, 6);
dam = number_range (1, 6);
dam = kensai_dam (ch, victim, dam, weapon, right);
act
("You swing your left blade in a sweeping arch, biting deeply into $N's shoulder.",
ch, NULL, victim, TO_CHAR);
act
("$n swings $s left blade in a sweeping arch, biting deeply into your shoulder.",
ch, NULL, victim, TO_VICT);
act
("$n swings $s left blade in a sweeping arch, biting deeply into $N's shoulder.",
ch, NULL, victim, TO_NOTVICT);
if (silver)
{
if (IS_QUICK (ch, QUICKENING_TRIPLE))
sev_hit (ch, victim, dam, gsn_sideswipe, DAM_SILVER, 3, TRUE, TRUE,
TRUE);
else
damage (ch, victim, dam, gsn_sideswipe, DAM_SILVER, TRUE, TRUE, TRUE);
}
else
{
if (IS_QUICK (ch, QUICKENING_TRIPLE))
sev_hit (ch, victim, dam, gsn_sideswipe, DAM_NORMAL, 3, TRUE, TRUE,
TRUE);
else
damage (ch, victim, dam, gsn_sideswipe, DAM_NORMAL, TRUE, TRUE, TRUE);
}
SET_BIT (ch->combocrap, COMBO_POUND);
ch->battlefury += number_range (50, 120);
if (ch->battlefury > 1000)
ch->battlefury = 1000 + number_range (1, 31);
ch->damcap[DAM_CHANGE] = 1;
if (failed)
{
ch->combocrap = 0;
}
return;
}
void
do_hiltsmash (CHAR_DATA * ch, char *argument)
{
CHAR_DATA *victim;
OBJ_DATA *blade;
bool weapon = FALSE;
bool right = FALSE;
bool silver = FALSE;
bool stun = FALSE;
char arg[MIL];
int dam;
argument = one_argument (argument, arg);
if (IS_NPC (ch))
return;
if (!IS_KENSAI (ch))
{
do_huh (ch, "");
return;
}
if (!IS_WPNM (ch, WPM_CRUSH))
{
stc ("You havent learned that technique.\n\r", ch);
return;
}
if ((blade = get_eq_char (ch, WEAR_WIELD)) == NULL
|| blade->item_type != ITEM_WEAPON)
{
stc ("You dont have a weapon in your right hand.\n\r", ch);
return;
}
if (arg[0] == '\0')
{
send_to_char ("Who do you wish to HiltSmash?\n\r", ch);
return;
}
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;
if (victim->position < POS_FIGHTING)
{
send_to_char ("You can only Hiltsmash someone who is standing.\n\r",
ch);
return;
}
if (ch == victim)
{
send_to_char ("HiltSmash yourself?\n\r", ch);
return;
}
if (IS_SET (blade->spectype, SITEM_SILVER))
silver = TRUE;
waiting (ch, 6);
dam = number_range (1, 6);
dam = kensai_dam (ch, victim, dam, weapon, right);
act ("You smash the hilt of your left blade into the back of $N's head.",
ch, NULL, victim, TO_CHAR);
act ("Somthing smashes into the back of your head, everything goes black.",
ch, NULL, victim, TO_VICT);
act ("$n smahes the hilt of $s left blade into the back of $N's head.", ch,
NULL, victim, TO_NOTVICT);
if (silver)
{
if (IS_QUICK (ch, QUICKENING_TRIPLE))
sev_hit (ch, victim, dam, gsn_hiltsmash, DAM_SILVER, 3, TRUE, TRUE,
TRUE);
else
damage (ch, victim, dam, gsn_hiltsmash, DAM_SILVER, TRUE, TRUE, TRUE);
}
else
{
if (IS_QUICK (ch, QUICKENING_TRIPLE))
sev_hit (ch, victim, dam, gsn_hiltsmash, DAM_NORMAL, 3, TRUE, TRUE,
TRUE);
else
damage (ch, victim, dam, gsn_hiltsmash, DAM_NORMAL, TRUE, TRUE, TRUE);
}
if (victim == NULL || victim->position == POS_DEAD || dam < 1)
return;
if (victim->position == POS_FIGHTING)
stop_fighting (victim, TRUE);
act ("You have been knocked on your ass!", victim, NULL, NULL, TO_CHAR);
act ("$n has been knocked on their ass!", victim, NULL, NULL, TO_ROOM);
victim->position = POS_STUNNED;
return;
}
void
do_cleave (CHAR_DATA * ch, char *argument)
{
CHAR_DATA *victim;
OBJ_DATA *blade;
bool weapon = TRUE;
bool right = TRUE;
bool silver = FALSE;
bool failed = FALSE;
char arg[MIL];
int dam;
bool combo = FALSE;
argument = one_argument (argument, arg);
if (IS_NPC (ch))
return;
if (!IS_KENSAI (ch))
{
do_huh (ch, "");
return;
}
if (!IS_WPNM (ch, WPM_GREP))
{
stc ("You havent learned that technique.\n\r", ch);
return;
}
if ((blade = get_eq_char (ch, WEAR_WIELD)) == NULL
|| blade->item_type != ITEM_WEAPON)
{
stc ("You dont have a weapon in your right hand.\n\r", ch);
return;
}
if (arg[0] == '\0' && ch->fighting == NULL)
{
send_to_char ("Who do you wish to Cleave?\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;
if (ch == victim)
{
send_to_char ("Cleave yourself?\n\r", ch);
return;
}
if (IS_COMBO (ch, COMBO_FAILED))
{
ch->combocrap = 0;
}
if (IS_COMBO (ch, COMBO_GREP))
{
fumble (ch, 1);
return;
}
else if (IS_COMBO (ch, COMBO_BEGUN) && IS_COMBO (ch, COMBO_SLICE)
&& IS_COMBO (ch, COMBO_BITE))
{
combo = TRUE;
ch->combocrap = 0;
}
else if (ch->combocrap == 0)
{
act ("#0Your#n $p#0 starts humming with a slight vibration.#n", ch,
blade, victim, TO_CHAR);
act ("$n#0's#n $p#0 starts humming with a slight vibration.#n", ch,
blade, victim, TO_VICT);
act ("$n#0's#n $p#0 starts humming with a slight vibration.#n", ch,
blade, victim, TO_NOTVICT);
SET_BIT (ch->combocrap, COMBO_BEGUN);
}
else if (IS_COMBO (ch, COMBO_BEGUN))
{
act ("#cYour#n $p #cturns back to normal.#n", ch, blade, victim,
TO_CHAR);
act ("$n's $p #cturns back to normal.#n", ch, blade, victim, TO_ROOM);
failed = TRUE;
}
else
{
ch->combocrap = 0;
}
if (IS_SET (blade->spectype, SITEM_SILVER))
silver = TRUE;
waiting (ch, 6);
dam = number_range (1, 6);
dam = kensai_dam (ch, victim, dam, weapon, right);
if (combo)
{
int i, max;
dam *= 1.2;
do_say (ch, "Flaming Phoenix Blade!");
act
("#yYou cleave your #Rf#rl#Ra#rm#Ri#rn#Rg#y right blade down at the back of#n $N#y's head.#n",
ch, NULL, victim, TO_CHAR);
if (!IS_NPC (victim))
{
act
("#yYou feel an intense searing pain as $n's #Rf#rl#Ra#rm#Ri#rn#Rg#y right blade cleaves into the back of your head.#n",
ch, NULL, victim, TO_VICT);
}
act
("#y$n cleaves $s #Rf#rl#Ra#rm#Ri#rn#Rg#y right blade down at the back of #n$N#y's head.#n",
ch, NULL, victim, TO_NOTVICT);
if (IS_QUICK (ch, QUICKENING_TRIPLE))
sev_hit (ch, victim, dam, gsn_fcleave, DAM_FIRE, 3, TRUE, TRUE, TRUE);
else
damage (ch, victim, dam, gsn_fcleave, DAM_FIRE, TRUE, TRUE, TRUE);
if (victim != NULL)
{
act
("#yYou go berserk and let loose a barrage of #Rf#rl#Ra#rm#Ri#rn#Rg#y blows at #n$N#y's back.#n",
ch, NULL, victim, TO_CHAR);
if (!IS_NPC (victim))
{
act
("#y$n goes berserk and lets loose a barrage of #Rf#rl#Ra#rm#Ri#rn#Rg#y blows at your back.#n",
ch, NULL, victim, TO_VICT);
}
act
("#y$n goes berserk and lets loose a barrage of #Rf#rl#Ra#rm#Ri#rn#Rg#y blows at #n$N#y's back.#n",
ch, NULL, victim, TO_NOTVICT);
max = ch->battlefury / 200;
if (max < 1)
max = 1;
for (i = 0; i < max; i++)
{
dam /= 1.2;
damage (ch, victim, dam, gsn_fstrike, DAM_FIRE, TRUE, TRUE,
TRUE);
}
}
return;
}
act
("You swing your right blade high, then cleave it down at $N's forehead.",
ch, NULL, victim, TO_CHAR);
act
("$n swings $s right blade high, then cleaves it down at $N's forehead.",
ch, NULL, victim, TO_VICT);
act
("$n swings $s right blade high, then cleaves it down at $N's forehead.",
ch, NULL, victim, TO_NOTVICT);
if (silver)
{
if (IS_QUICK (ch, QUICKENING_TRIPLE))
sev_hit (ch, victim, dam, gsn_cleave, DAM_SILVER, 3, TRUE, TRUE,
TRUE);
else
damage (ch, victim, dam, gsn_cleave, DAM_SILVER, TRUE, TRUE, TRUE);
}
else
{
if (IS_QUICK (ch, QUICKENING_TRIPLE))
sev_hit (ch, victim, dam, gsn_cleave, DAM_NORMAL, 3, TRUE, TRUE,
TRUE);
else
damage (ch, victim, dam, gsn_cleave, DAM_NORMAL, TRUE, TRUE, TRUE);
}
SET_BIT (ch->combocrap, COMBO_GREP);
ch->battlefury += number_range (50, 120);
if (ch->battlefury > 1000)
ch->battlefury = 1000 + number_range (1, 31);
ch->damcap[DAM_CHANGE] = 1;
if (failed)
{
ch->combocrap = 0;
}
return;
}
void
do_backslash (CHAR_DATA * ch, char *argument)
{
CHAR_DATA *victim;
OBJ_DATA *blade;
bool weapon = TRUE;
bool right = FALSE;
bool silver = FALSE;
bool failed = FALSE;
char arg[MIL];
int dam;
argument = one_argument (argument, arg);
if (IS_NPC (ch))
return;
if (!IS_KENSAI (ch))
{
do_huh (ch, "");
return;
}
if (!IS_WPNM (ch, WPM_BITE))
{
stc ("You havent learned that technique.\n\r", ch);
return;
}
if ((blade = get_eq_char (ch, WEAR_HOLD)) == NULL
|| blade->item_type != ITEM_WEAPON)
{
stc ("You dont have a weapon in your left hand.\n\r", ch);
return;
}
if (arg[0] == '\0' && ch->fighting == NULL)
{
send_to_char ("Who do you wish to BackSlash?\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;
if (ch == victim)
{
send_to_char ("BackSlash yourself?\n\r", ch);
return;
}
if (IS_COMBO (ch, COMBO_FAILED))
{
ch->combocrap = 0;
}
if (IS_COMBO (ch, COMBO_BITE))
{
fumble (ch, 2);
return;
}
else if (IS_COMBO (ch, COMBO_BEGUN) && IS_COMBO (ch, COMBO_SLICE))
{
act ("#RYour#n $p#R is enveloped in a shimmering flame.#n", ch, blade,
victim, TO_CHAR);
act ("$n#R's#n $p#R is enveloped in a shimmering flame.#n", ch, blade,
victim, TO_VICT);
act ("$n#R's#n $p#R is enveloped in a shimmering flame.#n", ch, blade,
victim, TO_NOTVICT);
}
else if (IS_COMBO (ch, COMBO_BEGUN))
{
act ("#cYour#n $p #cturns back to normal.#n", ch, blade, victim,
TO_CHAR);
act ("$n's $p #cturns back to normal.#n", ch, blade, victim, TO_ROOM);
failed = TRUE;
}
else
{
ch->combocrap = 0;
}
if (IS_SET (blade->spectype, SITEM_SILVER))
silver = TRUE;
waiting (ch, 6);
dam = number_range (1, 6);
dam = kensai_dam (ch, victim, dam, weapon, right);
act
("You duck under $N's blows, then slash your left blade across $s back.",
ch, NULL, victim, TO_CHAR);
act
("$n ducks under your blows, then you feel a biting pain as $s blade slashes across your back.",
ch, NULL, victim, TO_VICT);
act
("$n ducks under $N's blows, then slashes $s left blade across $S back.",
ch, NULL, victim, TO_NOTVICT);
if (silver)
{
if (IS_QUICK (ch, QUICKENING_TRIPLE))
sev_hit (ch, victim, dam, gsn_backslash, DAM_SILVER, 3, TRUE, TRUE,
TRUE);
else
damage (ch, victim, dam, gsn_backslash, DAM_SILVER, TRUE, TRUE, TRUE);
}
else
{
if (IS_QUICK (ch, QUICKENING_TRIPLE))
sev_hit (ch, victim, dam, gsn_backslash, DAM_NORMAL, 3, TRUE, TRUE,
TRUE);
else
damage (ch, victim, dam, gsn_backslash, DAM_NORMAL, TRUE, TRUE, TRUE);
}
SET_BIT (ch->combocrap, COMBO_BITE);
ch->battlefury += number_range (50, 120);
if (ch->battlefury > 1000)
ch->battlefury = 1000 + number_range (1, 31);
ch->damcap[DAM_CHANGE] = 1;
if (failed)
{
ch->combocrap = 0;
}
return;
}
void
do_downstab (CHAR_DATA * ch, char *argument)
{
CHAR_DATA *victim;
CHAR_DATA *vch;
CHAR_DATA *vch_next;
CHAR_DATA *mount;
OBJ_DATA *blade;
bool weapon = TRUE;
bool right = TRUE;
bool silver = FALSE;
bool combo = FALSE;
bool failed = FALSE;
char arg[MIL];
int dam;
int number_hit = 0;
int max_hit = 1;
argument = one_argument (argument, arg);
if (IS_NPC (ch))
return;
if (!IS_KENSAI (ch))
{
do_huh (ch, "");
return;
}
if (!IS_WPNM (ch, WPM_PIERCE))
{
stc ("You havent learned that technique.\n\r", ch);
return;
}
if ((blade = get_eq_char (ch, WEAR_WIELD)) == NULL
|| blade->item_type != ITEM_WEAPON)
{
stc ("You dont have a weapon in your right hand.\n\r", ch);
return;
}
if (arg[0] == '\0' && ch->fighting == NULL)
{
send_to_char ("Who do you wish to DownStab?\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;
if (ch == victim)
{
send_to_char ("DownStab yourself?\n\r", ch);
return;
}
if (IS_COMBO (ch, COMBO_FAILED))
{
ch->combocrap = 0;
}
if (IS_COMBO (ch, COMBO_PIERCE))
{
fumble (ch, 2);
return;
}
else if (IS_COMBO (ch, COMBO_BEGUN) && IS_COMBO (ch, COMBO_GREP)
&& IS_COMBO (ch, COMBO_SLASH))
{
combo = TRUE;
ch->combocrap = 0;
}
else if (IS_COMBO (ch, COMBO_BEGUN))
{
act ("#cYour#n $p #cturns back to normal.#n", ch, blade, victim,
TO_CHAR);
act ("$n's $p #cturns back to normal.#n", ch, blade, victim, TO_ROOM);
failed = TRUE;
}
else
{
ch->combocrap = 0;
}
if (IS_SET (blade->spectype, SITEM_SILVER))
silver = TRUE;
waiting (ch, 6);
dam = number_range (1, 6);
dam = kensai_dam (ch, victim, dam, weapon, right);
if (combo)
{
dam *= 1.5;
max_hit += ch->battlefury / 10;
if (max_hit > 9)
max_hit = 9;
do_say (ch, "Tarasque's Earth Cleaver!");
act ("You leap high into the air.", ch, NULL, NULL, TO_CHAR);
act ("$n leaps high into the air.", ch, NULL, NULL, TO_ROOM);
if (victim != NULL && victim->position != POS_DEAD)
act ("$n slams into you knocking you off your feet.", ch, NULL,
victim, TO_VICT);
act ("$n slams into $N knocking $M off $S feet.", ch, NULL, victim,
TO_NOTVICT);
act ("You slam into $N knocking $M off $S feet.", ch, NULL, victim,
TO_CHAR);
if (victim != NULL && victim->position != POS_DEAD)
act
("Then standing on your chest $n drives $s $p through you and down into the ground beneath you.",
ch, blade, victim, TO_VICT);
act
("Then standing on $N chest $n drives $s $p through $M and down into the ground beneath $M.",
ch, blade, victim, TO_NOTVICT);
act
("Then standing on $N chest you drive your $p through $M and down into the ground beneath $M.",
ch, blade, victim, TO_CHAR);
if (silver)
{
if (IS_QUICK (ch, QUICKENING_TRIPLE))
sev_hit (ch, victim, dam, gsn_downstab, DAM_SILVER, 3, TRUE, TRUE,
TRUE);
else
damage (ch, victim, dam, gsn_downstab, DAM_SILVER, TRUE, TRUE,
TRUE);
}
else
{
if (IS_QUICK (ch, QUICKENING_TRIPLE))
sev_hit (ch, victim, dam, gsn_downstab, DAM_NORMAL, 3, TRUE, TRUE,
TRUE);
else
damage (ch, victim, dam, gsn_downstab, DAM_NORMAL, TRUE, TRUE,
TRUE);
}
act
("$p pulsates as it channels its unleashed power through $N and down into the earth.",
ch, blade, victim, TO_NOTVICT);
act
("$p pulsates as it channels its unleashed power through $N and down into the earth.",
ch, blade, victim, TO_CHAR);
if (victim != NULL && victim->position != POS_DEAD)
act
("$p pulsates as it channels its unleashed power through you and down into the earth.",
ch, blade, victim, TO_VICT);
act ("The earth around $n heaves and shakes violently.", ch, NULL, NULL,
TO_ROOM);
act ("The earth around you heaves and shakes violently.", ch, NULL,
NULL, TO_CHAR);
for (vch = char_list; vch != NULL; vch = vch_next)
{
vch_next = vch->next;
if (vch->in_room == NULL)
continue;
if (vch->in_room == NULL)
continue;
if (!IS_NPC (vch))
{
if (is_same_group (vch, ch))
continue;
}
if (!IS_NPC (vch) && vch->pcdata->chobj != NULL)
continue;
if (ch == vch)
continue;
if (number_hit > 9)
continue;
if (vch->in_room == ch->in_room)
{
if ((mount = ch->mount) != NULL)
{
if (mount == vch)
continue;
}
if (can_see (ch, vch))
{
sev_hit (ch, vch, dam, skill_lookup ("earthquake"),
DAM_NORMAL, number_range (1, 3), FALSE, TRUE,
TRUE);
number_hit++;
}
}
}
return;
}
act
("You leap over $N's blows, then stab your right blade down toward $S chest.",
ch, NULL, victim, TO_CHAR);
act
("$n leaps over your blows, then stabs $s right blade down at your chest.",
ch, NULL, victim, TO_VICT);
act
("$n leaps over $N's blows, then stabs $s right blade down at $S chest.",
ch, NULL, victim, TO_NOTVICT);
if (silver)
{
if (IS_QUICK (ch, QUICKENING_TRIPLE))
sev_hit (ch, victim, dam, gsn_downstab, DAM_SILVER, 3, TRUE, TRUE,
TRUE);
else
damage (ch, victim, dam, gsn_downstab, DAM_SILVER, TRUE, TRUE, TRUE);
}
else
{
if (IS_QUICK (ch, QUICKENING_TRIPLE))
sev_hit (ch, victim, dam, gsn_downstab, DAM_NORMAL, 3, TRUE, TRUE,
TRUE);
else
damage (ch, victim, dam, gsn_downstab, DAM_NORMAL, TRUE, TRUE, TRUE);
}
SET_BIT (ch->combocrap, COMBO_PIERCE);
ch->battlefury += number_range (50, 120);
if (ch->battlefury > 1000)
ch->battlefury = 1000 + number_range (1, 31);
ch->damcap[DAM_CHANGE] = 1;
if (failed)
{
ch->combocrap = 0;
}
return;
}
void
do_neckslice (CHAR_DATA * ch, char *argument)
{
CHAR_DATA *victim;
OBJ_DATA *blade;
bool weapon = TRUE;
bool right = TRUE;
bool silver = FALSE;
bool failed = FALSE;
char arg[MIL];
int dam;
argument = one_argument (argument, arg);
if (IS_NPC (ch))
return;
if (!IS_KENSAI (ch))
{
do_huh (ch, "");
return;
}
if (!IS_WPNM (ch, WPM_SUCK))
{
stc ("You havent learned that technique.\n\r", ch);
return;
}
if ((blade = get_eq_char (ch, WEAR_WIELD)) == NULL
|| blade->item_type != ITEM_WEAPON)
{
stc ("You dont have a weapon in your right hand.\n\r", ch);
return;
}
if (arg[0] == '\0' && ch->fighting == NULL)
{
send_to_char ("Who do you wish to NeckSlice?\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;
if (ch == victim)
{
send_to_char ("NeckSlice yourself?\n\r", ch);
return;
}
if (IS_COMBO (ch, COMBO_FAILED))
{
ch->combocrap = 0;
}
if (IS_COMBO (ch, COMBO_SUCK))
{
fumble (ch, 1);
return;
}
else if (ch->combocrap == 0)
{
act ("#0Your#n $p#0 starts pulsing with dark energy.#n", ch, blade,
victim, TO_CHAR);
act ("$n#0's#n $p#0 starts pulsing with dark energy.#n", ch, blade,
victim, TO_VICT);
act ("$n#0's#n $p#0 starts pulsing with dark energy.#n", ch, blade,
victim, TO_NOTVICT);
SET_BIT (ch->combocrap, COMBO_BEGUN);
}
else if (IS_COMBO (ch, COMBO_BEGUN))
{
act ("#cYour#n $p #cturns back to normal.#n", ch, blade, victim,
TO_CHAR);
act ("$n's $p #cturns back to normal.#n", ch, blade, victim, TO_ROOM);
failed = TRUE;
}
else
{
ch->combocrap = 0;
}
if (IS_SET (blade->spectype, SITEM_SILVER))
silver = TRUE;
waiting (ch, 6);
dam = number_range (1, 6);
dam = kensai_dam (ch, victim, dam, weapon, right);
act
("You swing your right blade at $N's neck, blasting through $S defences, slicing your weapon across $N's throat.",
ch, NULL, victim, TO_CHAR);
act
("$n swings $s right blade at your neck, blasting through your defences, slicing $s weapon across your throat.",
ch, NULL, victim, TO_VICT);
act
("$n swings $s right blade at $N's neck, slicing $s weapon across $S neck.",
ch, NULL, victim, TO_NOTVICT);
if (silver)
{
if (IS_QUICK (ch, QUICKENING_TRIPLE))
sev_hit (ch, victim, dam, gsn_neckslice, DAM_SILVER, 3, TRUE, TRUE,
TRUE);
else
damage (ch, victim, dam, gsn_neckslice, DAM_SILVER, TRUE, TRUE, TRUE);
}
else
{
if (IS_QUICK (ch, QUICKENING_TRIPLE))
sev_hit (ch, victim, dam, gsn_neckslice, DAM_NORMAL, 3, TRUE, TRUE,
TRUE);
else
damage (ch, victim, dam, gsn_neckslice, DAM_NORMAL, TRUE, TRUE, TRUE);
}
SET_BIT (ch->combocrap, COMBO_SUCK);
ch->battlefury += number_range (50, 120);
if (ch->battlefury > 1000)
ch->battlefury = 1000 + number_range (1, 31);
ch->damcap[DAM_CHANGE] = 1;
if (failed)
{
ch->combocrap = 0;
}
return;
}
void
improve_tough (CHAR_DATA * ch)
{
char buf[MIL];
char bufskill[100];
int dice1, dice2;
bool trained = FALSE;
dice1 = number_percent ();
dice2 = number_range (1, 100);
if (IS_SET (mudconfig->world_affects, WORLD_DOUBLETRAIN))
{
dice1 += 10;
dice2 += 10;
}
if (IS_SET (mudconfig->world_affects, WORLD_HALFTRAIN))
{
dice1 -= 10;
dice2 -= 10;
}
if (IS_NPC (ch))
return;
if (IS_COR (ch, COR_TOUGHNESS))
return;
if (ch->pcdata->kensaitough >= 1000)
{
ch->pcdata->kensaitough = 1000;
return;
}
if ((dice1 > ch->pcdata->kensaitrain && dice2 > ch->pcdata->kensaitrain) ||
(dice1 >= 75 || dice2 >= 75))
ch->pcdata->kensaitrain++;
else
return;
if (ch->pcdata->kensaitrain >= ch->pcdata->kensaitough)
{
ch->pcdata->kensaitough++;
trained = TRUE;
ch->pcdata->kensaitrain = 0;
}
if (!trained)
{
return;
}
if (ch->pcdata->kensaitough == 1)
sprintf (bufskill, "starts to harden");
else if (ch->pcdata->kensaitough == 100)
sprintf (bufskill, "takes on a leathery hardness");
else if (ch->pcdata->kensaitough == 200)
sprintf (bufskill, "is about as hard as bark");
else if (ch->pcdata->kensaitough == 300)
sprintf (bufskill, "takes on a wood hardness");
else if (ch->pcdata->kensaitough == 400)
sprintf (bufskill, "attains a rock hard sheen");
else if (ch->pcdata->kensaitough == 500)
sprintf (bufskill, "takes on a metalic hardness");
else if (ch->pcdata->kensaitough == 600)
sprintf (bufskill, "is as hard as the hardest rock");
else if (ch->pcdata->kensaitough == 700)
sprintf (bufskill, "has attained an armor-like quality");
else if (ch->pcdata->kensaitough == 800)
sprintf (bufskill, "is as hard as dwarven smithed armor");
else if (ch->pcdata->kensaitough == 900)
sprintf (bufskill, "attains the hardness of draconic scales");
else if (ch->pcdata->kensaitough == 1000)
sprintf (bufskill, "has become so hard it could bend weapons");
else
return;
sprintf (buf, "#CYour skin %s.#n\n\r", bufskill);
send_to_char (buf, ch);
if (ch->pcdata->kensaitough == 1000 && !IS_COR (ch, COR_TOUGHNESS))
{
SET_BIT (ch->corbits, COR_TOUGHNESS);
ch->exp += 5000000;
ch->pcdata->kensaitrain = 0;
}
return;
}
void
improve_discipline (CHAR_DATA * ch)
{
char buf[MIL];
char bufskill[100];
int dice1, dice2;
bool trained = FALSE;
dice1 = number_percent ();
dice2 = number_range (1, 100);
if (IS_SET (mudconfig->world_affects, WORLD_DOUBLETRAIN))
{
dice1 += 10;
dice2 += 10;
}
if (IS_SET (mudconfig->world_affects, WORLD_HALFTRAIN))
{
dice1 -= 10;
dice2 -= 10;
}
if (IS_NPC (ch))
return;
if (!IS_COR (ch, COR_TOUGHNESS))
return;
if (IS_COR (ch, COR_DISCIPLINE))
return;
if (ch->pcdata->kensaidisc >= 1000)
{
ch->pcdata->kensaidisc = 1000;
return;
}
if ((dice1 > ch->pcdata->kensaitrain && dice2 > ch->pcdata->kensaitrain) ||
(dice1 >= 75 || dice2 >= 75))
ch->pcdata->kensaitrain += 1;
else
return;
if (ch->pcdata->kensaitrain >= ch->pcdata->kensaidisc)
{
ch->pcdata->kensaidisc++;
trained = TRUE;
ch->pcdata->kensaitrain = 0;
}
if (!trained)
{
return;
}
if (ch->pcdata->kensaidisc == 1)
sprintf (bufskill, "You start training your discipline");
else if (ch->pcdata->kensaidisc == 100)
sprintf (bufskill, "You are disciplined enough to leave the last cookie");
else if (ch->pcdata->kensaidisc == 200)
sprintf (bufskill,
"Your mind is hardly your best weapon, but it is improving");
else if (ch->pcdata->kensaidisc == 300)
sprintf (bufskill,
"You can barly make a candle flicker, or is that the wind?");
else if (ch->pcdata->kensaidisc == 400)
sprintf (bufskill, "You can push a candle across a table with your mind");
else if (ch->pcdata->kensaidisc == 500)
sprintf (bufskill, "You can now levitate a candle");
else if (ch->pcdata->kensaidisc == 600)
sprintf (bufskill, "You have attained an iron discipline");
else if (ch->pcdata->kensaidisc == 700)
sprintf (bufskill, "You can levitate with intense concentration");
else if (ch->pcdata->kensaidisc == 800)
sprintf (bufskill, "Your discipline rivals any Warlock");
else if (ch->pcdata->kensaidisc == 900)
sprintf (bufskill, "You can bend steal bars with your mind");
else if (ch->pcdata->kensaidisc == 1000)
sprintf (bufskill, "Your discipline rivals the Gods");
else
return;
sprintf (buf, "#C%s.#n\n\r", bufskill);
send_to_char (buf, ch);
if (ch->pcdata->kensaidisc == 1000 && !IS_COR (ch, COR_DISCIPLINE))
{
SET_BIT (ch->corbits, COR_DISCIPLINE);
ch->exp += 5000000;
ch->pcdata->kensaitrain = 0;
}
return;
}
void
do_checkfocus (CHAR_DATA * ch, char *argument)
{
char buf[MSL];
if (IS_NPC (ch))
return;
if (!IS_KENSAI (ch))
{
do_huh (ch, "");
return;
}
if (!IS_COR (ch, COR_TOUGHNESS))
{
do_huh (ch, "");
return;
}
if (ch->pcdata->kensaidisc < 100)
{
stc ("You dont have the discipline to focus your mind yet.\n\r", ch);
return;
}
stc
("#r--------------------------------------------------------------------------------#n\n\r",
ch);
stc ("#7 Focus Powers#n\n\r", ch);
stc
("#r--------------------------------------------------------------------------------#n\n\r",
ch);
if (ch->pcdata->kensaidisc >= 100)
{
sprintf (buf,
"#7(#y%s#7) Your focus grants you protection from evil.\n\r#7(#y%s#7) Your focus grants you resistance to damage.#n\n\r",
IS_SET (ch->affected_by,
AFF_PROTECT) ? "Active" : "Not Active",
IS_SET (ch->affected_by,
AFF_SANCTUARY) ? "Active" : "Not Active");
stc (buf, ch);
}
if (ch->pcdata->kensaidisc >= 100)
{
sprintf (buf, "#7(#y%s#7) Your focus protects you from blindness.\n\r",
IS_AFFECTED (ch, AFF_BLIND) ? "Active" : "Not Active");
stc (buf, ch);
}
if (ch->pcdata->kensaidisc >= 200)
{
sprintf (buf,
"#7(#y%s#7) Your focus lets you see in the dark.\n\r#7(#y%s#7) Your focus allows you to see invisible creatures.#n\n\r",
IS_AFFECTED (ch, AFF_INFRARED) ? "Active" : "Not Active",
IS_AFFECTED (ch, AFF_DETECT_INVIS) ? "Active" : "Not Active");
stc (buf, ch);
}
if (ch->pcdata->kensaidisc >= 300)
{
sprintf (buf,
"#7(#y%s#7) Your focus allows you to pass through doors.\n\r#7(#y%s#7) Your focus lets you move with out any sound.#n\n\r",
IS_AFFECTED (ch, AFF_PASS_DOOR) ? "Active" : "Not Active",
IS_AFFECTED (ch, AFF_SNEAK) ? "Active" : "Not Active");
stc (buf, ch);
}
if (ch->pcdata->kensaidisc >= 400)
{
sprintf (buf,
"#7(#y%s#7) Your focus makes you invisible to the naked eye.#n\n\r",
IS_AFFECTED (ch, AFF_INVISIBLE) ? "Active" : "Not Active");
stc (buf, ch);
}
if (ch->pcdata->kensaidisc >= 400)
{
sprintf (buf, "#7(#y%s#7) Your focus grants you flight.#n\n\r",
IS_AFFECTED (ch, AFF_FLYING) ? "Active" : "Not Active");
stc (buf, ch);
}
if (ch->pcdata->kensaidisc >= 500)
{
sprintf (buf,
"#7(#y%s#7) Your focus allows you to summon a lightning shield.#n\n\r",
IS_ITEMAFF (ch, ITEMA_SHOCKSHIELD) ? "Active" : "Not Active");
stc (buf, ch);
}
if (ch->pcdata->kensaidisc >= 500)
{
sprintf (buf,
"#7(#y%s#7) Your focus allows you to summon a fire shield.#n\n\r",
IS_ITEMAFF (ch, ITEMA_FIRESHIELD) ? "Active" : "Not Active");
stc (buf, ch);
}
if (ch->pcdata->kensaidisc >= 500)
{
sprintf (buf,
"#7(#y%s#7) Your focus allows you to summon an ice shield.#n\n\r",
IS_ITEMAFF (ch, ITEMA_ICESHIELD) ? "Active" : "Not Active");
stc (buf, ch);
}
if (ch->pcdata->kensaidisc >= 500)
{
sprintf (buf,
"#7(#y%s#7) Your focus allows you to summon an acid shield.#n\n\r",
IS_ITEMAFF (ch, ITEMA_ACIDSHIELD) ? "Active" : "Not Active");
stc (buf, ch);
}
if (ch->pcdata->kensaidisc >= 600)
{
sprintf (buf,
"#7(#y%s#7) Your focus allows you to summon a shield of swirling blades.#n\n\r",
IS_ITEMAFF (ch, ITEMA_BLADESHIELD) ? "Active" : "Not Active");
stc (buf, ch);
}
if (ch->pcdata->kensaidisc >= 700)
{
sprintf (buf,
"#7(#y%s#7) Your focus allows you to move faster then the eye can follow.#n\n\r",
IS_ITEMAFF (ch, ITEMA_SPEED) ? "Active" : "Not Active");
stc (buf, ch);
}
if (ch->pcdata->kensaidisc >= 800)
{
sprintf (buf,
"#7(#y%s#7) Your focus makes your skin harden, protecting you from damage.#n\n\r",
IS_ITEMAFF (ch, ITEMA_RESISTANCE) ? "Active" : "Not Active");
stc (buf, ch);
}
if (ch->pcdata->kensaidisc >= 900)
{
sprintf (buf,
"#7(#y%s#7) Your focus protects you from attacks on your mind.#n\n\r",
IS_XXX (ch, XXX_MINDBLOCK) ? "Active" : "Not Active");
stc (buf, ch);
}
if (ch->pcdata->kensaidisc >= 1000)
{
sprintf (buf,
"#7(#y%s#7) Your focus protects you from attacks against your focus.#n\n\r",
IS_XXX (ch, XXX_SFOCUS) ? "Active" : "Not Active");
stc (buf, ch);
}
stc
("#r--------------------------------------------------------------------------------#n\n\r",
ch);
return;
}
void
do_focus (CHAR_DATA * ch, char *argument)
{
int focus = 0;
if (IS_NPC (ch))
return;
if (!IS_KENSAI (ch))
{
do_huh (ch, "");
return;
}
if (!IS_COR (ch, COR_TOUGHNESS))
{
do_huh (ch, "");
return;
}
if (ch->pcdata->kensaidisc < 100)
{
stc ("You dont have the discipline to focus your mind yet.\n\r", ch);
return;
}
if (IS_COR (ch, COR_FOCUS))
{
if (ch->pcdata->kensaidisc >= 100)
{
if (IS_AFFECTED (ch, AFF_PROTECT))
{
REMOVE_BIT (ch->affected_by, AFF_PROTECT);
// send_to_char( "The divine aura around you fades.\n\r", ch );
// act("The divine aura around $n fades.",ch,NULL,NULL,TO_ROOM);
}
if (IS_AFFECTED (ch, AFF_SANCTUARY))
{
REMOVE_BIT (ch->affected_by, AFF_SANCTUARY);
// send_to_char( "The white aura around your body fades.\n\r", ch );
// act("The white aura about $n's body fades.",ch,NULL,NULL,TO_ROOM);
}
if (IS_AFFECTED (ch, AFF_BLIND))
{
REMOVE_BIT (ch->affected_by, AFF_BLIND);
// send_to_char( "You can see again.\n\r", ch );
// act("$n seems to be able to see again.",ch,NULL,NULL,TO_ROOM);
}
}
if (ch->pcdata->kensaidisc >= 200)
{
if (IS_AFFECTED (ch, AFF_DETECT_INVIS))
{
REMOVE_BIT (ch->affected_by, AFF_DETECT_INVIS);
// send_to_char( "Your eyes stop tingling.\n\r", ch );
// act("$n's eyes stop flickering with light.",ch,NULL,NULL,TO_ROOM);
}
if (IS_AFFECTED (ch, AFF_INFRARED))
{
REMOVE_BIT (ch->affected_by, AFF_INFRARED);
// send_to_char( "Your eyes stop glowing fiery red.\n\r", ch );
// act("$n's eyes stop glowing fiery red.",ch,NULL,NULL,TO_ROOM);
}
}
if (ch->pcdata->kensaidisc >= 300)
{
if (IS_AFFECTED (ch, AFF_SNEAK))
{
REMOVE_BIT (ch->affected_by, AFF_SNEAK);
// send_to_char( "You are no longer moving so quietly.\n\r", ch );
// act("$n is no longer moving so quietly.",ch,NULL,NULL,TO_ROOM);
}
if (IS_AFFECTED (ch, AFF_PASS_DOOR))
{
REMOVE_BIT (ch->affected_by, AFF_PASS_DOOR);
// send_to_char( "You feel solid again.\n\r", ch );
// act("$n is no longer translucent.",ch,NULL,NULL,TO_ROOM);
}
}
if (ch->pcdata->kensaidisc >= 400)
{
if (IS_AFFECTED (ch, AFF_INVISIBLE))
{
REMOVE_BIT (ch->affected_by, AFF_INVISIBLE);
// send_to_char( "You fade into existance.\n\r", ch );
// act("$n fades into existance.",ch,NULL,NULL,TO_ROOM);
}
if (IS_AFFECTED (ch, AFF_FLYING))
{
REMOVE_BIT (ch->affected_by, AFF_FLYING);
// send_to_char( "You slowly float to the ground.\n\r", ch );
// act("$n slowly floats to the ground.",ch,NULL,NULL,TO_ROOM);
}
}
if (ch->pcdata->kensaidisc >= 500)
{
if (IS_ITEMAFF (ch, ITEMA_SHOCKSHIELD))
{
REMOVE_BIT (ch->itemaffect, ITEMA_SHOCKSHIELD);
// send_to_char( "The crackling shield of lightning around you fades.\n\r", ch );
// act("The crackling shield of lightning around $n fades.",ch,NULL,NULL,TO_ROOM);
}
if (IS_ITEMAFF (ch, ITEMA_FIRESHIELD))
{
REMOVE_BIT (ch->itemaffect, ITEMA_FIRESHIELD);
// send_to_char( "The burning shield of fire around you fades.\n\r", ch );
// act("The burning shield of fire around $n fades.",ch,NULL,NULL,TO_ROOM);
}
if (IS_ITEMAFF (ch, ITEMA_ICESHIELD))
{
REMOVE_BIT (ch->itemaffect, ITEMA_ICESHIELD);
// send_to_char( "The shimmering shield of ice around you fades.\n\r", ch );
// act("The shimmering shield of ice around $n fades.",ch,NULL,NULL,TO_ROOM);
}
if (IS_ITEMAFF (ch, ITEMA_ACIDSHIELD))
{
REMOVE_BIT (ch->itemaffect, ITEMA_ACIDSHIELD);
// send_to_char( "The bubbling shield of acid around you fades.\n\r", ch );
// act("The bubbling shield of acid around $n fades.",ch,NULL,NULL,TO_ROOM);
}
}
if (ch->pcdata->kensaidisc >= 600)
{
if (IS_ITEMAFF (ch, ITEMA_BLADESHIELD))
{
REMOVE_BIT (ch->itemaffect, ITEMA_BLADESHIELD);
// send_to_char( "The swirling shield of blades around you fades.\n\r", ch );
// act("The swirling shield of blades around $n fades.",ch,NULL,NULL,TO_ROOM);
}
}
if (ch->pcdata->kensaidisc >= 700)
{
if (IS_ITEMAFF (ch, ITEMA_SPEED))
{
REMOVE_BIT (ch->itemaffect, ITEMA_SPEED);
// send_to_char ("Your actions slow down to normal speed.\n\r", ch);
// act ("$n stops moving at supernatural speed.", ch, NULL, NULL, TO_ROOM);
}
}
if (ch->pcdata->kensaidisc >= 800)
{
if (IS_ITEMAFF (ch, ITEMA_RESISTANCE))
{
REMOVE_BIT (ch->itemaffect, ITEMA_RESISTANCE);
}
}
if (ch->pcdata->kensaidisc >= 900)
{
if (IS_XXX (ch, XXX_MINDBLOCK))
{
REMOVE_BIT (ch->xxxbits, XXX_MINDBLOCK);
}
}
if (ch->pcdata->kensaidisc >= 1000)
{
if (IS_XXX (ch, XXX_SFOCUS))
{
REMOVE_BIT (ch->xxxbits, XXX_SFOCUS);
}
}
REMOVE_BIT (ch->corbits, COR_FOCUS);
stc ("You relax your focus, banishing your discipline powers.\n\r", ch);
act ("$n relaxes $s focus.", ch, NULL, NULL, TO_ROOM);
ch->pcdata->kensaifocus = 0;
return;
}
else
{
if (ch->pcdata->kensaidisc >= 100)
{
if (!IS_AFFECTED (ch, AFF_PROTECT))
{
SET_BIT (ch->affected_by, AFF_PROTECT);
// send_to_char( "You are surrounded by a divine aura.\n\r", ch );
// act("$n is surrounded by a divine aura.",ch,NULL,NULL,TO_ROOM);
}
if (!IS_AFFECTED (ch, AFF_SANCTUARY))
{
SET_BIT (ch->affected_by, AFF_SANCTUARY);
// send_to_char( "You are surrounded by a white aura.\n\r", ch );
// act("$n is surrounded by a white aura.",ch,NULL,NULL,TO_ROOM);
}
if (!IS_AFFECTED (ch, AFF_BLIND))
{
SET_BIT (ch->affected_by, AFF_BLIND);
// send_to_char( "You cannot see a thing!\n\r", ch );
// act("$n seems to be blinded!",ch,NULL,NULL,TO_ROOM);
}
focus++;
}
if (ch->pcdata->kensaidisc >= 200)
{
if (!IS_AFFECTED (ch, AFF_DETECT_INVIS))
{
SET_BIT (ch->affected_by, AFF_DETECT_INVIS);
// send_to_char( "Your eyes tingle.\n\r", ch );
// act("$n's eyes flicker with light.",ch,NULL,NULL,TO_ROOM);
}
if (!IS_AFFECTED (ch, AFF_INFRARED))
{
SET_BIT (ch->affected_by, AFF_INFRARED);
// send_to_char( "Your eyes glow fiery red.\n\r", ch );
// act("$n's eyes glow fiery red.",ch,NULL,NULL,TO_ROOM);
}
focus++;
}
if (ch->pcdata->kensaidisc >= 300)
{
if (!IS_AFFECTED (ch, AFF_SNEAK))
{
SET_BIT (ch->affected_by, AFF_SNEAK);
// send_to_char( "Your footsteps stop making any sound.\n\r", ch );
// act("$n's footsteps stop making any sound.",ch,NULL,NULL,TO_ROOM);
}
if (!IS_AFFECTED (ch, AFF_PASS_DOOR))
{
SET_BIT (ch->affected_by, AFF_PASS_DOOR);
// send_to_char( "You turn translucent.\n\r", ch );
// act("$n turns translucent.",ch,NULL,NULL,TO_ROOM);
}
focus++;
}
if (ch->pcdata->kensaidisc >= 400)
{
if (!IS_AFFECTED (ch, AFF_INVISIBLE))
{
SET_BIT (ch->affected_by, AFF_INVISIBLE);
// send_to_char( "You fade out of existance.\n\r", ch );
// act("$n fades out of existance.",ch,NULL,NULL,TO_ROOM);
}
if (!IS_AFFECTED (ch, AFF_FLYING))
{
SET_BIT (ch->affected_by, AFF_FLYING);
// send_to_char( "Your feet rise off the ground.\n\r", ch );
// act("$n's feet rise off the ground.",ch,NULL,NULL,TO_ROOM);
}
focus++;
}
if (ch->pcdata->kensaidisc >= 500)
{
if (!IS_ITEMAFF (ch, ITEMA_SHOCKSHIELD))
{
SET_BIT (ch->itemaffect, ITEMA_SHOCKSHIELD);
// send_to_char( "You are surrounded by a crackling shield of lightning.\n\r", ch );
// act("$n is surrounded by a crackling shield of lightning.",ch,NULL,NULL,TO_ROOM);
}
if (!IS_ITEMAFF (ch, ITEMA_FIRESHIELD))
{
SET_BIT (ch->itemaffect, ITEMA_FIRESHIELD);
// send_to_char( "You are surrounded by a burning shield of flames.\n\r", ch );
// act("$n is surrounded by a burning shield of flames.",ch,NULL,NULL,TO_ROOM);
}
if (!IS_ITEMAFF (ch, ITEMA_ICESHIELD))
{
SET_BIT (ch->itemaffect, ITEMA_ICESHIELD);
// send_to_char( "You are surrounded by a shimmering shield of ice.\n\r", ch );
// act("$n is surrounded by a shimmering shield of ice.",ch,NULL,NULL,TO_ROOM);
}
if (!IS_ITEMAFF (ch, ITEMA_ACIDSHIELD))
{
SET_BIT (ch->itemaffect, ITEMA_ACIDSHIELD);
// send_to_char( "You are surrounded by a bubbling shield of acid.\n\r", ch );
// act("$n is surrounded by a bubbling shield of acid.",ch,NULL,NULL,TO_ROOM);
}
focus++;
}
if (ch->pcdata->kensaidisc >= 600)
{
if (!IS_ITEMAFF (ch, ITEMA_BLADESHIELD))
{
SET_BIT (ch->itemaffect, ITEMA_BLADESHIELD);
// send_to_char( "You are surrounded by a shield of swirling blades.\n\r", ch );
// act("$n is surrounded by a shield of swirling blades.",ch,NULL,NULL,TO_ROOM);
}
focus++;
}
if (ch->pcdata->kensaidisc >= 700)
{
if (!IS_ITEMAFF (ch, ITEMA_SPEED))
{
SET_BIT (ch->itemaffect, ITEMA_SPEED);
// send_to_char ("You start moving faster than the eye can follow.\n\r", ch);
// act ("$n starts moving faster than the eye can follow.", ch, NULL, NULL, TO_ROOM);
}
focus++;
}
if (ch->pcdata->kensaidisc >= 800)
{
if (!IS_ITEMAFF (ch, ITEMA_RESISTANCE))
{
SET_BIT (ch->itemaffect, ITEMA_RESISTANCE);
// send_to_char ("You feel a presence protecting you from damage.\n\r", ch);
}
focus++;
}
if (ch->pcdata->kensaidisc >= 900)
{
if (!IS_XXX (ch, XXX_MINDBLOCK))
{
SET_BIT (ch->xxxbits, XXX_MINDBLOCK);
// send_to_char ("Your discipline protects you from attacks on your mind.\n\r", ch);
}
focus++;
}
if (ch->pcdata->kensaidisc >= 1000)
{
if (!IS_XXX (ch, XXX_SFOCUS))
{
SET_BIT (ch->xxxbits, XXX_SFOCUS);
// send_to_char ("Your discipline protects you from attacks against your focus.\n\r", ch);
}
focus++;
}
SET_BIT (ch->corbits, COR_FOCUS);
ch->pcdata->kensaifocus = focus;
if (ch->move < 4000)
{
stc ("You are unable to stay focused.\n\r", ch);
do_focus (ch, "");
return;
}
stc ("You focus your discipline, harvesting your mighty powers.\n\r",
ch);
act ("$n concentrates shortly, focusing $s powers.", ch, NULL, NULL,
TO_ROOM);
return;
}
return;
}
void
do_talent (CHAR_DATA * ch, char *argument)
{
char buf[MSL];
char arg[MIL];
int cost = 1;
int level = 0;
argument = one_argument (argument, arg);
if (IS_NPC (ch))
return;
if (!IS_CREATOR (ch))
{
if (!IS_KENSAI (ch))
{
do_huh (ch, "");
return;
}
if (!IS_COR (ch, COR_DISCIPLINE))
{
do_huh (ch, "");
return;
}
}
level = ch->pcdata->npowers[KEN_TALENT];
if (arg[0] == '\0')
{
cent_to_char
("#r--------------------------------------------------------------#n",
ch);
cent_to_char ("#7Battle Talents#n", ch);
cent_to_char
("#r--------------------------------------------------------------#n",
ch);
stc ("\n\r", ch);
if (level < 1)
cent_to_char ("#RYou dont have any Battle Talents.#n\n\r", ch);
if (level > 0)
cent_to_char ("#RWeapon Bond #r(#7wbond#r)#R.#n", ch);
if (level > 1)
cent_to_char ("#RSanctify #r(#7sanctify#r)#R.#n", ch);
if (level > 2)
cent_to_char ("#RBattle Hymn #r(#7hymn#r)#R.#n", ch);
if (level > 3)
cent_to_char ("#RMystic Barrier #r(#7barrier#r)#R.#n", ch);
if (level > 4)
cent_to_char ("#RMaster Form #r(#7mform#r)#R.#n", ch);
stc ("\n\r", ch);
cent_to_char
("#r--------------------------------------------------------------#n",
ch);
if (level < 5)
{
cent_to_char
("#RSyntax to learn new Battle Talents: talent learn.#n", ch);
cent_to_char
("#r--------------------------------------------------------------#n",
ch);
}
return;
}
else if (!str_cmp (arg, "learn") && level < 5)
{
cost += level;
cost *= 1000000;
if (ch->pcdata->power[POWER_CURRENT] < cost)
{
sprintf (buf,
"#RYou need #7%d#R more %s Power Points to learn %s Battle Talent.#n\n\r",
(cost - ch->pcdata->power[POWER_CURRENT]), get_class (ch),
level > 0 ? "another" : "your first");
stc (buf, ch);
return;
}
sprintf (buf, "#RYou learn %s Battle Talent.#n\n\r",
level > 0 ? "another" : "your first");
stc (buf, ch);
ch->pcdata->npowers[KEN_TALENT]++;
ch->pcdata->power[POWER_CURRENT] -= cost;
return;
}
else
{
do_talent (ch, "");
return;
}
return;
}
void
do_hymn (CHAR_DATA * ch, char *argument)
{
if (IS_NPC (ch))
return;
if (!IS_KENSAI (ch) || ch->pcdata->npowers[KEN_TALENT] < 3)
{
do_huh (ch, "");
return;
}
if (ch->pcdata->kensaihymn > 0)
{
stc ("You are already singing the Battle Hymn.\n\r", ch);
return;
}
stc ("You start singing a low wordless Battle Hymn.\n\r", ch);
act ("$n starts singing a low wordless Battle Hymn.", ch, NULL, NULL,
TO_ROOM);
ch->pcdata->kensaihymn = 180;
return;
}
void
do_mbarrier (CHAR_DATA * ch, char *argument)
{
if (IS_NPC (ch))
return;
if (!IS_KENSAI (ch) || ch->pcdata->npowers[KEN_TALENT] < 4)
{
do_huh (ch, "");
return;
}
if (IS_XXX (ch, XXX_BARRIER))
{
stc ("You relax your Mystic Barrier.\n\r", ch);
act ("The faint barrier around $n fades away.", ch, NULL, NULL,
TO_ROOM);
REMOVE_BIT (ch->xxxbits, XXX_BARRIER);
return;
}
stc ("You summon a Mystic Barrier.\n\r", ch);
act ("A faint barrier forms around $n.", ch, NULL, NULL, TO_ROOM);
SET_BIT (ch->xxxbits, XXX_BARRIER);
return;
}
void
do_mform (CHAR_DATA * ch, char *argument)
{
if (IS_NPC (ch))
return;
if (!IS_KENSAI (ch) || ch->pcdata->npowers[KEN_TALENT] < 5)
{
do_huh (ch, "");
return;
}
if (IS_POLYAFF (ch, POLY_MASTERFORM))
{
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_MASTERFORM);
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;
}
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_MASTERFORM);
free_string (ch->morph);
ch->morph = str_dup (get_form (ch));
return;
}
void
do_wbond (CHAR_DATA * ch, char *argument)
{
OBJ_DATA *obj;
char arg[MIL];
char katana[MSL];
int talent = 0;
argument = one_argument (argument, arg);
if (IS_NPC (ch))
return;
talent = ch->pcdata->npowers[KEN_TALENT];
if (!IS_KENSAI (ch) || talent < 1)
{
do_huh (ch, "");
return;
}
if (arg[0] == '\0')
{
stc ("What weapon do you wish to bond with.\n\r", ch);
return;
}
if ((obj = get_obj_carry (ch, arg)) == NULL)
{
send_to_char ("You are not carrying that object.\n\r", ch);
return;
}
if (obj->item_type != ITEM_WEAPON)
{
act ("$p is not a weapon.", ch, obj, NULL, TO_CHAR);
return;
}
if (!IS_SET (obj->spectype, SITEM_HIGHLANDER))
{
act ("$p is not one of your katanas.", ch, obj, NULL, TO_CHAR);
return;
}
if (obj->chobj != NULL)
{
send_to_char ("Somehow the object seems to resist your bond.\n\r", ch);
return;
}
if (IS_SET (obj->extra_flags, ITEM_VANISH))
{
stc ("Not on Illusions.\n\r", ch);
return;
}
if (IS_SET (obj->weapflags, WEAPON_BONDED))
{
act ("$p is already bonded.", ch, obj, NULL, TO_CHAR);
return;
}
if (IS_SET (obj->spectype, SITEM_MASTERY))
{
stc ("This is a mastery item.\n\r", ch);
returnShowing the first 100 KB of 103.0 KB. Download the archive for the full file.