highlander.c
legend/src/highlander.c · 98.6 KB
From the archive LoCRelease.tgz
Download the archive « Back to the archive contents
/***************************************************************************
* Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer, *
* Michael Seifert, Hans Henrik St{rfeldt, Tom Madsen, and Katja Nyboe. *
* *
* Merc Diku Mud improvments copyright (C) 1992, 1993 by Michael *
* Chastain, Michael Quan, and Mitchell Tse. *
* *
* In order to use any part of this Merc Diku Mud, you must comply with *
* both the original Diku license in 'license.doc' as well the Merc *
* license in 'license.txt'. In particular, you may not remove either of *
* these copyright notices. *
* *
* Much time and thought has gone into this software and you are *
* benefitting. We hope that you share your changes too. What goes *
* around, comes around. *
***************************************************************************/
/***************************************************************************
* God Wars Mud copyright (C) 1994, 1995, 1996 by Richard Woolcock *
* *
* Legend of Chrystancia copyright (C) 1999, 2000, 2001 by Matthew Little *
* This mud is NOT to be copied in whole or in part, or to be run without *
* the permission of Matthew Little. Nobody else has permission to *
* authorise the use of this code. *
***************************************************************************/
/***************************************************************************
* WotK public release *
* (C) 2000 'Queen Serenity' and 'Tamas D'Varde (Ryan Pessa)' *
* Modifications copyright Matthew Little (C) 2001-2002 *
***************************************************************************/
#if defined(macintosh)
#include <types.h>
#else
#include <sys/types.h>
#endif
#include <ctype.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <assert.h>
#include <unistd.h>
#include <stdarg.h>
#include <limits.h>
#include "merc.h"
void lightning_sword (CHAR_DATA * ch);
void fire_sword (CHAR_DATA * ch);
void ice_sword (CHAR_DATA * ch);
void drain_sword (CHAR_DATA * ch);
void soul_sword (CHAR_DATA * ch);
void crescent_strike (CHAR_DATA * ch);
void serpent_lunge (CHAR_DATA * ch);
void moon_slash (CHAR_DATA * ch);
void chain_swing (CHAR_DATA * ch);
void arc_bow (CHAR_DATA * ch);
void do_highlanderpowers (CHAR_DATA * ch, char *argument)
{
if (IS_NPC (ch))
return;
if (!IS_CLASS (ch, CLASS_HIGHLANDER))
{
do_rand_typo (ch);
return;
}
stc ("#c================================================================================#n\n\r", ch);
cent_to_char ("#w-[ Highlander Powers ]-#n", ch);
stc ("#c================================================================================#n\n\r", ch);
stc ("#cAncestral Gifts: (A) = Auto (T) = Toggle\n\r", ch);
stcf (ch, "%22s %22s %22s#n\n\r",
((IS_DEMPOWER (ch, HPOWER_HEAL)) ? "#wHeal Self" :
"#r--------------------"),
((IS_DEMPOWER (ch, HPOWER_SCRY)) ? "#wScry" :
"#r--------------------"),
((IS_DEMPOWER (ch, HPOWER_MIGHT)) ? "#wMight (A)" :
"#r--------------------"));
stcf (ch, "%22s %22s %22s#n\n\r",
((IS_DEMPOWER (ch, HPOWER_SENSE)) ? "#wSense" :
"#r--------------------"),
((IS_DEMPOWER (ch, HPOWER_SPEED)) ? "#wSpeed (A)" :
"#r--------------------"),
((IS_DEMPOWER (ch, HPOWER_SHIELD)) ? "#wShield (T)" :
"#r--------------------"));
stcf (ch, "%22s %22s %22s#n\n\r",
((IS_DEMPOWER (ch, HPOWER_VANISH)) ? "#wVanish (T)" :
"#r--------------------"),
((IS_DEMPOWER (ch, HPOWER_VISION)) ? "#wTrue Sight (T)" :
"#r--------------------"),
((IS_DEMPOWER (ch, HPOWER_EMPOWER)) ? "#wHempower" :
"#r--------------------"));
stcf (ch, "%22s %22s %22s#n\n\r",
((IS_DEMPOWER (ch, HPOWER_READAURA)) ? "#wRead Aura" :
"#r--------------------"),
((IS_DEMPOWER (ch, HPOWER_ANCESTRAL)) ? "#wAncestral Path" :
"#r--------------------"),
((IS_DEMPOWER (ch, HPOWER_TOUGHNESS)) ? "#wBayodou (A)" :
"#r--------------------"));
stcf (ch, "%22s %22s %22s#n\n\r",
((IS_DEMPOWER (ch, HPOWER_NIGHTSIGHT)) ? "#wNight Sight (T)" :
"#r--------------------"),
((IS_DEMPOWER (ch, HPOWER_BLADESPIN)) ? "#wBlade Spin" :
"#r--------------------"),
((IS_DEMPOWER (ch, HPOWER_SWORDCRAFT)) ? "#wSwordcraft" :
"#r--------------------"));
if ((IS_DEMPOWER (ch, HPOWER_EMPOWER)))
{
stc ("#cQuickening:\n\r", ch);
stcf (ch, "#w%22s %22s %22s#n\n\r",
((IS_DEMPOWER (ch, HPOWER_BYPASS_DEFENSE)) ?
"Bypass Defense Art (T)" : "#r--------------------"),
((IS_DEMPOWER (ch, HPOWER_SHIELDLESS)) ? "#wShieldless Art (T)"
: "#r--------------------"),
((IS_DEMPOWER (ch, HPOWER_PRESERVATION)) ?
"#wPreservation Art (T)" : "#r--------------------"));
}
if ((IS_DEMPOWER (ch, HPOWER_SWORDCRAFT)))
{
if ((IS_DEMPOWER (ch, HPOWER_ANCESTRAL))
|| (IS_DEMPOWER (ch, HPOWER_BLADESPIN)))
stc ("#cWeapon:\n\r", ch);
if ((IS_DEMPOWER (ch, HPOWER_ANCESTRAL)))
{
stc ("#c Magical:\n\r", ch);
stcf (ch, "%22s %22s %22s#n\n\r",
((IS_DEMPOWER (ch, HPOWER_ICE)) ? "#wIce Sword" :
"#r--------------------"),
((IS_DEMPOWER (ch, HPOWER_FIRE)) ? "#wFire Sword" :
"#r--------------------"),
((IS_DEMPOWER (ch, HPOWER_LIGHTNING)) ? "#wLightning Sword" :
"#r--------------------"));
stcf (ch, "%22s %22s #n\n\r",
((IS_DEMPOWER (ch, HPOWER_DRAIN)) ? "#wDrain Sword" :
"#r--------------------"),
((IS_DEMPOWER (ch, HPOWER_SOUL)) ? "#wSoul Sword" :
"#r--------------------"));
}
if ((IS_DEMPOWER (ch, HPOWER_BLADESPIN)))
{
stc ("#c Physical:\n\r", ch);
stcf (ch, "%22s %22s %22s#n\n\r",
((IS_DEMPOWER (ch, HPOWER_CRESCENT_STRIKE)) ?
"#wCrescent Strike" : "#r--------------------"),
((IS_DEMPOWER (ch, HPOWER_SERPENT_LUNGE)) ? "#wSerpent Lunge" :
"#r--------------------"),
((IS_DEMPOWER (ch, HPOWER_MOON_SLASH)) ? "#wMoon Slash" :
"#r--------------------"));
stcf (ch, "%22s %22s #n\n\r",
((IS_DEMPOWER (ch, HPOWER_CHAIN_SWING)) ? "#wChain Swing" :
"#r--------------------"),
((IS_DEMPOWER (ch, HPOWER_ARC_BOW)) ? "#wArc Bow" :
"#r--------------------"));
}
}
stc ("#c\n\r================================================================================#n\n\r", ch);
return;
}
/* Highlander Power Gaining Code */
void do_gainpowers (CHAR_DATA * ch, char *argument)
{ /*Begin Gain Powers */
char arg1[MAX_INPUT_LENGTH];
char arg2[MAX_INPUT_LENGTH];
int inpart = 0;
int cost = 0;
char buf[MSL];
smash_tilde (argument);
argument = one_argument (argument, arg1);
argument = one_argument (argument, arg2);
if (IS_NPC (ch))
return;
if (!IS_CLASS (ch, CLASS_HIGHLANDER))
{
do_rand_typo (ch);
return;
}
if ((arg1[0] == '\0'))
{
stc ("#b-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-#n\n\r", ch);
stc ("#b -=#wPowers#b=-#n\n\r", ch);
stc ("#b-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-#n\n\r", ch);
sprintf( buf,
" %sSense #r[ #y50 Primal#r] %sEmpower #r[ #y80 Primal#r] %sHeal #r[ #y60 Primal#r]#n\n\r",
IS_DEMPOWER (ch, HPOWER_SENSE) ? "#0" : "#w",
IS_DEMPOWER (ch, HPOWER_EMPOWER) ? "#0" : "#w",
IS_DEMPOWER (ch, HPOWER_HEAL) ? "#0" : "#w");
send_to_char( buf, ch );
sprintf( buf,
" %sSpeed #r[#y100 Primal#r] %sNightsight #r[ #y50 Primal#r] %sReadaura #r[ #y65 Primal#r]#n\n\r",
IS_DEMPOWER (ch, HPOWER_SPEED) ? "#0" : "#w",
IS_DEMPOWER (ch, HPOWER_NIGHTSIGHT) ? "#0" : "#w",
IS_DEMPOWER (ch, HPOWER_READAURA) ? "#0" : "#w");
send_to_char( buf, ch );
sprintf( buf,
" %sToughness #r[#y100 Primal#r] %sMight #r[#y100 Primal#r] %sVision #r[ #y70 Primal#r]#n\n\r",
IS_DEMPOWER (ch, HPOWER_TOUGHNESS) ? "#0" : "#w",
IS_DEMPOWER (ch, HPOWER_MIGHT) ? "#0" : "#w",
IS_DEMPOWER (ch, HPOWER_VISION) ? "#0" : "#w");
send_to_char( buf, ch );
sprintf( buf,
" %sShield #r[#y 75 Primal#r] %sScry #r[#y 75 Primal#r] %sVanish #r[ #y65 Primal#r]#n\n\r",
IS_DEMPOWER (ch, HPOWER_SHIELD) ? "#0" : "#w",
IS_DEMPOWER (ch, HPOWER_SCRY) ? "#0" : "#w",
IS_DEMPOWER (ch, HPOWER_VANISH) ? "#0" : "#w");
send_to_char( buf, ch );
sprintf( buf,
" %sBladespin #r[#y 80 Primal#r] %sAncestral #r[#y 90 Primal#r] %sSwordcraft #r[#y100 Primal#r]#n\n\r",
IS_DEMPOWER (ch, HPOWER_BLADESPIN) ? "#0" : "#w",
IS_DEMPOWER (ch, HPOWER_ANCESTRAL) ? "#0" : "#w",
IS_DEMPOWER (ch, HPOWER_SWORDCRAFT) ? "#0" : "#w");
send_to_char( buf, ch );
if ((IS_DEMPOWER (ch, HPOWER_EMPOWER)))
{
stc ("\n\r#b-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-#n\n\r", ch);
stc (" #b-=#wQuickening Techniques#b=-\n\r", ch);
stc (" recommended prompt <[%xxp] [%h/%HH %m/%MM %v/%VV] [Qui-%Q]>\n\r", ch );
stc ("#b-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-#n\n\r", ch);
sprintf( buf,
" %sBypass #r[#y200 Primal#r] %sShieldless #r[#y300 Primal#r] %sPreservation #r[#y400 Primal#r]#n\n\r",
IS_DEMPOWER (ch, HPOWER_BYPASS_DEFENSE) ? "#0" : "#w",
IS_DEMPOWER (ch, HPOWER_SHIELDLESS) ? "#0" : "#w",
IS_DEMPOWER (ch, HPOWER_PRESERVATION) ? "#0" : "#w");
send_to_char( buf, ch );
}
else
{
stc ("\n\r#b-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-#n\n\r", ch);
stc (" #b-=#cLearn Empower First#b=-\n\r",
ch);
stc ("#b-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-#n\n\r", ch);
}
if ((IS_DEMPOWER (ch, HPOWER_SWORDCRAFT)))
{
stc ("\n\r#b-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-#n\n\r", ch);
stc (" #b-=#wSword Techniques#b=-\n\r",
ch);
stc ("#b-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-#n\n\r", ch);
if ((IS_DEMPOWER (ch, HPOWER_ANCESTRAL)))
{
sprintf( buf,
" %sFire #r[#y150 Primal#r] %sIce #r[#y150 Primal#r] %sSoul #r[#y150 Primal#r]#n\n\r",
IS_DEMPOWER (ch, HPOWER_FIRE) ? "#0" : "#w",
IS_DEMPOWER (ch, HPOWER_ICE) ? "#0" : "#w",
IS_DEMPOWER (ch, HPOWER_SOUL) ? "#0" : "#w");
send_to_char( buf, ch );
sprintf( buf,
" %sDrain #r[#y150 Primal#r] %sLightning #r[#y150 Primal#r]#n\n\r",
IS_DEMPOWER (ch, HPOWER_DRAIN) ? "#0" : "#w",
IS_DEMPOWER (ch, HPOWER_LIGHTNING) ? "#0" : "#w");
send_to_char( buf, ch );
}
if ((IS_DEMPOWER (ch, HPOWER_BLADESPIN)))
{
sprintf( buf,
" %sCrescent #r[#y150 Primal#r] %sSerpent #r[#y150 Primal#r] %sMoon #r[#y150 Primal#r]#n\n\r",
IS_DEMPOWER (ch, HPOWER_CRESCENT_STRIKE) ? "#0" : "#w",
IS_DEMPOWER (ch, HPOWER_SERPENT_LUNGE) ? "#0" : "#w",
IS_DEMPOWER (ch, HPOWER_MOON_SLASH) ? "#0" : "#w");
send_to_char( buf, ch );
sprintf( buf,
" %sChain #r[#y150 Primal#r] %sArc #r[#y150 Primal#r]#n\n\r",
IS_DEMPOWER (ch, HPOWER_CHAIN_SWING) ? "#0" : "#w",
IS_DEMPOWER (ch, HPOWER_ARC_BOW) ? "#0" : "#w");
send_to_char( buf, ch );
}
}
else
{
stc ("\n\r#b-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-#n\n\r", ch);
stc (" #b-=#cLearn Sword Craft First#b=-\n\r", ch);
stc ("#b-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-#n\n\r", ch);
}
stc ("#b-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-#n\n\r", ch);
stc (" #wSyntax: gainp [power] or gainp technique [technique].\n\r",
ch);
stc (" #wTo gain sword techniques, learn bladespin [physical] and ancestral [magical].\n\r",
ch);
stc ("#b-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-#n\n\r", ch);
return;
}
/* Learn the powers themself */
if (!str_prefix (arg1, "technique"))
{
if (!(IS_DEMPOWER (ch, HPOWER_SWORDCRAFT)))
{
stc ("You need to learn the basis of the techniques first by learning Swordcraft.\n\r", ch);
return;
}
cost = 150;
if (!str_cmp (arg2, "fire"))
inpart = HPOWER_FIRE;
else if (!str_cmp (arg2, "ice"))
inpart = HPOWER_ICE;
else if (!str_cmp (arg2, "lightning"))
inpart = HPOWER_LIGHTNING;
else if (!str_cmp (arg2, "soul"))
inpart = HPOWER_SOUL;
else if (!str_cmp (arg2, "drain"))
inpart = HPOWER_DRAIN;
else if (!str_cmp (arg2, "crescent"))
inpart = HPOWER_CRESCENT_STRIKE;
else if (!str_cmp (arg2, "serpent"))
inpart = HPOWER_SERPENT_LUNGE;
else if (!str_cmp (arg2, "moon"))
inpart = HPOWER_MOON_SLASH;
else if (!str_cmp (arg2, "chain"))
inpart = HPOWER_CHAIN_SWING;
else if (!str_cmp (arg2, "arc"))
inpart = HPOWER_ARC_BOW;
else
{
stc ("That is not a technique.\n\r", ch);
do_gainpowers (ch, "");
return;
}
if ((inpart == HPOWER_FIRE) || (inpart == HPOWER_ICE)
|| (inpart == HPOWER_LIGHTNING) || (inpart == HPOWER_SOUL)
|| (inpart == HPOWER_DRAIN))
{
if (!(IS_DEMPOWER (ch, HPOWER_ANCESTRAL)))
{
stc ("You try to learn this technique, but some crucial aspect of thought is missing.\n\rLearn other skills to unlock this.\n\r", ch);
return;
}
}
if ((inpart == HPOWER_CRESCENT_STRIKE)
|| (inpart == HPOWER_SERPENT_LUNGE) || (inpart == HPOWER_MOON_SLASH)
|| (inpart == HPOWER_CHAIN_SWING) || (inpart == HPOWER_ARC_BOW))
{
if (!(IS_DEMPOWER (ch, HPOWER_BLADESPIN)))
{
stc ("You try to learn this technique, but some crucial aspect of thought is missing.\n\rLearn other skills to unlock this.\n\r", ch);
return;
}
}
}
else if (!str_cmp (arg1, "bladespin"))
{
inpart = HPOWER_BLADESPIN;
cost = 80;
}
else if (!str_cmp (arg1, "sense"))
{
inpart = HPOWER_SENSE;
cost = 50;
}
else if (!str_cmp (arg1, "swordcraft"))
{
inpart = HPOWER_SWORDCRAFT;
cost = 100;
}
else if (!str_cmp (arg1, "empower"))
{
inpart = HPOWER_EMPOWER;
cost = 80;
}
else if (!str_cmp (arg1, "bypass"))
{
if (!(IS_DEMPOWER (ch, HPOWER_EMPOWER)))
{
stc ("You need to learn empower first.\n\r", ch);
return;
}
inpart = HPOWER_BYPASS_DEFENSE;
cost = 200;
}
else if (!str_cmp (arg1, "shieldless"))
{
if (!(IS_DEMPOWER (ch, HPOWER_EMPOWER)))
{
stc ("You need to learn empower first.\n\r", ch);
return;
}
if (!(IS_DEMPOWER (ch, HPOWER_BYPASS_DEFENSE)))
{
stc ("You need to learn how to bypass defenses first.\n\r", ch);
return;
}
inpart = HPOWER_SHIELDLESS;
cost = 300;
}
else if (!str_cmp (arg1, "preservation"))
{
if (!(IS_DEMPOWER (ch, HPOWER_EMPOWER)))
{
stc ("You need to learn empower first.\n\r", ch);
return;
}
if (!(IS_DEMPOWER (ch, HPOWER_BYPASS_DEFENSE)))
{
stc ("You need to learn how to bypass defenses first.\n\r", ch);
return;
}
if (!(IS_DEMPOWER (ch, HPOWER_SHIELDLESS)))
{
stc ("You need to learn how to ignore shields first.\n\r", ch);
return;
}
inpart = HPOWER_PRESERVATION;
cost = 400;
}
else if (!str_cmp (arg1, "ancestral"))
{
inpart = HPOWER_ANCESTRAL;
cost = 90;
}
else if (!str_cmp (arg1, "heal"))
{
inpart = HPOWER_HEAL;
cost = 60;
}
else if (!str_cmp (arg1, "speed"))
{
inpart = HPOWER_SPEED;
cost = 100;
}
else if (!str_cmp (arg1, "toughness"))
{
inpart = HPOWER_TOUGHNESS;
cost = 100;
}
else if (!str_cmp (arg1, "might"))
{
inpart = HPOWER_MIGHT;
cost = 100;
}
else if (!str_cmp (arg1, "vision"))
{
inpart = HPOWER_VISION;
cost = 70;
}
else if (!str_cmp (arg1, "nightsight"))
{
inpart = HPOWER_NIGHTSIGHT;
cost = 50;
}
else if (!str_cmp (arg1, "shield"))
{
inpart = HPOWER_SHIELD;
cost = 75;
}
else if (!str_cmp (arg1, "scry"))
{
inpart = HPOWER_SCRY;
cost = 75;
}
else if (!str_cmp (arg1, "vanish"))
{
inpart = HPOWER_VANISH;
cost = 65;
}
else if (!str_cmp (arg1, "readaura"))
{
inpart = HPOWER_READAURA;
cost = 65;
}
else
{
do_gainpowers (ch, "");
return;
}
/* Check they havent already got the power */
if (IS_SET (ch->pcdata->powers[HPOWER_FLAGS], inpart))
{
stc ("You already have learned that power!\n\r", ch);
return;
}
/* Check the have enough to buy the power */
if (ch->practice < cost)
{
stc ("You dont have enough primal for this power.\n\r", ch);
return;
}
/* Set the Power to file */
SET_BIT (ch->pcdata->powers[HPOWER_FLAGS], inpart);
ch->practice -= cost;
if (!str_cmp (arg1, "empower"))
stc ("You have unlocked a new area of power.\n\rYou can now improve your Quickening.\n\r", ch);
if (!str_cmp (arg1, "bladespin"))
stc ("You have unlocked a new area of power.\n\rYou can now improve your Hp cheaper.\n\r", ch);
if (!str_cmp (arg1, "ancestral"))
stc ("You have unlocked a new area of power.\n\rYou can now improve your Mana cheaper.\n\r", ch);
if (!str_cmp (arg1, "swordcraft"))
stc ("You have unlocked a new area of power.\n\rYou can now improve your Move cheaper.\n\r", ch);
if (!str_cmp (arg1, "bypass"))
stc ("You master the art of using quickening to bypass the defenses (Parry/Dodge) of others.\n\r", ch);
if (!str_cmp (arg1, "shieldless"))
stc ("You master the art of using quickening to bypass the defenses (Sanct/Damage Prevention) of others.\n\r", ch);
if (!str_cmp (arg1, "preservation"))
stc ("You master the art of using quickening to stop the magic (Block Spells) of others.\n\r", ch);
if (!str_prefix (arg1, "technique"))
{
if (!str_cmp (arg2, "fire") || !str_cmp (arg2, "ice")
|| !str_cmp (arg2, "lightning") || !str_cmp (arg2, "soul")
|| !str_cmp (arg2, "drain") || !str_cmp (arg2, "crescent")
|| !str_cmp (arg2, "serpent") || !str_cmp (arg2, "moon")
|| !str_cmp (arg2, "chain") || !str_cmp (arg2, "arc"))
{
sprintf (buf, "You learn the %s sword Technique.\n\r",
capitalize (arg2));
stc (buf, ch);
}
else
{
stc ("No Such sword technique\n\r", ch);
}
}
else
{
sprintf (buf, "You gain knowledge of the %s Power\n\r",
capitalize (arg1));
stc (buf, ch);
}
save_char_obj (ch);
return;
} /* End of gainpowers */
void do_depower (CHAR_DATA * ch, char *argument)
{
CHAR_DATA *victim;
char arg[MAX_STRING_LENGTH];
char arg1[MAX_STRING_LENGTH];
int to_remove = 0;
bool removed = 0;
char *removing;
int reimburse;
bool reimbursing = FALSE;
argument = one_argument (argument, arg1); // Contains whether we reimburse or not
argument = one_argument (argument, arg); // Contains who we are removing from
// Leaves argument to determine what we are removing
if (!IS_IMMORTAL (ch))
return;
if (arg1[0] == '\0')
{
stc ("Syntax:\n\r depower <rudely/nicely/reimburse> <victim> <HPOWER_>\n\r", ch);
return;
}
else
{
if (!str_prefix (arg1, "nicely") || !str_prefix (arg1, "reimburse"))
{
reimbursing = TRUE;
}
else if (!str_prefix (arg1, "rudely"))
{
reimbursing = FALSE;
}
}
if (arg[0] == '\0')
{
stc ("Syntax:\n\r depower <rudely/nicely/reimburse> <victim> <HPOWER_>\n\r", ch);
return;
}
if (argument[0] == '\0')
{
stc ("Syntax:\n\r depower <rudely/nicely/reimburse> <victim> <HPOWER_>\n\r", ch);
return;
}
if ((victim = get_char_world (ch, arg)) == NULL)
{
stc ("Victim not found.\n\r", ch);
return;
}
if (IS_NPC (victim))
{
stc ("Not on npcs.\n\r", ch);
return;
}
if (!IS_CLASS (victim, CLASS_HIGHLANDER))
{
stc ("Not on non-highlanders.\n\r", ch);
return;
}
if (!str_cmp (argument, "HPOWER_SENSE"))
{
to_remove = HPOWER_SENSE;
reimburse = 50;
removing = "Sense Quickening";
}
else if (!str_cmp (argument, "HPOWER_EMPOWER"))
{
to_remove = HPOWER_EMPOWER;
reimburse = 80;
removing = "Empower";
}
else if (!str_cmp (argument, "HPOWER_HEAL"))
{
to_remove = HPOWER_HEAL;
reimburse = 60;
removing = "Heal Self";
}
else if (!str_cmp (argument, "HPOWER_SPEED"))
{
to_remove = HPOWER_SPEED;
reimburse = 100;
removing = "Speed (A)";
}
else if (!str_cmp (argument, "HPOWER_TOUGHNESS"))
{
to_remove = HPOWER_TOUGHNESS;
reimburse = 100;
removing = "Bayodou (A)";
}
else if (!str_cmp (argument, "HPOWER_VISION"))
{
to_remove = HPOWER_VISION;
reimburse = 70;
removing = "True Sight";
}
else if (!str_cmp (argument, "HPOWER_NIGHTSIGHT"))
{
to_remove = HPOWER_NIGHTSIGHT;
reimburse = 50;
removing = "Night Sight";
}
else if (!str_cmp (argument, "HPOWER_SHIELD"))
{
to_remove = HPOWER_SHIELD;
reimburse = 75;
removing = "Shield";
}
else if (!str_cmp (argument, "HPOWER_SCRY"))
{
to_remove = HPOWER_SCRY;
reimburse = 75;
removing = "Scry";
}
else if (!str_cmp (argument, "HPOWER_VANISH"))
{
to_remove = HPOWER_VANISH;
reimburse = 65;
removing = "Vanish";
}
else if (!str_cmp (argument, "HPOWER_MIGHT"))
{
to_remove = HPOWER_MIGHT;
reimburse = 100;
removing = "Might (A)";
}
else if (!str_cmp (argument, "HPOWER_READAURA"))
{
to_remove = HPOWER_READAURA;
reimburse = 65;
removing = "Read Aura";
}
else if (!str_cmp (argument, "HPOWER_FIRE"))
{
to_remove = HPOWER_FIRE;
reimburse = 150;
removing = "Fire Sword Tech";
}
else if (!str_cmp (argument, "HPOWER_ICE"))
{
to_remove = HPOWER_ICE;
reimburse = 150;
removing = "Ice Sword Tech";
}
else if (!str_cmp (argument, "HPOWER_LIGHTNING"))
{
to_remove = HPOWER_LIGHTNING;
reimburse = 150;
removing = "Lightning Sword Tech";
}
else if (!str_cmp (argument, "HPOWER_SOUL"))
{
to_remove = HPOWER_SOUL;
reimburse = 150;
removing = "Soul Sword Tech";
}
else if (!str_cmp (argument, "HPOWER_DRAIN"))
{
to_remove = HPOWER_DRAIN;
reimburse = 150;
removing = "Drain Sword Tech";
}
else if (!str_cmp (argument, "HPOWER_ANCESTRAL"))
{
to_remove = HPOWER_ANCESTRAL;
reimburse = 90;
removing = "Ancestral Path";
}
else if (!str_cmp (argument, "HPOWER_BLADESPIN"))
{
to_remove = HPOWER_BLADESPIN;
reimburse = 80;
removing = "Bladespin";
}
else if (!str_cmp (argument, "HPOWER_CRESCENT_STRIKE"))
{
to_remove = HPOWER_CRESCENT_STRIKE;
reimburse = 150;
removing = "Crescent Strike Tech";
}
else if (!str_cmp (argument, "HPOWER_SERPENT_LUNGE"))
{
to_remove = HPOWER_SERPENT_LUNGE;
reimburse = 150;
removing = "Serpent Lunge Tech";
}
else if (!str_cmp (argument, "HPOWER_MOON_SLASH"))
{
to_remove = HPOWER_MOON_SLASH;
reimburse = 150;
removing = "Moon Slash Tech";
}
else if (!str_cmp (argument, "HPOWER_CHAIN_SWING"))
{
to_remove = HPOWER_CHAIN_SWING;
reimburse = 150;
removing = "Chain Swing Tech";
}
else if (!str_cmp (argument, "HPOWER_ARC_BOW"))
{
to_remove = HPOWER_ARC_BOW;
reimburse = 150;
removing = "Arc Bow Tech";
}
else if (!str_cmp (argument, "HPOWER_BYPASS_DEFENSE"))
{
to_remove = HPOWER_BYPASS_DEFENSE;
reimburse = 200;
removing = "Bypass Defense Art (T)";
}
else if (!str_cmp (argument, "HPOWER_SHIELDLESS"))
{
to_remove = HPOWER_SHIELDLESS;
reimburse = 300;
removing = "Shieldless Art (T)";
}
else if (!str_cmp (argument, "HPOWER_PRESERVATION"))
{
to_remove = HPOWER_PRESERVATION;
reimburse = 400;
removing = "Preservation Art (T)";
}
else if (!str_cmp (argument, "HPOWER_SWORDCRAFT"))
{
to_remove = HPOWER_SWORDCRAFT;
reimburse = 100;
removing = "Swordcraft";
}
else if (!str_cmp (argument, "HPOWER_USE_BYPASS"))
{
to_remove = HPOWER_USE_BYPASS;
reimburse = 0;
removing = "Bypass Defense Focus";
}
else if (!str_cmp (argument, "HPOWER_USE_SHIELDLESS"))
{
to_remove = HPOWER_USE_SHIELDLESS;
reimburse = 0;
removing = "Shieldless Focus";
}
else if (!str_cmp (argument, "HPOWER_USE_PRESERVATION"))
{
to_remove = HPOWER_USE_PRESERVATION;
reimburse = 0;
removing = "Preservation Focus";
}
else
{
stc ("That power not recognized, please use one of the player.h bits if you wish to remove something.\n\r", ch);
stc ("Syntax:\n\r depower <rudely/nicely/reimburse> <victim> <HPOWER_>\n\r", ch);
return;
}
if (IS_DEMPOWER (victim, to_remove))
{
REMOVE_BIT (victim->pcdata->powers[DPOWER_FLAGS], to_remove);
removed = TRUE;
}
else
{
removed = FALSE;
}
if (removed)
{
stcf (ch, "You strip %s of their %s power.\n\r", victim->name,
removing);
stcf (victim, "%s has stripped you of your %s power.\n\r", ch->name,
removing);
if (reimbursing)
{
stcf (ch,
"However you kindly reimburse %s the %d primal it cost to purchase.\n\r",
victim->name, reimburse);
stcf (victim,
"However %s kindly reimburses you the %d primal it cost you to purchase.\n\r",
ch->name, reimburse);
victim->practice += reimburse;
}
save_char_obj (victim);
return;
}
else
{
stcf (ch,
"You were unable to remove %s from %s because they didn't have it.\n\r",
removing, victim->name);
return;
}
return;
}
/*Healing power, heals hit points based on weaponskill*/
void do_highlanderheal (CHAR_DATA * ch, char *argument)
{
int total_max_gain = 0;
if (IS_NPC (ch))
return;
if (!IS_CLASS (ch, CLASS_HIGHLANDER))
{
do_rand_typo (ch);
return;
}
if (!IS_DEMPOWER (ch, HPOWER_HEAL))
{
stc ("You haven't learned the Healing power yet\n\r", ch);
return;
}
if (ch->mana < 1000)
{
send_to_char ("You don't have enough mana.\n\r", ch);
return;
}
if (ch->position < POS_SLEEPING)
{
send_to_char ("You are too stunned!.\n\r", ch);
return;
}
if (ch->position == POS_FIGHTING)
{
stc ("Not while fighting!\n\r", ch);
return;
}
if (ch->hit >= ch->max_hit)
{
stc ("You require no healing!\n\r", ch);
return;
}
ch->mana = ch->mana - 1000;
{
int loopvar ;
for (loopvar = 0; loopvar <= 12; loopvar++)
{
total_max_gain+=ch->wpn[loopvar];
}
total_max_gain *= 3;
total_max_gain /= 4;
}
if (ch->fight_timer < 1)
{
total_max_gain *= 6;
// send_to_char ("Not until your fight timer expires.\n\r", ch);
// return;
}
// ch->hit = ch->hit + dice (ch->wpn[1], 4);
ch->hit = ch->hit + number_range(total_max_gain * 0.75, total_max_gain * 1.25);
if (ch->hit > ch->max_hit)
ch->hit = ch->max_hit;
act ("You feel the quickening flow through you.", ch, NULL, ch, TO_CHAR);
act ("$n glows brightly as they are healed.", ch, NULL, ch, TO_ROOM);
WAIT_STATE (ch, 12);
return;
}
void do_bladespin (CHAR_DATA * ch, char *argument)
{
char arg[MAX_INPUT_LENGTH];
char buf[MAX_STRING_LENGTH];
CHAR_DATA *victim;
int dam=0;
bool FATAL = FALSE;
one_argument (argument, arg);
if (IS_NPC (ch))
return;
if (!IS_CLASS (ch, CLASS_HIGHLANDER))
{
send_to_char ("Huh?\n\r", ch);
return;
}
if (!IS_DEMPOWER (ch, HPOWER_BLADESPIN))
{
stc ("You haven't learned how to spin your blades yet\n\r", ch);
return;
}
if (arg[0] == '\0' && ch->fighting == NULL)
{
send_to_char ("Who do you wish use bladespin on?\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 (victim == ch)
{
send_to_char
("Are you a bit confused? How can you do that to yourself?\n\r", ch);
return;
}
if ( is_safe ( ch, victim ) )
return;
if (!katana_check (ch))
{
stc ("You need to wield a katana.\n\r", ch);
return;
}
check_killer (ch, victim);
if (!IS_NPC (victim))
dam =
1000 +
dice ((100 + (ch->quickening[1] > 100 ? 100 : ch->quickening[1])),
20);
if (IS_NPC (victim))
dam =
1500 +
dice ((100 + (ch->quickening[1] > 100 ? 100 : ch->quickening[1])),
20);
dam += number_range (1, 20);
if (number_percent () > 45)
{
if (dam > victim->hit)
FATAL = TRUE;
sprintf (buf, "Your bladespin %s $N in a spray of blood. #w[#r%d#w]#n",
(FATAL ? "slaughters" : "shreds"), dam);
act (buf, ch, NULL, victim, TO_CHAR);
sprintf (buf, "$n's bladespin %s you in a spray of blood. #w[#r%d#w]#n",
(FATAL ? "slaughters" : "shreds"), dam);
act (buf, ch, NULL, victim, TO_VICT);
sprintf (buf, "$n's bladespin %s $N in a spray of blood.",
(FATAL ? "slaughters" : "shreds"));
act ("$n's bladespin shreds $N in a spray of blood.", ch, NULL, victim,
TO_NOTVICT);
PUNC_OTHER (ch, victim, dam);
}
if ((number_percent () > 30) && (!FATAL))
{
if (dam > victim->hit)
FATAL = TRUE;
sprintf (buf, "Your bladespin %s $N in a spray of blood. #w[#r%d#w]#n",
(FATAL ? "slaughters" : "shreds"), dam);
act (buf, ch, NULL, victim, TO_CHAR);
sprintf (buf, "$n's bladespin %s you in a spray of blood. #w[#r%d#w]#n",
(FATAL ? "slaughters" : "shreds"), dam);
act (buf, ch, NULL, victim, TO_VICT);
sprintf (buf, "$n's bladespin %s $N in a spray of blood.",
(FATAL ? "slaughters" : "shreds"));
act ("$n's bladespin shreds $N in a spray of blood.", ch, NULL, victim,
TO_NOTVICT);
PUNC_OTHER (ch, victim, dam);
}
if ((number_percent () > 25) && (!FATAL))
{
if (dam > victim->hit)
FATAL = TRUE;
sprintf (buf, "Your bladespin %s $N in a spray of blood. #w[#r%d#w]#n",
(FATAL ? "slaughters" : "shreds"), dam);
act (buf, ch, NULL, victim, TO_CHAR);
sprintf (buf, "$n's bladespin %s you in a spray of blood. #w[#r%d#w]#n",
(FATAL ? "slaughters" : "shreds"), dam);
act (buf, ch, NULL, victim, TO_VICT);
sprintf (buf, "$n's bladespin %s $N in a spray of blood.",
(FATAL ? "slaughters" : "shreds"));
act ("$n's bladespin shreds $N in a spray of blood.", ch, NULL, victim,
TO_NOTVICT);
PUNC_OTHER (ch, victim, dam);
}
if (!FATAL)
{
if (victim->position == POS_STANDING)
multi_hit (victim, ch, TYPE_UNDEFINED);
}
if (!IS_NPC(victim))
{
if (ch->fight_timer < 1) ch->fight_timer += 10;
}
WAIT_STATE (ch, 9);
return;
}
void do_quickening (CHAR_DATA * ch, char *argument)
{
char buf[MAX_STRING_LENGTH];
if (IS_NPC (ch))
return;
if (!IS_CLASS (ch, CLASS_HIGHLANDER))
{
do_rand_typo (ch);
return;
}
line2 (ch);
cent_to_char ("Quickening", ch);
line2 (ch);
sprintf (buf, "You have %d points out of %d points of Quickening stored.",
ch->quickening[0], ch->quickening[1]);
cent_to_char (buf, ch);
line2 (ch);
return;
}
/* Highlander Teaching */
void do_weaponteach (CHAR_DATA * ch, char *argument)
{
char buf[MAX_INPUT_LENGTH];
CHAR_DATA *victim;
char arg[MAX_INPUT_LENGTH];
argument = one_argument (argument, arg);
if (IS_NPC (ch))
return;
if (!IS_CLASS (ch, CLASS_HIGHLANDER))
{
send_to_char ("Huh?\n\r", ch);
return;
}
if (ch->wpn[1] < 1000)
{
stc ("Only Supremely Skilled people can teach skills\n\r", ch);
return;
}
if (arg[0] == '\0')
{
send_to_char ("Teach who the basics of weapons?\n\r", ch);
return;
}
if ((victim = get_char_room (ch, arg)) == NULL)
{
send_to_char ("They aren't here.\n\r", ch);
return;
}
if (victim->wpn[1] < 200)
{
stc ("They Need Grand Master in Slice before they can become a highlander.\n\r", ch);
return;
}
if (IS_NPC (victim))
{
send_to_char ("Not on NPC's.\n\r", ch);
return;
}
if (ch == victim)
{
send_to_char ("Not on yourself.\n\r", ch);
return;
}
if (victim->class != 0)
{
send_to_char ("You can't make a classed person a Highlander.\n\r", ch);
return;
}
if (victim->level != LEVEL_AVATAR && !IS_IMMORTAL (victim))
{
send_to_char ("Only on avatars.\n\r", ch);
return;
}
if (ch->practice < 5)
{
send_to_char
("You do not possess 5 primal to attempt teaching them.\n\r", ch);
return;
}
send_to_char ("You attempt to teach them the arts of weaponry.\n\r", ch);
sprintf (buf, "%s attempts to teach you the arts of weaponry.\n\r",
ch->name);
send_to_char (buf, victim);
if (number_range (1, 100) < 26)
{
send_to_char ("You both try hard, but the teachings don't stick.\n\r",
ch);
send_to_char
("You try very hard to learn from them, but the knowledge escapes you.\n\r",
victim);
if (number_range (1, 100) < 11)
{
send_to_char
("Worse! They had a disastrous accident in a teaching exercise.\n\r",
ch);
send_to_char
("Worse! During an exercise you slipped and fell on a sword causing greivous harm.\n\r",
victim);
victim->hit -= (number_range (10, 50) * 10);
if (victim->hit < 1)
victim->hit = 1;
if (number_range (1, 100) < 76)
{
send_to_char ("However, they learned from their mistakes.\n\r",
ch);
send_to_char ("However you did learn from your mistake.\n\r",
victim);
victim->exp += (number_range (100, 200) * 1000);
}
}
return;
}
ch->practice -= 5;
act ("You taught $N the arts of weaponry!", ch, NULL, victim, TO_CHAR);
act ("$n taught $N the arts of weaponry!", ch, NULL, victim, TO_NOTVICT);
act ("$n taught you the arts of weaponry!", ch, NULL, victim, TO_VICT);
victim->class = CLASS_HIGHLANDER;
victim->special = 0;
victim->pcdata->stats[UNI_RAGE] = 0; //Nullify Rage
victim->pcdata->stats[UNI_GEN] = 4; //Generation Means Rank
free_string (victim->morph);
victim->morph = str_dup ("");
save_char_obj (ch);
save_char_obj (victim);
return;
}
void lightning_sword (CHAR_DATA * ch)
{
//Lightning Stuns Victim and is fairly likely to hit, Avg Expense, Avg Damage
CHAR_DATA *victim;
char buf[MAX_STRING_LENGTH];
int dmg;
if (IS_NPC (ch))
return;
if ((victim = ch->fighting) == NULL)
{
send_to_char ("You find no need for this now.\n\r", ch);
return;
}
if (ch->mana < 1250)
{
send_to_char ("You have not the 1250 mystical power to use this.\n\r",
ch);
return;
}
if (!katana_check(ch) && !WORN_ARTIFACT (ch, ARTI_BRACERS_OF_STORMS_FURY))
{
send_to_char
("Without a proper katana the energy will destroy your weapon.\n\r",
ch);
return;
}
ch->mana -= 1250;
if (katana_check(ch))
{
send_to_char ("You channel mystical energy into your katana.\n\r", ch);
do_say (ch, "#rLightning SWORD!");
send_to_char ("Lightning shoots from your katana!\n\r", ch);
act ("Lightning bursts from $n's katana!", ch, NULL, NULL, TO_ROOM);
}
else
{
send_to_char ("You channel mystical energy into your bracers.\n\r", ch);
do_say (ch, "#rLightning STRIKE!");
send_to_char ("Lightning shoots from your bracers!\n\r", ch);
act ("Lightning bursts from $n's bracers!", ch, NULL, NULL, TO_ROOM);
}
if (number_range (0, 100) < 16)
{
act ("Your lightning blast flies past $N and is absorbed by the ground.", ch, NULL, victim, TO_CHAR);
act ("The lightning blast slams into the ground and is absorbed.", ch,
NULL, NULL, TO_ROOM);
return;
}
dmg = number_range ((ch->wpn[1]), (ch->wpn[1] * 3));
sprintf (buf,
"Your lightning blast slams into $N's and crackles around $S body sending them sprawling. #w[#r%d#w]#n",
dmg);
act (buf, ch, NULL, victim, TO_CHAR);
sprintf (buf,
"$n's lightning blast slams into you and crackles around your body sending you sprawling. #w[#r%d#w]#n",
dmg);
act (buf, ch, NULL, victim, TO_VICT);
act ("$n's lightning blast slams into $N's and crackles around $S body sending $N sprawling.", ch, NULL, victim, TO_NOTVICT);
PUNC_OTHER (ch, victim, dmg);
WAIT_STATE (ch, 10);
if (victim->position > POS_STUNNED)
{
victim->position = POS_STUNNED;
stop_fighting (victim, TRUE);
}
WAIT_STATE( victim, 12 );
return;
}
void fire_sword (CHAR_DATA * ch)
{
//Flame Cone Sword sets victim aflame, and is VERY likely to hit. More Expense, Low Dmg
CHAR_DATA *victim;
char buf[MAX_STRING_LENGTH];
int dmg;
if (IS_NPC (ch))
return;
if ((victim = ch->fighting) == NULL)
{
send_to_char ("You find no need for this now.\n\r", ch);
return;
}
if (ch->mana < 1750)
{
send_to_char ("You have not the 1750 mystical power to use this.\n\r",
ch);
return;
}
if (!katana_check(ch))
{
send_to_char
("Without a proper katana the energy will destroy your weapon.\n\r",
ch);
return;
}
ch->mana -= 1750;
send_to_char ("You channel mystical energy into your katana.\n\r", ch);
do_say (ch, "#rFIRE SWORD!");
send_to_char ("A tremendous cone of flame shoots from your katana.\n\r",
ch);
act ("A tremendous cone of flame shoots from $n's katana!", ch, NULL, NULL,
TO_ROOM);
if (number_range (0, 100) < 5)
{
act ("Your cone of flame flashes past $N and scorches the ground.", ch,
NULL, victim, TO_CHAR);
act ("The cone of flame flashes past you and scorches the ground.", ch,
NULL, victim, TO_VICT);
act ("The cone of flame flashes past $N and scorches the ground.", ch,
NULL, victim, TO_NOTVICT);
return;
}
dmg = number_range ((ch->wpn[1]), (ch->wpn[1] * 2));
sprintf (buf,
"Your cone of flame engulfs $N's in a sheet of flame. #w[#r%d#w]#n",
dmg);
act (buf, ch, NULL, victim, TO_CHAR);
sprintf (buf,
"$n's cone of flame engulfs you in a sheet of flame. #w[#r%d#w]#n",
dmg);
act (buf, ch, NULL, victim, TO_VICT);
act ("$n's engulfs $N's in a sheet of flame.", ch, NULL, victim,
TO_NOTVICT);
if (!WORN_ARTIFACT (victim, ARTI_DEMONS_HEART)) PUNC_OTHER (ch, victim, dmg);
WAIT_STATE (ch, 12);
if (!IS_SET (victim->affected_by, AFF_FLAMING) && !WORN_ARTIFACT (victim, ARTI_DEMONS_HEART))
SET_BIT (victim->affected_by, AFF_FLAMING);
return;
}
void ice_sword (CHAR_DATA * ch)
{
//Frost Sword can freeze victims solid, and is highly damaging, and is likely to hit. Incredibly Expensive
CHAR_DATA *victim;
char buf[MAX_STRING_LENGTH];
char spc[MAX_STRING_LENGTH];
char spcV[MAX_STRING_LENGTH];
int dmg;
bool froze = FALSE;
if (IS_NPC (ch))
return;
if ((victim = ch->fighting) == NULL)
{
send_to_char ("You find no need for this now.\n\r", ch);
return;
}
if (ch->mana < 2500)
{
send_to_char ("You have not the 2500 mystical power to use this.\n\r",
ch);
return;
}
if (!katana_check(ch))
{
send_to_char
("Without a proper katana the energy will destroy your weapon.\n\r",
ch);
return;
}
ch->mana -= 2500;
send_to_char ("You channel mystical energy into your katana.\n\r", ch);
do_say (ch, "#bFROST SWORD!");
send_to_char ("A ray of frost lances out from your katana.\n\r", ch);
act ("A ray of frost lances out from $n's katana!", ch, NULL, NULL,
TO_ROOM);
if (number_range (0, 100) < 10)
{
act ("Your ray of frost shoots past $N and freezes the ground.", ch,
NULL, victim, TO_CHAR);
act ("The ray of frost shoots past you and freezes the ground.", ch,
NULL, victim, TO_VICT);
act ("The ray of frost shoots past $N and freezes the ground.", ch,
NULL, victim, TO_NOTVICT);
return;
}
if (number_range (0, 1000) > 750)
froze = TRUE;
if (!froze)
{
sprintf (spc, "but $N recovers.");
sprintf (spcV, "but you recover.");
}
else
{
sprintf (spc, "and $N freezes solid.");
sprintf (spcV, "and you freeze solid.");
}
dmg = number_range ((ch->wpn[1]), (ch->wpn[1] * 4));
sprintf (buf,
"Your ray of frost envelopes $N's in a block of ice, %s #R[#b %d #n#R]#n",
spc, dmg);
act (buf, ch, NULL, victim, TO_CHAR);
sprintf (buf,
"$n's ray of frost envelopes you in a block of ice, %s #R[#b %d #n#R]#n",
spcV, dmg);
act (buf, ch, NULL, victim, TO_VICT);
sprintf (buf, "$n's ray of frost envelopes $N's in a block of ice, %s",
spc);
act (buf, ch, NULL, victim, TO_NOTVICT);
PUNC_OTHER (ch, victim, dmg);
WAIT_STATE (ch, 12);
if (froze)
{
if (!IS_SET (victim->flag2, AFF2_FROZEN))
SET_BIT (victim->flag2, AFF2_FROZEN);
if ( victim->fighting != NULL )
stop_fighting( victim, TRUE );
if ( ch->fighting == victim )
stop_fighting( ch, TRUE );
}
return;
}
void drain_sword (CHAR_DATA * ch)
{
//Drain Sword sucks health from a victim, and is moderately likely to hit. Avg Expense, Low Dmg
CHAR_DATA *victim;
char buf[MAX_STRING_LENGTH];
int dmg;
int heal;
if (IS_NPC (ch))
return;
if ((victim = ch->fighting) == NULL)
{
send_to_char ("You find no need for this now.\n\r", ch);
return;
}
if (ch->mana < 1500)
{
send_to_char ("You have not the 1500 mystical power to use this.\n\r",
ch);
return;
}
if (!katana_check(ch))
{
send_to_char
("Without a proper katana the energy will destroy your weapon.\n\r",
ch);
return;
}
ch->mana -= 1500;
send_to_char ("You channel mystical energy into your katana.\n\r", ch);
do_say (ch, "Drain SWORD!");
send_to_char ("A wave of energy launches itself from your katana.\n\r",
ch);
act ("A wave of energy launches itself from $n's katana!", ch, NULL, NULL,
TO_ROOM);
if (number_range (0, 100) < 20)
{
act ("Your wave of energy goes through $N, continues on a bit then fades.", ch, NULL, victim, TO_CHAR);
act ("The wave of energy goes through you, continues on a bit then fades.", ch, NULL, victim, TO_VICT);
act ("The wave of energy goes through $N, continues on a bit then fades.", ch, NULL, victim, TO_NOTVICT);
return;
}
dmg = number_range ((ch->wpn[1] * 1.5), (ch->wpn[1] * 2.5));
heal = number_range (dmg / 2, dmg);
sprintf (buf,
"Your wave of energy enters $N's body and drains %d health painfully from $N. #w[#r%d#w]#n",
heal, dmg);
act (buf, ch, NULL, victim, TO_CHAR);
sprintf (buf,
"$n's wave of energy enters your body and drains you painfully. #w[#r%d#w]#n",
dmg);
act (buf, ch, NULL, victim, TO_VICT);
act ("$n's wave of energy enters $N's body causing $N to look weak.", ch,
NULL, victim, TO_NOTVICT);
PUNC_OTHER (ch, victim, dmg);
ch->hit += heal;
if (ch->hit > ch->max_hit)
ch->hit = ch->max_hit;
WAIT_STATE (ch, 12);
return;
}
void soul_sword (CHAR_DATA * ch)
{
//Soul Sword can rarely kill victims outright, and does 1 dmg, and is VERY unlikely to hit. UNGODLY Expensive
CHAR_DATA *victim;
char buf[MAX_STRING_LENGTH];
int thebonus = 0;
if (IS_NPC (ch))
return;
if ((victim = ch->fighting) == NULL)
{
send_to_char ("You find no need for this now.\n\r", ch);
return;
}
if (IS_NPC (victim) && victim->level >= 1000)
{
stc ("Your attack on them was inneffective!\n\r", ch);
return;
}
if (IS_NPC (victim))
thebonus = 45;
else
thebonus = 7;
if (ch->mana < 7500)
{
send_to_char ("You have not the 7500 mystical power to use this.\n\r",
ch);
return;
}
if (!katana_check(ch))
{
send_to_char
("Without a proper katana the energy will destroy your weapon.\n\r",
ch);
return;
}
ch->mana -= 7500;
send_to_char ("You channel mystical energy into your katana.\n\r", ch);
do_say (ch, "#ySOUL SWORD!");
act ("A bolt of light shoots out of your katana and into $N", ch, NULL,
victim, TO_CHAR);
act ("A bolt of light shoots out of $n's katana and into you!", ch, NULL,
victim, TO_VICT);
act ("A bolt of light shoots out of $n's katana and into $N!", ch, NULL,
victim, TO_NOTVICT);
if (number_range (0, 250) > (4 + thebonus)) // Was .5% now it's 5%/20%
{
act ("Your attack was ineffective.", ch, NULL, victim, TO_CHAR);
act ("$n looks confused as nothing happens.", ch, NULL, NULL, TO_ROOM);
multi_hit (ch, victim, TYPE_UNDEFINED);
WAIT_STATE (ch, (PULSE_VIOLENCE * 5));
return;
}
sprintf (buf, "$N screams as $E is ripped apart by the dark energy.");
act (buf, ch, NULL, victim, TO_CHAR);
sprintf (buf,
"$n looks on as you start screaming while dark energy rips you apart from the inside out.");
act (buf, ch, NULL, victim, TO_VICT);
send_to_char ("You crumple to the ground.\n\r", victim);
act ("$n looks on as $N starts screaming in extreme pain.", ch, NULL,
victim, TO_NOTVICT);
WAIT_STATE (ch, 10);
victim->hit = victim->hit / 2;
PUNC_OTHER (ch, victim, 11);
return;
}
void do_swordcraft (CHAR_DATA * ch, char *argument)
{
char arg[MAX_STRING_LENGTH];
bool lit = FALSE;
bool fire = FALSE;
bool ice = FALSE;
bool drain = FALSE;
bool soul = FALSE;
bool crescent = FALSE;
bool serpent = FALSE;
bool moon = FALSE;
bool chain = FALSE;
bool arc = FALSE;
argument = one_argument (argument, arg);
if (IS_NPC (ch))
return;
if (!IS_CLASS (ch, CLASS_HIGHLANDER))
{
if (WORN_ARTIFACT (ch, ARTI_BRACERS_OF_STORMS_FURY))
{
lightning_sword (ch);
return;
}
do_rand_typo (ch);
return;
}
if (!(IS_DEMPOWER (ch, HPOWER_SWORDCRAFT)))
{
stc ("You are unable to use techniques without learning them.\n\r", ch);
return;
}
if (!str_prefix (arg, "lightning"))
lit = TRUE;
else if (!str_prefix (arg, "fire"))
fire = TRUE;
else if (!str_prefix (arg, "ice"))
ice = TRUE;
else if (!str_prefix (arg, "drain"))
drain = TRUE;
else if (!str_prefix (arg, "soul"))
soul = TRUE;
else if (!str_prefix (arg, "crescent"))
crescent = TRUE;
else if (!str_prefix (arg, "serpent"))
serpent = TRUE;
else if (!str_prefix (arg, "moon"))
moon = TRUE;
else if (!str_prefix (arg, "chain"))
chain = TRUE;
else if (!str_prefix (arg, "arc"))
arc = TRUE;
else
{
stc ("No such swordcraft\n\r", ch);
return;
}
if ((!lit) && (!fire) && (!ice) && (!drain) && (!soul) && (!crescent)
&& (!serpent) && (!moon) && (!chain) && (!arc))
{
send_to_char ("That is not a technique.\n\r", ch);
stc ("Choose one of:\n\r", ch);
stcf (ch, " Magical:%s%s%s%s%s.\n\r",
((IS_DEMPOWER (ch, HPOWER_ICE)) ? "#w Ice" : ""),
((IS_DEMPOWER (ch, HPOWER_FIRE)) ? "#w Fire" : ""),
((IS_DEMPOWER (ch, HPOWER_LIGHTNING)) ? "#w Lightning" : ""),
((IS_DEMPOWER (ch, HPOWER_DRAIN)) ? "#w Drain" : ""),
((IS_DEMPOWER (ch, HPOWER_SOUL)) ? "#w Soul" : ""));
stcf (ch, "#c Physical:%s%s%s%s%s.\n\r",
((IS_DEMPOWER (ch, HPOWER_CRESCENT_STRIKE)) ? "#w Crescent" : ""),
((IS_DEMPOWER (ch, HPOWER_SERPENT_LUNGE)) ? "#w Serpent" : ""),
((IS_DEMPOWER (ch, HPOWER_MOON_SLASH)) ? "#w Moon" : ""),
((IS_DEMPOWER (ch, HPOWER_CHAIN_SWING)) ? "#w Chain" : ""),
((IS_DEMPOWER (ch, HPOWER_ARC_BOW)) ? "#w Arc" : ""));
return;
}
if (lit || fire || ice || drain || soul)
{
if (!(IS_DEMPOWER (ch, HPOWER_ANCESTRAL)))
{
stc ("You are missing a crucial aspect to using this set of techniques.\n\r", ch);
return;
}
}
if (crescent || serpent || moon || chain || arc)
{
if (!(IS_DEMPOWER (ch, HPOWER_BLADESPIN)))
{
stc ("You are missing a crucial aspect to using this set of techniques.\n\r", ch);
return;
}
}
if (lit)
{
if (!IS_DEMPOWER (ch, HPOWER_LIGHTNING))
send_to_char ("You have not yet learned this sword technique.\n\r",
ch);
else
lightning_sword (ch);
return;
}
if (fire)
{
if (!IS_DEMPOWER (ch, HPOWER_FIRE))
send_to_char ("You have not yet learned this sword technique.\n\r",
ch);
else
fire_sword (ch);
return;
}
if (ice)
{
if (!IS_DEMPOWER (ch, HPOWER_ICE))
send_to_char ("You have not yet learned this sword technique.\n\r",
ch);
else
ice_sword (ch);
return;
}
if (drain)
{
if (!IS_DEMPOWER (ch, HPOWER_DRAIN))
send_to_char ("You have not yet learned this sword technique.\n\r",
ch);
else
drain_sword (ch);
return;
}
if (soul)
{
if (!IS_DEMPOWER (ch, HPOWER_SOUL))
send_to_char ("You have not yet learned this sword technique.\n\r",
ch);
else
soul_sword (ch);
return;
}
if (crescent)
{
if (!IS_DEMPOWER (ch, HPOWER_CRESCENT_STRIKE))
send_to_char ("You have not yet learned this sword technique.\n\r",
ch);
else
crescent_strike (ch);
return;
}
if (serpent)
{
if (!IS_DEMPOWER (ch, HPOWER_SERPENT_LUNGE))
send_to_char ("You have not yet learned this sword technique.\n\r",
ch);
else
serpent_lunge (ch);
return;
}
if (moon)
{
if (!IS_DEMPOWER (ch, HPOWER_MOON_SLASH))
send_to_char ("You have not yet learned this sword technique.\n\r",
ch);
else
moon_slash (ch);
return;
}
if (chain)
{
if (!IS_DEMPOWER (ch, HPOWER_CHAIN_SWING))
send_to_char ("You have not yet learned this sword technique.\n\r",
ch);
else
chain_swing (ch);
return;
}
if (arc)
{
if (!IS_DEMPOWER (ch, HPOWER_ARC_BOW))
send_to_char ("You have not yet learned this sword technique.\n\r",
ch);
else
arc_bow (ch);
return;
}
do_swordcraft (ch, "");
return;
}
void do_sensequickening (CHAR_DATA * ch, char *argument)
{
CHAR_DATA *hch;
char buf[MSL];
if (!IS_CLASS (ch, CLASS_HIGHLANDER))
{
do_rand_typo (ch);
return;
}
if (!IS_DEMPOWER (ch, HPOWER_SENSE))
{
send_to_char ("You don't know how to sense for quickening yet.\n\r",
ch);
return;
}
send_to_char
("[ Name ] [ Quickening ] [ Location ]\n\r", ch);
for (hch = char_list; hch; hch = hch->next)
{
if (IS_IMMORTAL (hch) && !can_see (ch, hch))
continue;
if (!IS_CLASS (hch, CLASS_HIGHLANDER))
continue;
sprintf (buf, "[ %-12s ] [ %4d %-4d ]", hch->name, hch->quickening[0],
hch->quickening[1]);
if (ch->quickening[1] > hch->quickening[1] && hch->in_room != NULL)
sprintf (buf + strlen (buf), " [ %-22s ]\n\r", hch->in_room->name);
else
sprintf (buf + strlen (buf), " [ %-22s ]\n\r", "Cannot Sense");
send_to_char (buf, ch);
}
return;
}
void do_hempower (CHAR_DATA * ch, char *argument)
{
char buf[MSL];
int cost;
if (!IS_DEMPOWER (ch, HPOWER_EMPOWER))
{
send_to_char ("You don't know how to utilize your quickening yet.\n\r",
ch);
return;
}
if (argument[0] == '\0')
{
stcf (ch, "Syntax:\n\r hempower <recharge%s%s%s>\n\r",
((IS_DEMPOWER (ch, HPOWER_BYPASS_DEFENSE)) ? "/bypass" : ""),
((IS_DEMPOWER (ch, HPOWER_SHIELDLESS)) ? "/shieldless" : ""),
((IS_DEMPOWER (ch, HPOWER_PRESERVATION)) ? "/preservation" : ""));
return;
}
/* if ( !str_prefix( argument, "discharge" ) )
{
int dis_dmg = ch->quickening[0] * ( number_range(10, 20 ) * 1000 );
if ( ch->quickening[0] < 1 )
{
stc( "You don't have any quickening pent up to discharge.\n\r", ch );
return;
}
stcf( ch, "You discharge your pent up quickening all at once, ruining your foci. #y[ #r%d #y]#n\n\r", dis_dmg );
if ( IS_DEMPOWER( ch, HPOWER_USE_BYPASS ) ) REMOVE_BIT( ch->pcdata->powers[DPOWER_FLAGS], HPOWER_USE_BYPASS );
if ( IS_DEMPOWER( ch, HPOWER_USE_SHIELDLESS ) ) REMOVE_BIT( ch->pcdata->powers[DPOWER_FLAGS], HPOWER_USE_SHIELDLESS );
if ( IS_DEMPOWER( ch, HPOWER_USE_PRESERVATION ) ) REMOVE_BIT( ch->pcdata->powers[DPOWER_FLAGS], HPOWER_USE_PRESERVATION );
PUNC_OTHER( ch, ch, dis_dmg );
ch->quickening[0] = 0;
return;
}
*/
if (str_prefix (argument, "recharge") && (ch->fight_timer > 0))
{
stc ("You may not change your foci while you have a fight timer.\n\r",
ch);
return;
}
if (!str_prefix (argument, "bypass"))
{
if (!IS_DEMPOWER (ch, HPOWER_BYPASS_DEFENSE))
{
stc ("You don't know the art of bypassing defenses.\n\r", ch);
return;
}
if (IS_DEMPOWER (ch, HPOWER_USE_BYPASS)) // this is whether it's active or not
{
if ((!IS_DEMPOWER (ch, HPOWER_USE_SHIELDLESS))
&& (!IS_DEMPOWER (ch, HPOWER_USE_PRESERVATION)))
{
if (ch->quickening[0] > 0)
{
stc ("To relax your only focus that expends your built up quickening would be suicide.\n\r", ch);
return;
}
}
stc ("You no longer will focus on bypassing your opponent's defenses.\n\r", ch);
REMOVE_BIT (ch->pcdata->powers[DPOWER_FLAGS], HPOWER_USE_BYPASS);
return;
}
else
{
if (ch->quickening[0] < 0)
{
stc ("You can't afford the 0 quickening it takes to activate this focus.\n\r", ch);
return;
}
else
{
ch->quickening[0] -= 0;
}
stc ("You now will focus on bypassing your opponent's defenses.\n\r",
ch);
SET_BIT (ch->pcdata->powers[DPOWER_FLAGS], HPOWER_USE_BYPASS);
return;
}
}
if (!str_prefix (argument, "shieldless"))
{
if (!IS_DEMPOWER (ch, HPOWER_SHIELDLESS))
{
stc ("You don't know the art of bypassing shields.\n\r", ch);
return;
}
if (IS_DEMPOWER (ch, HPOWER_USE_SHIELDLESS)) // this is whether it's active or not
{
if ((!IS_DEMPOWER (ch, HPOWER_USE_BYPASS))
&& (!IS_DEMPOWER (ch, HPOWER_USE_PRESERVATION)))
{
if (ch->quickening[0] > 0)
{
stc ("To relax your only focus that expends your built up quickening would be suicide.\n\r", ch);
return;
}
}
stc ("You no longer will focus on bypassing your opponent's shields.\n\r", ch);
REMOVE_BIT (ch->pcdata->powers[DPOWER_FLAGS], HPOWER_USE_SHIELDLESS);
return;
}
else
{
if (ch->quickening[0] < 5)
{
stc ("You can't afford the 5 quickening it takes to activate this focus.\n\r", ch);
return;
}
else
{
ch->quickening[0] -= 5;
}
stc ("You now will focus on bypassing your opponent's shields.\n\r",
ch);
SET_BIT (ch->pcdata->powers[DPOWER_FLAGS], HPOWER_USE_SHIELDLESS);
return;
}
}
if (!str_prefix (argument, "preservation"))
{
if (!IS_DEMPOWER (ch, HPOWER_PRESERVATION))
{
stc ("You don't know the art of improving your defenses.\n\r", ch);
return;
}
if (IS_DEMPOWER (ch, HPOWER_USE_PRESERVATION)) // this is whether it's active or not
{
if ((!IS_DEMPOWER (ch, HPOWER_USE_BYPASS))
&& (!IS_DEMPOWER (ch, HPOWER_USE_SHIELDLESS)))
{
if (ch->quickening[0] > 0)
{
stc ("To relax your only focus that expends your built up quickening would be suicide.\n\r", ch);
return;
}
}
stc ("You no longer will focus on blocking spells from other targets.\n\r", ch);
REMOVE_BIT (ch->pcdata->powers[DPOWER_FLAGS],
HPOWER_USE_PRESERVATION);
return;
}
else
{
if (ch->quickening[0] < 10)
{
stc ("You can't afford the 10 quickening it takes to activate this focus.\n\r", ch);
return;
}
else
{
ch->quickening[0] -= 10;
}
stc ("You now will focus on blocking spells from other targets.\n\r",
ch);
SET_BIT (ch->pcdata->powers[DPOWER_FLAGS], HPOWER_USE_PRESERVATION);
return;
}
}
if (str_prefix (argument, "recharge")) // ie It wasn't bypass, shieldless, preservation or recharge
{
stcf (ch, "Syntax:\n\r hempower <recharge%s%s%s>\n\r",
((IS_DEMPOWER (ch, HPOWER_BYPASS_DEFENSE)) ? "/bypass" : ""),
((IS_DEMPOWER (ch, HPOWER_SHIELDLESS)) ? "/shieldless" : ""),
((IS_DEMPOWER (ch, HPOWER_PRESERVATION)) ? "/preservation" : ""));
return;
}
if ((!IS_DEMPOWER (ch, HPOWER_USE_BYPASS))
&& (!IS_DEMPOWER (ch, HPOWER_USE_SHIELDLESS))
&& (!IS_DEMPOWER (ch, HPOWER_USE_PRESERVATION)))
{
stc ("To charge up your quickening without a focus to spend it on would be suicide.\n\r", ch);
return;
}
if (ch->quickening[1] >= 100)
cost = ch->quickening[1] * 200;
else if (ch->quickening[1] >= 50)
cost = ch->quickening[1] * 100;
else
cost = ch->quickening[1] * 50;
if (ch->hempower > -1)
{
send_to_char ("You cannot recharge your quickening so soon.\n\r", ch);
return;
}
if ((cost / 2) > ch->move)
{
sprintf (buf,
"You need at least another %d move points to activate empower.\n\r",
(cost / 2) - ch->move);
send_to_char (buf, ch);
return;
}
if ((cost / 2) > ch->mana)
{
sprintf (buf,
"You need at least another %d mana points to activate empower.\n\r",
(cost / 2) - ch->mana);
send_to_char (buf, ch);
return;
}
ch->move -= (cost / 2);
ch->mana -= (cost / 2);
ch->hempower = 1; // Mark them as empowered.
if (ch->quickening[1] >= 100)
ch->quickening[0] = 75 + (ch->quickening[1] * 1.60);
else if (ch->quickening[1] >= 50)
ch->quickening[0] = 50 + (ch->quickening[1] * 1.40);
else
ch->quickening[0] = 25 + (ch->quickening[1] * 1.20);
ch->quickening[0] += ch->quickening[1];
stcf (ch, "#cCurrent Quickening #y+#w%d\n\r", ch->quickening[0]);
sprintf (buf,
"You are briefly surrounded by %s moving %s hued energy as you recharge your quickening.\n\r",
ch->quickening[0] >= 120 ? "furiously" : ch->quickening[0] >=
60 ? "quickly" : "calmly",
ch->quickening[0] >= 180 ? "violet" : ch->quickening[0] >=
90 ? "blue " : "yellow ");
send_to_char (buf, ch);
sprintf (buf,
"$n is briefly surrounded by %s moving %s hued energy.",
ch->quickening[0] >= 120 ? "furiously" : ch->quickening[0] >=
60 ? "quickly" : "calmly",
ch->quickening[0] >= 180 ? "violet" : ch->quickening[0] >=
90 ? "blue " : "yellow");
act (buf, ch, NULL, NULL, TO_ROOM);
return;
}
/* Highlander Portal Power */
void do_ancestralpath (CHAR_DATA * ch, char *argument)
{
CHAR_DATA *victim;
char arg[MAX_INPUT_LENGTH];
if (IS_NPC (ch))
return;
argument = one_argument (argument, arg);
if (!IS_CLASS (ch, CLASS_HIGHLANDER))
{
do_rand_typo (ch);
return;
}
if (!IS_DEMPOWER (ch, HPOWER_ANCESTRAL))
{
send_to_char ("You don't know how to walk the ancestral path yet.\n\r",
ch);
return;
}
if (IS_SET (ch->flag2, AFF2_INARENA))
{
stc ("Not while in the arena.\n\r", ch);
return;
}
if (arg[0] == '\0')
{
send_to_char ("Walk the ancestrial path to whom?\n\r", ch);
return;
}
if ((victim = get_char_world (ch, arg)) == NULL)
{
send_to_char ("They are not of this world.\n\r", ch);
return;
}
if ( ch->fight_timer > 0 )
{
send_to_char( "Not with a fight timer.\n\r", ch );
return;
}
if (ch->move < 1000)
{
stc ("The path escapes your senses as you lose control over your inner energies.\n\r", ch);
return;
}
if (IS_NPC (victim) && IS_SET (victim->in_room->area->aflags, AFLAG_HQ))
{
stc ("You failed.\n\r", ch);
return;
}
if (ch == victim)
{
send_to_char ("But you're already at yourself!\n\r", ch);
return;
}
if (IS_SET (victim->in_room->room_flags, ROOM_CCHAMBER))
{
stc ("You failed\n\r", ch);
return;
}
if (room_is_private (victim->in_room))
{
send_to_char ("That room is private right now.\n\r", ch);
return;
}
if (!IS_NPC (victim) && !IS_IMMUNE (victim, IMM_SUMMON))
{
send_to_char ("They don't want you near them.\n\r", ch);
return;
}
if (victim->in_room == ch->in_room)
{
send_to_char ("But you're already there!\n\r", ch);
return;
}
if (IS_NPC (victim) && victim->level > 150)
{
stc ("You failed.\n\r", ch);
return;
}
act ("You follow the path to $N.", ch, NULL, victim, TO_CHAR);
act ("$n steps into the air, leaving behind no trace whatsoever.", ch,
NULL, victim, TO_ROOM);
char_from_room (ch);
char_to_room (ch, victim->in_room);
ch->move -= 1000;
act ("$n steps out of the air in front of $N.", ch, NULL, victim,
TO_NOTVICT);
act ("$n steps out of the air in front of you.", ch, NULL, victim,
TO_VICT);
do_look (ch, "auto");
return;
}
void non_katana_lightning_sword (CHAR_DATA * ch, OBJ_DATA * obj)
{
//Non Kat Lightning Stuns Victim and is twice as likely to miss as the orig, half orig Expense, Avg Damage
CHAR_DATA *victim;
char buf[MAX_STRING_LENGTH];
int dmg;
if ((victim = ch->fighting) == NULL)
return;
if (ch->mana < 1250)
return;
else
ch->mana -= 1250;
act ("#wYour $p glows #ccyan#w as it channels mystical energy.", ch, obj,
NULL, TO_CHAR);
do_say (ch, "#yLightning!");
act ("Lightning bursts forth from $p.", ch, obj, NULL, TO_CHAR);
act ("Lightning bursts forth from $n's $p!", ch, obj, NULL, TO_ROOM);
if (number_range (0, 100) < 16)
{
act ("Your lightning blast flies past $N and is absorbed by the ground.", ch, NULL, victim, TO_CHAR);
act ("The lightning blast flies past you and is absorbed by the ground.", ch, NULL, NULL, TO_VICT);
act ("The lightning blast slams into the ground and is absorbed.", ch,
NULL, NULL, TO_NOTVICT);
return;
}
dmg = number_range ((ch->spl[YELLOW_MAGIC]), (ch->spl[YELLOW_MAGIC] * 3));
sprintf (buf,
"Your lightning blast slams into $N's and crackles around $S body sending them sprawling. #w[#r%d#w]#n",
dmg);
act (buf, ch, NULL, victim, TO_CHAR);
sprintf (buf,
"$n's lightning blast slams into you and crackles around your body sending you sprawling. #w[#r%d#w]#n",
dmg);
act (buf, ch, NULL, victim, TO_VICT);
act ("$n's lightning blast slams into $N's and crackles around $S body sending $N sprawling.", ch, NULL, victim, TO_NOTVICT);
PUNC_OTHER (ch, victim, dmg);
if (victim->position > POS_STUNNED)
victim->position = POS_STUNNED;
return;
}
void non_katana_fire_sword (CHAR_DATA * ch, OBJ_DATA * obj)
{
//Non kat Flame Cone Sword sets victim aflame, and is twice as likely to miss as orig. half orig Expense, Low Dmg
CHAR_DATA *victim;
char buf[MAX_STRING_LENGTH];
int dmg;
if ((victim = ch->fighting) == NULL)
return;
if (ch->mana < 1750)
return;
else
ch->mana -= 1750;
act ("#wYour $p glows #rcherry red#w as it channels mystical energy.", ch,
obj, NULL, TO_CHAR);
do_say (ch, "#rFlame!");
act ("A tremendous cone of flame streams forth from $p.", ch, obj, NULL,
TO_CHAR);
act ("A tremendous cone of flame streams forth from $n's $p!", ch, obj,
NULL, TO_ROOM);
if (number_range (0, 100) < 10)
{
act ("Your cone of flame flashes past $N and scorches the ground.", ch,
NULL, victim, TO_CHAR);
act ("The cone of flame flashes past you and scorches the ground.", ch,
NULL, victim, TO_VICT);
act ("The cone of flame flashes past $N and scorches the ground.", ch,
NULL, victim, TO_NOTVICT);
return;
}
dmg = number_range ((ch->spl[RED_MAGIC]), (ch->spl[RED_MAGIC] * 2));
sprintf (buf,
"Your cone of flame engulfs $N's in a sheet of flame. #w[#r%d#w]#n",
dmg);
act (buf, ch, NULL, victim, TO_CHAR);
sprintf (buf,
"$n's cone of flame engulfs you in a sheet of flame. #w[#r%d#w]#n",
dmg);
act (buf, ch, NULL, victim, TO_VICT);
act ("$n's engulfs $N's in a sheet of flame.", ch, NULL, victim,
TO_NOTVICT);
if (!WORN_ARTIFACT (victim, ARTI_DEMONS_HEART)) PUNC_OTHER (ch, victim, dmg);
if (!IS_SET (victim->affected_by, AFF_FLAMING) && !WORN_ARTIFACT (victim, ARTI_DEMONS_HEART))
SET_BIT (victim->affected_by, AFF_FLAMING);
return;
}
void non_katana_ice_sword (CHAR_DATA * ch, OBJ_DATA * obj)
{
//Non kat Frost Sword can freeze victims solid, and is twice as likely to miss as orig. half orig Expense, Low Dmg
CHAR_DATA *victim;
char buf[MAX_STRING_LENGTH];
int dmg;
char spc[MAX_STRING_LENGTH];
char spcV[MAX_STRING_LENGTH];
bool froze = FALSE;
if ((victim = ch->fighting) == NULL)
return;
if (ch->mana < 2500) return;
else
ch->mana -= 2500;
act ("#wYour $p glows #bicy blue#w as it channels mystical energy.", ch,
obj, NULL, TO_CHAR);
do_say (ch, "#bArctic Breath!");
act ("A ray of frost lances out from $p.", ch, obj, NULL, TO_CHAR);
act ("A ray of frost lances out from $n's $p!", ch, obj, NULL, TO_ROOM);
if (number_range (0, 100) < 10)
{
act ("Your ray of frost shoots past $N and freezes the ground.", ch,
NULL, victim, TO_CHAR);
act ("The ray of frost shoots past you and freezes the ground.", ch,
NULL, victim, TO_VICT);
act ("The ray of frost shoots past $N and freezes the ground.", ch,
NULL, victim, TO_NOTVICT);
return;
}
if (number_range (0, 1000) > 750)
froze = TRUE;
if (!froze)
{
sprintf (spc, "but $N recovers.");
sprintf (spcV, "but you recover.");
}
else
{
sprintf (spc, "and $N freezes solid.");
sprintf (spcV, "and you freeze solid.");
}
dmg = number_range ((ch->spl[BLUE_MAGIC]) * 2, (ch->spl[BLUE_MAGIC] * 6));
sprintf (buf,
"Your ray of frost envelopes $N's in a block of ice, %s #R[#b %d #n#R]#n",
spc, dmg);
act (buf, ch, NULL, victim, TO_CHAR);
sprintf (buf,
"$n's ray of frost envelopes you in a block of ice, %s #R[#b %d #n#R]#n",
spcV, dmg);
act (buf, ch, NULL, victim, TO_VICT);
sprintf (buf, "$n's ray of frost envelopes $N's in a block of ice, %s",
spc);
act (buf, ch, NULL, victim, TO_NOTVICT);
PUNC_OTHER (ch, victim, dmg);
if (froze)
{
if (!IS_SET (victim->flag2, AFF2_FROZEN))
SET_BIT (victim->flag2, AFF2_FROZEN);
}
return;
}
void non_katana_drain_sword (CHAR_DATA * ch, OBJ_DATA * obj)
{
//Non kat Drain Sword sucks health from a victim, and is twice as likely to miss as orig. half orig Expense, Low Dmg
CHAR_DATA *victim;
char buf[MAX_STRING_LENGTH];
int dmg;
int heal;
if ((victim = ch->fighting) == NULL)
return;
if (ch->mana < 1500)
return;
else
ch->mana -= 1500;
act ("#wYour $p glows #Pdark purple#w as it channels mystical energy.", ch,
obj, NULL, TO_CHAR);
do_say (ch, "#PVampyric Kiss!");
act ("A wave of energy launches itself from $p.", ch, obj, NULL, TO_CHAR);
act ("A wave of energy launches itself from $n's $p into your body!", ch,
obj, victim, TO_VICT);
act ("A wave of energy launches itself from $n's $p!", ch, obj, victim,
TO_NOTVICT);
if (number_range (0, 100) < 40)
{
act ("Your wave of energy goes through $N, continues on a bit then fades.", ch, NULL, victim, TO_CHAR);
act ("The wave of energy goes through you, continues on a bit then fades.", ch, NULL, victim, TO_VICT);
act ("The wave of energy goes through $N, continues on a bit then fades.", ch, NULL, victim, TO_NOTVICT);
return;
}
dmg = number_range ((ch->spl[PURPLE_MAGIC]), (ch->spl[PURPLE_MAGIC] * 2));
heal = number_range (dmg / 3, dmg / 2);
sprintf (buf,
"Your wave of energy enters $N's body and drains %d health painfully from $N. #w[#r%d#w]#n",
heal, dmg);
act (buf, ch, NULL, victim, TO_CHAR);
sprintf (buf,
"$n's wave of energy enters your body and drains you painfully. #w[#r%d#w]#n",
dmg);
act (buf, ch, NULL, victim, TO_VICT);
act ("$n's wave of energy enters $N's body causing $N to look weak.", ch,
NULL, victim, TO_NOTVICT);
PUNC_OTHER (ch, victim, dmg);
ch->hit += heal;
if (ch->hit > ch->max_hit)
ch->hit = ch->max_hit;
return;
}
void non_katana_soul_sword (CHAR_DATA * ch, OBJ_DATA * obj)
{
//Non kat Soul Sword can rarely if ever kill victims outright, and does 1 dmg, and is even more unlikely to hit then the orig. not as UNGODLY Expensive
CHAR_DATA *victim=NULL;
char buf[MAX_STRING_LENGTH];
int thebonus = 0;
if (IS_NPC (victim) && victim->level >= 1000)
return;
if (IS_NPC (victim))
thebonus = 90;
else
thebonus = 14;
if ((victim = ch->fighting) == NULL)
return;
if (ch->mana < 5000)
return;
else
ch->mana -= 5000;
act ("#wYour $p glows #Gsinister green#w as it channels mystical energy.",
ch, obj, NULL, TO_CHAR);
do_say (ch, "#GPart Soul!");
act ("A bolt of light shoots out of $p.", ch, obj, NULL, TO_CHAR);
act ("A bolt of light shoots out of $n's $p and into you!", ch, obj,
victim, TO_VICT);
act ("A bolt of light shoots out of $n's $p!", ch, obj, victim,
TO_NOTVICT);
if (number_range (0, 250) < (8 + thebonus))
{
act ("Your attack was ineffective.", ch, NULL, victim, TO_CHAR);
act ("$n looks confused as nothing happens.", ch, NULL, NULL, TO_ROOM);
PUNC_OTHER (ch, victim, 1);
return;
}
sprintf (buf, "$N screams as $E is ripped apart by the dark energy.");
act (buf, ch, NULL, victim, TO_CHAR);
sprintf (buf,
"$n looks on as you start screaming while dark energy rips you apart from the inside out.");
act (buf, ch, NULL, victim, TO_VICT);
send_to_char ("You crumple to the ground.\n\r", victim);
act ("$n looks on as $N starts screaming in extreme pain.", ch, NULL,
victim, TO_NOTVICT);
victim->hit /= 2;
return;
}
// The following checks to see if the specified character is wielding a katana. -- Serenity
bool katana_check (CHAR_DATA * ch)
{
bool FLAG1 = FALSE;
bool FLAG2 = FALSE;
bool FLAG3 = FALSE;
bool FLAG4 = FALSE;
OBJ_DATA *obj1;
OBJ_DATA *obj2;
OBJ_DATA *obj3;
OBJ_DATA *obj4;
obj1 = get_eq_char (ch, WEAR_DUAL);
obj2 = get_eq_char (ch, WEAR_HOLD);
obj3 = get_eq_char (ch, WEAR_THIRD);
obj4 = get_eq_char (ch, WEAR_FOURTH);
if ((obj1 == NULL) && (obj2 == NULL) && (obj3 == NULL) && (obj4 == NULL))
return FALSE;
if (obj1 != NULL)
{
if (IS_SET (obj1->spectype, SITEM_HIGHLANDER))
FLAG1 = TRUE;
if ((!FLAG1) && (obj1->pIndexData->vnum == 29695))
FLAG1 = TRUE;
if ((!FLAG1) && (IS_ARTIFACT (obj1, ARTI_KATANA_MURAMASE)))
FLAG1 = TRUE;
if ((!FLAG1) && (IS_ARTIFACT (obj1, ARTI_SHATTERED_BLADE)))
FLAG1 = TRUE;
}
if (obj2 != NULL)
{
if (IS_SET (obj2->spectype, SITEM_HIGHLANDER))
FLAG2 = TRUE;
if ((!FLAG2) && (obj2->pIndexData->vnum == 29695))
FLAG2 = TRUE;
if ((!FLAG2) && (IS_ARTIFACT (obj2, ARTI_KATANA_MURAMASE)))
FLAG2 = TRUE;
if ((!FLAG2) && (IS_ARTIFACT (obj2, ARTI_SHATTERED_BLADE)))
FLAG2 = TRUE;
}
if (obj3 != NULL)
{
if (IS_SET (obj3->spectype, SITEM_HIGHLANDER))
FLAG3 = TRUE;
if ((!FLAG3) && (obj3->pIndexData->vnum == 29695))
FLAG3 = TRUE;
if ((!FLAG3) && (IS_ARTIFACT (obj3, ARTI_KATANA_MURAMASE)))
FLAG3 = TRUE;
if ((!FLAG3) && (IS_ARTIFACT (obj3, ARTI_SHATTERED_BLADE)))
FLAG3 = TRUE;
}
if (obj4 != NULL)
{
if (IS_SET (obj4->spectype, SITEM_HIGHLANDER))
FLAG4 = TRUE;
if ((!FLAG4) && (obj4->pIndexData->vnum == 29695))
FLAG4 = TRUE;
if ((!FLAG4) && (IS_ARTIFACT (obj4, ARTI_KATANA_MURAMASE)))
FLAG4 = TRUE;
if ((!FLAG4) && (IS_ARTIFACT (obj4, ARTI_SHATTERED_BLADE)))
FLAG4 = TRUE;
}
if ((!FLAG1) && (!FLAG2) && (!FLAG3) && (!FLAG4))
return FALSE;
return TRUE;
}
// Checks a single given object to see if it is a katana... -- Serenity
bool obj_katana_check (CHAR_DATA * ch, OBJ_DATA * obj1)
{
bool FLAG1 = FALSE;
if (obj1 == NULL)
return FALSE;
if (obj1 != NULL)
{
if (IS_SET (obj1->spectype, SITEM_HIGHLANDER))
FLAG1 = TRUE;
if ((!FLAG1) && (obj1->pIndexData->vnum == 29695))
FLAG1 = TRUE;
if ((!FLAG1) && (IS_ARTIFACT (obj1, ARTI_KATANA_MURAMASE)))
FLAG1 = TRUE;
if ((!FLAG1) && (IS_ARTIFACT (obj1, ARTI_SHATTERED_BLADE)))
FLAG1 = TRUE;
}
if (!FLAG1)
return FALSE;
return TRUE;
}
// let's play with some nifty things -- Serenity
// more sword techniques coming up, physicals instead of magicals
// physicals have the advantage in that they work with any weapon, although at a less efficient level.
void crescent_strike (CHAR_DATA * ch)
{
// Crescent strike, is a simple and elegant head swing. Proper execution results in the launching
// of a round object many feet away from the trunk. Keep this technique away from children, death
// and dismemberment may result from prolonged use. -- Serenity
// KAMI NO GIJUTSU - translates out to "God Technique" (_ÌZp) []
CHAR_DATA *victim;
OBJ_DATA *katana;
char buf[MAX_STRING_LENGTH];
int thebonus = 0;
if (IS_NPC (ch))
return;
if ((victim = ch->fighting) == NULL)
{
send_to_char ("You find no need for this now.\n\r", ch);
return;
}
if (((katana = get_eq_char (ch, WEAR_DUAL)) == NULL)
|| katana->item_type != ITEM_WEAPON)
{
if (((katana = get_eq_char (ch, WEAR_HOLD)) == NULL)
|| katana->item_type != ITEM_WEAPON)
{
send_to_char ("You need a weapon to use this.\n\r", ch);
return;
}
}
if (IS_NPC (victim) && victim->level >= 1000)
{
stc ("They parry your blow with ease!\n\r", ch);
return;
}
if (IS_NPC (victim))
thebonus = 45 + (ch->wpn[0] / 100);
else
thebonus = 5 + (ch->wpn[0] / 200);
if (ch->move < 9500)
{
send_to_char ("You have not the 9500 stamina to use this.\n\r", ch);
return;
}
if (!katana_check(ch))
{
send_to_char
("Without a proper katana, your ability is greatly reduced.\n\r",
ch);
thebonus /= 4;
}
ch->move -= 3500;
ch->quickening[0] = UMAX( ch->quickening[0]-5, 0 );
do_say (ch, "#yKAMI NO GIJUTSU!");
send_to_char
("You pause and then swing your weapon in a graceful arc.\n\r", ch);
act ("#n suddenly pauses and then swings $s weapon at you in a graceful arc.", ch, NULL, victim, TO_VICT);
act ("#n suddenly pauses and then swings $s weapon at $N in a graceful arc", ch, NULL, victim, TO_ROOM);
if ((number_range (0, 125) > thebonus))
{
act ("Your Crescent Strike doesn't connect with $N.", ch, NULL, victim,
TO_CHAR);
act ("You sense $n's graceful swing and narrowly evade it!", ch, NULL,
victim, TO_VICT);
act ("$n swings gracefully at $N but, $N evades it... Barely!", ch,
NULL, victim, TO_NOTVICT);
WAIT_STATE (ch, (PULSE_VIOLENCE * 2.5));
return;
}
if (IS_NPC (victim))
sprintf (buf,
"Your Crescent Strike connects with $N's head and removes it easily. #w[#r%d#w]#n",
(victim->max_hit * 2));
else
sprintf (buf,
"Your Crescent Strike connects with $N's head and removes it easily.");
act (buf, ch, NULL, victim, TO_CHAR);
act ("You sense $n's graceful swing too late to evade it removing your head...", ch, NULL, victim, TO_VICT);
act ("$n swings gracefully at $N and... $N fails to evade as it connects with $S head!", ch, NULL, victim, TO_NOTVICT);
if (IS_SET (victim->war, WARRING))
eliminate (ch, victim); // In a war, it's an instant elimination
else if ((IS_SET (ch->flag2, AFF2_INARENA)) && (IS_SET (victim->flag2, AFF2_INARENA)))
clean_arena (victim, ch); // In an arena fight, it's an instant victory
else if (!IS_NPC (victim)) // Anything else, it's an instant behead (NOT DECAP, NO PK or PD accrue )
{
victim->hit = 1;
update_pos (victim);
char_from_room (victim);
char_to_room (victim, get_room_index (ROOM_VNUM_ALTAR));
if (IS_SET (ch->in_room->room_flags, ROOM_TOTAL_DARKNESS))
REMOVE_BIT (ch->in_room->room_flags, ROOM_TOTAL_DARKNESS);
if (IS_CLASS (ch, CLASS_DROW) && IS_SET (ch->newbits, NEW_DARKNESS))
REMOVE_BIT (ch->newbits, NEW_DARKNESS);
ch->fight_timer = 30;
if (IS_CLASS (victim, CLASS_VAMPIRE))
do_mortalvamp (victim, "");
else if (IS_SET (victim->special, SPC_WOLFMAN))
do_unwerewolf (victim, "");
if (IS_CLASS (victim, CLASS_MAGE) && IS_AFFECTED (victim, AFF_POLYMORPH))
do_unpolymorph (victim, "");
victim->fight_timer = 0;
victim->pcdata->stats[UNI_RAGE] = 0;
ch->quickening[1] += 3;
}
else
PUNC_OTHER (ch, victim, (victim->max_hit * 2));
WAIT_STATE (ch, 15);
return;
}
void serpent_lunge (CHAR_DATA * ch)
{
// Serpent lunge, is a standard thrust, not. The goal of this technique is slam your weapon into your opponent
// which such force as to render them dead. On the other hand, even if it doesn't kill instantly, they might just
// notice the large wound you leave instead. Either way, good for you, bad for them. Right? -- Serenity
// KAGE NO GIJUTSU - translates out to "Shadow Technique" (eÌZp) []
CHAR_DATA *victim;
OBJ_DATA *katana;
char buf[MAX_STRING_LENGTH];
int dmg;
int chance;
int calc_chance;
bool stun_them = FALSE;
if ((victim = ch->fighting) == NULL)
{
send_to_char ("You find no need for this now.\n\r", ch);
return;
}
if (((katana = get_eq_char (ch, WEAR_DUAL)) == NULL)
|| katana->item_type != ITEM_WEAPON)
{
if (((katana = get_eq_char (ch, WEAR_HOLD)) == NULL)
|| katana->item_type != ITEM_WEAPON)
{
send_to_char ("You need a weapon to use this.\n\r", ch);
return;
}
}
if (IS_NPC (victim) && victim->level >= 1000)
{
stc ("They sidestep your lunge with ease!\n\r", ch);
return;
}
if (ch->move < 1000)
{
send_to_char ("You have not the 1000 stamina to use this.\n\r", ch);
return;
}
dmg = number_range ((ch->wpn[2] * 2), (ch->wpn[2] * 4));
chance = number_range ((ch->wpn[2] / 40), (ch->wpn[2] / 20));
if (!katana_check(ch))
{
send_to_char ("Without a proper katana, your ability is reduced.\n\r",
ch);
dmg /= 2;
}
ch->move -= 1000;
ch->quickening[0] = UMAX( ch->quickening[0]-10, 0 );
do_say (ch, "#yKAGE NO GIJUTSU!");
act ("#wYou suddenly draw $p back, kneel and then lunge, slamming it into $N's.", ch, katana, victim, TO_CHAR);
act ("$n suddenly draws $s $p back, kneels and then lunges with it, slamming $p into you with unthinkable force.", ch, katana, victim, TO_VICT);
act ("$n suddenly draws $s $p back, kneels and then lunges with it, slamming $p into $N with unthinkable force.", ch, katana, victim, TO_ROOM);
sprintf (buf, "Your serpent lunge staggers $N. #w[#r%d#w]#n", dmg);
act (buf, ch, NULL, victim, TO_CHAR);
sprintf (buf, "$n's lunge staggers you. #w[#r%d#w]#n", dmg);
act (buf, ch, NULL, victim, TO_VICT);
act ("$N staggers from $n's lunge.", ch, NULL, victim, TO_NOTVICT);
PUNC_OTHER (ch, victim, dmg);
if (number_range (0, 100) <= chance)
{
act ("$N is stunned from your lunge.", ch, NULL, victim, TO_CHAR);
act ("You are stunned from $N's lunge.", ch, NULL, victim, TO_VICT);
act ("$N seems a bit woozy after $n's lunge.", ch, NULL, victim, TO_ROOM);
stun_them = TRUE;
WAIT_STATE (victim, 12);
calc_chance = ch->quickening[0] /2;
calc_chance += 20;
// calc_chance = UMIN( calc_chance + 20, 100 );
if (number_range (0, 100) <= calc_chance )
{
if ((number_range (1, 100) % 3 ) != 0 )
{
if (IS_DEMPOWER (ch, HPOWER_DRAIN))
{
act ("$N is in a perfect position for...", ch, NULL, victim,
TO_CHAR);
drain_sword (ch);
if ( stun_them )
{
if (victim->position > POS_STUNNED)
{
victim->position = POS_STUNNED;
stop_fighting (victim, TRUE);
}
}
return;
}
}
else
{
if (IS_DEMPOWER (ch, HPOWER_CRESCENT_STRIKE))
{
act ("$N is in a perfect position for...", ch, NULL, victim,
TO_CHAR);
crescent_strike (ch);
if ( stun_them )
{
if (victim->position > POS_STUNNED)
{
victim->position = POS_STUNNED;
stop_fighting (victim, TRUE);
}
}
return;
}
}
}
}
if ( stun_them )
{
if (victim->position > POS_STUNNED)
{
victim->position = POS_STUNNED;
stop_fighting (victim, TRUE);
}
}
WAIT_STATE (ch, 12);
return;
}
void moon_slash (CHAR_DATA * ch)
{
// Moon slash, is a standard swing, not. The goal of this technique is to strike once, then spin around and
// instantly slash them on the opposite side. It's doesn't sound very fancy, but some skills link into it
// making it a part of a sequence. And if nothing else, at least it looks cool. Right? -- Serenity
// TSUKINO NO GIJUTSU - translates out to "Moon Technique" (ÌÌZp) []
CHAR_DATA *victim;
OBJ_DATA *katana;
char buf[MAX_STRING_LENGTH];
int dmg;
int dmg2;
int calc_chance;
if ((victim = ch->fighting) == NULL)
{
send_to_char ("You find no need for this now.\n\r", ch);
return;
}
if (((katana = get_eq_char (ch, WEAR_DUAL)) == NULL)
|| katana->item_type != ITEM_WEAPON)
{
if (((katana = get_eq_char (ch, WEAR_HOLD)) == NULL)
|| katana->item_type != ITEM_WEAPON)
{
send_to_char ("You need a weapon to use this.\n\r", ch);
return;
}
}
if (IS_NPC (victim) && victim->level >= 1000)
{
stc ("They parry your attack with ease!\n\r", ch);
return;
}
if (ch->move < 1500)
{
send_to_char ("You have not the 1500 stamina to use this.\n\r", ch);
return;
}
dmg = number_range ((ch->wpn[3] * 1.5), (ch->wpn[3] * 2.75));
dmg2 = number_range ((ch->wpn[3] * 1.5), (ch->wpn[3] * 2.75));
if (!katana_check(ch))
{
send_to_char ("Without a proper katana, your ability is reduced.\n\r",
ch);
dmg /= 1.5;
dmg2 /= 1.5;
}
ch->move -= 1500;
ch->quickening[0] = UMAX( ch->quickening[0]-15, 0 );
do_say (ch, "#yTSUKINO NO GIJUTSU!");
act ("#wYou quickly strike and spin, slashing your $p into both sides of $N's body.", ch, katana, victim, TO_CHAR);
act ("$n quickly strikes and spins with $s $p, slashing it into you on both sides of your body.", ch, katana, victim, TO_VICT);
act ("$n quickly kneels and lunges with $s $p, slashing it into both sides of $N's body.", ch, katana, victim, TO_ROOM);
sprintf (buf, "Your moon slash strikes $N. #w[#r%d#w]#n", dmg);
act (buf, ch, NULL, victim, TO_CHAR);
sprintf (buf, "Your moon slash strikes $N. #w[#r%d#w]#n", dmg2);
act (buf, ch, NULL, victim, TO_CHAR);
sprintf (buf, "$n's spinning slash strikes you. #w[#r%d#w]#n", dmg);
act (buf, ch, NULL, victim, TO_VICT);
sprintf (buf, "$n's spinning slash strikes you. #w[#r%d#w]#n", dmg2);
act (buf, ch, NULL, victim, TO_VICT);
act ("$N is struck twice simultaneously from $n's spinning slash.", ch,
NULL, victim, TO_NOTVICT);
PUNC_OTHER (ch, victim, dmg);
if ((victim != NULL) && (victim->hit > 0))
PUNC_OTHER (ch, victim, dmg2);
calc_chance = ch->quickening[0] /3;
calc_chance = UMIN( calc_chance + 20, 100 );
if ( (victim) && (number_range (0, 100) <= calc_chance ) )
{
if ((number_range (1, 100) % 2) == 1)
{
if (IS_DEMPOWER (ch, HPOWER_LIGHTNING))
{
act ("$N is in a perfect position for...", ch, NULL, victim,
TO_CHAR);
lightning_sword (ch);
return;
}
}
else
{
if (IS_DEMPOWER (ch, HPOWER_SERPENT_LUNGE))
{
act ("$N is in a perfect position for...", ch, NULL, victim,
TO_CHAR);
serpent_lunge (ch);
return;
}
}
}
WAIT_STATE (ch, 12);
return;
}
void chain_swing (CHAR_DATA * ch)
{
// Chain swing, is an optical illusion. The goal of this technique is to strike your opponent at long range
// and entangle them, by seemingly making the weapon appear to become like a 'chain sword'. Sounds strange?
// Perhaps, but it does give another new meaning to the phrase 'Reach out and touch someone'. Right? -- Serenity
// NOBASU NO GIJUTSU - translates out to "Stretch Technique" (L·ÌZp) []
CHAR_DATA *victim;
OBJ_DATA *katana;
char buf[MAX_STRING_LENGTH];
int dmg;
int chance;
int calc_chance;
if ((victim = ch->fighting) == NULL)
{
send_to_char ("You find no need for this now.\n\r", ch);
return;
}
if (((katana = get_eq_char (ch, WEAR_DUAL)) == NULL)
|| katana->item_type != ITEM_WEAPON)
{
if (((katana = get_eq_char (ch, WEAR_HOLD)) == NULL)
|| katana->item_type != ITEM_WEAPON)
{
send_to_char ("You need a weapon to use this.\n\r", ch);
return;
}
}
if (IS_NPC (victim) && victim->level >= 1000)
{
stc ("They parry your attack with ease!\n\r", ch);
return;
}
if (ch->move < 1000)
{
send_to_char ("You have not the 1000 stamina to use this.\n\r", ch);
return;
}
dmg = number_range ((ch->wpn[4] * 1.5), (ch->wpn[4] * 2));
chance = number_range ((ch->wpn[4] / 20), (ch->wpn[4] / 10));
if (!katana_check(ch))
{
send_to_char ("Without a proper katana, your ability is reduced.\n\r",
ch);
dmg /= 2;
}
ch->move -= 1000;
ch->quickening[0] = UMAX( ch->quickening[0]-20, 0 );
do_say (ch, "#yNOBASU NO GIJUTSU!");
act ("#wYou quickly lash out with $p and it streches, constricting and entangling $N's body.", ch, katana, victim, TO_CHAR);
act ("$n quickly lashes out with $s $p, as you step back it STRETCHES? Surprised, you are unable to escape being entangled by it.", ch, katana, victim, TO_VICT);
act ("$n quickly lashes out with $s $p, as $N steps back it STRETCHES? Surprised, $N gets hit and entangled.", ch, katana, victim, TO_ROOM);
sprintf (buf, "Your chain swing strikes $N. #w[#r%d#w]#n", dmg);
act (buf, ch, NULL, victim, TO_CHAR);
sprintf (buf, "$n's constriction strikes you. #w[#r%d#w]#n", dmg);
act (buf, ch, NULL, victim, TO_VICT);
act ("$N is constricted by $n's $p.", ch, katana, victim, TO_NOTVICT);
PUNC_OTHER (ch, victim, dmg);
if (number_range (0, 100) <= chance)
{
act ("As $p returns to its normal length $N appears to still believe $E is entangled.", ch, katana, victim, TO_CHAR);
act ("$n's $p returns to its proper length, but why can't you move freely?", ch, katana, victim, TO_VICT);
act ("$n's $p returns to its proper length, but $N appears to be entangled still. Strange.", ch, katana, victim, TO_ROOM);
if (!IS_SET (victim->affected_by, AFF_WEBBED))
SET_BIT (victim->affected_by, AFF_WEBBED);
calc_chance = ch->quickening[0] /4;
calc_chance += 20;
// calc_chance = UMIN( calc_chance + 20, 100 );
if (number_range (0, 100) <= calc_chance )
{
if ((number_range (1, 100) % 2) == 1)
{
if (IS_DEMPOWER (ch, HPOWER_FIRE))
{
act ("$N is in a perfect position for...", ch, NULL, victim,
TO_CHAR);
fire_sword (ch);
return;
}
}
else
{
if (IS_DEMPOWER (ch, HPOWER_MOON_SLASH))
{
act ("$N is in a perfect position for...", ch, NULL, victim,
TO_CHAR);
moon_slash (ch);
return;
}
}
}
}
WAIT_STATE (ch, 8);
return;
}
void arc_bow (CHAR_DATA * ch)
{
// Arc Bow, is another optical illusion. The goal of this technique is to strike your opponent at long range
// with 3-7 arrows of energy, by seemingly making the weapon appear to become a 'bow'. Sounds strange?
// Perhaps, but it does give another new meaning to the phrase 'Pokey, pokey'. Right? -- Serenity
// YAYUMI NO GIJUTSU - translates out to "Bow and Arrow Technique" (î|ÌZp) []
CHAR_DATA *victim;
OBJ_DATA *katana;
char buf[MAX_STRING_LENGTH];
int dmg;
int arrows;
int chance;
int t_dmg = 0;
int calc_chance;
if ((victim = ch->fighting) == NULL)
{
send_to_char ("You find no need for this now.\n\r", ch);
return;
}
if (IS_NPC (victim) && victim->level >= 1000)
{
stc ("They parry your attack with ease!\n\r", ch);
return;
}
if (ch->move < 1500)
{
send_to_char ("You have not the 1500 stamina to use this.\n\r", ch);
return;
}
dmg = number_range ((ch->wpn[11] * 0.35), (ch->wpn[11] * 0.75));
chance = number_range ((ch->wpn[11] / 200), (ch->wpn[11] / 100));
arrows = dice (1, 3);
if (ch->max_move >= 10000)
arrows++;
if (ch->max_move >= 25000)
arrows++;
if (ch->max_move >= 50000)
arrows++;
if (ch->max_move >= 75000)
arrows++;
chance *= arrows; // more arrows = better chance
ch->move -= 1500;
ch->quickening[0] = UMAX( ch->quickening[0]-25, 0 );
if (!obj_katana_check (ch, (katana = get_eq_char (ch, WEAR_DUAL))))
{
//if (!obj_katana_check (ch, (katana = get_eq_char (ch, WEAR_WIELD))))
{
send_to_char ("Without a proper katana, your ability is reduced.\n\r",
ch);
dmg /= 2;
katana = get_eq_char (ch, WEAR_WIELD);
if (katana == NULL || katana->item_type != ITEM_WEAPON)
{
katana = get_eq_char (ch, WEAR_HOLD);
if (katana == NULL || katana->item_type != ITEM_WEAPON)
{
send_to_char ("Without an proper weapon, you cannot use this ability.\n\r",
ch);
return;;
}
}
}
}
do_say (ch, "#yYAYUMI NO GIJUTSU!");
sprintf (buf,
"#wYou let $p fall until you can grab its middle, pull it back as a bowstring appears and release %d arrows into an awed $N.",
arrows);
act (buf, ch, katana, victim, TO_CHAR);
sprintf (buf,
"#w$n lets $s $p fall until $e can grab its middle, $e pulls it back as a bowstring appears. Startled you don't even think to dodge the %d arrows $e fires.",
arrows);
act (buf, ch, katana, victim, TO_VICT);
sprintf (buf,
"#w$n lets $s $p fall until $e can grab its middle, $e pulls it back as a bowstring appears and releases %d arrows into an awed $N's.",
arrows);
act (buf, ch, katana, victim, TO_ROOM);
if (!IS_NPC (victim))
sprintf (buf, "Your arc arrows pierce %s repeatedly. ", victim->name);
else
sprintf (buf, "Your arc arrows pierce %s repeatedly. ",
victim->short_descr);
stc (buf, ch);
sprintf (buf, "%s's arrows pierce you repeatedly. ", ch->name);
stc (buf, victim);
for (; arrows > 0; arrows--)
{
dmg = number_range ((ch->wpn[11] * 0.35), (ch->wpn[11] * 0.75));
if (IS_NPC (victim) && (victim->hit < dmg))
{
dmg = victim->hit + 20;
arrows = 0;
}
stcf (ch, "#w[#r%d#w]#n ", dmg);
stcf (victim, "#w[#r%d#w]#n ", dmg);
t_dmg += dmg;
if (victim)
PUNC_OTHER (ch, victim, dmg);
}
stcf (ch, " #w[#cTot-#r%d#w]#n\n\r ", t_dmg);
stcf (victim, " #w[#cTot-#r%d#w]#n\n\r ", t_dmg);
act ("$N is pierced repeatedly by $n's arrows.", ch, katana, victim, TO_NOTVICT);
if (number_range (0, 100) <= chance)
{
act ("$N staggers and stumbles from your onslaught.\n\r", ch, NULL, victim, TO_CHAR);
act ("You stagger and stumble from the onslaught.\n\r", ch, NULL, victim, TO_VICT);
act ("$N staggers and stumbles from the onslaught.\n\r", ch, NULL, victim, TO_ROOM);
do_stance( victim, "" );
WAIT_STATE (victim, PULSE_VIOLENCE + 1);
calc_chance = ch->quickening[0] /5;
calc_chance += 20;
// calc_chance = UMIN( calc_chance + 20, 100 );
if (number_range (0, 100) <= calc_chance )
{
if ((number_range (1, 100) % 2) == 1)
{
if (IS_DEMPOWER (ch, HPOWER_ICE))
{
act ("$N is in a perfect position for...", ch, NULL, victim, TO_CHAR);
ice_sword (ch);
return;
}
}
else
{
if (IS_DEMPOWER (ch, HPOWER_CHAIN_SWING))
{
act ("$N is in a perfect position for...", ch, NULL, victim, TO_CHAR);
chain_swing (ch);
return;
}
}
}
}
WAIT_STATE (ch, 8);
return;
}
void do_katana (CHAR_DATA * ch, char *argument)
{
OBJ_DATA *obj;
if (IS_NPC (ch))
return;
if (!IS_CLASS (ch, CLASS_HIGHLANDER))
{
do_rand_typo (ch);
return;
}
if (ch->practice < 60)
{
send_to_char ("It costs 60 points of primal to create a katana.\n\r",
ch);
return;
}
ch->practice -= 60;
obj = create_object (get_obj_index (29695), 0);
free_string(obj->questowner);
obj->questowner = str_dup(ch->name);
if (IS_SET (obj->quest, QUEST_ARTIFACT))
REMOVE_BIT (obj->quest, QUEST_ARTIFACT);
obj_to_char (obj, ch);
act ("A katana appears in your hands in a flash of light.", ch, NULL, NULL,
TO_CHAR);
act ("A katana appears in $n's hands in a flash of light.", ch, NULL, NULL,
TO_ROOM);
return;
}
void hlupkeep (CHAR_DATA * ch)
{
divide_to_char (ch);
cent_to_char ("-= Highlander Upkeep =-", ch);
divide_to_char (ch);
if (ch->pcdata->powers[HPOWER_FLAGS] < 1)
stc ("You have not gained any highlander powers.\n\r", ch);
if (IS_DEMPOWER (ch, HPOWER_NIGHTSIGHT))
{
if (IS_VAMPAFF (ch, VAM_NIGHTSIGHT))
stc ("Your eyes are glowing bright red, allowing you to see in the dark.\n\r", ch);
else
stc ("You are able to see in the dark, although that power is not currently activated.\n\r", ch);
}
if (IS_DEMPOWER (ch, HPOWER_MIGHT))
stc ("Your muscles ripple with supernatural strength.\n\r", ch);
if (IS_DEMPOWER (ch, HPOWER_TOUGHNESS))
stc ("Your skin reflects blows with supernatural toughness.\n\r", ch);
if (IS_DEMPOWER (ch, HPOWER_SPEED))
stc ("You move with supernatural speed and grace.\n\r", ch);
if (IS_DEMPOWER (ch, HPOWER_SCRY))
stc ("You are able to scry over great distances at will.\n\r", ch);
if (IS_DEMPOWER (ch, HPOWER_VISION))
{
if (IS_SET (ch->act, PLR_HOLYLIGHT))
stc ("Your senses are heightened.\n\r", ch);
else
stc ("You have heightened senses, although this power is not currently activated.\n\r", ch);
}
if (IS_DEMPOWER (ch, HPOWER_SENSE))
stc ("You have the ability to sense how much quickening those like you can control.\n\r", ch);
if (IS_DEMPOWER (ch, HPOWER_EMPOWER))
{
if (ch->hempower < 0)
stc ("You have the ability to focus your quickening.\n\r", ch);
else
stc ("You are currently focusing your quickening.\n\r", ch);
stc ("...And have the ability to train your Quickening.\n\r", ch);
if ((IS_DEMPOWER (ch, HPOWER_USE_BYPASS)))
stc ("...And are currently focused on bypassing your opponent's defenses (Parry/Dodge).\n\r", ch);
else if ((IS_DEMPOWER (ch, HPOWER_BYPASS_DEFENSE)))
stc ("...And can utilize the Bypass Defense Art.\n\r", ch);
if ((IS_DEMPOWER (ch, HPOWER_USE_SHIELDLESS)))
stc ("...And are currently focused on bypassing your opponent's defenses (Sanct/Damage Prevention).\n\r", ch);
else if ((IS_DEMPOWER (ch, HPOWER_SHIELDLESS)))
stc ("...And can utilize the Shieldless Art.\n\r", ch);
if ((IS_DEMPOWER (ch, HPOWER_USE_PRESERVATION)))
stc ("...And are currently focused on stopping your opponent's magics (Block Spells).\n\r", ch);
else if ((IS_DEMPOWER (ch, HPOWER_PRESERVATION)))
stc ("...And can utilize the Preservation Art.\n\r", ch);
}
if (IS_DEMPOWER (ch, HPOWER_SHIELD))
{
stc ("You have the ability to remain unseen by those using scry and readaura.\n\r", ch);
if (IS_IMMUNE (ch, IMM_SHIELDED))
stc ("...And are currently doing so.\n\r", ch);
}
if (IS_DEMPOWER (ch, HPOWER_ANCESTRAL))
{
stc ("You have the ability to travel great distances in a single leap.\n\r", ch);
stc ("...And can now train your Mana with reduced expenditures.\n\r",
ch);
}
if (IS_DEMPOWER (ch, HPOWER_BLADESPIN))
{
stc ("You have the ability to spin your katana's at such speed and force as to inflict great harm.\n\r", ch);
stc ("...And can now train your Hp with reduced expenditures.\n\r", ch);
}
if (IS_DEMPOWER (ch, HPOWER_SWORDCRAFT))
{
stc ("You have the ability to utilize various powerful sword techniques in battle.\n\r", ch);
stc ("...And can now train your Move with reduced expenditures.\n\r",
ch);
if (IS_DEMPOWER (ch, HPOWER_ANCESTRAL))
{
stc ("...And have discovered the hidden aspects needed to learn magical techniques.\n\r", ch);
if (IS_DEMPOWER (ch, HPOWER_FIRE))
stc ("......Such as the technique to cause deadly flames to erupt and scorch your foe.\n\r", ch);
if (IS_DEMPOWER (ch, HPOWER_ICE))
stc ("......Such as the technique to cause bone-chilling frost to encase your foe in glacial ice.\n\r", ch);
if (IS_DEMPOWER (ch, HPOWER_LIGHTNING))
stc ("......Such as the technique to cause staggering bolts of lightning to disrupt your foe's nervous system.\n\r", ch);
if (IS_DEMPOWER (ch, HPOWER_SOUL))
stc ("......Such as the technique to rip your foe's soul from its fleshy coil causing unimaginable agony.\n\r", ch);
if (IS_DEMPOWER (ch, HPOWER_DRAIN))
stc ("......Such as the technique to cause ethereal wisps to burst forth and drain the stamina of your foe.\n\r", ch);
}
if (IS_DEMPOWER (ch, HPOWER_BLADESPIN))
{
stc ("...And have discovered the hidden aspects needed to learn physical techniques.\n\r", ch);
if (IS_DEMPOWER (ch, HPOWER_CRESCENT_STRIKE))
stc ("......Such as the technique to instantly remove your foe's head from their shoulders.\n\r", ch);
if (IS_DEMPOWER (ch, HPOWER_SERPENT_LUNGE))
stc ("......Such as the technique to strike your foe with such force as to stun them.\n\r", ch);
if (IS_DEMPOWER (ch, HPOWER_MOON_SLASH))
stc ("......Such as the technique to attack so swiftly you hit twice but they feel only one cut.\n\r", ch);
if (IS_DEMPOWER (ch, HPOWER_CHAIN_SWING))
stc ("......Such as the technique to create a vivid illusion to entrap your foe's mind and body.\n\r", ch);
if (IS_DEMPOWER (ch, HPOWER_ARC_BOW))
stc ("......Such as the technique to launch mystic projectiles into your foe knocking them off-balance.\n\r", ch);
}
}
if (IS_DEMPOWER (ch, HPOWER_READAURA))
stc ("You are able to decipher the Auras of other things living or not.\n\r", ch);
if (IS_DEMPOWER (ch, HPOWER_HEAL))
stc ("You are able to heal yourself at will.\n\r", ch);
if (IS_DEMPOWER (ch, HPOWER_VANISH))
{
if (IS_SET (ch->act, PLR_WIZINVIS))
stc ("You are hidden from the view of most prying eyes.\n\r", ch);
else
stc ("You are able to vanish althought this power is not currently activated.\n\r", ch);
}
divide_to_char (ch);
return;
}