/*---------------------------------------------------------------------------------X
| <(()Seeds of Hate: Swords & Sorcery Edition())> |
| _\|::>< Warlock Class ><::|/_ |
| |Class Tier Number: I| |
| |Coder: Chino| |
| *Warlock is an original class made for Seeds of Hate, Swords & Sorcery Edition! |
| Please don't copy without permission and due credit! |
| Thanks. |
| -Trent, God of PaiN! (ASDF!) |
X----------------------------------------------------------------------------------X
*/
#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"
#include "interp.h"
void do_arts( CHAR_DATA *ch, char *argument )
{
char arg1[MAX_INPUT_LENGTH];
char arg2[MAX_INPUT_LENGTH];
char arg3[MAX_INPUT_LENGTH];
char buf[MAX_STRING_LENGTH];
argument = one_argument( argument, arg1 );
argument = one_argument( argument, arg2 );
argument = one_argument( argument, arg3 );
if (IS_NPC(ch)) return;
if (!IS_CLASS(ch, CLASS_WIZARD))
{
send_to_char("Huh?\n\r",ch);
return;
}
if (arg1[0] == '\0' && arg2[0] == '\0')
{
stc(" #0_..#7-+=|#W*#7|=+-#0._\n\r",ch);
stc(" #0/ / \\ \n\r",ch);
stc(" #0/ / \\ \n\r",ch);
stc(" #0|#p.#0| #RArts#0 |\n\r",ch);
stc(" #0|#p.#0| |\n\r",ch);
sprintf(buf," #0|#p.#0| #rSkills #R[#y%2d#R] #0|\n\r",ch->pcdata->powers[WL_SKILLS]);
stc(buf,ch);
stc(" #0|#p.#0| |\n\r",ch);
sprintf(buf," #0|#p.#0|#p.#bSpells #R[#y%2d#R] #0|\n\r",ch->pcdata->stats[WL_SPELLS]);
stc(buf,ch);
stc(" #0|#p.#0|#p..#0 |\n\r",ch);
stc(" #0|#p.#0|#p... #0|\n\r",ch);
stc(" #g*#G.#0|#p.#0|#p... . #0 |#g*#G.#g*#G.#g*#G.\n\r",ch);
stc("#G.#g*#G.#g*#0\\#p.#0|#p.... .. #0 |#G.#g*#G.#g*#G.#g*#G.#g*#G.#g*\n\r",ch);
stc("#g*#G.#g*#G.#g*#0\\|#p...#0_#p..#0_#p.#0______|#g*#G.#g*#G.#g*#G.#g*#G.#g*#G.#g*#G.#g*\n\r",ch);
stc(" #g*#G.#g*#G.#g*#G.#g*#G.#g*#G.#g*#G.#g*#G.#g*#G.#g*#G.#g*#G.#g*#G.#g*#G.#g*#G.#g*#G.#g*#G.#g*#G.#g*#G.#g*#G.#g*#G.#g*\n\r",ch);
stc(" #G.#g*#G.#g*#G.#g*#G.#g*#G.#g*#G.#g*#G.#g*#G.#g*#G.#g*#G.#g*#G.#g*#G.#g*#G.#g*#G.#g*#G.#g*\n\r",ch);
return;
}
if (arg2[0] == '\0')
{
if (!str_cmp(arg1,"skills"))
{
send_to_char("#rSkills - #RThe physical skills necessary for the Warlock's power.\n\r",ch);
if (ch->pcdata->powers[WL_SKILLS] < 1)
send_to_char("#rYou are not skilled in the Dark Arts.\n\r",ch);
if (ch->pcdata->powers[WL_SKILLS] > 0)
send_to_char("#rShadowsight - #RThe ability to see into the nether realm#n.\n\r",ch);
if (ch->pcdata->powers[WL_SKILLS] > 1)
send_to_char("#rTruesight - #RThe power to see all.#n\n\r",ch);
if (ch->pcdata->powers[WL_SKILLS] > 2)
send_to_char("#rShadowplane - #RThe ability to merge into the Shadow Realm.#n\n\r",ch);
if (ch->pcdata->powers[WL_SKILLS] > 3)
send_to_char("#rEnhanced Mnemonics - #RGreatly improved Warlock spellcasting (auto)#n\n\r",ch);
return;
}
else if (!str_cmp(arg1,"spells"))
{
sprintf(buf,"#y00#R=============================#y00\n\r");
stc(buf, ch);
sprintf(buf," #R( #ySpells#R )\n\r");
stc(buf, ch);
sprintf(buf," #R(#y=============================#R)\n\r");
stc(buf, ch);
if (ch->pcdata->stats[WL_SPELLS] < 1){
sprintf(buf," #R( #CFirebolt #P[ ] #R)\n\r");
stc(buf, ch);}
else{
sprintf(buf," #R( #CFirebolt #P[#yX#P] #R)\n\r");
stc(buf, ch);}
if (ch->pcdata->stats[WL_SPELLS] < 2){
sprintf(buf," #R( #CNegativity #P[ ] #R)\n\r");
stc(buf, ch);}
else{
sprintf(buf," #R( #CNegativity #P[#yX#P] #R)\n\r");
stc(buf, ch);}
if (ch->pcdata->stats[WL_SPELLS] < 3){
sprintf(buf," #R( #CThunderclap #P[ ] #R)\n\r");
stc(buf, ch);}
else{
sprintf(buf," #R( #CThunderclap #P[#yX#P] #R)\n\r");
stc(buf, ch);}
if (ch->pcdata->stats[WL_SPELLS] < 4){
sprintf(buf," #R( #CIcelance #P[ ] #R)\n\r");
stc(buf, ch);}
else{
sprintf(buf," #R( #CIcelance #P[#yX#P] #R)\n\r");
stc(buf, ch);}
if (ch->pcdata->stats[WL_SPELLS] < 5){
sprintf(buf," #R( #CPhase Shift #P[ ] #R)\n\r");
stc(buf, ch);}
else{
sprintf(buf," #R( #CPhase Shift #P[#yX#P] #R)\n\r");
stc(buf, ch);}
if (ch->pcdata->stats[WL_SPELLS] < 6){
sprintf(buf," #R( #CChaos Sphere #P[ ] #R)\n\r");
stc(buf, ch);}
else{
sprintf(buf," #R( #CChaos Sphere #P[#yX#P] #R)\n\r");
stc(buf, ch);}
if (ch->pcdata->stats[WL_SPELLS] < 7){
sprintf(buf," #R( #CParadise Lost #P[ ] #R)\n\r");
stc(buf, ch);}
else{
sprintf(buf," #R( #CParadise Lost #P[#yX#P] #R)\n\r");
stc(buf, ch);}
if (ch->pcdata->stats[WL_SPELLS] < 8){
sprintf(buf," #R( #CHellblades #P[ ] #R)\n\r");
stc(buf, ch);}
else{
sprintf(buf," #R( #CHellblades #P[#yX#P] #R)\n\r");
stc(buf, ch);}
if (ch->pcdata->stats[WL_SPELLS] < 9){
sprintf(buf," #R( #CVortex #P[ ] #R)\n\r");
stc(buf, ch);}
else{
sprintf(buf," #R( #CVortex #P[#yX#P] #R)\n\r");
stc(buf, ch);}
if (ch->pcdata->stats[WL_SPELLS] < 10){
sprintf(buf," #R( #CEntropy #P[ ] #R)\n\r");
stc(buf, ch);}
else{
sprintf(buf," #R( #CEntropy #P[#yX#P] #R)\n\r");
stc(buf, ch);}
if (ch->pcdata->stats[WL_SPELLS] < 11){
sprintf(buf," #R( #CWrath of the Damned #P[ ] #R)\n\r");
stc(buf, ch);}
else{
sprintf(buf," #R( #CWrath of the Damned #P[#yX#P] #R)\n\r");
stc(buf, ch);}
sprintf(buf,"#y00#R=============================#y00\n\r");
stc(buf, ch);
return;
}
stc(" #0_..#7-+=|#W*#7|=+-#0._\n\r",ch);
stc(" #0/ / \\ \n\r",ch);
stc(" #0/ / \\ \n\r",ch);
stc(" #0|#p.#0| #RArts#0 |\n\r",ch);
stc(" #0|#p.#0| |\n\r",ch);
sprintf(buf," #0|#p.#0| #rSkills #R[#y%2d#R] #0|\n\r",ch->pcdata->powers[WL_SKILLS]);
stc(buf,ch);
stc(" #0|#p.#0| |\n\r",ch);
sprintf(buf," #0|#p.#0|#p.#bSpells #R[#y%2d#R] #0|\n\r",ch->pcdata->powers[WL_SPELLS]);
stc(buf,ch);
stc(" #0|#p.#0|#p..#0 |\n\r",ch);
stc(" #0|#p.#0|#p... #0|\n\r",ch);
stc(" #g*.#0|#p.#0|#p... . #0 |#g*#G.#g*#G.#g*#G.\n\r",ch);
stc("#g.#g*.#g*#0\\#p.#0|#p.... .. #0 |#G.#g*#G.#g*#G.#g*#G.#g*#G.#g*\n\r",ch);
stc("#g*.#g*.#g*#0\\|#p...#0_#p..#0_#p.#0______|#g*#G.#g*#G.#g*#G.#g*#G.#g*#G.#g*#G.#g*\n\r",ch);
stc(" #g*#G.#g*#G.#g*#G.#g*#G.#g*#G.#g*#G.#g*#G.#g*#G.#g*#G.#g*#G.#g*#G.#g*#G.#g*#G.#g*#G.#g*#G.#g*#G.#g*#G.#g*#G.#g*#G.#g*\n\r",ch);
stc(" #G.#g*#G.#g*#G.#g*#G.#g*#G.#g*#G.#g*#G.#g*#G.#g*#G.#g*#G.#g*#G.#g*#G.#g*#G.#g*#G.#g*#G.#g*\n\r",ch);
return;
}
else if (!str_cmp(arg2,"gain") && !str_cmp(arg1,"skills"))
{
int cost;
int max = 4;
cost = (ch->pcdata->powers[WL_SKILLS]+1) * 20;
if ( ch->pcdata->powers[WL_SKILLS] >= max )
{
sprintf(buf,"#rYou have already gained all of the #RW#8arlock#r skills#n\n\r");
send_to_char(buf,ch);
return;
}
if ( cost > ch->practice)
{
sprintf(buf,"#rYou need #R%d #rprimal to gain another skill#n\n\r", cost);
send_to_char(buf,ch);
return;
}
ch->pcdata->powers[WL_SKILLS]++;
ch->practice -= cost;
sprintf(buf,"#rYour skills increase!#n\n\r");
send_to_char(buf,ch);
}
else if (!str_cmp(arg2,"gain") && !str_cmp(arg1,"spells"))
{
int cost;
int max = 11;
cost = (ch->pcdata->stats[WL_SPELLS]+1) * 20;
if ( ch->pcdata->stats[WL_SPELLS] >= max )
{
sprintf(buf,"#rYou know the all warlock spells!#n\n\r");
send_to_char(buf,ch);
return;
}
if ( cost > ch->practice)
{
sprintf(buf,"#rYou need #R%d #rprimal to learn a new spell#n\n\r", cost);
send_to_char(buf,ch);
return;
}
ch->pcdata->stats[WL_SPELLS]++;
ch->practice -= cost;
sprintf(buf,"#rYou gain a new spell!#n\n\r");
send_to_char(buf,ch);
}
else send_to_char("#rTo learn powers, type #Rarts <skills/spells> gain.#n\n\r",ch);
return;
}
void do_thunderclap( CHAR_DATA *ch, char *argument )
{
CHAR_DATA *vch;
CHAR_DATA *vch_next;
int dam = 0;
char buf[MAX_STRING_LENGTH];
if (!IS_CLASS(ch, CLASS_WIZARD))
{
stc("Huh?\n\r",ch);
return;
}
if (ch->pcdata->stats[WL_SPELLS] < 3)
{
stc("#rYou do not yet know this spell.\n\r",ch);
return;
}
if (ch->mana < 10000)
{
stc("#rYou do not have the required #c10000#r mana.\n\r",ch);
return;
}
for ( vch = ch->in_room->people; vch != NULL; vch = vch_next )
{
vch_next = vch->next_in_room;
if (vch != ch)
vch->position = POS_STUNNED;
dam = number_range( vch->hit/32, vch->hit/16);
if (ch->pcdata->powers[WL_SKILLS] > 3)
dam *= 2;
if (vch != ch)
vch->hit -= dam;
if (vch != ch){
sprintf(buf, "#R%s closes his eyes and brings his hands together, releasing a massive shockwave! #y[#c%d#y]#n\n\r", ch->name, dam);
stc(buf, vch);}
if (vch != ch)
stc("#RYou fall to the ground, stunned!\n\r",vch);
if (vch != ch){
sprintf(buf, "#R%s falls to the ground, stunned!\n\r", vch->name);
stc(buf, ch);}
if (vch->hit < -10)
vch->hit = -10;
}
sprintf(buf, "#RYou close your eyes and bring your hands together, releasing a massive shockwave! #y[#c%d#y]#n\n\r", dam);
stc(buf, ch);
ch->fight_timer += 10;
ch->mana -= 10000;
WAIT_STATE(ch, PULSE_VIOLENCE);
return;
}
void do_hellblades( CHAR_DATA *ch, char *argument )
{
char arg1[MAX_INPUT_LENGTH];
char buf[MAX_STRING_LENGTH];
CHAR_DATA *victim;
OBJ_DATA *obj;
int cost = 0;
argument = one_argument( argument, arg1);
if (!IS_CLASS(ch, CLASS_WIZARD))
{
send_to_char("Huh?\n\r",ch);
return;
}
if ( arg1[0] == '\0' )
{
stc("#RUse hellblades on who?\n\r",ch);
return;
}
if ((victim = get_char_room(ch, arg1)) == NULL)
{
stc("#RThey aren't here.\n\r", ch);
return;
}
if (victim == ch)
{
stc("#RYeah ok..... dork....\n\r",ch);
return;
}
if (!IS_CLASS(ch, CLASS_WIZARD))
{
stc("#RHuh?\n\r",ch);
return;
}
if (ch->pcdata->stats[WL_SPELLS] < 8)
{
stc("#RYou do not yet have mastery of this spell.\n\r",ch);
return;
}
if (is_safe(ch,victim)) return;
if (ch->pcdata->powers[WL_SKILLS] < 4) cost = 20000;
if (ch->pcdata->powers[WL_SKILLS] > 3) cost = 15000;
if (ch->mana < 20000 && ch->pcdata->powers[WL_SKILLS] < 4)
{
stc("#RYou do not have the #y20000#R required mana.\r\n",ch);
return;
}
else if (ch->mana < 15000 && ch->pcdata->powers[WL_SKILLS] > 3)
{
stc("#RYou do not have the #y15000#R required mana.\r\n",ch);
return;
}
//Left Arm
if (IS_ARM_L(victim,LOST_ARM))
{
sprintf( buf, "#y%s#R has already lost his left arm.\n\r", victim->name);
stc( buf, ch);
return;
}
if (!IS_ARM_L(victim,LOST_ARM))
SET_BIT(victim->loc_hp[2],LOST_ARM);
else
{
sprintf( buf, "#y%s#R has already lost his left arm.\n\r", victim->name);
stc( buf, ch);
return;
}
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);
act("#RYour hellblades spin around you, cutting off #y$N's#R left arm!",ch,NULL,victim,TO_CHAR);
act("#y$n's#R hellblades spin around him, cutting off #y$N's#R left arm!",ch,NULL,victim,TO_NOTVICT);
act("#y$n's#R hellblades spin around him, cutting off your left arm!",ch,NULL,victim,TO_VICT);
make_part(victim,"arm");
if (IS_ARM_L(victim,LOST_ARM) && IS_ARM_R(victim,LOST_ARM))
{
if ((obj = get_eq_char( victim, WEAR_ARMS )) != NULL)
take_item(victim,obj);
}
if ((obj = get_eq_char( victim, WEAR_HOLD )) != NULL)
take_item(victim,obj);
if ((obj = get_eq_char( victim, WEAR_HANDS )) != NULL)
take_item(victim,obj);
if ((obj = get_eq_char( victim, WEAR_WRIST_L )) != NULL)
take_item(victim,obj);
if ((obj = get_eq_char( victim, WEAR_FINGER_L )) != NULL)
take_item(victim,obj);
if (IS_ARM_R(victim,LOST_ARM))
{
sprintf( buf, "#y%s#R has already lost his right arm.\n\r", victim->name);
stc( buf, ch);
return;
}
if (!IS_ARM_R(victim,LOST_ARM))
SET_BIT(victim->loc_hp[3],LOST_ARM);
else
{
sprintf( buf, "#y%s#R has already lost his right arm.\n\r", victim->name);
stc( buf, ch);
return;
}
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);
act("#RYour hellblades spin around you, cutting off #y$N's#R right arm!",ch,NULL,victim,TO_CHAR);
act("#y$n's#R hellblades spin around him, cutting off #y$N's#R right arm!",ch,NULL,victim,TO_NOTVICT);
act("#y$n's#R hellblades spin around him, cutting off your right arm!",ch,NULL,victim,TO_VICT);
make_part(victim,"arm");
if (IS_ARM_L(victim,LOST_ARM) && IS_ARM_R(victim,LOST_ARM))
{
if ((obj = get_eq_char( victim, WEAR_ARMS )) != NULL)
take_item(victim,obj);
}
if ((obj = get_eq_char( victim, WEAR_WIELD )) != NULL)
take_item(victim,obj);
if ((obj = get_eq_char( victim, WEAR_HANDS )) != NULL)
take_item(victim,obj);
if ((obj = get_eq_char( victim, WEAR_WRIST_R )) != NULL)
take_item(victim,obj);
if ((obj = get_eq_char( victim, WEAR_FINGER_R )) != NULL)
take_item(victim,obj);
// more fun stuff with mnemonic enhancement
if (ch->pcdata->powers[WL_SKILLS] > 3 && number_range(1, 20) < 5)
{
//left leg
if (IS_LEG_L(victim,LOST_LEG))
{
sprintf( buf, "#y%s#R has already lost his left leg.\n\r", victim->name);
stc( buf, ch);
return;
}
if (!IS_LEG_L(victim,LOST_LEG))
SET_BIT(victim->loc_hp[4],LOST_LEG);
else
{
sprintf( buf, "#y%s#R has already lost his left leg.\n\r", victim->name);
stc( buf, ch);
return;
}
if (!IS_BLEEDING(victim,BLEEDING_LEG_L))
SET_BIT(victim->loc_hp[6],BLEEDING_LEG_L);
if (IS_BLEEDING(victim,BLEEDING_FOOT_L))
REMOVE_BIT(victim->loc_hp[6],BLEEDING_FOOT_L);
act("#RYour hellblades spin around you, cutting off #y$N's#R left leg!",ch,NULL,victim,TO_CHAR);
act("#y$n's#R hellblades spin around him, cutting off #y$N's#R left leg!",ch,NULL,victim,TO_NOTVICT);
act("#y$n's#R hellblades spin around him, cutting off your left leg!",ch,NULL,victim,TO_VICT);
make_part(victim,"leg");
if (IS_LEG_L(victim,LOST_LEG) && IS_LEG_R(victim,LOST_LEG))
{
if ((obj = get_eq_char( victim, WEAR_LEGS )) != NULL)
take_item(victim,obj);
}
if ((obj = get_eq_char( victim, WEAR_FEET )) != NULL)
take_item(victim,obj);
//right leg
if (IS_LEG_R(victim,LOST_LEG))
{
sprintf( buf, "#y%s#R has already lost his right leg.\n\r", victim->name);
stc( buf, ch);
return;
}
if (!IS_LEG_R(victim,LOST_LEG))
SET_BIT(victim->loc_hp[5],LOST_LEG);
else
{
sprintf( buf, "#y%s#R has already lost his right leg.\n\r", victim->name);
stc( buf, ch);
return;
}
if (!IS_BLEEDING(victim,BLEEDING_LEG_R))
SET_BIT(victim->loc_hp[6],BLEEDING_LEG_R);
if (IS_BLEEDING(victim,BLEEDING_FOOT_R))
REMOVE_BIT(victim->loc_hp[6],BLEEDING_FOOT_R);
act("#RYour hellblades spin around you, cutting off #y$N's#R right leg!",ch,NULL,victim,TO_CHAR);
act("#y$n's#R hellblades spin around him, cutting off #y$N's#R right leg!",ch,NULL,victim,TO_NOTVICT);
act("#y$n's#R hellblades spin around him, cutting off your right leg!",ch,NULL,victim,TO_VICT);
make_part(victim,"leg");
if (IS_LEG_L(victim,LOST_LEG) && IS_LEG_R(victim,LOST_LEG))
{
if ((obj = get_eq_char( victim, WEAR_LEGS )) != NULL)
take_item(victim,obj);
}
if ((obj = get_eq_char( victim, WEAR_FEET )) != NULL)
take_item(victim,obj);
}
if (ch->pcdata->powers[WL_SKILLS] > 3 && number_range(1, 100) < 5 && !IS_NPC(victim))
{
behead( victim );
sprintf( buf, "#y%s#R is cut to pieces by #y%s's#R hellblades.\n\r", victim->name, ch->name);
do_info( ch, buf);
ch->pkill ++;
victim->pdeath -= 1;
ch->race ++;
return;
}
victim->hit *= .9;
ch->mana -= cost;
return;
}
void do_wrath( CHAR_DATA *ch, char *argument )
{
CHAR_DATA *victim;
char arg1[MAX_INPUT_LENGTH];
char buf[MAX_STRING_LENGTH];
int dam;
argument = one_argument( argument, arg1 );
if (!IS_CLASS(ch, CLASS_WIZARD))
{
send_to_char("Huh?\n\r",ch);
return;
}
if ( arg1[0] == '\0')
{
send_to_char( "#RRelease the Wrath of the Damned on who?\n\r", ch );
return;
}
if (ch->pcdata->stats[WL_SPELLS] < 11)
{
stc("#RYou do not yet have mastery of this spell.\n\r",ch);
return;
}
if ((victim = get_char_world(ch, arg1)) == NULL)
{
sprintf(buf, "#y%s#R is not here.\n\r",arg1);
stc( buf, ch);
return;
}
if (victim->level < LEVEL_AVATAR)
{
stc("Not on mortals.\n\r",ch);
return;
}
if (ch->mana < 5000)
{
stc("#RYou do not have the 5000 required mana.\n\r",ch);
return;
}
if (IS_BODY(victim, BROKEN_SPINE))
{
sprintf(buf, "#y%s#R already has a broken spine.\n\r",victim->name);
stc( buf, ch);
return;
}
act("#RYou close your eyes and chant dark words, calling forth the damned to release their wrath upon #y$N#R.", ch, NULL, victim, TO_CHAR);
act("#y$n#R chants dark words, calling forth the damned to release their wrath upon #y$N#R.", ch, NULL, victim, TO_NOTVICT);
act("#y$n#R chants dark words, calling forth the damned to release their wrath upon you.#n", ch, NULL, victim, TO_VICT);
SET_BIT(victim->loc_hp[1],BROKEN_SPINE);
act("#y$N#R screams in agony as $S spine is snapped with a gruesome #C*#yPOP#C*#n.", ch, NULL, victim, TO_NOTVICT);
act("#y$N#R screams in agony as $S spine is snapped with a gruesome #C*#yPOP#C*#n", ch, NULL, victim, TO_CHAR);
stc("#RYou scream in agony as your spine is snapped with a gruesome #C*#yPOP#C*#n", victim);
dam = (victim->hit) / 8;
if (ch->pcdata->powers[WL_SKILLS] > 3) dam *= 2;
hurt_person(ch, victim, dam);
ch->mana -= 5000;
return;
}
void do_firebolt( CHAR_DATA *ch, char *argument)
{
CHAR_DATA *victim;
char arg1[MAX_INPUT_LENGTH];
char buf[MAX_STRING_LENGTH];
int dam;
argument = one_argument( argument, arg1 );
if (IS_NPC(ch) )
return;
if (!IS_CLASS(ch, CLASS_WIZARD))
{
send_to_char("Huh?\n\r",ch);
return;
}
if ( arg1[0] == '\0')
{
send_to_char( "#RCast firebolt on whom?\n\r", ch );
return;
}
if ( ( victim = get_char_room( ch, arg1 ) ) == NULL )
{
send_to_char( "#RThey aren't here.#n\n\r", ch );
return;
}
if (victim->level < LEVEL_AVATAR)
{
stc("Not on mortals.\n\r",ch);
return;
}
if ((victim == ch))
{
stc("#RYeah ok...\n\r",ch);
return;
}
if (ch->pcdata->stats[WL_SPELLS] < 1)
{
stc("#RYou do not yet have mastery of this spell.\n\r",ch);
return;
}
if (ch->mana < 1000)
{
stc("#RYou do not have the required 1000 mana.\n\r",ch);
return;
}
dam = number_range(2000, 3500);
if (ch->pcdata->powers[WL_SKILLS] > 3)
{
dam += number_range( 750, 1500 );
}
if (IS_NPC(victim)) dam *= 1.7;
act("#y$n#R points $s hands towards #y$N#R, releasing a powerful bolt of flame.", ch, NULL, victim, TO_NOTVICT);
sprintf( buf, "#RYou point your hands toward $N, releasing a powerful blase of flame#n #y[#C%d#y]#n\n\r", dam);
act( buf, ch,NULL,victim,TO_CHAR);
sprintf( buf, "#y$n#R points his hands towards you, releasing a powerful bolt of flame.#n #y[#C%d#y]#n\n\r", dam);
act( buf, ch,NULL,victim,TO_VICT); if (!IS_SET(victim->affected_by, AFF_FLAMING))
SET_BIT(victim->affected_by, AFF_FLAMING);
ch->mana -= 1000;
hurt_person(ch, victim, dam);
if (victim->hit < -10) victim->hit = -10;
if (number_percent() < 50)
{
act("#y$n#R points $s hands towards #y$N#R, releasing a powerful bolt of flame.", ch, NULL, victim, TO_NOTVICT);
sprintf( buf, "#RYou point your hands toward $N, releasing a powerful blast of flame#n #y[#C%d#y]#n\n\r", dam);
act( buf, ch,NULL,victim,TO_CHAR);
sprintf( buf, "#y$n#R points his hands towards you, releasing a powerful bolt of flame.#n #y[#C%d#y]#n\n\r", dam);
act( buf, ch,NULL,victim,TO_VICT); if (!IS_SET(victim->affected_by, AFF_FLAMING))
SET_BIT(victim->affected_by, AFF_FLAMING);
hurt_person(ch, victim, dam);
if (victim->hit < -10) victim->hit = -10;
}
if (number_percent() < 10)
{
act("#y$n#R points $s hands towards #y$N#R, releasing a powerful bolt of flame.", ch, NULL, victim, TO_NOTVICT);
sprintf( buf, "#RYou point your hands toward $N, releasing a powerful blast of flame#n #y[#C%d#y]#n\n\r", dam);
act( buf, ch,NULL,victim,TO_CHAR);
sprintf( buf, "#y$n#R points his hands towards you, releasing a powerful bolt of flame.#n #y[#C%d#y]#n\n\r", dam);
act( buf, ch,NULL,victim,TO_VICT);
if (!IS_SET(victim->affected_by, AFF_FLAMING))
SET_BIT(victim->affected_by, AFF_FLAMING);
hurt_person(ch, victim, dam);
if (victim->hit < -10) victim->hit = -10;
}
if (ch->pcdata->powers[WL_SKILLS] > 3)
{WAIT_STATE(ch, 4 );}
else WAIT_STATE(ch, 8);
if (ch->fighting == NULL) ch->fighting = victim;
return;
}
void do_pshift( CHAR_DATA *ch, char *argument )
{
ROOM_INDEX_DATA *to_room;
EXIT_DATA *pexit;
CHAR_DATA *victim;
int door;
if (!IS_CLASS(ch, CLASS_WIZARD))
{
stc("Huh?\n\r",ch);
return;
}
if (ch->pcdata->stats[WL_SPELLS] < 5)
{
stc("#RYou do not yet have mastery of this spell.#n\n\r",ch);
return;
}
if ( ( victim = ch->fighting ) == NULL )
{
if ( ch->position == POS_FIGHTING )
ch->position = POS_STANDING;
send_to_char( "You aren't fighting anyone.\n\r", ch );
return;
}
if(ch->mana < 750)
{
send_to_char("#RYou d not have the 750 required mana.\n\r",ch);
return;
}
door = number_door( );
if ( ( pexit = ch->in_room->exit[door] ) == NULL
|| (to_room = pexit->to_room) == NULL)
{
act( "#y$n#R mutters some words and disappears!", ch, NULL, NULL, TO_ROOM );
send_to_char( "#RYou mutter some dark words and vanish from combat.\n\r", ch );
char_from_room( ch );
char_to_room( ch, get_room_index(ROOM_VNUM_ALTAR));
stop_fighting( ch, TRUE );
return;
};
act( "#y$n#R mutters some words and disappears!", ch, NULL, NULL, TO_ROOM );
send_to_char( "#RYou mutter some dark words and vanish from combat.\n\r", ch );
char_from_room(ch);
char_to_room( ch, to_room );
do_look(ch,"auto");
stop_fighting( ch, TRUE );
ch->mana -= 750;
return;
}
void do_vortex(CHAR_DATA *ch, char *argument)
{
ROOM_INDEX_DATA *pRoom;
ROOM_INDEX_DATA *pDir;
OBJ_DATA *pObj;
CHAR_DATA *pChar;
int i;
if (!IS_CLASS(ch, CLASS_WIZARD))
{
send_to_char("Huh?\n\r",ch);
return;
}
if (ch->pcdata->stats[WL_SPELLS] < 9)
{
stc("#RYou do not yet have mastery over this spell.\n\r",ch);
return;
}
if (ch->mana < 7500)
{
stc("#RYou do not have the required 7500 mana.\n\r",ch);
return;
}
pRoom = ch->in_room;
for ( i = 0; i < 5; i++ )
{
char buf[MAX_STRING_LENGTH];
if ( !pRoom->exit[i] || !pRoom->exit[i]->to_room )
continue;
pDir = pRoom->exit[i]->to_room;
if ( IS_SET(pDir->room_flags,ROOM_SAFE) )
continue;
for ( pObj = pDir->contents; pObj; pObj = pDir->contents )
{
if (!pObj) continue;
if (pObj->in_room == NULL) continue;
obj_from_room(pObj);
obj_to_room(pObj,pRoom);
if ( pDir->people )
{
sprintf(buf,"#RA vortex sucks $p to the %s.",dir_name[rev_dir[i]]);
// act(buf,pDir->people,pObj,NULL,TO_CHAR);
act(buf,pDir->people,pObj,NULL,TO_ROOM);
}
sprintf(buf,"#RA vortex sucks $p from the %s.",dir_name[i]);
act(buf,ch,pObj,NULL,TO_CHAR);
act(buf,ch,pObj,NULL,TO_ROOM);
}
for ( pChar = pDir->people; pChar; pChar = pDir->people )
{
if (!pChar) continue;
if (pChar->in_room == NULL) continue;
if (pChar == ch) continue;
sprintf(buf,"#RA vortex sucks $n to the %s.",dir_name[rev_dir[i]]);
act(buf,pChar,NULL,NULL,TO_ROOM);
sprintf(buf,"#RA vortex sucks you to the %s.",dir_name[rev_dir[i]]);
send_to_char(buf,pChar);
char_from_room(pChar);
char_to_room(pChar,pRoom);
sprintf(buf,"#RA vortex sucks $N from the %s.",dir_name[i]);
act(buf,ch,NULL,pChar,TO_CHAR);
act(buf,ch,NULL,pChar,TO_ROOM);
}
}
ch->mana -= 7500;
}
void do_plost( CHAR_DATA *ch, char *argument )
{
char arg[MAX_INPUT_LENGTH];
CHAR_DATA *victim;
char buf[MAX_STRING_LENGTH];
one_argument( argument, arg );
if (IS_NPC(ch)) return;
if (!IS_CLASS(ch, CLASS_WIZARD))
{
send_to_char("Huh?\n\r",ch);
return;
}
if (ch->pcdata->stats[WL_SPELLS] < 7)
{
send_to_char("#RYou do not yet have mastery over this spell.\n\r",ch);
return;
}
if (ch->mana < 7500)
{
stc("#RYou do not have the required 7500 mana.\n\r",ch);
return;
}
if ( arg[0] == '\0' )
{
send_to_char( "#RCast paradise lost on who?\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 == ch )
{
send_to_char( "#RBeware the penguins.#n\n\r", ch );
return;
}
if ( !IS_AFFECTED(victim, AFF_SANCTUARY) )
{
send_to_char( "#RThey don't have sanctuary on!#n\n\r", ch );
return;
}
REMOVE_BIT(victim->affected_by, AFF_SANCTUARY);
send_to_char("#RYour eyes sink into your head as you fill the room with despair.#n\n\r",ch);
sprintf(buf, "#y%s#R's eyes sink into his head, and you are overcome with depression.#n\n\r", ch->name);
stc( buf, victim);
multi_hit( ch, victim, TYPE_UNDEFINED );
multi_hit( ch, victim, TYPE_UNDEFINED );
if (ch->pcdata->powers[WL_SKILLS] > 3)
{
multi_hit( ch, victim, TYPE_UNDEFINED );
}
WAIT_STATE( ch, 3 * PULSE_VIOLENCE );
ch->mana -= 7500;
return;
}
void do_icelance( CHAR_DATA *ch, char *argument)
{
CHAR_DATA *victim;
char arg1[MAX_INPUT_LENGTH];
char buf[MAX_STRING_LENGTH];
int dam;
argument = one_argument( argument, arg1 );
if (IS_NPC(ch) )
return;
if (!IS_CLASS(ch, CLASS_WIZARD))
{
send_to_char("Huh?\n\r",ch);
return;
}
if ( arg1[0] == '\0')
{
send_to_char( "#RUse icelance on who?\n\r", ch );
return;
}
if ( ( victim = get_char_room( ch, arg1 ) ) == NULL )
{
send_to_char( "#RThey aren't here.#n\n\r", ch );
return;
}
if ((victim == ch))
{
stc("#RYeah ok...\n\r",ch);
return;
}
if (ch->pcdata->stats[WL_SPELLS] < 4)
{
stc("#RYou do not yet have mastery of this spell.\n\r",ch);
return;
}
if (ch->mana < 5000)
{
stc("#RYou do not have the required 5000 mana.\n\r",ch);
return;
}
dam = number_range(5000, 7500);
if (ch->pcdata->powers[WL_SKILLS] > 3)
{
dam += number_range( 1250, 2500 );
}
if (IS_NPC(victim))
{
dam *= 2.5;
}
act("#y$n#R points $s hands towards #y$N#R and sends forth a wicked spear of ice.", ch, NULL, victim, TO_NOTVICT);
sprintf( buf, "#RYou point your hands toward %s and sends forth a wicked spear of ice.#n #y[#C%d#y]#n\n\r", victim->name, dam);
stc( buf, ch);
sprintf( buf, "#y%s#R points his hands towards you and sends forth a wicked spear of ice.#n #y[#C%d#y]#n\n\r", ch->name, dam);
stc( buf, victim);
ch->mana -= 5000;
victim->hit -= dam;
if (!IS_BLEEDING(victim, BLEEDING_THROAT))
SET_BIT(victim->loc_hp[6], BLEEDING_THROAT);
if (victim->hit < -10) victim->hit = -10;
if (ch->pcdata->powers[WL_SKILLS] > 3)
{WAIT_STATE(ch, 8 );}
else WAIT_STATE(ch, 16);
if (ch->fighting == NULL) ch->fighting = victim;
return;
}
void do_negativity( CHAR_DATA *ch, char *argument)
{
CHAR_DATA *victim;
char buf[MAX_STRING_LENGTH];
char arg[MAX_INPUT_LENGTH];
int dam;
argument = one_argument( argument, arg );
if (IS_NPC(ch) )
return;
if (!IS_CLASS(ch, CLASS_WIZARD))
{
stc("Huh?\n\r",ch);
return;
}
if ( arg[0] == '\0')
{
send_to_char( "#RCast negativity on who?\n\r", ch );
return;
}
if ( ( victim = get_char_room( ch, arg ) ) == NULL )
{
send_to_char( "#RThey aren't here.#n\n\r", ch );
return;
}
if ((victim == ch))
{
stc("#RYeah ok...\n\r",ch);
return;
}
if (ch->pcdata->stats[WL_SPELLS] < 2)
{
stc("You do not yet have mastery of this spell.",ch);
return;
}
dam = number_range(2500, 5000);
if (ch->pcdata->powers[WL_SKILLS] > 3) dam *= 2;
if (ch->mana < dam * 2)
{
stc("You do not have enough mana for this spell.",ch);
return;
}
hurt_person(ch, victim, dam);
ch->hit += dam;
ch->mana -= dam;
sprintf(buf, "#rYou place your hands on #R%s,#r sucking the life out of them. #B[#R%d#B]#n\n\r", victim->name, dam);
stc(buf, ch);
sprintf(buf, "#R%s#r places his hands on you, sucking out your life. #B[#R%d#B]#n\n\r", ch->name, dam);
stc(buf, victim);
WAIT_STATE(ch, 10);
return;
}
void do_chaos( CHAR_DATA *ch, char *argument )
{
CHAR_DATA *victim;
AFFECT_DATA af;
int chaos, dam;
char arg[MAX_INPUT_LENGTH];
char buf[MAX_STRING_LENGTH];
argument = one_argument( argument, arg );
if (IS_NPC(ch)) return;
if (!IS_CLASS(ch, CLASS_WIZARD))
{
send_to_char("Huh?\n\r",ch);
return;
}
if (ch->pcdata->stats[WL_SPELLS] < 6)
{
send_to_char("Huh?\n\r",ch);
return;
}
if ( arg[0] == '\0')
{
send_to_char( "#RCast chaos orb on whom?\n\r", ch );
return;
}
if ( ( victim = get_char_room( ch, arg ) ) == NULL )
{
send_to_char( "They are not here.\n\r", ch );
return;
}
if (is_safe(ch, victim))
{
stc("You cannot attack them.\n\r",ch);
return;
}
if (ch->mana < 5000)
{
stc("You do not ave the required 5000 mana.\n\r",ch);
return;
}
chaos = number_range(1, 9);
act("#r$n#0 begins chanting dark words, summoning forth a sphere of #rc#lh#pa#go#cs#0 to hurl at #r$N!#n", ch, NULL, victim, TO_NOTVICT);
sprintf( buf, "#0You summon forth a perfect sphere of #rc#lh#pa#go#cs#0 and hurl it at #r$N!#n\n\r");
act(buf, ch, NULL, victim, TO_CHAR);
sprintf( buf, "#r$n#0 summons forth a perfect sphere of #rc#lh#pa#go#cs#0 and hurls it at you!#n\n\r");
act(buf, ch, NULL, victim, TO_VICT);
if (chaos == 1 || chaos == 6)
{
stc("The sphere explodes in a shower of #Ggreen bubbles#n.\n\r",victim);
stc("Your sphere explodes in a shower of #Ggreen bubbles#n.\n\r",ch);
if ( IS_AFFECTED(victim, AFF_POISON)) return;
af.type = gsn_poison;
af.duration = chaos * 10;
af.location = APPLY_STR;
af.modifier = 0 - number_range(1,3);
af.bitvector = AFF_POISON;
affect_join( victim, &af );
WAIT_STATE(victim, number_range(5, 20));
send_to_char( "#GYou are poisoned!#n\n\r", victim );
}
else if (chaos == 2 || chaos == 7 )
{
stc("The sphere explodes, forming a #yyellow haze#n.\n\r",victim);
stc("Your sphere explodes, forming a #yyellow haze#n.\n\r",ch);
if ( IS_AFFECTED(victim, AFF_BLIND))
{
af.type = gsn_blindness;
af.location = APPLY_HITROLL;
af.modifier = -4;
af.duration = chaos * 10;
af.bitvector = AFF_BLIND;
affect_to_char( victim, &af );
WAIT_STATE(victim, number_range(5, 15));
send_to_char( "#yYou are blinded!#n\n\r", victim );
}
else
{
stc("They are already blinded.\n\r",ch);
}
}
else if (chaos == 3 || chaos == 8)
{
stc("The sphere explodes in a shower of #Rred flames#n.\n\r",victim);
stc("Your sphere explodes in a shower of #Rred flames#n.\n\r",ch);
WAIT_STATE(victim, number_range(5, 20));
SET_BIT(victim->affected_by, AFF_FLAMING);
}
else if (chaos == 4 || chaos == 9)
{
dam = number_range(7500, 15000);
sprintf(buf,"The sphere explodes in a scattering of #Lblue sparks#n. #R[#y%d#R]#n\n\r", dam);
stc( buf, victim);
sprintf(buf,"Your sphere explodes in a scattering of #Lblue sparks#n. #R[#y%d#R]#n\n\r", dam);
stc( buf, ch);
WAIT_STATE(victim, number_range(5, 8));
hurt_person(ch, victim, dam);
}
else if (chaos == 5 )
{
stc("The sphere dissipates before it hits you#n.\n\r",victim);
stc("Your dissipates shortly after casting#n.\n\r",ch);
}
WAIT_STATE(ch, 4);
ch->mana -= 5000;
if (victim->hit < -10) victim->hit = -10;
return;
}