/***************************************************************************
* 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. *
***************************************************************************/
#include <glib.h>
#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>
#include <fight.h>
#include <tables.h>
#include <power.h>
/*
* Local functions.
*/
void adv_spell_damage args( ( CHAR_DATA *ch, OBJ_DATA *book,
OBJ_DATA *page, char *argument) );
void adv_spell_affect args( ( CHAR_DATA *ch, OBJ_DATA *book,
OBJ_DATA *page, char *argument) );
void adv_spell_action args( ( CHAR_DATA *ch, OBJ_DATA *book,
OBJ_DATA *page, char *argument) );
void birth_write args( ( CHAR_DATA *ch, char *argument ) );
bool birth_ok args( ( CHAR_DATA *ch, char *argument ) );
/*
* External functions.
*/
bool check_dumbshit args( (char *command) );
void set_fighting args( ( CHAR_DATA *ch, CHAR_DATA *victim ) );
void check_killer args( ( CHAR_DATA *ch, CHAR_DATA *victim ) );
extern int sphere_lookup args((char * sphere));
extern int sphere_count args((CHAR_DATA *ch));
extern int count_snoopers args(( DESCRIPTOR_DATA *ch ));
/* Need to get rid of those flames somehow - KaVir */
void do_smother( CHAR_DATA *ch, char *argument )
{
CHAR_DATA *victim;
char arg[MAX_INPUT_LENGTH];
one_argument( argument, arg );
if (IS_NPC( ch )) return;
if ( arg[0] == '\0' )
{
send_to_char( "Smother whom?\n\r", ch );
return;
}
if ( ( victim = get_char_room( ch, arg ) ) == NULL )
{
send_to_char( "They aren't here.\n\r", ch );
return;
}
if ( ch == victim )
{
send_to_char( "You cannot smother yourself.\n\r", ch );
return;
}
if (!IS_AFFECTED(victim, AFF_FLAMING))
{
send_to_char( "But they are not on fire!\n\r", ch );
return;
}
if ( number_percent() > (ch->level*2) )
{
act( "You try to smother the flames around $N but fail!", ch, NULL, victim, TO_CHAR );
act( "$n tries to smother the flames around you but fails!", ch, NULL, victim, TO_VICT );
act( "$n tries to smother the flames around $N but fails!", ch, NULL, victim, TO_NOTVICT );
if ( number_percent() > 98 && !IS_AFFECTED(ch,AFF_FLAMING) )
{
act( "A spark of flame from $N's body sets you on fire!", ch, NULL, victim, TO_CHAR );
act( "A spark of flame from your body sets $n on fire!", ch, NULL, victim, TO_VICT );
act( "A spark of flame from $N's body sets $n on fire!", ch, NULL, victim, TO_NOTVICT );
SET_BIT(ch->affected_by, AFF_FLAMING);
do_humanity(ch,"");
}
return;
}
act( "You manage to smother the flames around $M!", ch, NULL, victim, TO_CHAR );
act( "$n manages to smother the flames around you!", ch, NULL, victim, TO_VICT );
act( "$n manages to smother the flames around $N!", ch, NULL, victim, TO_NOTVICT );
REMOVE_BIT(victim->affected_by, AFF_FLAMING);
do_humanity(ch,"");
return;
}
/* Loads of Vampire powers follow. KaVir */
void power_fangs( CHAR_DATA *ch, CHAR_DATA *victim, char *argument )
{
if (IS_VAMPAFF(ch,VAM_FANGS) )
{
send_to_char("Your fangs slide back into your gums.\n\r",ch);
act("$n's fangs slide back into $s gums.", ch, NULL, NULL, TO_ROOM);
REMOVE_BIT(ch->pcdata->stats[UNI_AFF], VAM_FANGS);
return;
}
send_to_char("Your fangs extend out of your gums.\n\r",ch);
act("A pair of razor sharp fangs extend from $n's mouth.", ch, NULL, NULL, TO_ROOM);
SET_BIT(ch->pcdata->stats[UNI_AFF], VAM_FANGS);
return;
}
void do_shift( CHAR_DATA *ch, char *argument )
{
char arg [MAX_INPUT_LENGTH];
int toform = 0;
argument = one_argument( argument, arg );
if (IS_NPC(ch)) return;
if (!IS_CLASS(ch, CLASS_WEREWOLF))
{
send_to_char("Huh?\n\r",ch);
return;
}
if ( arg[0] == '\0' )
{
send_to_char( "You can shift between the following forms: Homid, Glabro, Crinos, Hispo, Lupus.\n\r", ch );
return;
}
if ( !str_cmp(arg,"homid" ) ) toform = 1;
else if ( !str_cmp(arg,"glabro") ) toform = 2;
else if ( !str_cmp(arg,"crinos") ) toform = 3;
else if ( !str_cmp(arg,"hispo" ) ) toform = 4;
else if ( !str_cmp(arg,"lupus" ) ) toform = 5;
else
{
send_to_char( "You can shift between the following forms: Homid, Glabro, Crinos, Hispo, Lupus.\n\r", ch );
return;
}
if ( ch->pcdata->stats[UNI_FORM0] < 1 || ch->pcdata->stats[UNI_FORM0] > 5)
ch->pcdata->stats[UNI_FORM0] = 1;
if ( ch->pcdata->stats[UNI_FORM0] == toform )
{
send_to_char( "You are already in that form.\n\r", ch );
return;
}
ch->pcdata->stats[UNI_FORM1] = toform;
return;
}
void power_claws( CHAR_DATA *ch, CHAR_DATA *victim, char *argument )
{
if (IS_VAMPAFF(ch,VAM_CLAWS) )
{
if (IS_CLASS(ch, CLASS_VAMPIRE))
{
send_to_char("Your claws slide back under your nails.\n\r",ch);
act("$n's claws slide back under $s nails.", ch, NULL, NULL, TO_ROOM);
}
else
{
send_to_char("Your talons slide back into your fingers.\n\r",ch);
act("$n's talons slide back into $s fingers.",ch,NULL,NULL,TO_ROOM);
}
REMOVE_BIT(ch->pcdata->stats[UNI_AFF], VAM_CLAWS);
return;
}
if (IS_CLASS(ch, CLASS_VAMPIRE))
{
send_to_char("Sharp claws extend from under your finger nails.\n\r",ch);
act("Sharp claws extend from under $n's finger nails.", ch, NULL, NULL, TO_ROOM);
}
else
{
send_to_char("Razor sharp talons extend from your fingers.\n\r",ch);
act("Razor sharp talons extend from $n's fingers.",ch,NULL,NULL,TO_ROOM);
}
SET_BIT(ch->pcdata->stats[UNI_AFF], VAM_CLAWS);
return;
}
void do_anarch( CHAR_DATA *ch, char *argument )
{
char arg [MAX_INPUT_LENGTH];
char buf [MAX_INPUT_LENGTH];
argument = one_argument( argument, arg );
if (IS_NPC(ch)) return;
if (IS_CLASS(ch, CLASS_VAMPIRE) )
{
send_to_char("Huh?\n\r",ch);
return;
}
if (!IS_CLASS(ch, CLASS_VAMPIRE) )
{
send_to_char("Huh?\n\r",ch);
return;
}
if (ch->clan > CLAN_NONE)
{
send_to_char("But you are already in a clan!\n\r",ch);
return;
}
if (IS_SET(ch->special, SPC_INCONNU))
{
send_to_char("But you are already an Inconnu!\n\r",ch);
return;
}
if ( IS_SET(ch->special, SPC_ANARCH) )
{
send_to_char("You are no longer an Anarch.\n\r",ch);
sprintf(buf,"%s is no longer an Anarch!",ch->name->str);
do_info(ch,buf);
REMOVE_BIT(ch->special, SPC_ANARCH);
return;
}
send_to_char("You are now an Anarch.\n\r",ch);
sprintf(buf,"%s is now an Anarch!",ch->name->str);
do_info(ch,buf);
SET_BIT(ch->special, SPC_ANARCH);
return;
}
void do_inconnu( CHAR_DATA *ch, char *argument )
{
char arg [MAX_INPUT_LENGTH];
char buf [MAX_INPUT_LENGTH];
argument = one_argument( argument, arg );
if (IS_NPC(ch)) return;
if (IS_CLASS(ch, CLASS_VAMPIRE) )
{
send_to_char("Huh?\n\r",ch);
return;
}
if (!IS_CLASS(ch, CLASS_VAMPIRE) )
{
send_to_char("Huh?\n\r",ch);
return;
}
if (ch->clan > CLAN_NONE && ch->pcdata->stats[UNI_GEN] < 3)
{
send_to_char("You cannot abandon your clan!\n\r",ch);
return;
}
if (years_old(ch) < 75 && ch->pcdata->stats[UNI_GEN] > 2)
{
send_to_char("You must be at least an Elder to become an Inconnu.\n\r",ch);
return;
}
if (IS_SET(ch->special, SPC_INCONNU))
{
send_to_char("But you are already an Inconnu!\n\r",ch);
return;
}
if (ch->exp < 1000000)
{
send_to_char("It costs 1000000 exp to become an Inconnu.\n\r",ch);
return;
}
if (IS_SET(ch->special, SPC_ANARCH)) REMOVE_BIT(ch->special, SPC_ANARCH);
ch->clan = CLAN_NONE;
ch->exp -= 1000000;
send_to_char("You are now an Inconnu.\n\r",ch);
sprintf(buf,"%s is now an Inconnu!",ch->name->str);
do_info(ch,buf);
SET_BIT(ch->special, SPC_INCONNU);
return;
}
void do_bite( CHAR_DATA *ch, char *argument )
{
CHAR_DATA *victim;
char arg1 [MAX_INPUT_LENGTH];
char arg2 [MAX_INPUT_LENGTH];
char buf [MAX_INPUT_LENGTH];
int clancount;
sh_int count;
sh_int clan = -1;
bool can_sire = FALSE;
bool outcast = FALSE;
argument = one_argument( argument, arg1);
argument = one_argument( argument, arg2);
if (IS_NPC(ch)) return;
if (!strcmp(ch->name->str,"Halbarad"))
{
send_to_char("You are a CAITIFF, dumbass! You get NO childe!\n\r",ch);
return;
}
if (!IS_CLASS(ch, CLASS_VAMPIRE) && !IS_IMMORTAL(ch))
{
send_to_char("Huh?\n\r",ch);
return;
}
if (IS_IMMORTAL(ch) && ch->level < LEVEL_JUDGE)
{
send_to_char("Huh?\n\r",ch);
return;
}
if (ch->pcdata->stats[UNI_CURRENT] == -1)
ch->pcdata->stats[UNI_CURRENT] = ch->pcdata->stats[UNI_AFF];
//if (IS_SET(ch->special,SPC_PRINCE)) can_sire = TRUE;
//if (ch->pcdata->stats[UNI_GEN] < 3 || ch->pcdata->stats[UNI_GEN] > 6) can_sire = FALSE;
if (ch->pcdata->stats[UNI_GEN] > 12)
can_sire = FALSE; // was 6
else
can_sire = TRUE;
if (!can_sire && !IS_IMMORTAL(ch))
{
send_to_char("You are not able to create any childer.\n\r",ch);
return;
}
if (ch->clan == CLAN_NONE && ch->pcdata->stats[UNI_GEN] == 2 && !IS_IMMORTAL(ch))
{
send_to_char( "First you need to found a clan.\n\r", ch );
return;
}
clancount = 0;
for ( count = 0 ; count < MAX_DISC ; count++ )
{
if ( IS_VAMPPASS(ch,count) )
clancount++;
}
if ( clancount < 3 && !IS_IMMORTAL(ch))
{
send_to_char( "First you need to master 3 disciplines.\n\r", ch );
return;
}
if ( arg1[0] == '\0' )
{
send_to_char( "Bite whom?\n\r", ch );
return;
}
if ( ( victim = get_char_room( ch, arg1 ) ) == NULL )
{
send_to_char( "They aren't here.\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( "You cannot bite yourself.\n\r", ch );
return;
}
if (IS_CLASS(victim, CLASS_MAGE))
{
send_to_char( "You cannot bite mages.\n\r", ch );
return;
}
if (IS_CLASS(victim, CLASS_WEREWOLF))
{
send_to_char( "You are unable to create werevamps!\n\r", ch );
return;
}
if (IS_CLASS(victim, CLASS_VAMPIRE) && ch->beast != 100)
{
send_to_char( "But they are already a vampire!\n\r", ch );
return;
}
if (IS_SWWF(victim))
{
send_to_char("Do I really have to tell you that you can't do this?\n\r",ch);
return;
}
if (IS_CLASS(victim, CLASS_WRAITH))
{
send_to_char( "You cannot turn wraiths into vampires.\n\r", ch );
return;
}
if (IS_IMMUNE(victim,IMM_VAMPIRE) && ch->beast != 100)
{
send_to_char( "You cannot bite an unwilling person.\n\r", ch );
return;
}
if (!IS_VAMPAFF(ch,VAM_FANGS) && ch->beast != 100 && !IS_IMMORTAL(ch))
{
send_to_char("First you better get your fangs out!\n\r",ch);
return;
}
if (IS_VAMPAFF(ch,VAM_DISGUISED) && ch->beast != 100 && !IS_IMMORTAL(ch))
{
send_to_char("You must reveal your true nature to bite someone.\n\r",ch);
return;
}
if (!IS_IMMORTAL(ch))
{
if (ch->clan == CLAN_NONE && ch->level < 4 )
{
send_to_char("You cannot create any childe.\n\r",ch);
return;
}
if (ch->exp < 1000000 && ch->beast != 100)
{
send_to_char("You cannot afford the 1000000 exp to create a childe.\n\r",ch);
return;
}
if (HAS_DELAY(victim) || HAS_DELAY(ch))
{
send_to_char( "Not with a wait timer...\n\r", ch );
return;
}
for ( count = 0 ; count < MAX_DISC; count++ )
{
if ( get_disc(victim,count) > 0 || IS_VAMPPASS(victim,count) )
{
send_to_char("You have no inherited discs.\n\r",ch);
return;
}
}
}
if ( IS_IMMORTAL(ch) )
{
if ( arg2[0] == '\0' )
{
send_to_char("Usage: bite <player> <clan|'random'>\n\r",ch);
return;
}
if ( (clan = vamp_clan_lookup(arg2)) == -1)
{
if (!str_cmp(arg2,"random"))
clan = number_range(0,MAX_VAMP_CLAN - 1);
else
{
send_to_char("Usage: bite <player> <clan|'random'>\n\r",ch);
return;
}
}
}
if (ch->beast == 100 || ch->pcdata->stats[UNI_RAGE] > 0)
{
if (!IS_VAMPAFF(ch,VAM_FANGS) ) power_fangs(ch,ch,argument);
act("Your jaw opens wide and you leap hungrily at $N.", ch, NULL, victim, TO_CHAR);
act("$n's jaw opens wide and $e leaps hungrily at $N.", ch, NULL, victim, TO_NOTVICT);
act("$n's jaw opens wide and $e leaps hungrily at you.", ch, NULL, victim, TO_VICT);
one_hit( ch, victim, -1, 0 );
return;
}
/* if (ch->beast > 0)
ch->beast += 1; */
ch->exp = ch->exp - 1000000;
//act("You sink your teeth into $N.", ch, NULL, victim, TO_CHAR);
act("$n sinks $s teeth into $N.", ch, NULL, victim, TO_NOTVICT);
act("$n sinks $s teeth into your neck.", ch, NULL, victim, TO_VICT);
send_to_char( "You sink your fangs into your helpless victim.\n\r", ch );
send_to_char( "Then, in the final death throes, you bite your own arm.\n\r", ch );
send_to_char( "You allow your blood to drip into their mouth, damning them to Eternal Night!\n\r", ch );
send_to_char( "You feel some of your essential blood potential drain into your victim!\n\r", ch );
send_to_char( "You feel your soul ripped asunder as your lifeblood is drawn away!!\n\r", victim );
send_to_char( "Your last breath escapes you, and you begin to submit to death itself.\n\r", victim );
send_to_char( "You suddenly feel a hot, coppery tasting fluid enter your mouth.\n\r",victim);
send_to_char( "The strength of the Kindred begins to fill your veins.\n\r", victim );
send_to_char( "Your mind is flooded with the sudden knowledge of damnation and Eternal Night!\n\r", victim );
send_to_char( "Awakening to a new knowledge of your status as a Chosen, you know that upon your\n\r", victim );
send_to_char( "first taste of mortal blood, you shall forever enter the ranks of the Kindred!\n\r", victim );
victim->creature=CLASS_VAMPIRE;
if ( victim->pcdata->stats[UNI_GEN] != 0 )
{
if (IS_SET(ch->special,SPC_SIRE))
REMOVE_BIT(ch->special,SPC_SIRE);
if (IS_SET(ch->special, SPC_ANARCH) && ch->clan == CLAN_NONE)
outcast = TRUE;
}
else outcast = FALSE;
send_to_char( "\n\rYou are now a vampire.\n\r", victim );
/* AutoSect Code by Spiral */
if (IS_IMMORTAL(ch))
victim->sect = SECT_INDEPENDENT;
else
victim->sect = ch->sect;
victim->pcdata->stats[UNI_GEN] = (IS_IMMORTAL(ch) ? 4 : ch->pcdata->stats[UNI_GEN] + 1);
/*
clan_table_bite(victim);
*/
if ( clan != -1 )
{
victim->lord = g_string_assign(victim->lord,vamp_clan_table[clan].lineage);
}
else if (ch->pcdata->stats[UNI_GEN] == 1)
victim->lord = g_string_assign(victim->lord,ch->name->str);
else
{
sprintf(buf,"%s %s",ch->lord->str,ch->name->str);
victim->lord = g_string_assign(victim->lord,buf);
}
if ( clan != -1 )
{
if (victim->pcdata->stats[UNI_CURRENT] == -1)
{
for ( count = 0 ; count < MAX_DISC; count++ )
{
if ( get_disc(victim,count) < 0 )
victim->pcdata->Ninherited[count] = 1;
}
}
for ( count = 0 ; count < 3; count++ )
{
victim->pcdata->Ninherited[vamp_clan_table[clan].discipline[count]] = 1;
victim->pcdata->disc[vamp_clan_table[clan].discipline[count]] = 1;
}
victim->clan = vamp_clan_table[clan].iclan_number;
}
else if (ch->pcdata->stats[UNI_GEN] != 1)
{
if (victim->pcdata->stats[UNI_CURRENT] == -1)
{
for ( count = 0 ; count < MAX_DISC; count++ )
{
if ( get_disc(victim,count) < 0 )
victim->pcdata->Ninherited[count] = 1;
}
}
/* Remove any old powers they might have */
for ( count = 0 ; count < MAX_DISC; count++ )
{
victim->pcdata->disc[count] = 0;
}
if (!outcast)
{
victim->clan= ch->clan;
}
/* Give the vampire the base powers of their sire */
for ( count = 0 ; count < MAX_DISC; count++ )
{
if ( ch->pcdata->Ninherited[count] )
{
victim->pcdata->Ninherited[count] = 1;
victim->pcdata->disc[count] = 1;
}
}
}
save_char_obj(ch);
save_char_obj(victim);
return;
}
void do_claw( CHAR_DATA *ch, char *argument )
{
CHAR_DATA *victim;
char arg [MAX_INPUT_LENGTH];
char buf [MAX_INPUT_LENGTH];
bool can_sire = FALSE;
argument = one_argument( argument, arg );
if (IS_NPC(ch)) return;
if (!IS_CLASS(ch, CLASS_SWWF) && !IS_IMMORTAL(ch))
{
power_claws(ch,ch,argument);
return;
}
if (IS_IMMORTAL(ch) && ch->level <= LEVEL_HIGHJUDGE)
{
send_to_char("Huh?\n\r",ch);
return;
}
if (IS_SET(ch->special, SPC_BETA)
|| IS_SET(ch->special, SPC_PRINCE)) can_sire = TRUE;
else can_sire = FALSE;
if (!can_sire)
{
send_to_char("You are unable to spread your gift.\n\r",ch);
return;
}
if (ch->pcdata->stats[UNI_GEN] == 1 && ch->pcdata->stats[UNI_AFF] >= 4 && !IS_IMMORTAL(ch))
{
send_to_char("You have already created 4 tribal leaders.\n\r",ch);
return;
}
/*
else if (ch->pcdata->stats[UNI_GEN] != 1 && ch->pcdata->stats[UNI_AFF] >= 2)
{
send_to_char("You have already created 2 pups.\n\r",ch);
return;
}
*/
if (ch->clan == CLAN_NONE && ch->pcdata->stats[UNI_GEN] != 1 )
{
send_to_char( "First you need to create a tribe.\n\r", ch );
return;
}
if ( arg[0] == '\0' )
{
send_to_char( "Claw whom?\n\r", ch );
return;
}
if ( ( victim = get_char_room( ch, arg ) ) == NULL )
{
send_to_char( "They aren't here.\n\r", ch );
return;
}
if ( IS_NPC(victim) )
{
send_to_char( "Not on NPC's.\n\r", ch );
return;
}
if ( IS_IMMORTAL(victim) )
{
send_to_char( "Not on Immortal's.\n\r", ch );
return;
}
if ( ch == victim )
{
send_to_char( "You cannot claw yourself.\n\r", ch );
return;
}
if (IS_CLASS(victim, CLASS_MAGE))
{
send_to_char( "You cannot bite mages.\n\r", ch );
return;
}
if ( victim->level != LEVEL_AVATAR && !IS_IMMORTAL(victim) )
{
send_to_char( "You can only claw avatars.\n\r", ch );
return;
}
if (HAS_DELAY(victim) || HAS_DELAY(ch))
{
send_to_char( "Not with a wait timer...\n\r", ch );
return;
}
if (IS_CLASS(victim, CLASS_VAMPIRE) || IS_SET(victim->pcdata->stats[UNI_AFF], VAM_MORTAL))
{
send_to_char( "You are unable to create werevamps!\n\r", ch );
return;
}
if (IS_SWWF(victim))
{
send_to_char("Do I really have to tell you that you can't do this?\n\r",ch);
return;
}
if ( IS_CLASS(victim, CLASS_WEREWOLF) && victim->clan != CLAN_RONIN)
{
send_to_char( "But they are already a werewolf!\n\r", ch );
return;
}
if (IS_IMMUNE(victim,IMM_WEREWOLF))
{
send_to_char( "You cannot claw an unwilling person.\n\r", ch );
return;
}
if (!IS_VAMPAFF(ch,VAM_CLAWS))
{
send_to_char("First you better get your claws out!\n\r",ch);
return;
}
if (ch->exp < 1000000)
{
send_to_char("You cannot afford the 1000000 exp to pass on the gift.\n\r",ch);
return;
}
ch->exp = ch->exp - 1000000;
if (ch->pcdata->stats[UNI_CURRENT] < 1) ch->pcdata->stats[UNI_CURRENT] = 1;
else ch->pcdata->stats[UNI_CURRENT] += 1;
if (IS_SET(ch->special,SPC_SIRE)) REMOVE_BIT(ch->special,SPC_SIRE);
send_to_char( "You thrash the cowering form beneath you, raking your claws along it's soul.\n\r", ch );
send_to_char( "Then, in the final death throes, you chomp it's neck, tearing out it's essence.\n\r", ch );
send_to_char( "You breathe your Tribal strength into the bloody corpse.\n\r", ch );
send_to_char( "They are now forever submissive to your tribe!\n\r", ch );
send_to_char( "You feel your soul ripped asunder as the Garou Claws your very soul to shreds!!\n\r", victim );
send_to_char( "As it tears your throat out, and you begin to submit to death itself.\n\r", victim );
send_to_char( "You suddenly feel a strong, earthly essence overcome your soul.\n\r", victim );
send_to_char( "As the strength of the Garou begins to fill your veins, your mind is flooded \n\r", victim );
send_to_char( "with the sudden knowledge of Tribal power and everlasting loyalty to the Eldest.\n\r", victim );
act( "$n suddenly reaches out and claws $N to shreds!", ch, NULL, victim, TO_NOTVICT );
act( "$n then takes $N's throat in $s mouth, and tears it out!", ch, NULL, victim, TO_NOTVICT );
act( "$N goes into convulsions, then slowly steadies, then peers up at $n with adoration.", ch, NULL, victim, TO_NOTVICT );
victim->creature=CLASS_WEREWOLF;
send_to_char( "\n\rYou are now a werewolf.\n\r", victim );
if (IS_IMMORTAL(ch))
victim->pcdata->stats[UNI_GEN] = 3;
else
victim->pcdata->stats[UNI_GEN] = ch->pcdata->stats[UNI_GEN] + 1;
if (ch->pcdata->stats[UNI_GEN] == 1)
victim->lord = g_string_assign(victim->lord,ch->name->str);
else
{
sprintf(buf,"%s %s",ch->lord->str,ch->name->str);
victim->lord = g_string_assign(victim->lord,buf);
}
if (!IS_IMMORTAL(ch))
victim->clan= ch->clan;
else
victim->clan= CLAN_RONIN;
victim->pcdata->stats[UNI_AFF] = 0;
victim->pcdata->stats[UNI_CURRENT] = 0;
save_char_obj(ch);
save_char_obj(victim);
if (IS_IMMORTAL(ch))
victim->sect = SECT_INDEPENDENT;
else
victim->sect = ch->sect;
return;
}
void do_clanname( CHAR_DATA *ch, char *argument )
{
send_to_char( "Huh?\n\r", ch );
return;
}
void do_stake( CHAR_DATA *ch, char *argument )
{
CHAR_DATA *victim;
OBJ_DATA *stake;
char arg [MAX_INPUT_LENGTH];
int blood;
//Removed for now - Spiral
send_to_char("Nope, not in this life time.\n\r",ch);
return;
argument = one_argument( argument, arg );
if (IS_NPC( ch )) return;
if ( arg[0] == '\0' )
{
send_to_char( "Stake whom?\n\r", ch );
return;
}
if ( ( victim = get_char_room( ch, arg ) ) == NULL )
{
send_to_char( "They aren't here.\n\r", ch );
return;
}
stake = get_eq_char( ch, WEAR_HOLD );
if ( stake == NULL || stake->item_type != ITEM_STAKE )
{
stake = get_eq_char( ch, WEAR_WIELD );
if ( stake == NULL || stake->item_type != ITEM_STAKE )
{
send_to_char( "How can you stake someone down without holding a stake?\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( "You cannot stake yourself.\n\r", ch );
return;
}
if (!IS_CLASS(victim, CLASS_VAMPIRE))
{
send_to_char( "You can only stake vampires.\n\r", ch );
return;
}
if (victim->position > POS_MORTAL)
{
send_to_char( "You can only stake down a vampire who is mortally wounded.\n\r", ch );
return;
}
act("You plunge $p into $N's heart.", ch, stake, victim, TO_CHAR);
act("$n plunges $p into $N's heart.", ch, stake, victim, TO_NOTVICT);
send_to_char( "You feel a stake plunged through your heart.\n\r", victim );
if (IS_IMMUNE(victim,IMM_STAKE)) return;
/* Have to make sure they have enough blood to change back */
blood = victim->pcdata->condition[COND_THIRST];
victim->pcdata->condition[COND_THIRST] = 666;
/* To take care of vampires who have powers in affect. */
if (IS_VAMPAFF(victim,VAM_DISGUISED) ) power_mask(victim,victim,"self");
if (IS_IMMUNE(victim,IMM_SHIELDED) ) power_shield(victim,victim,argument);
if (IS_VAMPAFF(victim,VAM_FANGS) ) power_fangs(victim,victim,argument);
if (IS_VAMPAFF(victim,VAM_CLAWS) ) power_claws(victim,victim,argument);
if (IS_VAMPAFF(victim,VAM_NIGHTSIGHT) ) power_nightsight(victim,victim,argument);
if (IS_SET(victim->act,PLR_HOLYLIGHT) ) power_truesight(victim,victim,argument);
if (IS_VAMPAFF(victim,VAM_CHANGED) ) power_change(victim,victim,"human");
if (IS_POLYAFF(victim,POLY_SERPENT) ) power_serpent(victim,victim,argument);
victim->pcdata->stats[UNI_RAGE] = 0;
victim->pcdata->condition[COND_THIRST] = blood;
REMOVE_BIT(victim->creature, CLASS_VAMPIRE);
obj_from_char(stake);
obj_to_char(stake,victim);
ch->exp = ch->exp + 1000;
victim->home = 3001;
return;
}
void do_clandisc( CHAR_DATA *ch, char *argument )
{
char arg [MAX_INPUT_LENGTH];
char buf [MAX_STRING_LENGTH];
char buf2 [MAX_STRING_LENGTH];
char clan_list [MAX_STRING_LENGTH];
char buy_list [MAX_STRING_LENGTH];
int count;
int discipline;
bool fFound = FALSE;
bool fCanBuy = FALSE;
int lcount = 0;
int clancount = 0;
int clanmax = 10;
int ratemax = 10; //What the Hell is this??? - Spiral
int cost[MAX_DISCIPLINE];
argument = one_argument( argument, arg );
if (IS_NPC(ch)) return;
if ( !IS_CLASS(ch,CLASS_VAMPIRE) )
{
send_to_char( "Huh?\n\r", ch );
return;
}
if (ch->pcdata->stats[UNI_CURRENT] == -1)
{
for ( count = 0 ; count < MAX_DISCIPLINE ; count++ )
{
if ( get_disc(ch,count) > 0 )
ch->pcdata->inherited[count] = 1;
}
}
if (ch->pcdata->stats[UNI_GEN] >= 2)
{
clanmax = 12;
ratemax = 9;
}
if (ch->pcdata->stats[UNI_GEN] >= 3) ratemax = 8;
if (ch->pcdata->stats[UNI_GEN] >= 4)
{
clanmax = UMAX( 3, ( 14 - ch->pcdata->stats[UNI_GEN] ) );
ratemax = 6;
}
if (ch->pcdata->stats[UNI_GEN] >= 5) clanmax += 1;
// if (ch->pcdata->stats[UNI_GEN] >= 6) ratemax = 5;
// if (ch->pcdata->stats[UNI_GEN] >= 8) ratemax = 4;
if (ch->pcdata->stats[UNI_GEN] >= 7) ratemax = 5;
if (ch->pcdata->stats[UNI_GEN] >=10) ratemax = 4;
if (ch->pcdata->rank == AGE_ANCILLA ) clanmax += 1;
if (ch->pcdata->rank == AGE_ELDER ) clanmax += 2;
if (ch->pcdata->rank == AGE_METHUSELAH )
{
ratemax += 1;
clanmax += 3;
//extra Disc for those Meth Vamps
}
for ( count = 0 ; count < MAX_DISCIPLINE ; count++ )
{
if ( get_disc(ch,count) > 0 || IS_VAMPPASS(ch,count) )
clancount++;
}
str_cpy(buy_list,"");
for ( count = 0 ; count < MAX_DISCIPLINE ; count++ )
{
cost[count] = 0;
if ( IS_VAMPPASS(ch,count) )
cost[count] = ( get_disc(ch,count) >= ratemax ? 0 :
COST_DIS * get_disc(ch,count) ) ;
else if ( get_disc(ch, count) > 0 || clancount < clanmax )
cost[count] = ( get_disc(ch,count) >= ratemax ? 0 : COST_DIS
* (get_disc(ch,count) + 1) + COST_DIS);
if ( cost[count] != 0 && cost[count] <= ch->practice )
{
fCanBuy = TRUE;
sprintf(buf2," %s %d: %d\n\r", IS_VAMPPASS(ch,count) ?
discipline_table[count].name_caps :
discipline_table[count].name,
get_disc(ch,count) + 1, cost[count]);
strcat(buy_list, buf2);
}
}
if ( arg[0] == '\0' )
{
send_to_char("Current powers:\n\r",ch);
str_cpy(clan_list,"");
str_cpy(buf,"");
for ( count = 0 ; count < MAX_DISCIPLINE ; count++ )
{
str_cpy(buf2,"");
if ( get_disc(ch,count) > 0 && !IS_VAMPPASS(ch,count) )
{
sprintf(buf2,"{R%s {B[{W%3d{B]{x", discipline_table[count].name, get_disc(ch,count));
fFound = TRUE;
}
else if ( IS_VAMPPASS(ch,count) )
{
sprintf(buf2,"{R%s {B[{W%3d{B]{x", discipline_table[count].name_caps, get_disc(ch,count));
fFound = TRUE;
}
if (strcmp(buf2,""))
{
lcount += 1;
if ( lcount >= 3 )
{
strcat(clan_list," ");
strcat(clan_list, buf2);
strcat(clan_list, "\n\r");
send_to_char(clan_list, ch);
lcount = 0;
str_cpy(clan_list, "");
}
else
{
if ( lcount > 1 )
strcat(clan_list," ");
strcat(clan_list, buf2);
}
}
}
if (fFound)
{
strcat(buf,clan_list);
send_to_char(buf,ch);
}
else
send_to_char(" None",ch);
if (clancount <= clanmax)
{
if ( fCanBuy )
{
send_to_char("It will cost you in primal as "
"shown to train these disciplines:\n\r",ch);
send_to_char(buy_list,ch);
sprintf(buf,"You have {y%d{x primal.\n\r", ch->practice);
send_to_char(buf,ch);
}
}
return;
}
if ( (discipline = discipline_lookup(arg)) != -1 )
{
if ( cost[discipline] > ch->practice
|| cost[discipline] == 0
|| ( clancount >= clanmax
&& get_disc(ch,discipline) == 0 ) )
{
sprintf(buf,"Powers: %s\n\r", discipline_table[discipline].powers);
send_to_char(buf,ch);
return;
}
sprintf(buf,"You master the discipline of {R%s %d{x.\n\r",
discipline_table[discipline].name,
get_disc(ch,discipline) + 1);
send_to_char(buf, ch);
/*
clan_table_powerselect(ch,discipline_table[discipline].name);
*/
if (clancount < 3 )
ch->pcdata->inherited[discipline] = 1;
ch->pcdata->discipline[discipline]++;
ch->practice -= cost[discipline];
return;
}
else
send_to_char( "No such discipline.\n\r", ch );
return;
}
void do_garou( CHAR_DATA *ch, char *argument )
{
char arg [MAX_INPUT_LENGTH];
argument = one_argument( argument, arg );
if (IS_NPC(ch)) return;
if (IS_IMMUNE(ch, IMM_WEREWOLF))
{
send_to_char("You will now allow werewolves to claw you.\n\r",ch);
REMOVE_BIT(ch->immune, IMM_WEREWOLF);
return;
}
send_to_char("You will no longer allow werewolves to claw you.\n\r",ch);
SET_BIT(ch->immune, IMM_WEREWOLF);
return;
}
void do_vampire( CHAR_DATA *ch, char *argument )
{
char arg [MAX_INPUT_LENGTH];
argument = one_argument( argument, arg );
if (IS_NPC(ch)) return;
if (IS_IMMUNE(ch, IMM_VAMPIRE))
{
send_to_char("You will now allow vampires to bite you.\n\r",ch);
REMOVE_BIT(ch->immune, IMM_VAMPIRE);
return;
}
send_to_char("You will no longer allow vampires to bite you.\n\r",ch);
SET_BIT(ch->immune, IMM_VAMPIRE);
return;
}
void do_introduce( CHAR_DATA *ch, char *argument )
{
char arg [MAX_INPUT_LENGTH];
argument = one_argument( argument, arg );
if (IS_NPC(ch)) return;
if (IS_CLASS(ch, CLASS_VAMPIRE) && ch->pcdata->stats[UNI_GEN] > 0 && ch->pcdata->stats[UNI_GEN] < 8)
do_tradition(ch,ch->lord->str);
else if (IS_CLASS(ch, CLASS_WEREWOLF) && IS_HERO(ch))
//&& ch->pcdata->stats[UNI_GEN] > 0 && ch->pcdata->stats[UNI_GEN] < 5)
do_bloodline(ch,ch->lord->str);
else send_to_char("Huh?\n\r",ch);
return;
}
void do_bloodline( 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];
char buf2 [MAX_STRING_LENGTH];
argument = one_argument( argument, arg1 );
argument = one_argument( argument, arg2 );
argument = one_argument( argument, arg3 );
if (IS_NPC(ch)) return;
if (arg1 != '\0') arg1[0] = UPPER(arg1[0]);
if (arg2 != '\0') arg2[0] = UPPER(arg2[0]);
if (arg3 != '\0') arg3[0] = UPPER(arg3[0]);
if ( ch->clan == CLAN_NONE && ch->pcdata->stats[UNI_GEN] != 1 )
{
str_cpy(buf,"In the name of Gaia, I announce my Garou heritage.");
do_say(ch,buf);
sprintf(buf,"My name is %s, I am a Ronin of no tribe.", ch->name->str);
do_say(ch,buf);
return;
}
str_cpy(buf,"In the name of Gaia, I announce my Garou heritage.");
do_say(ch,buf);
if (ch->pcdata->stats[UNI_GEN] != 1)
{
if (ch->pcdata->stats[UNI_GEN] >= 4) sprintf(buf2,"%s",arg3);
else if (ch->pcdata->stats[UNI_GEN] == 3) sprintf(buf2,"%s",arg2);
else if (ch->pcdata->stats[UNI_GEN] == 2) sprintf(buf2,"%s",arg1);
if (ch->pcdata->stats[UNI_GEN] == 1)
sprintf(buf,"My name is %s, chosen Champion of Gaia.", ch->name->str);
if (ch->pcdata->stats[UNI_GEN] == 2)
sprintf(buf,"My name is %s, Chieftain of the %s tribe, pup of %s.", ch->name->str,iclan_table[ch->clan].pretty_name,buf2);
else
sprintf(buf,"My name is %s, of the %s tribe, pup of %s.", ch->name->str,iclan_table[ch->clan].pretty_name,buf2);
do_say(ch,buf);
}
if ( arg3[0] != '\0' )
{
sprintf(buf,"My name is %s, of the %s tribe, pup of %s.",
arg3,iclan_table[ch->clan].pretty_name,arg2);
do_say(ch,buf);
}
if ( arg2[0] != '\0' )
{
if ( arg1[0] != '\0' )
sprintf(buf,"My name is %s, Chieftain of the %s tribe, pup of %s.",arg2,iclan_table[ch->clan].pretty_name,arg1);
else
sprintf(buf,"My name is %s, of the %s tribe, pup of %s.",arg2,iclan_table[ch->clan].pretty_name,arg1);
do_say(ch,buf);
}
if ( ch->pcdata->stats[UNI_GEN] == 1 )
sprintf(buf,"My name is %s, chosen Champion of Gaia.", ch->name->str);
else
sprintf(buf,"My name is %s, chosen Champion of Gaia.", arg1);
do_say(ch,buf);
return;
}
void do_tradition( CHAR_DATA *ch, char *argument )
{
char arg1 [MAX_INPUT_LENGTH];
char arg2 [MAX_INPUT_LENGTH];
char arg3 [MAX_INPUT_LENGTH];
char arg4 [MAX_INPUT_LENGTH];
char arg5 [MAX_INPUT_LENGTH];
char arg6 [MAX_INPUT_LENGTH];
char buf [MAX_INPUT_LENGTH];
char buf2 [MAX_INPUT_LENGTH];
char buf3 [MAX_INPUT_LENGTH];
argument = one_argument( argument, arg1 );
argument = one_argument( argument, arg2 );
argument = one_argument( argument, arg3 );
argument = one_argument( argument, arg4 );
argument = one_argument( argument, arg5 );
argument = one_argument( argument, arg6 );
if (IS_NPC(ch)) return;
if (arg1 != '\0') arg1[0] = UPPER(arg1[0]);
if (arg2 != '\0') arg2[0] = UPPER(arg2[0]);
if (arg3 != '\0') arg3[0] = UPPER(arg3[0]);
if (arg4 != '\0') arg4[0] = UPPER(arg4[0]);
if (arg5 != '\0') arg5[0] = UPPER(arg5[0]);
if (arg6 != '\0') arg6[0] = UPPER(arg6[0]);
/* if (!str_cmp(arg1,"kavir")) str_cpy(arg1,"KaVir"); */
if (!IS_CLASS(ch, CLASS_VAMPIRE) || (ch->pcdata->stats[UNI_GEN] < 1) || (ch->pcdata->stats[UNI_GEN] > 7))
{
send_to_char("Huh?\n\r",ch);
return;
}
/*
if ( !str_cmp(ch->clan,"") && ch->pcdata->stats[UNI_GEN] == 2 )
{
send_to_char( "Not until you've created your own clan!\n\r", ch );
return;
}
*/
if (ch->pcdata->stats[UNI_GEN] == 2) sprintf(buf3,"Antediluvian");
else if (ch->pcdata->rank == AGE_NEONATE) sprintf(buf3,"Neonate");
else if (ch->pcdata->rank == AGE_ANCILLA) sprintf(buf3,"Ancilla");
else if (ch->pcdata->rank == AGE_ELDER) sprintf(buf3,"Elder");
else if (ch->pcdata->rank == AGE_METHUSELAH) sprintf(buf3,"Methuselah");
else sprintf(buf3,"Childe");
if (ch->pcdata->stats[UNI_GEN] == 7) sprintf(buf2,"Seventh");
else if (ch->pcdata->stats[UNI_GEN] == 6) sprintf(buf2,"Sixth");
else if (ch->pcdata->stats[UNI_GEN] == 5) sprintf(buf2,"Fifth");
else if (ch->pcdata->stats[UNI_GEN] == 4) sprintf(buf2,"Fourth");
else if (ch->pcdata->stats[UNI_GEN] == 3) sprintf(buf2,"Third");
else if (ch->pcdata->stats[UNI_GEN] == 2) sprintf(buf2,"Second");
if (ch->pcdata->stats[UNI_GEN] == 1)
sprintf(buf,"As is the tradition, I recite the lineage of %s, Sire of all Kindred.",ch->name->str);
else
sprintf(buf,"As is the tradition, I recite the lineage of %s, %s of the %s Generation.",ch->name->str,buf3,buf2);
do_say(ch,buf);
if ( ch->pcdata->stats[UNI_GEN] != 1 )
{
if (ch->pcdata->stats[UNI_GEN] == 7) sprintf(buf2,"%s",arg6);
else if (ch->pcdata->stats[UNI_GEN] == 6) sprintf(buf2,"%s",arg5);
else if (ch->pcdata->stats[UNI_GEN] == 5) sprintf(buf2,"%s",arg4);
else if (ch->pcdata->stats[UNI_GEN] == 4) sprintf(buf2,"%s",arg3);
else if (ch->pcdata->stats[UNI_GEN] == 3) sprintf(buf2,"%s",arg2);
else if (ch->pcdata->stats[UNI_GEN] == 2) sprintf(buf2,"%s",arg1);
if (IS_SET(ch->special, SPC_ANARCH) || ch->clan == CLAN_NONE)
sprintf(buf,"My name is %s. I am of no clan. My sire is %s.", ch->name->str,buf2);
else if (ch->pcdata->stats[UNI_GEN] == 2)
sprintf(buf,"My name is %s. I founded %s. My sire is %s.", ch->name->str,iclan_table[ch->clan].pretty_name,buf2);
else
sprintf(buf,"My name is %s. I am of %s. My sire is %s.", ch->name->str,iclan_table[ch->clan].pretty_name,buf2);
do_say(ch,buf);
}
if ( arg6[0] != '\0' )
{
sprintf(buf,"My name is %s. My sire is %s.",
arg6,arg5);
do_say(ch,buf);
}
if ( arg5[0] != '\0' )
{
sprintf(buf,"My name is %s. My sire is %s.",
arg5,arg4);
do_say(ch,buf);
}
if ( arg4[0] != '\0' )
{
sprintf(buf,"My name is %s. My sire is %s.",
arg4,arg3);
do_say(ch,buf);
}
if ( arg3[0] != '\0' )
{
sprintf(buf,"My name is %s. My sire is %s.",
arg3,arg2);
do_say(ch,buf);
}
if ( arg2[0] != '\0' )
{
sprintf(buf,"My name is %s. My sire is %s.",arg2,arg1);
do_say(ch,buf);
}
if ( ch->pcdata->stats[UNI_GEN] == 1 )
sprintf(buf,"My name is %s. All Kindred are my childer.",ch->name->str);
else
sprintf(buf,"My name is %s. All Kindred are my childer.",arg1);
do_say(ch,buf);
if ( ch->pcdata->stats[UNI_GEN] == 7 ) sprintf(buf,"My name is %s, childe of %s, childe of %s, childe of %s, childe of %s, childe of %s, childe of %s. Recognize my lineage.",ch->name->str,arg6,arg5,arg4,arg3,arg2,arg1);
if ( ch->pcdata->stats[UNI_GEN] == 6 ) sprintf(buf,"My name is %s, childe of %s, childe of %s, childe of %s, childe of %s, childe of %s. Recognize my lineage.",ch->name->str,arg5,arg4,arg3,arg2,arg1);
if ( ch->pcdata->stats[UNI_GEN] == 5 ) sprintf(buf,"My name is %s, childe of %s, childe of %s, childe of %s, childe of %s. Recognize my lineage.",ch->name->str,arg4,arg3,arg2,arg1);
if ( ch->pcdata->stats[UNI_GEN] == 4 ) sprintf(buf,"My name is %s, childe of %s, childe of %s, childe of %s. Recognize my lineage.",ch->name->str,arg3,arg2,arg1);
if ( ch->pcdata->stats[UNI_GEN] == 3 ) sprintf(buf,"My name is %s, childe of %s, childe of %s. Recognize my lineage.",ch->name->str,arg2,arg1);
if ( ch->pcdata->stats[UNI_GEN] == 2 ) sprintf(buf,"My name is %s, childe of %s. Recognize my lineage.",ch->name->str,arg1);
if ( ch->pcdata->stats[UNI_GEN] == 1 ) sprintf(buf,"My name is %s. Recognize my lineage.",ch->name->str);
do_say(ch,buf);
return;
}
void do_mortalvamp( CHAR_DATA *ch, char *argument )
{
char arg [MAX_INPUT_LENGTH];
int blood;
argument = one_argument( argument, arg );
if (IS_NPC(ch)) return;
if (IS_CLASS(ch,CLASS_VAMPIRE) )
{
/* Have to make sure they have enough blood to change back */
blood = ch->pcdata->condition[COND_THIRST];
ch->pcdata->condition[COND_THIRST] = 666;
/* Remove physical vampire attributes when you take mortal form */
if (IS_VAMPAFF(ch,VAM_DISGUISED) ) power_mask(ch,ch,"self");
if (IS_IMMUNE(ch,IMM_SHIELDED) ) power_shield(ch,ch,argument);
if (IS_VAMPAFF(ch,VAM_FANGS) ) power_fangs(ch,ch,argument);
if (IS_VAMPAFF(ch,VAM_CLAWS) ) power_claws(ch,ch,argument);
if (IS_VAMPAFF(ch,VAM_NIGHTSIGHT) ) power_nightsight(ch,ch,argument);
if (IS_SET(ch->act,PLR_HOLYLIGHT) ) power_truesight(ch,ch,argument);
if (IS_VAMPAFF(ch,VAM_CHANGED) ) power_change(ch,ch,"human");
if (IS_POLYAFF(ch,POLY_SERPENT) ) power_serpent(ch,ch,argument);
ch->pcdata->stats[UNI_RAGE] = 0;
ch->pcdata->condition[COND_THIRST] = blood;
send_to_char("You loose your vampire powers.\n\r",ch);
REMOVE_BIT(ch->creature, CLASS_VAMPIRE);
SET_BIT(ch->pcdata->stats[UNI_AFF], VAM_MORTAL);
return;
}
send_to_char("You regain your vampire powers.\n\r",ch);
ch->creature= CLASS_VAMPIRE;
REMOVE_BIT(ch->pcdata->stats[UNI_AFF], VAM_MORTAL);
return;
}
void do_regenerate( CHAR_DATA *ch, char *argument )
{
char arg [MAX_INPUT_LENGTH];
double min = 50;
double max = 150;
argument = one_argument( argument, arg );
if (IS_NPC(ch)) return;
if (!IS_CLASS(ch, CLASS_VAMPIRE))
{
send_to_char("Huh?\n\r",ch);
return;
}
if (ch->pcdata->stats[UNI_RAGE] > 0)
{
send_to_char("You cannot control your regenerative powers while the beast is so strong.\n\r",ch);
return;
}
if ( ch->position == POS_FIGHTING )
{
send_to_char("You cannot regenerate while fighting.\n\r",ch);
return;
}
if ( ch->hit >= ch->max_hit && ch->mana >= ch->max_mana && ch->move >= ch->max_move )
{
send_to_char("But you are already completely regenerated!\n\r",ch);
return;
}
if ( ch->pcdata->condition[COND_THIRST] < 5 )
{
send_to_char("You have insufficient blood.\n\r",ch);
return;
}
if (IS_AFFECTED(ch,AFF_AGGDAM))
{
min = 25;
max = 50;
}
if ( IS_ITEMAFF(ch, ITEMA_REGENERATE) )
{
spell_clot(skill_lookup("clot"), AUTO_REGEN, ch, ch);
spell_mend(skill_lookup("mend"), AUTO_REGEN, ch, ch);
if (number_percent() < 50)
{
min *= 1.20;
max *= 1.20; /* 50% of a 20% */
}
else if (number_percent() < 50)
{
min *= 1.40;
max *= 1.40; /* 25% of a 40% */
}
else if (number_percent() < 50)
{
min *= 1.80;
max *= 1.80; /* 12.5% of a 80% */
}
else if (number_percent() < 50)
{
min *= 2.60;
max *= 2.60; /* 6.25% of a 160% */
}
else if (number_percent() < 50)
{
min *= 5;
max *= 5; /* 3.125% of a 400% */
}
}
ch->pcdata->condition[COND_THIRST] -= number_range(4,10);
if ( ch->hit >= ch->max_hit && ch->mana >= ch->max_mana && ch->move >= ch->max_move )
{
send_to_char("Your body has completely regenerated.\n\r",ch);
act("$n's body completely regenerates itself.",ch,NULL,NULL,TO_ROOM);
}
else
send_to_char("Your body slowly regenerates itself.\n\r",ch);
if (ch->hit < 1 )
{
ch->hit = ch->hit + 1;
update_pos(ch);
WAIT_STATE( ch, 24 );
}
else
{
min += 2 * (10 - ch->pcdata->stats[UNI_GEN]);
max += 2 * (20 - (ch->pcdata->stats[UNI_GEN] * 2));
ch->hit = UMIN(ch->hit + number_range((int)min,(int)max), ch->max_hit);
ch->mana = UMIN(ch->mana + number_range((int)min,(int)max), ch->max_mana);
ch->move = UMIN(ch->move + number_range((int)min,(int)max), ch->max_move);
update_pos(ch);
}
return;
}
void werewolf_regen( CHAR_DATA *ch )
{
double min = 50;
double max = 100;
if (IS_NPC(ch)) return;
if (IS_AFFECTED(ch,AFF_AGGDAM))
{
min = 25;
max = 50;
}
if ( IS_ITEMAFF(ch, ITEMA_REGENERATE) )
{
spell_clot(skill_lookup("clot"), AUTO_REGEN, ch, ch);
spell_mend(skill_lookup("mend"), AUTO_REGEN, ch, ch);
if (number_percent() < 50)
{
min *= 1.20;
max *= 1.20; /* 50% of a 20% */
}
else if (number_percent() < 50)
{
min *= 1.40;
max *= 1.40; /* 25% of a 40% */
}
else if (number_percent() < 50)
{
min *= 1.80;
max *= 1.80; /* 12.5% of a 80% */
}
else if (number_percent() < 50)
{
min *= 2.60;
max *= 2.60; /* 6.25% of a 160% */
}
else if (number_percent() < 50)
{
min *= 5;
max *= 5; /* 3.125% of a 400% */
}
}
if (ch->hit < 10 )
{
ch->hit = ch->hit + 1;
update_pos(ch);
}
else
{
min += 10;
max += 20;
ch->hit = UMIN(ch->hit + number_range((int)min,(int)max), ch->max_hit);
ch->mana = UMIN(ch->mana + number_range((int)min,(int)max), ch->max_mana);
ch->move = UMIN(ch->move + number_range((int)min,(int)max), ch->max_move);
if ( ch->hit >= ch->max_hit && ch->mana >= ch->max_mana && ch->move >= ch->max_move )
send_to_char("Your body has completely regenerated itself.\n\r",ch);
}
return;
}
void reg_mend( CHAR_DATA *ch )
{
int ribs = 0;
int teeth = 0;
if (IS_BODY(ch,BROKEN_RIBS_1 )) ribs += 1;
if (IS_BODY(ch,BROKEN_RIBS_2 )) ribs += 2;
if (IS_BODY(ch,BROKEN_RIBS_4 )) ribs += 4;
if (IS_BODY(ch,BROKEN_RIBS_8 )) ribs += 8;
if (IS_BODY(ch,BROKEN_RIBS_16)) ribs += 16;
if (IS_HEAD(ch,LOST_TOOTH_1 )) teeth += 1;
if (IS_HEAD(ch,LOST_TOOTH_2 )) teeth += 2;
if (IS_HEAD(ch,LOST_TOOTH_4 )) teeth += 4;
if (IS_HEAD(ch,LOST_TOOTH_8 )) teeth += 8;
if (IS_HEAD(ch,LOST_TOOTH_16 )) teeth += 16;
if (ribs > 0)
{
if (IS_BODY(ch,BROKEN_RIBS_1 ))
REMOVE_BIT(ch->loc_hp[1],BROKEN_RIBS_1);
if (IS_BODY(ch,BROKEN_RIBS_2 ))
REMOVE_BIT(ch->loc_hp[1],BROKEN_RIBS_2);
if (IS_BODY(ch,BROKEN_RIBS_4 ))
REMOVE_BIT(ch->loc_hp[1],BROKEN_RIBS_4);
if (IS_BODY(ch,BROKEN_RIBS_8 ))
REMOVE_BIT(ch->loc_hp[1],BROKEN_RIBS_8);
if (IS_BODY(ch,BROKEN_RIBS_16))
REMOVE_BIT(ch->loc_hp[1],BROKEN_RIBS_16);
ribs -= 1;
if (ribs >= 16) {ribs -= 16;
SET_BIT(ch->loc_hp[1],BROKEN_RIBS_16);}
if (ribs >= 8 ) {ribs -= 8;
SET_BIT(ch->loc_hp[1],BROKEN_RIBS_8);}
if (ribs >= 4 ) {ribs -= 4;
SET_BIT(ch->loc_hp[1],BROKEN_RIBS_4);}
if (ribs >= 2 ) {ribs -= 2;
SET_BIT(ch->loc_hp[1],BROKEN_RIBS_2);}
if (ribs >= 1 ) {ribs -= 1;
SET_BIT(ch->loc_hp[1],BROKEN_RIBS_1);}
act("One of $n's ribs snap back into place.",ch,NULL,NULL,TO_ROOM);
act("One of your ribs snap back into place.",ch,NULL,NULL,TO_CHAR);
}
else if (IS_HEAD(ch,LOST_EYE_L))
{
act("An eyeball appears in $n's left eye socket.",ch,NULL,NULL,TO_ROOM);
act("An eyeball appears in your left eye socket.",ch,NULL,NULL,TO_CHAR);
REMOVE_BIT(ch->loc_hp[LOC_HEAD],LOST_EYE_L);
}
else if (IS_HEAD(ch,LOST_EYE_R))
{
act("An eyeball appears in $n's right eye socket.",ch,NULL,NULL,TO_ROOM);
act("An eyeball appears in your right eye socket.",ch,NULL,NULL,TO_CHAR);
REMOVE_BIT(ch->loc_hp[LOC_HEAD],LOST_EYE_R);
}
else if (IS_HEAD(ch,LOST_EAR_L))
{
act("An ear grows on the left side of $n's head.",ch,NULL,NULL,TO_ROOM);
act("An ear grows on the left side of your head.",ch,NULL,NULL,TO_CHAR);
REMOVE_BIT(ch->loc_hp[LOC_HEAD],LOST_EAR_L);
}
else if (IS_HEAD(ch,LOST_EAR_R))
{
act("An ear grows on the right side of $n's head.",ch,NULL,NULL,TO_ROOM);
act("An ear grows on the right side of your head.",ch,NULL,NULL,TO_CHAR);
REMOVE_BIT(ch->loc_hp[LOC_HEAD],LOST_EAR_R);
}
else if (IS_HEAD(ch,LOST_NOSE))
{
act("A nose grows on the front of $n's face.",ch,NULL,NULL,TO_ROOM);
act("A nose grows on the front of your face.",ch,NULL,NULL,TO_CHAR);
REMOVE_BIT(ch->loc_hp[LOC_HEAD],LOST_NOSE);
REMOVE_BIT(ch->loc_hp[LOC_HEAD],BROKEN_NOSE);
}
else if (teeth > 0)
{
if (IS_HEAD(ch,LOST_TOOTH_1 ))
REMOVE_BIT(ch->loc_hp[LOC_HEAD],LOST_TOOTH_1);
if (IS_HEAD(ch,LOST_TOOTH_2 ))
REMOVE_BIT(ch->loc_hp[LOC_HEAD],LOST_TOOTH_2);
if (IS_HEAD(ch,LOST_TOOTH_4 ))
REMOVE_BIT(ch->loc_hp[LOC_HEAD],LOST_TOOTH_4);
if (IS_HEAD(ch,LOST_TOOTH_8 ))
REMOVE_BIT(ch->loc_hp[LOC_HEAD],LOST_TOOTH_8);
if (IS_HEAD(ch,LOST_TOOTH_16))
REMOVE_BIT(ch->loc_hp[LOC_HEAD],LOST_TOOTH_16);
teeth -= 1;
if (teeth >= 16) {teeth -= 16;
SET_BIT(ch->loc_hp[LOC_HEAD],LOST_TOOTH_16);}
if (teeth >= 8 ) {teeth -= 8;
SET_BIT(ch->loc_hp[LOC_HEAD],LOST_TOOTH_8);}
if (teeth >= 4 ) {teeth -= 4;
SET_BIT(ch->loc_hp[LOC_HEAD],LOST_TOOTH_4);}
if (teeth >= 2 ) {teeth -= 2;
SET_BIT(ch->loc_hp[LOC_HEAD],LOST_TOOTH_2);}
if (teeth >= 1 ) {teeth -= 1;
SET_BIT(ch->loc_hp[LOC_HEAD],LOST_TOOTH_1);}
act("A missing tooth grows in your mouth.",ch,NULL,NULL,TO_CHAR);
act("A missing tooth grows in $n's mouth.",ch,NULL,NULL,TO_ROOM);
}
else if (IS_HEAD(ch,BROKEN_NOSE))
{
act("$n's nose snaps back into place.",ch,NULL,NULL,TO_ROOM);
act("Your nose snaps back into place.",ch,NULL,NULL,TO_CHAR);
REMOVE_BIT(ch->loc_hp[LOC_HEAD],BROKEN_NOSE);
}
else if (IS_HEAD(ch,BROKEN_JAW))
{
act("$n's jaw snaps back into place.",ch,NULL,NULL,TO_ROOM);
act("Your jaw snaps back into place.",ch,NULL,NULL,TO_CHAR);
REMOVE_BIT(ch->loc_hp[LOC_HEAD],BROKEN_JAW);
}
else if (IS_HEAD(ch,BROKEN_SKULL))
{
act("$n's bloody skull knits itself back together.",ch,NULL,NULL,TO_ROOM);
act("Your bloody skull knits itself back together.",ch,NULL,NULL,TO_CHAR);
REMOVE_BIT(ch->loc_hp[LOC_HEAD],BROKEN_SKULL);
}
else if (IS_BODY(ch,BROKEN_SPINE))
{
act("$n's spine knits itself back together.",ch,NULL,NULL,TO_ROOM);
act("Your spine knits itself back together.",ch,NULL,NULL,TO_CHAR);
REMOVE_BIT(ch->loc_hp[LOC_BODY],BROKEN_SPINE);
}
else if (IS_BODY(ch,BROKEN_NECK))
{
act("$n's neck snaps back into place.",ch,NULL,NULL,TO_ROOM);
act("Your neck snaps back into place.",ch,NULL,NULL,TO_CHAR);
REMOVE_BIT(ch->loc_hp[LOC_BODY],BROKEN_NECK);
}
else if (IS_ARM_L(ch,LOST_ARM))
{
act("An arm grows from the bloody stump of $n's left shoulder.",ch,NULL,NULL,TO_ROOM);
act("An arm grows from the bloody stump of your left shoulder.",ch,NULL,NULL,TO_CHAR);
REMOVE_BIT(ch->loc_hp[LOC_ARM_L],LOST_ARM);
REMOVE_BIT(ch->loc_hp[LOC_ARM_L],BROKEN_ARM);
SET_BIT(ch->loc_hp[LOC_ARM_L],LOST_HAND);
}
else if (IS_ARM_R(ch,LOST_ARM))
{
act("An arm grows from the bloody stump of $n's right shoulder.",ch,NULL,NULL,TO_ROOM);
act("An arm grows from the bloody stump of your right shoulder.",ch,NULL,NULL,TO_CHAR);
REMOVE_BIT(ch->loc_hp[LOC_ARM_R],LOST_ARM);
REMOVE_BIT(ch->loc_hp[LOC_ARM_R],BROKEN_ARM);
SET_BIT(ch->loc_hp[LOC_ARM_R],LOST_HAND);
}
else if (IS_LEG_L(ch,LOST_LEG))
{
act("A leg grows from the bloody stump of $n's left hip.",ch,NULL,NULL,TO_ROOM);
act("A leg grows from the bloody stump of your left hip.",ch,NULL,NULL,TO_CHAR);
REMOVE_BIT(ch->loc_hp[LOC_LEG_L],LOST_LEG);
REMOVE_BIT(ch->loc_hp[LOC_LEG_L],BROKEN_LEG);
SET_BIT(ch->loc_hp[LOC_LEG_L],LOST_FOOT);
}
else if (IS_LEG_R(ch,LOST_LEG))
{
act("A leg grows from the bloody stump of $n's right hip.",ch,NULL,NULL,TO_ROOM);
act("A leg grows from the bloody stump of your right hip.",ch,NULL,NULL,TO_CHAR);
REMOVE_BIT(ch->loc_hp[LOC_LEG_R],LOST_LEG);
REMOVE_BIT(ch->loc_hp[LOC_LEG_R],BROKEN_LEG);
SET_BIT(ch->loc_hp[LOC_LEG_R],LOST_FOOT);
}
else if (IS_ARM_L(ch,BROKEN_ARM))
{
act("$n's left arm snaps back into place.",ch,NULL,NULL,TO_ROOM);
act("Your left arm snaps back into place.",ch,NULL,NULL,TO_CHAR);
REMOVE_BIT(ch->loc_hp[LOC_ARM_L],BROKEN_ARM);
}
else if (IS_ARM_R(ch,BROKEN_ARM))
{
act("$n's right arm snaps back into place.",ch,NULL,NULL,TO_ROOM);
act("Your right arm snaps back into place.",ch,NULL,NULL,TO_CHAR);
REMOVE_BIT(ch->loc_hp[LOC_ARM_R],BROKEN_ARM);
}
else if (IS_LEG_L(ch,BROKEN_LEG))
{
act("$n's left leg snaps back into place.",ch,NULL,NULL,TO_ROOM);
act("Your left leg snaps back into place.",ch,NULL,NULL,TO_CHAR);
REMOVE_BIT(ch->loc_hp[LOC_LEG_L],BROKEN_LEG);
}
else if (IS_LEG_R(ch,BROKEN_LEG))
{
act("$n's right leg snaps back into place.",ch,NULL,NULL,TO_ROOM);
act("Your right leg snaps back into place.",ch,NULL,NULL,TO_CHAR);
REMOVE_BIT(ch->loc_hp[LOC_LEG_R],BROKEN_LEG);
}
else if (IS_ARM_L(ch,LOST_HAND))
{
act("A hand grows from the bloody stump of $n's left wrist.",ch,NULL,NULL,TO_ROOM);
act("A hand grows from the bloody stump of your left wrist.",ch,NULL,NULL,TO_CHAR);
REMOVE_BIT(ch->loc_hp[LOC_ARM_L],LOST_HAND);
SET_BIT(ch->loc_hp[LOC_ARM_L],LOST_THUMB);
SET_BIT(ch->loc_hp[LOC_ARM_L],LOST_FINGER_I);
SET_BIT(ch->loc_hp[LOC_ARM_L],LOST_FINGER_M);
SET_BIT(ch->loc_hp[LOC_ARM_L],LOST_FINGER_R);
SET_BIT(ch->loc_hp[LOC_ARM_L],LOST_FINGER_L);
}
else if (IS_ARM_R(ch,LOST_HAND))
{
act("A hand grows from the bloody stump of $n's right wrist.",ch,NULL,NULL,TO_ROOM);
act("A hand grows from the bloody stump of your right wrist.",ch,NULL,NULL,TO_CHAR);
REMOVE_BIT(ch->loc_hp[LOC_ARM_R],LOST_HAND);
SET_BIT(ch->loc_hp[LOC_ARM_R],LOST_THUMB);
SET_BIT(ch->loc_hp[LOC_ARM_R],LOST_FINGER_I);
SET_BIT(ch->loc_hp[LOC_ARM_R],LOST_FINGER_M);
SET_BIT(ch->loc_hp[LOC_ARM_R],LOST_FINGER_R);
SET_BIT(ch->loc_hp[LOC_ARM_R],LOST_FINGER_L);
}
else if (IS_LEG_L(ch,LOST_FOOT))
{
act("A foot grows from the bloody stump of $n's left ankle.",ch,NULL,NULL,TO_ROOM);
act("A foot grows from the bloody stump of your left ankle.",ch,NULL,NULL,TO_CHAR);
REMOVE_BIT(ch->loc_hp[LOC_LEG_L],LOST_FOOT);
}
else if (IS_LEG_R(ch,LOST_FOOT))
{
act("A foot grows from the bloody stump of $n's right ankle.",ch,NULL,NULL,TO_ROOM);
act("A foot grows from the bloody stump of your right ankle.",ch,NULL,NULL,TO_CHAR);
REMOVE_BIT(ch->loc_hp[LOC_LEG_R],LOST_FOOT);
}
else if (IS_ARM_L(ch,LOST_THUMB))
{
act("A thumb slides out of $n's bloody left hand.",ch,NULL,NULL,TO_ROOM);
act("A thumb slides out of your bloody left hand.",ch,NULL,NULL,TO_CHAR);
REMOVE_BIT(ch->loc_hp[LOC_ARM_L],LOST_THUMB);
REMOVE_BIT(ch->loc_hp[LOC_ARM_L],BROKEN_THUMB);
}
else if (IS_ARM_L(ch,BROKEN_THUMB))
{
act("$n's left thumb snaps back into place.",ch,NULL,NULL,TO_ROOM);
act("Your left thumb snaps back into place.",ch,NULL,NULL,TO_CHAR);
REMOVE_BIT(ch->loc_hp[LOC_ARM_L],BROKEN_THUMB);
}
else if (IS_ARM_L(ch,LOST_FINGER_I))
{
act("An index finger slides out of $n's bloody left hand.",ch,NULL,NULL,TO_ROOM);
act("An index finger slides out of your bloody left hand.",ch,NULL,NULL,TO_CHAR);
REMOVE_BIT(ch->loc_hp[LOC_ARM_L],LOST_FINGER_I);
REMOVE_BIT(ch->loc_hp[LOC_ARM_L],BROKEN_FINGER_I);
}
else if (IS_ARM_L(ch,BROKEN_FINGER_I))
{
act("$n's left index finger snaps back into place.",ch,NULL,NULL,TO_ROOM);
act("Your left index finger snaps back into place.",ch,NULL,NULL,TO_CHAR);
REMOVE_BIT(ch->loc_hp[LOC_ARM_L],BROKEN_FINGER_I);
}
else if (IS_ARM_L(ch,LOST_FINGER_M))
{
act("A middle finger slides out of $n's bloody left hand.",ch,NULL,NULL,TO_ROOM);
act("A middle finger slides out of your bloody left hand.",ch,NULL,NULL,TO_CHAR);
REMOVE_BIT(ch->loc_hp[LOC_ARM_L],LOST_FINGER_M);
REMOVE_BIT(ch->loc_hp[LOC_ARM_L],BROKEN_FINGER_M);
}
else if (IS_ARM_L(ch,BROKEN_FINGER_M))
{
act("$n's left middle finger snaps back into place.",ch,NULL,NULL,TO_ROOM);
act("Your left middle finger snaps back into place.",ch,NULL,NULL,TO_CHAR);
REMOVE_BIT(ch->loc_hp[LOC_ARM_L],BROKEN_FINGER_M);
}
else if (IS_ARM_L(ch,LOST_FINGER_R))
{
act("A ring finger slides out of $n's bloody left hand.",ch,NULL,NULL,TO_ROOM);
act("A ring finger slides out of your bloody left hand.",ch,NULL,NULL,TO_CHAR);
REMOVE_BIT(ch->loc_hp[LOC_ARM_L],LOST_FINGER_R);
REMOVE_BIT(ch->loc_hp[LOC_ARM_L],BROKEN_FINGER_R);
}
else if (IS_ARM_L(ch,BROKEN_FINGER_R))
{
act("$n's left ring finger snaps back into place.",ch,NULL,NULL,TO_ROOM);
act("Your left ring finger snaps back into place.",ch,NULL,NULL,TO_CHAR);
REMOVE_BIT(ch->loc_hp[LOC_ARM_L],BROKEN_FINGER_R);
}
else if (IS_ARM_L(ch,LOST_FINGER_L))
{
act("A little finger slides out of $n's bloody left hand.",ch,NULL,NULL,TO_ROOM);
act("A little finger slides out of your bloody left hand.",ch,NULL,NULL,TO_CHAR);
REMOVE_BIT(ch->loc_hp[LOC_ARM_L],LOST_FINGER_L);
REMOVE_BIT(ch->loc_hp[LOC_ARM_L],BROKEN_FINGER_L);
}
else if (IS_ARM_L(ch,BROKEN_FINGER_L))
{
act("$n's left little finger snaps back into place.",ch,NULL,NULL,TO_ROOM);
act("Your left little finger snaps back into place.",ch,NULL,NULL,TO_CHAR);
REMOVE_BIT(ch->loc_hp[LOC_ARM_L],BROKEN_FINGER_L);
}
else if (IS_ARM_R(ch,LOST_THUMB))
{
act("A thumb slides out of $n's bloody right hand.",ch,NULL,NULL,TO_ROOM);
act("A thumb slides out of your bloody right hand.",ch,NULL,NULL,TO_CHAR);
REMOVE_BIT(ch->loc_hp[LOC_ARM_R],LOST_THUMB);
REMOVE_BIT(ch->loc_hp[LOC_ARM_R],BROKEN_THUMB);
}
else if (IS_ARM_R(ch,BROKEN_THUMB))
{
act("$n's right thumb snaps back into place.",ch,NULL,NULL,TO_ROOM);
act("Your right thumb snaps back into place.",ch,NULL,NULL,TO_CHAR);
REMOVE_BIT(ch->loc_hp[LOC_ARM_R],BROKEN_THUMB);
}
else if (IS_ARM_R(ch,LOST_FINGER_I))
{
act("An index finger slides out of $n's bloody right hand.",ch,NULL,NULL,TO_ROOM);
act("An index finger slides out of your bloody right hand.",ch,NULL,NULL,TO_CHAR);
REMOVE_BIT(ch->loc_hp[LOC_ARM_R],LOST_FINGER_I);
REMOVE_BIT(ch->loc_hp[LOC_ARM_R],BROKEN_FINGER_I);
}
else if (IS_ARM_R(ch,BROKEN_FINGER_I))
{
act("$n's right index finger snaps back into place.",ch,NULL,NULL,TO_ROOM);
act("Your right index finger snaps back into place.",ch,NULL,NULL,TO_CHAR);
REMOVE_BIT(ch->loc_hp[LOC_ARM_R],BROKEN_FINGER_I);
}
else if (IS_ARM_R(ch,LOST_FINGER_M))
{
act("A middle finger slides out of $n's bloody right hand.",ch,NULL,NULL,TO_ROOM);
act("A middle finger slides out of your bloody right hand.",ch,NULL,NULL,TO_CHAR);
REMOVE_BIT(ch->loc_hp[LOC_ARM_R],LOST_FINGER_M);
REMOVE_BIT(ch->loc_hp[LOC_ARM_R],BROKEN_FINGER_M);
}
else if (IS_ARM_R(ch,BROKEN_FINGER_M))
{
act("$n's right middle finger snaps back into place.",ch,NULL,NULL,TO_ROOM);
act("Your right middle finger snaps back into place.",ch,NULL,NULL,TO_CHAR);
REMOVE_BIT(ch->loc_hp[LOC_ARM_R],BROKEN_FINGER_M);
}
else if (IS_ARM_R(ch,LOST_FINGER_R))
{
act("A ring finger slides out of $n's bloody right hand.",ch,NULL,NULL,TO_ROOM);
act("A ring finger slides out of your bloody right hand.",ch,NULL,NULL,TO_CHAR);
REMOVE_BIT(ch->loc_hp[LOC_ARM_R],LOST_FINGER_R);
REMOVE_BIT(ch->loc_hp[LOC_ARM_R],BROKEN_FINGER_R);
}
else if (IS_ARM_R(ch,BROKEN_FINGER_R))
{
act("$n's right ring finger snaps back into place.",ch,NULL,NULL,TO_ROOM);
act("Your right ring finger snaps back into place.",ch,NULL,NULL,TO_CHAR);
REMOVE_BIT(ch->loc_hp[LOC_ARM_R],BROKEN_FINGER_R);
}
else if ( IS_ARM_R(ch,LOST_FINGER_L))
{
act("A little finger slides out of $n's bloody right hand.",ch,NULL,NULL,TO_ROOM);
act("A little finger slides out of your bloody right hand.",ch,NULL,NULL,TO_CHAR);
REMOVE_BIT(ch->loc_hp[LOC_ARM_R],LOST_FINGER_L);
REMOVE_BIT(ch->loc_hp[LOC_ARM_R],BROKEN_FINGER_L);
}
else if ( IS_ARM_R(ch,BROKEN_FINGER_L))
{
act("$n's right little finger snaps back into place.",ch,NULL,NULL,TO_ROOM);
act("Your right little finger snaps back into place.",ch,NULL,NULL,TO_CHAR);
REMOVE_BIT(ch->loc_hp[LOC_ARM_R],BROKEN_FINGER_L);
}
else if (IS_BODY(ch,CUT_THROAT))
{
if (IS_SET(ch->loc_hp[6], BLEEDING_THROAT)) return;
act("The wound in $n's throat closes up.",ch,NULL,NULL,TO_ROOM);
act("The wound in your throat closes up.",ch,NULL,NULL,TO_CHAR);
REMOVE_BIT(ch->loc_hp[LOC_BODY],CUT_THROAT);
}
return;
}
void vamp_rage( CHAR_DATA *ch )
{
if (IS_NPC(ch)) return;
send_to_char("You scream with rage as the beast within consumes you!\n\r",ch);
act("$n screams with rage as $s inner beast consumes $m!.", ch, NULL, NULL, TO_ROOM);
do_beastlike(ch,"");
power_rage(ch,ch,"");
return;
}
void do_humanity( CHAR_DATA *ch, char *argument )
{
char arg [MAX_INPUT_LENGTH];
argument = one_argument( argument, arg );
if (IS_NPC( ch )) return;
if (!IS_NPC( ch )) return; /* need to re-do beast */
if (!IS_NPC(ch) && IS_CLASS(ch,CLASS_VAMPIRE) && ch->beast > 0
&& ch->beast < 100 && number_range(1, 500) <= ch->beast)
{
if (ch->beast == 1)
{
send_to_char("You have attained Golconda!\n\r", ch);
ch->exp += 1000000;
}
else
send_to_char("You feel slightly more in control of your beast.\n\r", ch);
ch->beast -= 1;
}
return;
}
void do_beastlike( CHAR_DATA *ch, char *argument )
{
char arg [MAX_INPUT_LENGTH];
int blood;
argument = one_argument( argument, arg );
if (IS_NPC( ch )) return;
if (!IS_NPC( ch )) return; /* need to re-do beast */
if (!IS_NPC(ch) && IS_CLASS(ch,CLASS_VAMPIRE) && ch->beast < 100
&& ch->beast > 0 && number_range(1, 500) <= ch->beast)
{
if (ch->beast < 99)
send_to_char("You feel your beast take more control over your actions.\n\r", ch);
else
send_to_char("Your beast has fully taken over control of your actions!\n\r", ch);
ch->beast += 1;
blood = ch->pcdata->condition[COND_THIRST];
ch->pcdata->condition[COND_THIRST] = 666;
if ((get_disc(ch,DISC_PROTEAN) > 0 || (get_disc(ch,DISC_OBTENEBRATION) > 1))
&& !IS_VAMPAFF(ch,VAM_NIGHTSIGHT) ) power_nightsight(ch,ch,"");
if (!IS_VAMPAFF(ch,VAM_FANGS) ) power_fangs(ch,ch,"");
if (get_disc(ch,DISC_PROTEAN) > 1 &&
!IS_VAMPAFF(ch,VAM_CLAWS) ) power_claws(ch,ch,"");
ch->pcdata->condition[COND_THIRST] = blood;
}
return;
}
void do_feed( CHAR_DATA *ch, char *argument )
{
CHAR_DATA *victim;
char arg [MAX_INPUT_LENGTH];
char buf [MAX_INPUT_LENGTH];
char bufch [MAX_INPUT_LENGTH];
char bufvi [MAX_INPUT_LENGTH];
int blood;
argument = one_argument( argument, arg );
if (IS_NPC(ch)) return;
if (!IS_CLASS(ch, CLASS_VAMPIRE))
{
send_to_char("Huh?\n\r",ch);
return;
}
if ( ( victim = get_char_room( ch, arg ) ) == NULL )
{
send_to_char( "They aren't here.\n\r", ch );
return;
}
if (IS_NPC(victim))
{
send_to_char("Not on NPC's.\n\r",ch);
return;
}
if (!IS_CLASS(victim, CLASS_VAMPIRE))
{
send_to_char("Blood does them no good at all.\n\r",ch);
return;
}
if (!IS_IMMUNE(victim, IMM_VAMPIRE))
{
send_to_char("They refuse to drink your blood.\n\r",ch);
return;
}
if ( ch->pcdata->condition[COND_THIRST] < 20 )
{
send_to_char("You don't have enough blood.\n\r",ch);
return;
}
blood = number_range(5,10);
ch->pcdata->condition[COND_THIRST] -= (blood * 2);
victim->pcdata->condition[COND_THIRST] += blood;
if (IS_AFFECTED(ch,AFF_POLYMORPH)) sprintf(bufch,ch->morph->str);
else sprintf(bufch,ch->name->str);
if (IS_AFFECTED(victim,AFF_POLYMORPH)) sprintf(bufvi,victim->morph->str);
else sprintf(bufvi,victim->name->str);
sprintf(buf,"You tear open your wrist and feed some blood to %s.",bufvi);
act(buf,ch,NULL,victim,TO_CHAR);
sprintf(buf,"%s tears open $s wrist and feeds some blood to %s.",bufch,bufvi);
act(buf, ch, NULL, victim, TO_NOTVICT);
if (victim->position < POS_RESTING)
send_to_char("You feel some blood poured down your throat.\n\r",victim);
else
{
sprintf(buf,"%s tears open $s wrist and feeds you some blood.",bufch);
act(buf, ch, NULL, victim, TO_VICT);
}
return;
}
void do_upkeep( CHAR_DATA *ch, char *argument )
{
char arg [MAX_INPUT_LENGTH];
char buf [MAX_INPUT_LENGTH];
GString *output;
char buf2 [MAX_INPUT_LENGTH];
int SnoopCount = 0;
argument = one_argument( argument, arg );
if (IS_NPC(ch)) return;
if (IS_SWWF(ch))
{
send_to_char("--------------------------------------------------------\n\r",ch);
send_to_char(" -= Werewolf upkeep =-\n\r",ch);
send_to_char("--------------------------------------------------------\n\r",ch);
send_to_char(" 1 Staying alive.\n\r",ch);
if (IS_SET(ch->act,PLR_WIZINVIS ) )
send_to_char(" 5 Blur.\n\r",ch);
if (IS_VAMPAFF(ch,VAM_CLAWS) )
{
sprintf(buf," 1- 3 Claws out.\n\r");
send_to_char(buf,ch);
}
if (ch->pcdata->wwf_shape == SHAPE_CRINOS && ch->pcdata->sgift[1] != BREED_METIS)
send_to_char(" 5 Crinos form.\n\r",ch);
if (ch->pcdata->wwf_shape == SHAPE_GLABRO)
send_to_char(" 3 Glabro form.\n\r",ch);
if (ch->pcdata->wwf_shape == SHAPE_HISPO)
send_to_char(" 3 Hispo form.\n\r",ch);
if (IS_ADDED(ch,ADDED_BRISTLES) )
send_to_char(" 1- 3 Bristles\n\r",ch);
if (IS_AFFECTED(ch, AFF_HIDE))
send_to_char(" 1- 7 Hide.\n\r",ch);
if (IS_ITEMAFF(ch,ITEMA_SUNSHIELD) )
send_to_char(" 1- 7 Sunshield.\n\r",ch);
if (IS_ADDED(ch,ADDED_ANIMAL_MASTER) )
send_to_char(" 1- 5 Animal Master.\n\r",ch);
if ( ( ( ch->hit - ch->pcdata->absorb[ABS_MOB_HP] ) < 1 ) ||
( ( ch->max_hit - ch->pcdata->absorb[ABS_MOB_MAX_HP]) < 1 ) )
send_to_char(" 5-15 Absorbing.\n\r",ch);
if (IS_ADDED(ch,ADDED_HAND_FLAME) )
send_to_char(" 1- 5 Flaming Hand.\n\r",ch);
}
else if (IS_CLASS(ch, CLASS_VAMPIRE))
{
send_to_char("--------------------------------------------------------\n\r",ch);
send_to_char(" -= Vampire upkeep =-\n\r",ch);
send_to_char("--------------------------------------------------------\n\r",ch);
send_to_char(" 1 Staying alive.\n\r",ch);
if (IS_VAMPAFF(ch,VAM_DISGUISED) )
{
if (ch->beast == 0 ) sprintf(buf," 0 Disguised as %s.\n\r",ch->morph->str);
else if (ch->beast == 100) sprintf(buf," 10-20 Disguised as %s.\n\r",ch->morph->str);
else sprintf(buf," 5-10 Disguised as %s.\n\r",ch->morph->str);
send_to_char(buf,ch);
}
if (IS_IMMUNE(ch,IMM_SHIELDED) )
{
if (ch->beast == 0 ) sprintf(buf," 0 Shield.\n\r");
else if (ch->beast == 100) sprintf(buf," 2- 6 Shield.\n\r");
else sprintf(buf," 1- 3 Shield.\n\r");
send_to_char(buf,ch);
}
if (IS_AFFECTED(ch,AFF_DISEASE ) )
send_to_char(" 10 Disease.\n\r",ch);
/*
* Unveil Cost for vampires per Tick
*/
SnoopCount = count_snoopers(ch->desc);
if ( SnoopCount > 0)
{
SnoopCount *= 10;
output = g_string_new("");
g_string_sprintf(output," %2d Unveil\n\r", SnoopCount);
send_to_char(output->str,ch);
g_string_free(output,TRUE);
}
if (IS_ADDED(ch,ADDED_DISCERN ) )
send_to_char(" 30 Whispers.\n\r",ch);
if (IS_SET(ch->act,PLR_MARBLEFLESH ) )
send_to_char(" 2 Marbled Flesh.\n\r",ch);
if (IS_SET(ch->added,ADDED_NIGHTFALL ) )
send_to_char(" 5 Nightfall.\n\r",ch);
if (IS_SET(ch->act,PLR_WIZINVIS ) )
send_to_char(" 5 Vanish.\n\r",ch);
if (IS_SET(ch->added,ADDED_CLOAK ) )
send_to_char(" 5-10 Equipment vanished.\n\r",ch);
if (IS_AFFECTED(ch,AFF_AGGDAM ) )
send_to_char(" 0 Aggravated wounds.\n\r",ch);
if (IS_VAMPAFF(ch,VAM_FANGS) )
{
if (ch->beast == 0 ) sprintf(buf," 0 Fangs out.\n\r");
else if (ch->beast == 100) sprintf(buf," 2 Fangs out.\n\r");
else sprintf(buf," 1 Fangs out.\n\r");
send_to_char(buf,ch);
}
if (IS_VAMPAFF(ch,VAM_CLAWS) )
{
if (ch->beast == 0 ) sprintf(buf," 0 Claws out.\n\r");
else if (ch->beast == 100) sprintf(buf," 2- 6 Claws out.\n\r");
else sprintf(buf," 1- 3 Claws out.\n\r");
send_to_char(buf,ch);
}
if (IS_VAMPAFF(ch,VAM_NIGHTSIGHT) )
{
if (ch->beast == 0 ) sprintf(buf," 0 Nightsight.\n\r");
else if (ch->beast == 100) sprintf(buf," 2 Nightsight.\n\r");
else sprintf(buf," 1 Nightsight.\n\r");
send_to_char(buf,ch);
}
if (IS_SET(ch->act,PLR_HOLYLIGHT) )
{
if (ch->beast == 0 ) sprintf(buf," 0 Truesight.\n\r");
else if (ch->beast == 100) sprintf(buf," 2-10 Truesight.\n\r");
else sprintf(buf," 1- 5 Truesight.\n\r");
send_to_char(buf,ch);
}
if (IS_VAMPAFF(ch,VAM_CHANGED) )
{
if (IS_POLYAFF(ch,POLY_BAT)) sprintf(buf2,"bat" );
else if (IS_POLYAFF(ch,POLY_WOLF)) sprintf(buf2,"wolf");
else if (IS_POLYAFF(ch,POLY_ZULO)) sprintf(buf2,"horrid");
else if (IS_POLYAFF(ch,POLY_CHANGELING)) sprintf(buf2,"changeling");
else if (IS_POLYAFF(ch,POLY_BONECRAFT)) sprintf(buf2,"bonecraft");
else sprintf(buf2,"mist");
if (ch->beast == 0 ) sprintf(buf," 0 Changed into %s form.\n\r",buf2);
else if (ch->beast == 100) sprintf(buf," 10-20 Changed into %s form.\n\r",buf2);
else sprintf(buf," 5-10 Changed into %s form.\n\r",buf2);
send_to_char(buf,ch);
}
if (IS_SET(ch->sight, SIGHT_SPIRIT)){
send_to_char(" 1 Spirit Sight.\n\r",ch);
}
if (IS_POLYAFF(ch,POLY_SERPENT) )
{
if (ch->beast == 0 ) sprintf(buf," 0 Serpent form.\n\r");
else if (ch->beast == 100) sprintf(buf," 6- 8 Serpent form.\n\r");
else sprintf(buf," 1- 3 Serpent form.\n\r");
send_to_char(buf,ch);
}
}
else
{
send_to_char("Huh?\n\r",ch);
return;
}
send_to_char("--------------------------------------------------------\n\r",ch);
return;
}
void do_vclan( CHAR_DATA *ch, char *argument )
{
char buf[MAX_STRING_LENGTH];
char arg[MAX_INPUT_LENGTH];
CHAR_DATA *gch;
one_argument( argument, arg );
if (IS_NPC(ch)) return;
if (!IS_CLASS(ch, CLASS_VAMPIRE) )
{
send_to_char("Huh?\n\r",ch);
return;
}
if (ch->clan == CLAN_NONE || IS_SET(ch->special, SPC_ANARCH) )
{
send_to_char("But you don't belong to any clan!\n\r",ch);
return;
}
sprintf( buf, "The %s clan:\n\r", iclan_table[ch->clan].pretty_name );
send_to_char( buf, ch );
send_to_char("[ Name ] [ Gen ] [Blood]\n\r", ch );
for ( gch = char_list; gch != NULL; gch = gch->next )
{
if ( IS_NPC(gch) ) continue;
if ( !IS_CLASS(gch, CLASS_VAMPIRE) ) continue;
if ( ch->clan == gch->clan )
{
sprintf( buf,
"[%-16s] [ %d ] [ %3d ]\n\r",
capitalize( gch->name->str ),
gch->pcdata->stats[UNI_GEN],
gch->pcdata->condition[COND_THIRST] );
send_to_char( buf, ch );
}
}
mudsetting->last_proc_logged = 20;
return;
}
void do_tribe( CHAR_DATA *ch, char *argument )
{
char buf[MAX_STRING_LENGTH];
char arg[MAX_INPUT_LENGTH];
char clan[MAX_INPUT_LENGTH];
CHAR_DATA *gch;
one_argument( argument, arg );
if (IS_NPC(ch)) return;
if (!IS_CLASS(ch, CLASS_WEREWOLF) && !IS_SWWF(ch))
{
send_to_char("Huh?\n\r",ch);
return;
}
if ( ch->sect == SECT_WYRM )
{
send_to_char("You need no tribe, foul spawn of the wyrm.\n\r",ch);
return;
}
send_to_char("[ Name ] [ Tribe ]\n\r", ch );
for ( gch = char_list; gch != NULL; gch = gch->next )
{
if ( IS_NPC(gch) ) continue;
if ( !IS_CLASS(gch, CLASS_WEREWOLF) && !IS_SWWF(gch) ) continue;
if ( IS_IMMORTAL(gch) ) continue;
if ( gch->sect == SECT_WYRM) continue;
if ( gch->clan != CLAN_NONE && gch->clan != CLAN_RONIN )
sprintf(clan,iclan_table[gch->clan].pretty_name);
else if ( gch->pcdata->stats[UNI_GEN] == 1 )
sprintf(clan,"All");
else
sprintf(clan,"None");
{
sprintf( buf,
"[%-16s] [%-13s]\n\r",
capitalize( gch->name->str ), iclan_table[gch->clan].pretty_name);
send_to_char( buf, ch );
}
}
mudsetting->last_proc_logged = 21;
return;
}
void do_werewolf( CHAR_DATA *ch, char *argument )
{
char buf[MAX_INPUT_LENGTH];
char arg[MAX_INPUT_LENGTH];
CHAR_DATA *vch;
CHAR_DATA *vch_next;
OBJ_DATA *obj;
argument = one_argument( argument, arg );
if (IS_NPC(ch)) return;
if (!IS_CLASS(ch, CLASS_WEREWOLF)) return;
if (IS_SET(ch->special, SPC_WOLFMAN)) return;
SET_BIT(ch->special, SPC_WOLFMAN);
send_to_char("You throw back your head and howl with rage!\n\r",ch);
act("$n throws back $s head and howls with rage!.", ch, NULL, NULL, TO_ROOM);
send_to_char("Coarse dark hair sprouts from your body.\n\r",ch);
act("Coarse dark hair sprouts from $n's body.",ch,NULL,NULL,TO_ROOM);
if (!IS_VAMPAFF(ch,VAM_NIGHTSIGHT))
{
send_to_char("Your eyes start glowing red.\n\r",ch);
act("$n's eyes start glowing red.",ch,NULL,NULL,TO_ROOM);
SET_BIT(ch->pcdata->stats[UNI_AFF], VAM_NIGHTSIGHT);
}
if (!IS_VAMPAFF(ch,VAM_FANGS))
{
send_to_char("A pair of long fangs extend from your mouth.\n\r",ch);
act("A pair of long fangs extend from $n's mouth.",ch,NULL,NULL,TO_ROOM);
SET_BIT(ch->pcdata->stats[UNI_AFF], VAM_FANGS);
}
if (!IS_VAMPAFF(ch,VAM_CLAWS))
{
send_to_char("Razor sharp talons extend from your fingers.\n\r",ch);
act("Razor sharp talons extend from $n's fingers.",ch,NULL,NULL,TO_ROOM);
SET_BIT(ch->pcdata->stats[UNI_AFF], VAM_CLAWS);
}
if ((obj = get_eq_char(ch,WEAR_WIELD)) != NULL && !IS_SET(obj->spectype, SITEM_WOLFWEAPON))
{
act("$p drops from your right hand.",ch,obj,NULL,TO_CHAR);
act("$p drops from $n's right hand.",ch,obj,NULL,TO_ROOM);
obj_from_char(obj);
obj_to_char(obj, ch);
}
if ((obj = get_eq_char(ch,WEAR_HOLD)) != NULL && !IS_SET(obj->spectype, SITEM_WOLFWEAPON))
{
act("$p drops from your left hand.",ch,obj,NULL,TO_CHAR);
act("$p drops from $n's left hand.",ch,obj,NULL,TO_ROOM);
obj_from_char(obj);
obj_to_char(obj, ch);
}
SET_BIT(ch->affected_by, AFF_POLYMORPH);
SET_BIT(ch->pcdata->stats[UNI_AFF], VAM_DISGUISED);
sprintf(buf,"%s the werewolf",ch->name->str);
ch->morph = g_string_assign(ch->morph,buf);
ch->pcdata->stats[UNI_RAGE] += 25;
if (ch->pcdata->powers[WPOWER_WOLF] > 3) ch->pcdata->stats[UNI_RAGE] += 100;
if (ch->pcdata->stats[UNI_RAGE] > 400)
ch->pcdata->stats[UNI_RAGE] = 400;
for ( vch = char_list; vch != NULL; vch = vch_next )
{
vch_next = vch->next;
if ( vch->in_room == NULL )
continue;
if ( ch == vch )
{
act("You throw back your head and howl with rage!", ch, NULL, NULL, TO_CHAR);
continue;
}
if ( !IS_NPC(vch) && vch->pcdata->chobj != NULL )
continue;
if (!IS_NPC(vch))
{
if (vch->in_room == ch->in_room)
act("$n throws back $s head and howls with rage!", ch, NULL, vch, TO_VICT);
else if (vch->in_room->area == ch->in_room->area)
send_to_char("You hear a fearsome howl close by!\n\r", vch);
else
/* send_to_char("You hear a fearsome howl far off in the
distance!\n\r", vch);*/
if (!CAN_PK(vch)) continue;
}
if ( vch->in_room == ch->in_room && can_see( ch, vch) )
{
if ( check_pk(ch,vch,CHECK_DELAY|CHECK_ATTACK))
return;
set_attack_flag(ch,vch);
multi_hit( ch, vch, TYPE_UNDEFINED );
if (vch == NULL || vch->position <= POS_STUNNED) continue;
multi_hit( ch, vch, TYPE_UNDEFINED );
if (vch == NULL || vch->position <= POS_STUNNED) continue;
multi_hit( ch, vch, TYPE_UNDEFINED );
}
}
mudsetting->last_proc_logged = 22;
return;
}
void do_unwerewolf( CHAR_DATA *ch, char *argument )
{
char arg[MAX_INPUT_LENGTH];
argument = one_argument( argument, arg );
if (IS_NPC(ch)) return;
if (!IS_CLASS(ch, CLASS_WEREWOLF)) return;
if (!IS_SET(ch->special, SPC_WOLFMAN)) return;
REMOVE_BIT(ch->special, SPC_WOLFMAN);
REMOVE_BIT(ch->affected_by, AFF_POLYMORPH);
REMOVE_BIT(ch->pcdata->stats[UNI_AFF], VAM_DISGUISED);
ch->morph = g_string_assign(ch->morph,"");
if (IS_VAMPAFF(ch,VAM_CLAWS))
{
send_to_char("Your talons slide back into your fingers.\n\r",ch);
act("$n's talons slide back into $s fingers.",ch,NULL,NULL,TO_ROOM);
REMOVE_BIT(ch->pcdata->stats[UNI_AFF], VAM_CLAWS);
}
if (IS_VAMPAFF(ch,VAM_FANGS))
{
send_to_char("Your fangs slide back into your mouth.\n\r",ch);
act("$n's fangs slide back into $s mouth.",ch,NULL,NULL,TO_ROOM);
REMOVE_BIT(ch->pcdata->stats[UNI_AFF], VAM_FANGS);
}
if (IS_VAMPAFF(ch,VAM_NIGHTSIGHT))
{
send_to_char("The red glow in your eyes fades.\n\r",ch);
act("The red glow in $n's eyes fades.",ch,NULL,NULL,TO_ROOM);
REMOVE_BIT(ch->pcdata->stats[UNI_AFF], VAM_NIGHTSIGHT);
}
send_to_char("Your coarse hair shrinks back into your body.\n\r",ch);
act("$n's coarse hair shrinks back into $s body.",ch,NULL,NULL,TO_ROOM);
ch->pcdata->stats[UNI_RAGE] -= 25;
if (ch->pcdata->stats[UNI_RAGE] < 0) ch->pcdata->stats[UNI_RAGE] = 0;
return;
}
void sabbat_fav( CHAR_DATA *ch, char *argument )
{
CHAR_DATA *victim;
char arg1 [MAX_INPUT_LENGTH];
char arg2 [MAX_INPUT_LENGTH];
argument = one_argument( argument, arg1 );
argument = one_argument( argument, arg2 );
if ( IS_NPC(ch) ) return;
if ( !IS_CLASS(ch,CLASS_VAMPIRE) && (IS_SET(ch->special,SPC_PRINCE) || ch->pcdata->stats[UNI_GEN] != 2) )
{
send_to_char( "Huh?\n\r", ch );
return;
}
if ( arg1[0] == '\0' || arg2[0] == '\0' )
{
send_to_char( "Syntax is: favour <target> <regent/cardinal/sire/priscus/seraph>\n\r", ch );
return;
}
if ( ( victim = get_char_room( ch, arg1 ) ) == NULL )
{
send_to_char( "They aren't here.\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 ( !IS_CLASS(victim,CLASS_VAMPIRE) )
{
send_to_char( "But they are not a vampire!\n\r", ch );
return;
}
if ( (victim->sect != ch->sect && str_cmp(arg2,"induct")) )
{
send_to_char( "You can only grant your favour to someone in your sect!\n\r", ch );
return;
}
if ( (ch->pcdata->stats[UNI_GEN] > victim->pcdata->stats[UNI_GEN]) )
{
send_to_char( "You can only grant your favour to someone of a lower generation.\n\r", ch );
return;
}
if ( !str_cmp(arg2,"regent") && ((ch->pcdata->stats[UNI_GEN] == 2)) )
{
if (IS_SET(victim->special,SPC_PRINCE)) {
act("You remove $N's regent privilages!",ch,NULL,victim,TO_CHAR);
act("$n removes $N's regent privilages!",ch,NULL,victim,TO_NOTVICT);
act("$n removes your regent privilages!",ch,NULL,victim,TO_VICT);
if (IS_SET(victim->special,SPC_SIRE)) REMOVE_BIT(victim->special,SPC_SIRE);
REMOVE_BIT(victim->special,SPC_PRINCE);return;}
act("You make $N a regent!",ch,NULL,victim,TO_CHAR);
act("$n has made $N a regent!",ch,NULL,victim,TO_NOTVICT);
act("$n has made you a regent!",ch,NULL,victim,TO_VICT);
SET_BIT(victim->special,SPC_PRINCE);
if (IS_SET(victim->special,SPC_SIRE)) REMOVE_BIT(victim->special,SPC_SIRE);
return;
}
else if ( !str_cmp(arg2,"sire") && (ch->pcdata->stats[UNI_GEN] == 2 || IS_SET(ch->special,SPC_PRINCE) ) )
{
if (IS_SET(victim->special,SPC_SIRE)) {
act("You remove $N's permission to sire a childe!",ch,NULL,victim,TO_CHAR);
act("$n has removed $N's permission to sire a childe!",ch,NULL,victim,TO_NOTVICT);
act("$n has remove your permission to sire a childe!",ch,NULL,victim,TO_VICT);
REMOVE_BIT(victim->special,SPC_SIRE);return;}
act("You grant $N permission to sire a childe!",ch,NULL,victim,TO_CHAR);
act("$n has granted $N permission to sire a childe!",ch,NULL,victim,TO_NOTVICT);
act("$n has granted you permission to sire a childe!",ch,NULL,victim,TO_VICT);
SET_BIT(victim->special,SPC_SIRE);
return;
}
else if ( !str_cmp(arg2,"cardinal") && (ch->pcdata->stats[UNI_GEN] == 2 || IS_SET(ch->special,SPC_PRINCE)) )
{
if (IS_SET(victim->special,SPC_CARDINAL)) {
act("You remove $N's cardinal status!",ch,NULL,victim,TO_CHAR);
act("$n has removed $N's cardinal status!",ch,NULL,victim,TO_NOTVICT);
act("$n has remove your cardinal status!",ch,NULL,victim,TO_VICT);
REMOVE_BIT(victim->special,SPC_CARDINAL);return;}
act("You grant $N cardinal status!",ch,NULL,victim,TO_CHAR);
act("$n has granted $N cardinal status!",ch,NULL,victim,TO_NOTVICT);
act("$n has granted you cardinal status!",ch,NULL,victim,TO_VICT);
SET_BIT(victim->special,SPC_CARDINAL);
return;
}
else if ( !str_cmp(arg2,"priscus") && (ch->pcdata->stats[UNI_GEN] == 2 || IS_SET(ch->special,SPC_PRINCE) ) )
{
if (IS_SET(victim->special,SPC_PRIMOGEN)) {
act("You remove $N's priscus status!",ch,NULL,victim,TO_CHAR);
act("$n has removed $N's priscus status!",ch,NULL,victim,TO_NOTVICT);
act("$n has remove your priscus status!",ch,NULL,victim,TO_VICT);
REMOVE_BIT(victim->special,SPC_PRIMOGEN);return;}
act("You grant $N priscus status!",ch,NULL,victim,TO_CHAR);
act("$n has granted $N priscus status!",ch,NULL,victim,TO_NOTVICT);
act("$n has granted you priscus status!",ch,NULL,victim,TO_VICT);
SET_BIT(victim->special,SPC_PRIMOGEN);
return;
}
else if ( !str_cmp(arg2,"seraph") && (ch->pcdata->stats[UNI_GEN] == 2 || IS_SET(ch->special,SPC_PRINCE) ) )
{
if (IS_SET(victim->special,SPC_JUSTICAR)) {
act("You remove $N's seraph status!",ch,NULL,victim,TO_CHAR);
act("$n has removed $N's seraph status!",ch,NULL,victim,TO_NOTVICT);
act("$n has remove your seraph status!",ch,NULL,victim,TO_VICT);
REMOVE_BIT(victim->special,SPC_JUSTICAR);return;}
act("You grant $N seraph status!",ch,NULL,victim,TO_CHAR);
act("$n has granted $N seraph status!",ch,NULL,victim,TO_NOTVICT);
act("$n has granted you seraph status!",ch,NULL,victim,TO_VICT);
SET_BIT(victim->special,SPC_JUSTICAR);
return;
}
else send_to_char( "You are unable to grant that sort of favour.\n\r", ch );
return;
}
void do_favour( CHAR_DATA *ch, char *argument )
{
CHAR_DATA *victim;
char arg1 [MAX_INPUT_LENGTH];
char arg2 [MAX_INPUT_LENGTH];
if (IS_SABBAT(ch))
{
sabbat_fav(ch,argument);
return;
}
argument = one_argument( argument, arg1 );
argument = one_argument( argument, arg2 );
if ( IS_NPC(ch) ) return;
if ( !IS_CLASS(ch,CLASS_VAMPIRE) && (IS_SET(ch->special,SPC_PRINCE) || ch->pcdata->stats[UNI_GEN] != 2) )
{
send_to_char( "Huh?\n\r", ch );
return;
}
if ( arg1[0] == '\0' || arg2[0] == '\0' )
{
send_to_char( "Syntax is: favour <target> <prince/sire/primogen/justicar>\n\r", ch );
return;
}
if ( ( victim = get_char_room( ch, arg1 ) ) == NULL )
{
send_to_char( "They aren't here.\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 ( !IS_CLASS(victim,CLASS_VAMPIRE) )
{
send_to_char( "But they are not a vampire!\n\r", ch );
return;
}
if ( (victim->sect != ch->sect && str_cmp(arg2,"induct")) && str_cmp(ch->name->str,"Dominion"))
{
send_to_char( "You can only grant your favour to someone in your sect!\n\r", ch );
return;
}
if ( (ch->pcdata->stats[UNI_GEN] > victim->pcdata->stats[UNI_GEN]) && str_cmp(ch->name->str,"Dominion") )
{
send_to_char( "You can only grant your favour to someone of a lower generation.\n\r", ch );
return;
}
if ( !str_cmp(arg2,"prince") && ((ch->pcdata->stats[UNI_GEN] == 2) || !str_cmp(ch->name->str,"Dominion")) )
{
if (IS_SET(victim->special,SPC_PRINCE)) {
act("You remove $N's prince privilages!",ch,NULL,victim,TO_CHAR);
act("$n removes $N's prince privilages!",ch,NULL,victim,TO_NOTVICT);
act("$n removes your prince privilages!",ch,NULL,victim,TO_VICT);
if (IS_SET(victim->special,SPC_SIRE)) REMOVE_BIT(victim->special,SPC_SIRE);
REMOVE_BIT(victim->special,SPC_PRINCE);return;}
act("You make $N a prince!",ch,NULL,victim,TO_CHAR);
act("$n has made $N a prince!",ch,NULL,victim,TO_NOTVICT);
act("$n has made you a prince!",ch,NULL,victim,TO_VICT);
SET_BIT(victim->special,SPC_PRINCE);
if (IS_SET(victim->special,SPC_SIRE)) REMOVE_BIT(victim->special,SPC_SIRE);
return;
}
else if ( !str_cmp(arg2,"sire") && (ch->pcdata->stats[UNI_GEN] == 2 || IS_SET(ch->special,SPC_PRINCE) || !str_cmp(ch->name->str,"Dominion")) )
{
if (IS_SET(victim->special,SPC_SIRE))
{
act("You remove $N's permission to sire a childe!",ch,NULL,victim,TO_CHAR);
act("$n has removed $N's permission to sire a childe!",ch,NULL,victim,TO_NOTVICT);
act("$n has remove your permission to sire a childe!",ch,NULL,victim,TO_VICT);
REMOVE_BIT(victim->special,SPC_SIRE);
return;
}
act("You grant $N permission to sire a childe!",ch,NULL,victim,TO_CHAR);
act("$n has granted $N permission to sire a childe!",ch,NULL,victim,TO_NOTVICT);
act("$n has granted you permission to sire a childe!",ch,NULL,victim,TO_VICT);
SET_BIT(victim->special,SPC_SIRE);
return;
}
else if ( !str_cmp(arg2,"primogen") && (ch->pcdata->stats[UNI_GEN] == 2 || IS_SET(ch->special,SPC_PRINCE) || !str_cmp(ch->name->str,"Dominion")) )
{
if (IS_SET(victim->special,SPC_PRIMOGEN)) {
act("You remove $N's primogen status!",ch,NULL,victim,TO_CHAR);
act("$n has removed $N's primogen status!",ch,NULL,victim,TO_NOTVICT);
act("$n has remove your primogen status!",ch,NULL,victim,TO_VICT);
REMOVE_BIT(victim->special,SPC_PRIMOGEN);return;}
act("You grant $N primogen status!",ch,NULL,victim,TO_CHAR);
act("$n has granted $N primogen status!",ch,NULL,victim,TO_NOTVICT);
act("$n has granted you primogen status!",ch,NULL,victim,TO_VICT);
SET_BIT(victim->special,SPC_PRIMOGEN);
return;
}
else if ( !str_cmp(arg2,"justicar") && (ch->pcdata->stats[UNI_GEN] == 2 || IS_SET(ch->special,SPC_PRINCE) || !str_cmp(ch->name->str,"Dominion")) )
{
if (IS_SET(victim->special,SPC_JUSTICAR)) {
act("You remove $N's justicar status!",ch,NULL,victim,TO_CHAR);
act("$n has removed $N's justicar status!",ch,NULL,victim,TO_NOTVICT);
act("$n has remove your justicar status!",ch,NULL,victim,TO_VICT);
REMOVE_BIT(victim->special,SPC_JUSTICAR);return;}
act("You grant $N justicar status!",ch,NULL,victim,TO_CHAR);
act("$n has granted $N justicar status!",ch,NULL,victim,TO_NOTVICT);
act("$n has granted you justicar status!",ch,NULL,victim,TO_VICT);
SET_BIT(victim->special,SPC_JUSTICAR);
return;
}
/*
else if ( !str_cmp(arg2,"outcast") && victim->pcdata->stats[UNI_GEN] > 2 &&
ch->pcdata->stats[UNI_GEN] == 2)
{
act("You make $N a Caitiff!",ch,NULL,victim,TO_CHAR);
act("$n has made $N a Caitiff!",ch,NULL,victim,TO_NOTVICT);
act("$n has made you a Caitiff!",ch,NULL,victim,TO_VICT);
free_string(victim->clan);
victim->clan = str_dup( "" );
return;
}
else if ( !str_cmp(arg2,"outcast") && victim->pcdata->stats[UNI_GEN] > 2 &&
!IS_SET(victim->special, SPC_PRINCE) && IS_SET(ch->special,SPC_PRINCE))
{
act("You make $N a Caitiff!",ch,NULL,victim,TO_CHAR);
act("$n has made $N a Caitiff!",ch,NULL,victim,TO_NOTVICT);
act("$n has made you a Caitiff!",ch,NULL,victim,TO_VICT);
free_string(victim->clan);
victim->clan = str_dup( "" );
return;
}
else if ( !str_cmp(arg2,"induct") && victim->pcdata->stats[UNI_GEN] > 2 &&
ch->pcdata->stats[UNI_GEN] == 2 && strlen(victim->clan) < 2)
{
if (IS_SET(victim->special, SPC_ANARCH))
{
send_to_char("You cannot induct an Anarch!\n\r",ch);
return;
}
act("You induct $N into your clan!",ch,NULL,victim,TO_CHAR);
act("$n inducts $N into $s clan!",ch,NULL,victim,TO_NOTVICT);
act("$n inducts you into $s clan!",ch,NULL,victim,TO_VICT);
free_string(victim->clan);
victim->clan = str_dup( ch->clan );
return;
}
else if ( !str_cmp(arg2,"induct") && victim->pcdata->stats[UNI_GEN] > 2 &&
!IS_SET(victim->special, SPC_PRINCE) && IS_SET(ch->special,SPC_PRINCE) &&
strlen(victim->clan) < 2)
{
if (IS_SET(victim->special, SPC_ANARCH))
{
send_to_char("You cannot induct an Anarch!\n\r",ch);
return;
}
act("You induct $N into your clan!",ch,NULL,victim,TO_CHAR);
act("$n inducts $N into $s clan!",ch,NULL,victim,TO_NOTVICT);
act("$n inducts you into $s clan!",ch,NULL,victim,TO_VICT);
free_string(victim->clan);
victim->clan = str_dup( ch->clan );
return;
}
else if ( !str_cmp(arg2,"accept") &&
(ch->pcdata->stats[UNI_GEN] == 2 || IS_SET(ch->special,SPC_PRINCE)))
{
if ( victim->pcdata->rank > AGE_CHILDE)
{ send_to_char("But they are not a childe!\n\r",ch); return; }
act("You accept $N into the clan!",ch,NULL,victim,TO_CHAR);
act("$n has accepted $N into $s clan!",ch,NULL,victim,TO_NOTVICT);
act("$n accepted you into $s clan!",ch,NULL,victim,TO_VICT);
victim->pcdata->rank = AGE_NEONATE;
return;
}
*/
else send_to_char( "You are unable to grant that sort of favour.\n\r", ch );
return;
}
void do_totems( CHAR_DATA *ch, char *argument )
{
char arg1[MAX_INPUT_LENGTH];
char arg2[MAX_INPUT_LENGTH];
char buf[MAX_STRING_LENGTH];
bool ADVANCED_TOT = FALSE;
argument = one_argument( argument, arg1 );
argument = one_argument( argument, arg2 );
if (IS_NPC(ch)) return;
if (!IS_CLASS(ch, CLASS_WEREWOLF))
{
send_to_char("Huh?\n\r",ch);
return;
}
if (arg1[0] == '\0' && arg2[0] == '\0')
{
sprintf(buf,"Totems:\n\r{GBear {g({G%d{g) {GLynx {g({G%d{g) {GBoar {g({G%d{g)\n\r{GOwl {g({G%d{g) {GSpider {g({G%d{g) {GWolf {g({G%d{g),\n\r{GHawk {g({G%d{g) {GMantis {g({G%d{g) {GShark {g({G%d{g)\n\r{GSphinx {g({G%d{g) {GRat {g({G%d{g) {GChameleon {g({G%d{g).{x\n\r",
ch->pcdata->powers[WPOWER_BEAR], ch->pcdata->powers[WPOWER_LYNX],
ch->pcdata->powers[WPOWER_BOAR], ch->pcdata->powers[WPOWER_OWL],
ch->pcdata->powers[WPOWER_SPIDER], ch->pcdata->powers[WPOWER_WOLF],
ch->pcdata->powers[WPOWER_HAWK],ch->pcdata->powers[WPOWER_MANTIS],
ch->pcdata->powers[WPOWER_SHARK],ch->pcdata->powers[WPOWER_SPHINX],
ch->pcdata->powers[WPOWER_RAT],ch->pcdata->powers[WPOWER_CHAMELEON]);
send_to_char(buf,ch);
return;
}
if (arg2[0] == '\0')
{
if (!str_cmp(arg1,"bear"))
{
send_to_char("Bear: The totem of strength and aggression.\n\r",ch);
if (ch->pcdata->powers[WPOWER_BEAR] < 1)
send_to_char("You have none of the Bear totem powers.\n\r",ch);
if (ch->pcdata->powers[WPOWER_BEAR] > 0)
send_to_char("FLEX: You strength is so great that no ropes can hold you.\n\r",ch);
if (ch->pcdata->powers[WPOWER_BEAR] > 1)
send_to_char("RAGE: You are able to build yourself up a rage at will.\n\r",ch);
if (ch->pcdata->powers[WPOWER_BEAR] > 2)
send_to_char("Steel claws: Your claws are so tough that they can parry weapons.\n\r",ch);
if (ch->pcdata->powers[WPOWER_BEAR] > 3)
send_to_char("Hibernation: Your wounds heal at amazing speeds when you sleep.\n\r",ch);
if (ch->pcdata->powers[WPOWER_BEAR] > 4)
send_to_char("Enhanced Damage: You inflict more damage in combat.\n\r",ch);
return;
}
else if (!str_cmp(arg1,"boar"))
{
send_to_char("Boar: The totem of toughness and perserverance.\n\r",ch);
if (ch->pcdata->powers[WPOWER_BOAR] < 1)
send_to_char("You have none of the Boar totem powers.\n\r",ch);
if (ch->pcdata->powers[WPOWER_BOAR] > 0)
send_to_char("Shatter: No door is sturdy enough to resist you.\n\r",ch);
if (ch->pcdata->powers[WPOWER_BOAR] > 1)
send_to_char("CHARGE: Your first blow in combat has a +100 damage bonus.\n\r",ch);
if (ch->pcdata->powers[WPOWER_BOAR] > 2)
send_to_char("Toughness: Your skin is extremely tough. You take half damage in combat.\n\r",ch);
if (ch->pcdata->powers[WPOWER_BOAR] > 3)
send_to_char("Immovability: You are able to shrug off blows that would knock out most people.\n\r",ch);
if (ch->pcdata->powers[WPOWER_BOAR] > 4)
send_to_char("Supreme Toughness: Your skin is strong beyond belief. You take one quarter damage in combat.\n\r",ch);
return;
}
else if (!str_cmp(arg1,"shark"))
{
send_to_char("Shark: The totem of toughness and speed.\n\r",ch);
if (ch->pcdata->powers[WPOWER_SHARK] < 1)
send_to_char("You have none of the Shark totem powers.\n\r",ch);
if (ch->pcdata->powers[WPOWER_SHARK] > 0)
send_to_char("Vicious Jaws: Bite attack more often.\n\r",ch);
if (ch->pcdata->powers[WPOWER_SHARK] > 1)
send_to_char("Gnawing Bite: More damage from bite attack.\n\r",ch);
if (ch->pcdata->powers[WPOWER_SHARK] > 2)
send_to_char("Clenching Jaws: Chance to snap jaws on to a fleeing opponent.\n\r",ch);
if (ch->pcdata->powers[WPOWER_SHARK] > 3)
send_to_char("Bite of Fenris: Chance of biting off limbs in combat.\n\r",ch);
if (ch->pcdata->powers[WPOWER_SHARK] > 4)
send_to_char("Slashing Wound: Increased blood loos or damage from bite attacks.\n\r",ch);
return;
}
else if (!str_cmp(arg1,"sphinx"))
{
send_to_char("Sphinx: The totem of toughness and speed.\n\r",ch);
if (ch->pcdata->powers[WPOWER_SPHINX] < 1)
send_to_char("You have none of the Sphinx totem powers.\n\r",ch);
if (ch->pcdata->powers[WPOWER_SPHINX] > 0)
send_to_char("Moon Gate:\n\r",ch);
if (ch->pcdata->powers[WPOWER_SPHINX] > 1)
send_to_char("Griffin's Tail:\n\r",ch);
if (ch->pcdata->powers[WPOWER_SPHINX] > 2)
send_to_char("Moon Beam:\n\r",ch);
if (ch->pcdata->powers[WPOWER_SPHINX] > 3)
send_to_char("\n\r",ch);
if (ch->pcdata->powers[WPOWER_SPHINX] > 4)
send_to_char("Luna's Armor:\n\r",ch);
return;
}
else if (!str_cmp(arg1,"rat"))
{
send_to_char("Rat: \n\r",ch);
if (ch->pcdata->powers[WPOWER_RAT] < 1)
send_to_char("You have none of the Rat totem powers.\n\r",ch);
if (ch->pcdata->powers[WPOWER_RAT] > 0)
send_to_char("Burrow: \n\r",ch);
if (ch->pcdata->powers[WPOWER_RAT] > 1)
send_to_char("Quills: \n\r",ch);
if (ch->pcdata->powers[WPOWER_RAT] > 2)
send_to_char("Speed of the Rat: \n\r",ch);
if (ch->pcdata->powers[WPOWER_RAT] > 3)
send_to_char("Pounce: \n\r",ch);
if (ch->pcdata->powers[WPOWER_RAT] > 4)
send_to_char("Prowl: \n\r",ch);
return;
}
else if (!str_cmp(arg1,"chameleon"))
{
send_to_char("Chameleon: \n\r",ch);
if (ch->pcdata->powers[WPOWER_CHAMELEON] < 1)
send_to_char("You have none of the Chameleon totem powers.\n\r",ch);
if (ch->pcdata->powers[WPOWER_CHAMELEON] > 0)
send_to_char("Mirror Image:\n\r",ch);
if (ch->pcdata->powers[WPOWER_CHAMELEON] > 1)
send_to_char("Stab in the Dark:\n\r",ch);
if (ch->pcdata->powers[WPOWER_CHAMELEON] > 2)
send_to_char("Gift of the Spriggan:\n\r",ch);
if (ch->pcdata->powers[WPOWER_CHAMELEON] > 3)
send_to_char("Instinct:\n\r",ch);
if (ch->pcdata->powers[WPOWER_CHAMELEON] > 4)
send_to_char("Speed of Thought:\n\r",ch);
return;
}
else if (!str_cmp(arg1,"lynx"))
{
send_to_char("Lynx: The totem of speed and agility.\n\r",ch);
if (ch->pcdata->powers[WPOWER_LYNX] < 1)
send_to_char("You have none of the Lynx totem powers.\n\r",ch);
if (ch->pcdata->powers[WPOWER_LYNX] > 0)
send_to_char("Light footed: You move so lightly that you leave no tracks behind you.\n\r",ch);
if (ch->pcdata->powers[WPOWER_LYNX] > 1)
send_to_char("Stalker: You are able hunt people with much greater speed than normal.\n\r",ch);
if (ch->pcdata->powers[WPOWER_LYNX] > 2)
send_to_char("Combat speed: You have an extra attack in combat.\n\r",ch);
if (ch->pcdata->powers[WPOWER_LYNX] > 3)
send_to_char("Lightning Claws: Yours claws parry blows with lightning fast speed.\n\r",ch);
if (ch->pcdata->powers[WPOWER_LYNX] > 4)
send_to_char("Enhanced Combat speed: You have extra attacks in combat.\n\r",ch);
return;
}
else if (!str_cmp(arg1,"Owl"))
{
send_to_char("Owl: The totem of thought and spiritualism.\n\r",ch);
if (ch->pcdata->powers[WPOWER_OWL] < 1)
send_to_char("You have none of the Owl totem powers.\n\r",ch);
if (ch->pcdata->powers[WPOWER_OWL] > 0)
send_to_char("VANISH: You are able to conceal yourself from all but the most perceptive.\n\r",ch);
if (ch->pcdata->powers[WPOWER_OWL] > 1)
send_to_char("SHIELD: You are able to shield your mind from scrying and aura-reading.\n\r",ch);
if (ch->pcdata->powers[WPOWER_OWL] > 2)
send_to_char("SHADOWPLANE: You are able to enter the shadow plane.\n\r",ch);
if (ch->pcdata->powers[WPOWER_OWL] > 3)
send_to_char("Magical Control: You are able to fully control your magic in crinos form.\n\r",ch);
return;
}
else if (!str_cmp(arg1,"Spider"))
{
send_to_char("Spider: The totem of ambush and cunning.\n\r",ch);
if (ch->pcdata->powers[WPOWER_SPIDER] < 1)
send_to_char("You have none of the Spider totem powers.\n\r",ch);
if (ch->pcdata->powers[WPOWER_SPIDER] > 0)
send_to_char("Poisonous bite: Your bite injects your opponents with a deadly venom.\n\r",ch);
if (ch->pcdata->powers[WPOWER_SPIDER] > 1)
send_to_char("WEB: You are able to shoot a web at your opponents to entrap them.\n\r",ch);
if (ch->pcdata->powers[WPOWER_SPIDER] > 2)
send_to_char("Immunity to poison: Poisons have no affect upon you.\n\r",ch);
return;
}
else if (!str_cmp(arg1,"Wolf"))
{
send_to_char("Wolf: Controlling your innate wolf powers.\n\r",ch);
if (ch->pcdata->powers[WPOWER_WOLF] < 1)
send_to_char("You have none of the Wolf totem powers.\n\r",ch);
if (ch->pcdata->powers[WPOWER_WOLF] > 0)
send_to_char("CLAWS: You can extend or retract your claws at will.\n\r",ch);
if (ch->pcdata->powers[WPOWER_WOLF] > 1)
send_to_char("FANGS: You can extend or retract your fangs at will.\n\r",ch);
if (ch->pcdata->powers[WPOWER_WOLF] > 2)
send_to_char("CALM: You are able to repress your inner beast at will.\n\r",ch);
if (ch->pcdata->powers[WPOWER_WOLF] > 3)
send_to_char("Spirit of Fenris: You are able to enter rage faster than normal.\n\r",ch);
return;
}
else if (!str_cmp(arg1,"Hawk"))
{
send_to_char("Hawk: The totem of vision and perception.\n\r",ch);
if (ch->pcdata->powers[WPOWER_HAWK] < 1)
send_to_char("You have none of the Wolf totem powers.\n\r",ch);
if (ch->pcdata->powers[WPOWER_HAWK] > 0)
send_to_char("NIGHTSIGHT: You can see perfectly well in the dark.\n\r",ch);
if (ch->pcdata->powers[WPOWER_HAWK] > 1)
send_to_char("SHADOWSIGHT: You can see into the plane of shadows.\n\r",ch);
if (ch->pcdata->powers[WPOWER_HAWK] > 2)
send_to_char("TRUESIGHT: You have perfect vision.\n\r",ch);
return;
}
else if (!str_cmp(arg1,"Mantis"))
{
send_to_char("Mantis: The totem of dexterity and reflexes.\n\r",ch);
if (ch->pcdata->powers[WPOWER_MANTIS] < 1)
send_to_char("You have none of the Mantis totem powers.\n\r",ch);
if (ch->pcdata->powers[WPOWER_MANTIS] > 3)
send_to_char("Incredibly fast attacks: Your opponents get -20 to parry and -40 to dodge.\n\r",ch);
else if (ch->pcdata->powers[WPOWER_MANTIS] > 2)
send_to_char("Extremely fast attacks: Your opponents get -15 to parry and -30 to dodge.\n\r",ch);
else if (ch->pcdata->powers[WPOWER_MANTIS] > 1)
send_to_char("Very fast attacks: Your opponents get -10 to parry and -20 to dodge.\n\r",ch);
else if (ch->pcdata->powers[WPOWER_MANTIS] > 0)
send_to_char("Fast attacks: Your opponents get -5 to parry and -10 to dodge.\n\r",ch);
return;
}
sprintf(buf,"Totems: Bear (%d), Lynx (%d), Boar (%d), Owl (%d), Spider (%d), Wolf (%d),\n\r Hawk (%d), Mantis (%d).\n\r",
ch->pcdata->powers[WPOWER_BEAR], ch->pcdata->powers[WPOWER_LYNX],
ch->pcdata->powers[WPOWER_BOAR], ch->pcdata->powers[WPOWER_OWL],
ch->pcdata->powers[WPOWER_SPIDER], ch->pcdata->powers[WPOWER_WOLF],
ch->pcdata->powers[WPOWER_HAWK],ch->pcdata->powers[WPOWER_MANTIS]);
send_to_char(buf,ch);
return;
}
if (!str_cmp(arg2,"improve"))
{
int improve;
int cost;
int max;
if (!str_cmp(arg1,"bear" )) {improve = WPOWER_BEAR; max=5;}
else if (!str_cmp(arg1,"boar" )) {improve = WPOWER_BOAR; max=5;}
else if (!str_cmp(arg1,"lynx" )) {improve = WPOWER_LYNX; max=5;}
else if (!str_cmp(arg1,"owl" )) {improve = WPOWER_OWL; max=4;}
else if (!str_cmp(arg1,"spider" )) {improve = WPOWER_SPIDER; max=3;}
else if (!str_cmp(arg1,"wolf" )) {improve = WPOWER_WOLF; max=4;}
else if (!str_cmp(arg1,"hawk" )) {improve = WPOWER_HAWK; max=3;}
else if (!str_cmp(arg1,"mantis" )) {improve = WPOWER_MANTIS; max=4;}
else if (!str_cmp(arg1,"shark" ))
{
if (ch->pcdata->powers[WPOWER_MANTIS] < 4 || ch->pcdata->powers[WPOWER_BEAR] < 5)
{
send_to_char("You must have Mantis 4 and Bear 5 before you get the Shark Totem.\n\r",ch);
return;
}
ADVANCED_TOT = TRUE;
improve = WPOWER_SHARK; max=5;
}
else if (!str_cmp(arg1,"sphinx" ))
{
if (ch->pcdata->powers[WPOWER_OWL] < 4 || ch->pcdata->powers[WPOWER_HAWK] < 3)
{
send_to_char("You must have Owl 4 and Hawk 3 before you get the Sphinx Totem.\n\r",ch);
return;
}
ADVANCED_TOT = TRUE;
improve = WPOWER_SPHINX; max=5;
}
else if (!str_cmp(arg1,"rat" ))
{
if (ch->pcdata->powers[WPOWER_SPIDER] < 3 || ch->pcdata->powers[WPOWER_BOAR] < 5)
{
send_to_char("You must have Spider 3 and Boar 5 before you get the Rat Totem.\n\r",ch);
return;
}
ADVANCED_TOT = TRUE;
improve = WPOWER_RAT; max=5;
}
else if (!str_cmp(arg1,"chameleon" ))
{
if (ch->pcdata->powers[WPOWER_LYNX] < 5 || ch->pcdata->powers[WPOWER_WOLF] < 4)
{
send_to_char("You must have Lynx 5 and Wolf 4 before you get the Chameleon Totem.\n\r",ch);
return;
}
ADVANCED_TOT = TRUE;
improve = WPOWER_CHAMELEON; max=5;
}
else
{
send_to_char("You can improve: Bear, Boar, Lynx, Owl, Spider, Wolf, Hawk, Mantis, Shark, Sphinx, Rat or Chameleon.\n\r",ch);
return;
}
if ( ADVANCED_TOT == FALSE )
cost = (ch->pcdata->powers[improve]+1) * COST_TOTEM;
else
cost = ((ch->pcdata->powers[improve]+1) * COST_TOTEM) + 50;
arg1[0] = UPPER(arg1[0]);
if ( ch->pcdata->powers[improve] >= max )
{
sprintf(buf,"You have already gained all the powers of the %s totem.\n\r", arg1);
send_to_char(buf,ch);
return;
}
if ( cost > ch->practice )
{
sprintf(buf,"It costs you %d primal to improve your %s totem.\n\r", cost, arg1);
send_to_char(buf,ch);
return;
}
ch->pcdata->powers[improve] += 1;
ch->practice -= cost;
ch->pcdata->spent[SPENT_P] += cost;
sprintf(buf,"You improve your ability in the %s totem.\n\r", arg1);
send_to_char(buf,ch);
}
else send_to_char("To improve a totem, type: Totem <totem type> improve.\n\r",ch);
return;
}
void do_birth( CHAR_DATA *ch, char *argument )
{
char buf2[MAX_STRING_LENGTH];
if (IS_NPC(ch)) return;
if (!IS_EXTRA(ch, EXTRA_PREGNANT))
{
send_to_char("But you are not even pregnant!\n\r",ch);
return;
}
if (!IS_EXTRA(ch, EXTRA_LABOUR))
{
send_to_char("You're not ready to give birth yet.\n\r",ch);
return;
}
if ( argument[0] == '\0' )
{
if (ch->pcdata->genes[4] == SEX_MALE)
send_to_char( "What do you wish to name your little boy?\n\r", ch );
else if (ch->pcdata->genes[4] == SEX_FEMALE)
send_to_char( "What do you wish to name your little girl?\n\r", ch );
else
send_to_char( "What do you wish to name your child?\n\r", ch );
return;
}
if (!check_parse_name( argument ))
{
send_to_char( "Thats an illegal name.\n\r", ch );
return;
}
if ( char_exists(FALSE,argument) )
{
send_to_char( "That player already exists.\n\r", ch );
return;
}
str_cpy(buf2,ch->pcdata->cparents->str);
strcat(buf2," ");
strcat(buf2,argument);
if (!birth_ok(ch, buf2))
{
send_to_char( "Bug - please inform Spiral\n\r", ch );
return;
}
argument[0] = UPPER(argument[0]);
birth_write( ch, argument );
ch->pcdata->genes[9] += 1;
REMOVE_BIT(ch->extra, EXTRA_PREGNANT);
REMOVE_BIT(ch->extra, EXTRA_LABOUR);
save_char_obj(ch);
return;
}
bool birth_ok( CHAR_DATA *ch, char *argument )
{
char buf [MAX_STRING_LENGTH];
char mum [MAX_INPUT_LENGTH];
char dad [MAX_INPUT_LENGTH];
char child [MAX_INPUT_LENGTH];
argument = one_argument( argument, mum );
argument = one_argument( argument, dad );
argument = one_argument( argument, child );
if (dad[0] == '\0')
{
send_to_char("You are unable to give birth - please inform Spiral\n\r",ch);
return FALSE;
}
if (child[0] == '\0')
{
send_to_char("You are unable to give birth - please inform Spiral\n\r",ch);
return FALSE;
}
dad[0] = UPPER(dad[0]);
child[0] = UPPER(child[0]);
if (ch->pcdata->genes[4] == SEX_MALE)
{
send_to_char("You give birth to a little boy!\n\r",ch);
sprintf(buf,"%s has given birth to %s's son, named %s!",ch->name->str,dad,child);
do_info(ch,buf);
return TRUE;
}
else if (ch->pcdata->genes[4] == SEX_FEMALE)
{
send_to_char("You give birth to a little girl!\n\r",ch);
sprintf(buf,"%s has given birth to %s's daughter, named %s!",ch->name->str,dad,child);
do_info(ch,buf);
return TRUE;
}
return FALSE;
}
bool char_exists( bool backup, char *argument )
{
FILE *fp;
char buf [MAX_STRING_LENGTH];
bool found = FALSE;
fclose( fpReserve );
if (backup)
sprintf( buf, "%sbackup/%s", PLAYER_DIR, capitalize( argument ) );
else
sprintf( buf, "%s%s", PLAYER_DIR, capitalize( argument ) );
if ( ( fp = fopen( buf, "r" ) ) != NULL )
{
found = TRUE;
fclose( fp );
}
fpReserve = fopen( NULL_FILE, "r" );
return found;
}
void birth_write( CHAR_DATA *ch, char *argument )
{
FILE *fp;
char buf [MAX_STRING_LENGTH];
char *strtime;
strtime = ctime( ¤t_time );
strtime[strlen(strtime)-1] = '\0';
sprintf( buf, "%s%s", PLAYER_DIR, capitalize( argument ) );
if ( ( fp = fopen(buf, "w") ) != NULL)
{
fprintf( fp, "#PLAYERS\n");
fprintf( fp, "Name %s~\n",capitalize( argument ));
fprintf( fp, "ShortDescr ~\n" );
fprintf( fp, "LongDescr ~\n" );
fprintf( fp, "Description ~\n" );
fprintf( fp, "Lord ~\n" );
fprintf( fp, "iCla 0\n" );
fprintf( fp, "Class 0\n" );
fprintf( fp, "Morph ~\n" );
fprintf( fp, "Createtime %s~\n", strtime );
fprintf( fp, "Lasttime ~\n" );
fprintf( fp, "Lasthost ~\n" );
fprintf( fp, "Poweraction ~\n" );
fprintf( fp, "Powertype ~\n" );
fprintf( fp, "Prompt ~\n" );
fprintf( fp, "Cprompt ~\n" );
fprintf( fp, "Sex %d\n",ch->pcdata->genes[4] );
fprintf( fp, "Race 0\n" );
fprintf( fp, "Immune %d\n",ch->pcdata->genes[3] );
fprintf( fp, "Polyaff 0\n" );
fprintf( fp, "ChrPnts 20\n" );
fprintf( fp, "Itemaffect 0\n" );
fprintf( fp, "Vampaff 0\n" );
fprintf( fp, "Vamppass 0\n" );
fprintf( fp, "Form 32767\n" );
fprintf( fp, "Beast 15\n" );
fprintf( fp, "Vampgen -1\n" );
fprintf( fp, "Spectype 0\n" );
fprintf( fp, "Specpower 0\n" );
fprintf( fp, "Home 3001\n" );
fprintf( fp, "Level 2\n" );
fprintf( fp, "Trust 0\n" );
fprintf( fp, "Played 0\n" );
fprintf( fp, "Room %d\n",ch->in_room->vnum );
fprintf( fp, "PkPdMkMd 0 0 0 0\n" );
fprintf( fp, "Weapons 0 0 0 0 0 0 0 0 0 0 0 0 0\n" );
fprintf( fp, "Spells 4 4 4 4 4\n" );
fprintf( fp, "Combat 0 0 0 0 0 0 0 0\n" );
fprintf( fp, "Stance 0 0 0 0 0 0 0 0 0 0 0\n" );
fprintf( fp, "Locationhp 0 0 0 0 0 0 0\n" );
fprintf( fp, "HpManaMove %d %d %d %d %d %d\n",
ch->pcdata->genes[0], ch->pcdata->genes[0], ch->pcdata->genes[1],
ch->pcdata->genes[1], ch->pcdata->genes[2], ch->pcdata->genes[2]);
fprintf( fp, "Gold 0\n" );
fprintf( fp, "Exp 0\n" );
fprintf( fp, "Act 1600\n" );
fprintf( fp, "Extra 32768\n" );
fprintf( fp, "AffectedBy 0\n" );
fprintf( fp, "Position 7\n" );
fprintf( fp, "Practice 0\n" );
fprintf( fp, "SavingThrow 0\n" );
fprintf( fp, "Alignment 0\n" );
fprintf( fp, "Hitroll 0\n" );
fprintf( fp, "Damroll 0\n" );
fprintf( fp, "Armor 100\n" );
fprintf( fp, "Wimpy 0\n" );
fprintf( fp, "Deaf 0\n" );
fprintf( fp, "Password %s~\n",ch->pcdata->pwd->str );
fprintf( fp, "Bamfin ~\n" );
fprintf( fp, "Bamfout ~\n" );
fprintf( fp, "Title the mortal~\n" );
fprintf( fp, "Conception ~\n" );
fprintf( fp, "Parents %s~\n",ch->pcdata->cparents->str );
fprintf( fp, "Cparents ~\n" );
fprintf( fp, "AttrPerm %d %d %d %d %d\n",
ch->pcdata->perm_str,
ch->pcdata->perm_int,
ch->pcdata->perm_wis,
ch->pcdata->perm_dex,
ch->pcdata->perm_con );
fprintf( fp, "AttrMod 0 0 0 0 0\n" );
fprintf( fp, "Quest 0\n" );
fprintf( fp, "Wolf 0\n" );
fprintf( fp, "Rank 0\n" );
fprintf( fp, "Stage 0 0 0\n" );
fprintf( fp, "Wolfform 0 0\n" );
fprintf( fp, "Runes 0 0 0 0\n" );
fprintf( fp, "Disc 0 0 0 0 0 0 0 0 0 0 0\n" );
fprintf( fp, "Genes 0 0 0 0 0 0 0 0 0 0\n" );
fprintf( fp, "FakeCon 0 0 0 0 0 0 0 0\n" );
fprintf( fp, "Condition 0 48 48\n" );
fprintf( fp, "End\n\n" );
fprintf( fp, "#END\n" );
fclose( fp );
}
return;
}
void do_induct ( CHAR_DATA * ch, char *argument )
{
CHAR_DATA *victim;
char arg [MAX_INPUT_LENGTH];
char arg2 [MAX_INPUT_LENGTH];
argument = one_argument( argument, arg );
argument = one_argument( argument, arg2 );
if (IS_NPC(ch))
return;
if (!IS_HERO(ch))
return;
if ( arg[0] == '\0' )
{
if (!IS_IMMUNE(ch, IMM_INDUCT))
{
SET_BIT(ch->immune, IMM_INDUCT);
send_to_char("You will now allow your prince to induct you.\n\r",ch);
return;
}
send_to_char("You will no longer allow your prince to induct you.\n\r",ch);
REMOVE_BIT(ch->immune, IMM_INDUCT);
return;
}
if ( ( victim = get_char_room( ch, arg ) ) == NULL )
{
send_to_char( "They aren't here.\n\r", ch );
return;
}
if ( IS_NPC(victim) )
{
send_to_char( "Not on NPC's.\n\r", ch );
return;
}
if (ch->exp < 1000000 )
{
send_to_char("You cannot afford the 1000000 exp to induct them.\n\r",ch);
return;
}
if ( IS_IMMORTAL(victim) )
{
send_to_char( "Not on Immortals's.\n\r", ch );
return;
}
if ( ch == victim )
{
send_to_char( "You cannot induct yourself.\n\r", ch );
return;
}
if ( !IS_SET(ch->special, SPC_PRINCE))
{
send_to_char( "Only the prince may induct members.\n\r", ch);
return;
}
if ( !IS_IMMUNE(victim,IMM_INDUCT) )
{
send_to_char("That player does not want to be inducted.\n\r", ch);
return;
}
if (victim->sect != SECT_INDEPENDENT)
{
if ( arg2[0] == '\0' )
{
send_to_char("That player is already inducted.\n\r", ch);
return;
}
victim->sect = SECT_INDEPENDENT;
act("$N just got kicked out of thier sect.", ch, NULL, victim, TO_CHAR);
act("$n has kicked you out of your sect.", ch, NULL, victim, TO_VICT);
return;
}
act("$N is now inducted.", ch, NULL, victim, TO_CHAR);
act("$n has inducted you in your sect.", ch, NULL, victim, TO_VICT);
victim->sect = ch->sect;
ch->exp -= 1000000;
return;
}
void do_antitribu( CHAR_DATA *ch, char *argument )
{
if ( IS_NPC(ch) )
return;
if ( !IS_CLASS(ch, CLASS_VAMPIRE) )
{
send_to_char("Huh?\n\r", ch);
return;
}
if ( IS_SET(ch->special, SPC_INDUCTED) )
{
send_to_char("You cannot antitribu if you are already inducted into a sect.\n\r", ch);
return;
}
if ( IS_SET(ch->special, SPC_ANTITRIBU) )
{
REMOVE_BIT(ch->special, SPC_ANTITRIBU);
send_to_char("You are no longer antitribu.\n\r", ch);
}
else
{
SET_BIT(ch->special, SPC_ANTITRIBU);
send_to_char( "You are now antitribu.\n\r", ch);
}
return;
}
/*
int get_disc( CHAR_DATA * ch, int discipline_no )
{
sh_int count;
if (IS_NPC(ch))
return 0;
for ( count = 0 ; count <= 10 ; count++ )
{
if ( ch->pcdata->discipline[discipline_no] > count )
continue;
else
break;
}
return count;
}
*/
int discipline_lookup (const char *name)
{
int discipline;
for ( discipline = 0; discipline < MAX_DISC;discipline++)
{
if (LOWER(name[0]) == LOWER(discipline_table[discipline].name[0])
&& !str_prefix( name,discipline_table[discipline].name))
return discipline;
}
return -1;
}
int vamp_clan_lookup (const char *name)
{
int vamp_clan;
for ( vamp_clan = 0; vamp_clan < MAX_VAMP_CLAN ;vamp_clan++)
{
if (LOWER(name[0]) == LOWER(vamp_clan_table[vamp_clan].name[0])
&& !str_prefix( name,vamp_clan_table[vamp_clan].name))
return vamp_clan;
}
return -1;
}
void increase_gifts( CHAR_DATA *ch, char *argument )
{
char arg [MAX_INPUT_LENGTH];
char buf [MAX_INPUT_LENGTH];
int improve, imp_cost;
int gt = 0;
int gift = 0;
int ww_max = 5;
one_argument( argument, arg );
if (!str_cmp(argument,"homid"))
{improve = BREED_HOMID; gt = 0;}
else if (!str_cmp(argument,"lupus"))
{improve = BREED_LUPUS; gt = 0;}
else if (!str_cmp(argument,"metis"))
{improve = BREED_METIS; gt = 0;}
else if (!str_cmp(argument,"ragabash"))
{improve = AUSPICE_RAGABASH; gt = 1;}
else if (!str_cmp(argument,"theurge"))
{improve = AUSPICE_THEURGE; gt = 1;}
else if (!str_cmp(argument,"philodox"))
{improve = AUSPICE_PHILODOX; gt = 1;}
else if (!str_cmp(argument,"galliard"))
{improve = AUSPICE_GALLIARD; gt = 1;}
else if (!str_cmp(argument,"ahroun"))
{improve = AUSPICE_AHROUN; gt = 1;}
else if (!str_cmp(argument,"black furies"))
{improve = TRIBE_BLACK_FURIES; gt = 2;}
else if (!str_cmp(argument,"bone gnawers"))
{improve = TRIBE_BONE_GNAWERS; gt = 2;}
else if (!str_cmp(argument,"children of gaia"))
{improve = TRIBE_CHILDREN_OF_GAIA; gt = 2;}
else if (!str_cmp(argument,"fianna"))
{improve = TRIBE_FIANNA; gt = 2;}
else if (!str_cmp(argument,"get of fenris"))
{improve = TRIBE_GET_OF_FENRIS; gt = 2;}
else if (!str_cmp(argument,"glass walkers"))
{improve = TRIBE_GLASS_WALKERS; gt = 2;}
else if (!str_cmp(argument,"red talons"))
{improve = TRIBE_RED_TALONS; gt = 2;}
else if (!str_cmp(argument,"shadow lords"))
{improve = TRIBE_SHADOW_LORDS; gt = 2;}
else if (!str_cmp(argument,"silent striders"))
{improve = TRIBE_SILENT_STRIDERS; gt = 2;}
else if (!str_cmp(argument,"silver fangs"))
{improve = TRIBE_SILVER_FANGS; gt = 2;}
else if (!str_cmp(argument,"stargazers"))
{improve = TRIBE_STARGAZERS; gt = 2;}
else if (!str_cmp(argument,"uktena"))
{improve = TRIBE_UKTENA; gt = 2;}
else if (!str_cmp(argument,"child of spiral"))
{improve = TRIBE_CHILD_OF_SPIRAL; gt = 2;}
else if (!str_cmp(argument,"wendigos"))
{improve = TRIBE_WENDIGO; gt = 2;}
else
{
send_to_char("You know of no such gift.\n\r",ch);
return;
}
switch (gt)
{
default: break;
case 0: gift = ch->pcdata->breed[improve];
break;
case 1: gift = ch->pcdata->auspice[improve];
break;
case 2: gift = ch->pcdata->tribes[improve];
break;
}
if (gift == 0)
{
send_to_char("You know of no such gift.\n\r",ch);
return;
}
if (gift >= ww_max)
{
send_to_char("You are unable to improve your ability in that gift any further.\n\r",ch);
return;
}
if (gift < 1)
gift = 1;
else
gift++;
if ((gt == 0 && ch->pcdata->sgift[1] == improve) || (gt == 1 && ch->pcdata->sgift[2] == improve)
|| (gt == 2 && ch->pcdata->sgift[3] == improve ))
imp_cost = gift * 50;
else
imp_cost = (gift * 50 ) * 2;
if (ch->primal_hold < imp_cost && ch->practice < imp_cost)
{
sprintf(buf,"You need another %d primal to increase that gift.\n\r",
imp_cost - ch->practice );
send_to_char(buf,ch);
return;
}
if ( gift > get_renown(ch) )
{
send_to_char("You need to raise your rank in renown before you can buy that.\n\r",ch);
return;
}
switch (gt)
{
default :
break;
case 0:
ch->pcdata->breed[improve] = gift;
break;
case 1:
ch->pcdata->auspice[improve] = gift;
break;
case 2:
ch->pcdata->tribes[improve] = gift;
break;
}
if (ch->primal_hold >= imp_cost)
ch->primal_hold -= imp_cost;
else
ch->practice -= imp_cost;
send_to_char("You improve your gift.\n\r",ch);
return;
}
bool check_power(CHAR_DATA *ch, char *argument, int power_type, int power_class, POWER_FUN *power_fun)
{
CHAR_DATA *victim,*victim_next;
char arg[MSL];
//char buf[MSL];
if (IS_NPC(ch))
{
send_to_char("Your a NPC! SHOO!\n\r",ch);
return FALSE;
}
if (!IS_CLASS(ch,power_class))
{
send_to_char("Huh?\n\r",ch);
return FALSE;
}
if (power_fun == NULL)
return FALSE;
switch (power_type)
{
default:
send_to_char("Power Type not Defined! PLease alert spiral ASAP.\n\r",ch);
return FALSE;
break;
case PTYPE_AFFECT_SELF:
(*power_fun)(ch,ch,argument);
send_to_char("\n\r",ch);
return TRUE;
break;
case PTYPE_GENERAL:
if (HAS_DELAY(ch))
{
send_to_char("Not with a wait timer.\n\r",ch);
return FALSE;
}
if (ch->fighting != NULL)
return FALSE;
(*power_fun)(ch,ch,argument);
return TRUE;
break;
case PTYPE_VICTIM_ROOM:
argument = one_argument(argument,arg);
if (HAS_DELAY(ch))
{
send_to_char("Not with a wait timer.\n\r",ch);
return FALSE;
}
if (ch->fighting != NULL)
{
send_to_char("Not while fighting.\n\r",ch);
return FALSE;
}
if ((victim=get_char_room(ch,arg))==NULL)
{
send_to_char("There not here. Umm try again.\n\r",ch);
return FALSE;
}
if (IS_ITEMAFF(ch, ITEMA_PEACE))
{
send_to_char("They wave thier banner of peace.. you surrender..\n\r",ch);
return FALSE;
}
if (HAS_DELAY(victim))
{
send_to_char("They have a wait timer... you have to wait!\n\r",ch);
return FALSE;
}
if (!IS_NPC(victim) && !IS_AVATAR(victim))
{
send_to_char("Pick on someone your own size.\n\r",ch);
return FALSE;
}
if (!IS_NPC(victim) && IS_IMMORTAL(victim))
return FALSE;
if (ch == victim)
{
send_to_char( "You cannot do this to your self!\n\r", ch );
return FALSE;
}
if (check_disc(ch,victim,CDISC_PK|CDISC_TSAFE|CDISC_PLANE|CDISC_REINA))
return FALSE;
(*power_fun)(ch,victim,argument);
return TRUE;
break;
case PTYPE_VICTIM_SELF:
argument = one_argument(argument,arg);
if (HAS_DELAY(ch))
{
send_to_char("Not with a wait timer.\n\r",ch);
return FALSE;
}
if ((victim=get_char_room(ch,arg))==NULL)
{
send_to_char("There not here. Umm try again.\n\r",ch);
return FALSE;
}
if (IS_ITEMAFF(ch, ITEMA_PEACE))
{
send_to_char("They wave thier banner of peace.. you surrender..\n\r",ch);
return FALSE;
}
if (HAS_DELAY(victim))
{
send_to_char("They have a wait timer... you have to wait!\n\r",ch);
return FALSE;
}
if (!IS_NPC(victim) && !IS_AVATAR(victim))
{
send_to_char("Pick on someone your own size.\n\r",ch);
return FALSE;
}
if (!IS_NPC(victim) && IS_IMMORTAL(victim))
return FALSE;
if (check_disc(ch,victim,CDISC_PK|CDISC_TSAFE|CDISC_PLANE|CDISC_REINA))
return FALSE;
(*power_fun)(ch,victim,argument);
return TRUE;
break;
case PTYPE_OFFENCE_VICTIM_ROOM:
argument = one_argument(argument,arg);
if (HAS_DELAY(ch))
{
send_to_char("Not with a wait timer.\n\r",ch);
return FALSE;
}
if ((victim=get_char_room(ch,arg))==NULL)
{
if (ch->fighting == NULL)
{
send_to_char("There not here. Umm try again.\n\r",ch);
return FALSE;
}
else
victim = ch->fighting;
}
if (IS_ITEMAFF(ch, ITEMA_PEACE))
{
send_to_char("They wave thier banner of peace.. you surrender..\n\r",ch);
return FALSE;
}
if (HAS_DELAY(victim))
{
send_to_char("They have a wait timer... you have to wait!\n\r",ch);
return FALSE;
}
if (!IS_NPC(victim) && !IS_AVATAR(victim))
{
send_to_char("Pick on someone your own size.\n\r",ch);
return FALSE;
}
if (!IS_NPC(victim) && IS_IMMORTAL(victim))
return FALSE;
if (ch == victim)
{
send_to_char( "You cannot do this to your self!\n\r", ch );
return FALSE;
}
if (check_disc(ch,victim,CDISC_PK|CDISC_TSAFE|CDISC_PLANE|CDISC_REINA))
return FALSE;
(*power_fun)(ch,victim,argument);
return TRUE;
break;
case PTYPE_VICTIM_GLOBAL:
argument = one_argument(argument,arg);
if (HAS_DELAY(ch))
{
send_to_char("Not with a wait timer.\n\r",ch);
return FALSE;
}
if (ch->fighting != NULL)
{
send_to_char("Not while fighting.\n\r",ch);
return FALSE;
}
if ((victim=get_char_world(ch,arg))==NULL)
{
send_to_char("There not here. Umm try again.\n\r",ch);
return FALSE;
}
if (IS_ITEMAFF(ch, ITEMA_PEACE))
{
send_to_char("They wave thier banner of peace.. you surrender..\n\r",ch);
return FALSE;
}
if (!IS_NPC(victim) && IS_IMMORTAL(victim))
return FALSE;
if (!IS_NPC(victim) && !IS_AVATAR(victim))
{
send_to_char("Pick on someone your own size.\n\r",ch);
return FALSE;
}
if (HAS_DELAY(victim))
{
send_to_char("They have a wait timer... you have to wait!\n\r",ch);
return FALSE;
}
if (ch == victim)
{
send_to_char( "You cannot do this to your self!\n\r", ch );
return FALSE;
}
if (check_disc(ch,victim,CDISC_PK|CDISC_TSAFE|CDISC_PLANE|CDISC_REINA))
return FALSE;
(*power_fun)(ch,victim,argument);
return TRUE;
break;
case PTYPE_OFFENCE_VICTIM_GLOBAL:
if (HAS_DELAY(ch))
{
send_to_char("Not with a wait timer.\n\r",ch);
return FALSE;
}
for(victim = ch->in_room->people; victim != NULL; victim = victim_next)
{
victim_next = victim->next_in_room;
if (IS_ITEMAFF(ch, ITEMA_PEACE))
continue;
if (!IS_NPC(victim) && IS_IMMORTAL(victim))
continue;
if (HAS_DELAY(victim))
continue;
if (!IS_NPC(victim) && !IS_AVATAR(victim))
continue;
if (ch == victim)
continue;
if (check_disc(ch,victim,CDISC_PK|CDISC_TSAFE|CDISC_PLANE|CDISC_REINA))
continue;
(*power_fun)(ch,victim,argument);
}
return TRUE;
break;
case PTYPE_OFFENCE_RORP:
argument = one_argument(argument,arg);
if (HAS_DELAY(ch))
{
send_to_char("Not with a wait timer.\n\r",ch);
return FALSE;
}
if (!str_cmp(arg,"all"))
{
for(victim = ch->in_room->people; victim != NULL; victim = victim_next)
{
victim_next = victim->next_in_room;
if (IS_ITEMAFF(ch, ITEMA_PEACE))
continue;
if (!IS_NPC(ch) && IS_IMMORTAL(victim))
continue;
if (!IS_NPC(ch) && !IS_AVATAR(victim))
continue;
if (HAS_DELAY(victim))
continue;
if (ch == victim)
continue;
if (check_disc(ch,victim,CDISC_PK|CDISC_TSAFE|CDISC_PLANE|CDISC_REINA))
continue;
(*power_fun)(ch,victim,argument);
}
return TRUE;
}
else if ((victim=get_char_room(ch,arg))==NULL)
{
send_to_char("There not here. Umm try again.\n\r",ch);
return FALSE;
}
if (IS_ITEMAFF(ch, ITEMA_PEACE))
{
send_to_char("They wave thier banner of peace.. you surrender..\n\r",ch);
return FALSE;
}
if (HAS_DELAY(victim))
{
send_to_char("They have a wait timer... you have to wait!\n\r",ch);
return FALSE;
}
if (!IS_NPC(victim) && !IS_AVATAR(victim))
{
send_to_char("Pick on someone your own size.\n\r",ch);
return FALSE;
}
if (ch == victim)
{
send_to_char( "You cannot do this to your self!\n\r", ch );
return FALSE;
}
if (!IS_NPC(victim) && IS_IMMORTAL(victim))
return FALSE;
if (check_disc(ch,victim,CDISC_PK|CDISC_TSAFE|CDISC_PLANE|CDISC_REINA))
return FALSE;
(*power_fun)(ch,victim,argument);
return TRUE;
break;
}
return FALSE;
}
bool power_pool_check(CHAR_DATA *ch, int power_class, int pool_need)
{
if (IS_NPC(ch))
return FALSE;
switch (power_class)
{
case CLASS_MAGE:
if (ch->mana < pool_need)
{
send_to_char("You don't have the needed mana.\n\r",ch);
return FALSE;
}
break;
case CLASS_VAMPIRE:
if (ch->pcdata->condition[COND_THIRST] < pool_need)
{
send_to_char("You don't have the blood pool needed.\n\r",ch);
return FALSE;
}
break;
case CLASS_WEREWOLF:
break;
case CLASS_SWWF:
if (ch->pcdata->rage_points < pool_need)
{
send_to_char("You don't have the rage needed!\n\r",ch);
return FALSE;
}
break;
}
return TRUE;
}
bool power_req_check(CHAR_DATA *ch, int power_class, int power_need, int power_level, int wwf_gift)
{
switch (power_class)
{
case CLASS_MAGE:
/*
* Example of Needed Foci check..
*/
if (has_sphere(ch,power_need) < power_level)
{
return FALSE;
}
if (!check_has_foci(ch,power_need, power_level))
{
return FALSE;
}
break;
case CLASS_VAMPIRE:
if (power_need == DISC_EVERYONE) {
return TRUE;
}
if (get_disc(ch,power_need) < power_level)
return FALSE;
break;
case CLASS_WEREWOLF:
if (ch->pcdata->powers[power_need] < power_level)
return FALSE;
break;
case CLASS_SWWF:
if (power_level > get_renown(ch))
return FALSE;
switch (wwf_gift)
{
case GT_BREED:
if (get_breed(ch,power_need) < power_level)
return FALSE;
break;
case GT_AUSPICE:
if (get_auspice(ch,power_need) < power_level)
return FALSE;
break;
case GT_TRIBE:
if (get_tribe(ch,power_need) < power_level)
return FALSE;
break;
}
break;
}
return TRUE;
}
void do_powers(CHAR_DATA *ch, char *argument)
{
char buf[MAX_STRING_LENGTH];
char buf2[MAX_STRING_LENGTH];
char arg[MSL];
char arg1[MSL];
int cmd,want_sphere,cost,gt,count,lcount=0;
bool fFound = FALSE, fPower = FALSE;
buf[0] = '\0';
buf2[0] = '\0';
argument = one_argument(argument,arg);
if (IS_NPC(ch)){
send_to_char("huh\n\r",ch);
return;
}
if (!IS_AVATAR(ch) && !IS_IMMORTAL(ch))
{
send_to_char("Your not a avatar! Shoo!!!\n\r",ch);
return;
}
switch (ch->creature)
{
default:
if (IS_SET(ch->pcdata->stats[UNI_AFF], VAM_MORTAL))
{
send_to_char("You skin pales and cools.\n\r",ch);
act("$n's skin pales slightly.", ch, NULL, NULL, TO_ROOM);
ch->creature=CLASS_VAMPIRE;
REMOVE_BIT(ch->pcdata->stats[UNI_AFF], VAM_MORTAL);
return;
}
//Add mortal command here for vampires... make sure they are set...
send_to_char("You don't have any powers! SHOO!!!\n\r",ch);
return;
break;
case CLASS_MAGE:
//If No argument list power matrix
if ( arg[0] == '\0' )
{
send_to_char("Current Spheres:\n\r",ch);
sprintf(buf,"{CCorrespondence: {Y[{c%3d{Y] {CEntropy: {Y[{c%3d{Y] {CForces: {Y[{c%3d{Y]{x\n\r",has_sphere(ch,SPHERE_CORRESPONDENCE),
has_sphere(ch,SPHERE_ENTROPY),has_sphere(ch,SPHERE_FORCES));
send_to_char(buf,ch);
sprintf(buf,"{CMind: {Y[{c%3d{Y] {CMatter: {Y[{c%3d{Y] {CPrime: {Y[{c%3d{Y]{x\n\r",has_sphere(ch,SPHERE_MIND),
has_sphere(ch,SPHERE_MATTER),has_sphere(ch,SPHERE_PRIME));
send_to_char(buf,ch);
sprintf(buf,"{CSpirit: {Y[{c%3d{Y] {CLife: {Y[{c%3d{Y] {CTime: {Y[{c%3d{Y]{x\n\r",has_sphere(ch,SPHERE_SPIRIT),
has_sphere(ch,SPHERE_LIFE),has_sphere(ch,SPHERE_TIME));
send_to_char(buf,ch);
sprintf(buf,"\n\rArete: %d\n\r",ch->arete);
send_to_char(buf,ch);
send_to_char( "--------------------------------------------------------------------------------\n\r", ch );
send_to_char("To improve a Sphere rating, type: powers improve <Sphere name>\n\r",ch);
send_to_char("To list a Sphere rating, type: powers list <Sphere name>\n\r",ch);
send_to_char( "--------------------------------------------------------------------------------\n\r", ch );
return;
}
if (!str_cmp(arg,"improve"))
{
argument = one_argument( argument, arg1 );
if (( want_sphere = sphere_lookup(arg1) ) != 666 )
cost = (((has_sphere(ch,want_sphere) + 1) * 50) + 50);
else
{
send_to_char("Available spheres:\n\r",ch);
send_to_char("Correspondence, Entropy, Forces, Mind, Matter,\n\r",ch);
send_to_char("Prime, Spirit, Life, and Time\n\r",ch);
return;
}
if ( cost > ch->practice )
{
send_to_char("You can't afford this, you need more primal.\n\r",ch);
return;
}
if ( ch->arete < (has_sphere(ch,want_sphere) + 1))
{
send_to_char("You must raise your Arete level.\n\r",ch);
return;
}
/* this doesnt work properly */
if ( has_sphere(ch,want_sphere) == 0 && sphere_count(ch) >= 6 && ((sphere_count(ch)) > (((get_age(ch) + 17 ) * 2) / 100) + 2))
{
send_to_char("You don't have the required hours to get another sphere.\n\r",ch);
return;
}
ch->practice -= cost;
ch->pcdata->spent[SPENT_P] += cost;
ch->pcdata->discipline[want_sphere]++;
sprintf(buf,"Your %s increases!\n\r", arg1);
send_to_char(buf,ch);
return;
}
//If "list" list the powers
if (!strcmp(arg,"list"))
{
for (cmd = 0; mage_cmds[cmd].set_num != 0; cmd++)
{
if (has_sphere(ch,mage_cmds[cmd].set_type) >= mage_cmds[cmd].set_num && mage_cmds[cmd].command != NULL)
{
sprintf(buf,"{W({b%d{W){x %s {R%s{x\n\r",mage_cmds[cmd].set_num,mage_cmds[cmd].name,mage_cmds[cmd].command);
send_to_char(buf,ch);
}
}
return;
}
for (cmd = 0; mage_cmds[cmd].set_num != 0; cmd++)
{
if (mage_cmds[cmd].command == NULL)
continue;
if (!str_prefix(arg,mage_cmds[cmd].command))
{
if (IS_EXTRA(ch,TIED_UP) && strcmp("flex",mage_cmds[cmd].command))
{
send_to_char("You are all tied up..\n\r",ch);
return;
}
//Check power requierments.. each call has it's own.. so we do it here.
if (!power_req_check(ch,CLASS_MAGE,mage_cmds[cmd].set_type,
mage_cmds[cmd].set_num,
mage_cmds[cmd].gift_type))
{
fPower = FALSE;
continue;
}
//Check thier pool cost..
if (!power_pool_check(ch,CLASS_MAGE,mage_cmds[cmd].pool_cost))
return;
//Check everything else that we need..
if (!check_power(ch,argument,mage_cmds[cmd].command_type,CLASS_MAGE,mage_cmds[cmd].power_fun ))
{
fPower = FALSE;
return;
}
else
fPower = TRUE;
//post power checks here...
//Add Gain Paradox and Mana Drain Here
if (!IS_NPC(ch))
ch->mana -= mage_cmds[cmd].pool_cost;
ch->paradox[0] += gain_paradox(ch);
//Delay them per table
WAIT_STATE(ch,mage_cmds[cmd].wait_time);
return;
}
}
if (!fPower)
{
send_to_char("Power not found, or You Don't have the req's for it.\n\r",ch);
return;
}
break;
case CLASS_WEREWOLF:
//If No argument list power matrix
if ( arg[0] == '\0' )
{
sprintf(buf,"Totems:\n\r{GBear {g({G%d{g) {GLynx {g({G%d{g) {GBoar {g({G%d{g)\n\r{GOwl {g({G%d{g) {GSpider {g({G%d{g) {GWolf {g({G%d{g),\n\r{GHawk {g({G%d{g) {GMantis {g({G%d{g) {GShark {g({G%d{g)\n\r{GSphinx {g({G%d{g) {GRat {g({G%d{g) {GChameleon {g({G%d{g).{x\n\r",
ch->pcdata->powers[WPOWER_BEAR], ch->pcdata->powers[WPOWER_LYNX],
ch->pcdata->powers[WPOWER_BOAR], ch->pcdata->powers[WPOWER_OWL],
ch->pcdata->powers[WPOWER_SPIDER], ch->pcdata->powers[WPOWER_WOLF],
ch->pcdata->powers[WPOWER_HAWK],ch->pcdata->powers[WPOWER_MANTIS],
ch->pcdata->powers[WPOWER_SHARK],ch->pcdata->powers[WPOWER_SPHINX],
ch->pcdata->powers[WPOWER_RAT],ch->pcdata->powers[WPOWER_CHAMELEON]);
send_to_char(buf,ch);
send_to_char( "--------------------------------------------------------------------------------\n\r", ch );
send_to_char("To improve a Totem rating, type: powers improve <Totem name>\n\r",ch);
send_to_char("To list a Totem rating, type: powers list <Totem name>\n\r",ch);
send_to_char( "--------------------------------------------------------------------------------\n\r", ch );
return;
}
if (!str_cmp(arg,"improve"))
{
int improve;
int cost;
int max;
bool ADVANCED_TOT = FALSE;
one_argument( argument, arg1 );
if (!str_cmp(arg1,"bear" ))
{
improve = WPOWER_BEAR; max=5;
}
else if (!str_cmp(arg1,"boar" ))
{
improve = WPOWER_BOAR; max=5;
}
else if (!str_cmp(arg1,"lynx" ))
{
improve = WPOWER_LYNX; max=5;
}
else if (!str_cmp(arg1,"owl" ))
{
improve = WPOWER_OWL; max=4;
}
else if (!str_cmp(arg1,"spider" ))
{
improve = WPOWER_SPIDER; max=3;
}
else if (!str_cmp(arg1,"wolf" ))
{
improve = WPOWER_WOLF; max=4;
}
else if (!str_cmp(arg1,"hawk" ))
{
improve = WPOWER_HAWK; max=3;
}
else if (!str_cmp(arg1,"mantis" ))
{
improve = WPOWER_MANTIS; max=4;
}
else if (!str_cmp(arg1,"shark" ))
{
if (ch->pcdata->powers[WPOWER_MANTIS] < 4 || ch->pcdata->powers[WPOWER_BEAR] < 5)
{
send_to_char("You must have Mantis 4 and Bear 5 before you get the Shark Totem.\n\r",ch);
return;
}
ADVANCED_TOT = TRUE;
improve = WPOWER_SHARK; max=5;
}
else if (!str_cmp(arg1,"sphinx" ))
{
if (ch->pcdata->powers[WPOWER_OWL] < 4 || ch->pcdata->powers[WPOWER_HAWK] < 3)
{
send_to_char("You must have Owl 4 and Hawk 3 before you get the Sphinx Totem.\n\r",ch);
return;
}
ADVANCED_TOT = TRUE;
improve = WPOWER_SPHINX; max=5;
}
else if (!str_cmp(arg1,"rat" ))
{
if (ch->pcdata->powers[WPOWER_SPIDER] < 3 || ch->pcdata->powers[WPOWER_BOAR] < 5)
{
send_to_char("You must have Spider 3 and Boar 5 before you get the Rat Totem.\n\r",ch);
return;
}
ADVANCED_TOT = TRUE;
improve = WPOWER_RAT; max=5;
}
else if (!str_cmp(arg1,"chameleon" ))
{
if (ch->pcdata->powers[WPOWER_LYNX] < 5 || ch->pcdata->powers[WPOWER_WOLF] < 4)
{
send_to_char("You must have Lynx 5 and Wolf 4 before you get the Chameleon Totem.\n\r",ch);
return;
}
ADVANCED_TOT = TRUE;
improve = WPOWER_CHAMELEON; max=5;
}
else
{
send_to_char("You can improve: Bear, Boar, Lynx, Owl, Spider, Wolf, Hawk, Mantis, Shark, Sphinx, Rat or Chameleon.\n\r",ch);
return;
}
if ( ADVANCED_TOT == FALSE )
cost = (ch->pcdata->powers[improve]+1) * COST_TOTEM;
else
cost = ((ch->pcdata->powers[improve]+1) * COST_TOTEM) + 50;
arg1[0] = UPPER(arg1[0]);
if ( ch->pcdata->powers[improve] >= max )
{
sprintf(buf,"You have already gained all the powers of the %s totem.\n\r", arg1);
send_to_char(buf,ch);
return;
}
if ( cost > ch->practice )
{
sprintf(buf,"It costs you %d primal to improve your %s totem.\n\r", cost, arg1);
send_to_char(buf,ch);
return;
}
ch->pcdata->powers[improve] += 1;
ch->practice -= cost;
ch->pcdata->spent[SPENT_P] += cost;
sprintf(buf,"You improve your ability in the %s totem.\n\r", arg1);
send_to_char(buf,ch);
}
//If "list" list the powers
if (!strcmp(arg,"list"))
{
for (cmd = 0; wwf_tot_cmds[cmd].set_num != 0; cmd++)
{
if (ch->pcdata->powers[wwf_tot_cmds[cmd].set_type] >= wwf_tot_cmds[cmd].set_num && wwf_tot_cmds[cmd].command != NULL)
{
sprintf(buf,"{W({b%d{W){x %s {R%s{x\n\r",wwf_tot_cmds[cmd].set_num,wwf_tot_cmds[cmd].name,wwf_tot_cmds[cmd].command);
send_to_char(buf,ch);
}
}
return;
}
//if "improve" run the improve funtion
for (cmd = 0; wwf_tot_cmds[cmd].set_num != 0; cmd++)
{
if (wwf_tot_cmds[cmd].command == NULL)
continue;
if (!str_prefix(arg,wwf_tot_cmds[cmd].command))
{
if (IS_EXTRA(ch,TIED_UP) && strcmp("flex",wwf_tot_cmds[cmd].command))
{
send_to_char("You are all tied up..\n\r",ch);
return;
}
//Check power requierments.. each call has it's own.. so we do it here.
if (!power_req_check(ch,CLASS_WEREWOLF,wwf_tot_cmds[cmd].set_type,
wwf_tot_cmds[cmd].set_num,
wwf_tot_cmds[cmd].gift_type))
{
continue;
}
//Check thier pool cost..
if (!power_pool_check(ch,CLASS_WEREWOLF,wwf_tot_cmds[cmd].pool_cost))
return;
//Check everything else that we need..
if (!check_power(ch,argument,wwf_tot_cmds[cmd].command_type,CLASS_WEREWOLF,wwf_tot_cmds[cmd].power_fun ))
{
fPower = FALSE;
return;
}
else
fPower = TRUE;
//Delay them per table
WAIT_STATE(ch,wwf_tot_cmds[cmd].wait_time);
return;
}
}
break;
case CLASS_VAMPIRE:
//If No argument list power matrix
if ( arg[0] == '\0' )
{
send_to_char("Current powers:\n\r",ch);
str_cpy(buf2,"");
str_cpy(buf,"");
for ( count = 0 ; count < MAX_DISC ; count++ )
{
str_cpy(buf2,"");
if ( get_disc(ch,count) > 0 && !IS_VAMPPASS(ch,count) )
{
sprintf(buf2,"{R%s {B[{W%3d{B]{x", discipline_table[count].name, get_disc(ch,count));
fFound = TRUE;
}
else if ( IS_VAMPPASS(ch,count) )
{
sprintf(buf2,"{R%s {B[{W%3d{B]{x", discipline_table[count].name_caps, get_disc(ch,count));
fFound = TRUE;
}
if (strcmp(buf2,""))
{
lcount += 1;
if ( lcount >= 3 )
{
strcat(buf," ");
strcat(buf, buf2);
strcat(buf, "\n\r");
send_to_char(buf, ch);
lcount = 0;
str_cpy(buf, "");
}
else
{
if ( lcount > 1 )
strcat(buf," ");
strcat(buf, buf2);
}
}
}
if (fFound)
{
send_to_char(buf,ch);
}
else
send_to_char(" None",ch);
send_to_char("\n\r",ch);
send_to_char( "--------------------------------------------------------------------------------\n\r", ch );
send_to_char("To improve a Discipline rating, type: powers improve <Discipline name>\n\r",ch);
send_to_char("To list a Discipline rating, type: powers list <Discipline name>\n\r",ch);
send_to_char( "--------------------------------------------------------------------------------\n\r", ch );
return;
}
if ( !IS_NPC(ch) && IS_SET(ch->added, ADDED_CHAMELEON))
{
power_chameleon(ch,ch,argument);
return;
}
if (IS_EXTRA(ch,EXTRA_OSWITCH) )
{
power_essence(ch,ch,argument);
return;
}
//If "list" list the powers
if (!strcmp(arg,"list"))
{
one_argument(argument,arg1);
for (cmd = 0; vamp_cmds1[cmd].set_num != 0; cmd++)
{
if (get_disc(ch,vamp_cmds1[cmd].set_type) >= vamp_cmds1[cmd].set_num && vamp_cmds1[cmd].name != NULL && vamp_cmds1[cmd].command != NULL)
{
if (arg1[0] != '\0' && str_prefix(arg1,discipline_table[vamp_cmds1[cmd].set_type].name))
continue;
sprintf(buf,"{W({b%s %d{W){x %s {R%s{x\n\r",discipline_table[vamp_cmds1[cmd].set_type].name, vamp_cmds1[cmd].set_num,vamp_cmds1[cmd].name,vamp_cmds1[cmd].command);
send_to_char(buf,ch);
}
}
return;
}
//if "improve" run the improve funtion
if (!strcmp(arg,"improve"))
{
int count, discipline;
int clancount = 0, clanmax = 10;
int ratemax = 10; //What the Hell is this??? - Spiral
int cost[MAX_DISC];
one_argument( argument, arg1 );
if (ch->pcdata->stats[UNI_CURRENT] == -1)
{
for ( count = 0 ; count < MAX_DISC ; count++ )
{
if ( get_disc(ch,count) > 0 )
ch->pcdata->Ninherited[count] = 1;
}
}
if (ch->pcdata->stats[UNI_GEN] >= 2)
{
clanmax = 12;
ratemax = 9;
}
if (ch->pcdata->stats[UNI_GEN] >= 3) ratemax = 8;
if (ch->pcdata->stats[UNI_GEN] >= 4)
{
clanmax = UMAX( 3, ( 14 - ch->pcdata->stats[UNI_GEN] ) );
ratemax = 6;
}
if (ch->pcdata->stats[UNI_GEN] >= 5) clanmax += 1;
// if (ch->pcdata->stats[UNI_GEN] >= 6) ratemax = 5;
// if (ch->pcdata->stats[UNI_GEN] >= 8) ratemax = 4;
if (ch->pcdata->stats[UNI_GEN] >= 7) ratemax = 5;
if (ch->pcdata->stats[UNI_GEN] >=10) ratemax = 4;
if (ch->pcdata->rank == AGE_ANCILLA ) clanmax += 1;
if (ch->pcdata->rank == AGE_ELDER ) clanmax += 2;
if (ch->pcdata->rank == AGE_METHUSELAH )
{
ratemax += 1;
clanmax += 3;
//extra Disc for those Meth Vamps
}
for ( count = 0 ; count < MAX_DISC; count++ )
{
if ( get_disc(ch,count) > 0 || IS_VAMPPASS(ch,count) )
clancount++;
}
if ( (discipline = discipline_lookup(arg1)) != -1 )
{
cost[discipline] = 0;
if ( IS_VAMPPASS(ch,discipline) )
cost[discipline] = ( get_disc(ch,discipline) >= ratemax ? 0 : COST_DIS * get_disc(ch,discipline) ) ;
else
cost[discipline] = ( get_disc(ch,discipline) >= ratemax ? 0 : COST_DIS * (get_disc(ch,discipline) + 1) + COST_DIS);
if (ch->pcdata->disc[discipline] == 0 && ch->pcdata->Ninherited[discipline] != 1)
{
send_to_char("You do not own that Discipline.\n\r",ch);
return;
}
if ((ch->pcdata->disc[discipline] + 1) > ratemax)
{
send_to_char("You cannot raise that discipline anymore.\n\r",ch);
return;
}
if (ch->practice < cost[discipline])
{
sprintf(buf,"You do not have the requiered %d Primal.\n\r",cost[discipline]);
send_to_char(buf,ch);
return;
}
sprintf(buf,"You master the discipline of {R%s %d{x.\n\r",
discipline_table[discipline].name,
get_disc(ch,discipline) + 1);
send_to_char(buf, ch);
/*
clan_table_powerselect(ch,discipline_table[discipline].name);
*/
ch->pcdata->disc[discipline]++;
ch->practice -= cost[discipline];
ch->pcdata->spent[SPENT_P] += cost[discipline];
return;
}
else
{
send_to_char( "No such discipline.\n\r", ch );
}
return;
}
for (cmd = 0; vamp_cmds1[cmd].set_num != 0; cmd++)
{
if (vamp_cmds1[cmd].command == NULL)
continue;
if (!str_prefix(arg,vamp_cmds1[cmd].command))
{
if (IS_EXTRA(ch,TIED_UP) && strcmp("flex",vamp_cmds1[cmd].command))
{
send_to_char("You are all tied up..\n\r",ch);
return;
}
//Check power requierments.. each call has it's own.. so we do it here.
if (!power_req_check(ch,CLASS_VAMPIRE,vamp_cmds1[cmd].set_type,
vamp_cmds1[cmd].set_num,
vamp_cmds1[cmd].gift_type))
{
continue;
}
//Check thier pool cost..
if (!power_pool_check(ch,CLASS_VAMPIRE,vamp_cmds1[cmd].pool_cost))
return;
//Check everything else that we need..
if (!check_power(ch,argument,vamp_cmds1[cmd].command_type,CLASS_VAMPIRE,vamp_cmds1[cmd].power_fun ))
{
//send_to_char("Your power failed.\n\r",ch);
return;
}
//post power checks here...
//Drain Pool...
if (!IS_NPC(ch))
ch->pcdata->condition[COND_THIRST] -= number_range(vamp_cmds1[cmd].pool_cost / 2, vamp_cmds1[cmd].pool_cost);
//Delay them per table
WAIT_STATE(ch,vamp_cmds1[cmd].wait_time);
return;
}
}
break;
case CLASS_SWWF:
if ( arg[0] == '\0' )
{
sprintf(buf,"Breed: \n\r");
for (cmd = 0; cmd <= BREED_MAX;cmd++)
{
if ((ch->pcdata->breed[cmd] == -1) || (ch->pcdata->breed[cmd] > 0))
{
if (ch->pcdata->breed[cmd] == -1)
gt = 0;
else
gt = ch->pcdata->breed[cmd];
sprintf(buf2," {R%s{W: {W({B%d{W){x",breed_table[cmd].haunt,gt );
if (strlen(buf) >= 70)
{
strcat(buf,"\n\r");
send_to_char(buf,ch);
strcpy(buf,buf2);
}
else
strcat(buf,buf2);
}
}
if (buf[0] != '\0')
{
strcat(buf,"\n\r");
send_to_char(buf,ch);
}
sprintf(buf,"Auspice: \n\r");
for (cmd = 0; cmd <= AUSPICE_MAX;cmd++)
{
if ((ch->pcdata->auspice[cmd] == -1) || (ch->pcdata->auspice[cmd] > 0))
{
if (ch->pcdata->auspice[cmd] == -1)
gt = 0;
else
gt = ch->pcdata->auspice[cmd];
sprintf(buf2," {R%s{W: {W({B%d{W){x",auspice_table[cmd].haunt,gt );
if (strlen(buf) >= 70)
{
strcat(buf,"\n\r");
send_to_char(buf,ch);
strcpy(buf,buf2);
}
else
strcat(buf,buf2);
}
}
if (buf[0] != '\0')
{
strcat(buf,"\n\r");
send_to_char(buf,ch);
}
sprintf(buf,"Tribe: \n\r");
for (cmd = 0; cmd <= TRIBE_MAX;cmd++)
{
if ((ch->pcdata->tribes[cmd] == -1) || (ch->pcdata->tribes[cmd] > 0))
{
if (ch->pcdata->tribes[cmd] == -1)
gt = 0;
else
gt = ch->pcdata->tribes[cmd];
sprintf(buf2," {R%s{W: {W({B%d{W){x",tribe_table[cmd].haunt,gt );
if (strlen(buf) >= 70)
{
strcat(buf,"\n\r");
send_to_char(buf,ch);
strcpy(buf,buf2);
}
else
strcat(buf,buf2);
}
}
if (buf[0] != '\0')
{
strcat(buf,"\n\r");
send_to_char(buf,ch);
}
send_to_char( "--------------------------------------------------------------------------------\n\r", ch );
send_to_char("To improve a gift rating, type: powers improve <gift name>\n\r",ch);
send_to_char("To list a gift rating, type: powers list <gift name>\n\r",ch);
send_to_char( "--------------------------------------------------------------------------------\n\r", ch );
return;
}
else
{
if (!strcmp(arg,"improve"))
{
increase_gifts( ch,argument );
return;
}
if (!strcmp(arg,"list"))
{
one_argument(argument,arg1);
for (cmd = 0; wwf_gift_cmds[cmd].set_num != 0; cmd++)
{
//then display the commands based on Type
switch (wwf_gift_cmds[cmd].gift_type)
{
default:
break;
case GT_BREED:
if (get_breed(ch,wwf_gift_cmds[cmd].set_type) >= wwf_gift_cmds[cmd].set_num)
{
if (arg1[0] != '\0' && str_prefix(arg1,breed_table[wwf_gift_cmds[cmd].set_type].haunt))
continue;
sprintf(buf,"{W({b%15s%d{W){x %s {R%s{x\n\r",breed_table[wwf_gift_cmds[cmd].set_type].haunt,wwf_gift_cmds[cmd].set_num,wwf_gift_cmds[cmd].name,wwf_gift_cmds[cmd].command);
send_to_char(buf,ch);
}
break;
case GT_AUSPICE:
if (get_auspice(ch,wwf_gift_cmds[cmd].set_type) >= wwf_gift_cmds[cmd].set_num)
{
if (arg1[0] != '\0' && str_prefix(arg1,auspice_table[wwf_gift_cmds[cmd].set_type].haunt))
continue;
sprintf(buf,"{W({b%15s%d{W){x %s {R%s{x\n\r",auspice_table[wwf_gift_cmds[cmd].set_type].haunt,wwf_gift_cmds[cmd].set_num,wwf_gift_cmds[cmd].name,wwf_gift_cmds[cmd].command);
send_to_char(buf,ch);
}
break;
case GT_TRIBE:
if (get_tribe(ch,wwf_gift_cmds[cmd].set_type) >= wwf_gift_cmds[cmd].set_num)
{
if (arg1[0] != '\0' && str_prefix(arg1,tribe_table[wwf_gift_cmds[cmd].set_type].haunt))
continue;
sprintf(buf,"{W({b%15s%d{W){x %s {R%s{x\n\r",tribe_table[wwf_gift_cmds[cmd].set_type].haunt,wwf_gift_cmds[cmd].set_num,wwf_gift_cmds[cmd].name,wwf_gift_cmds[cmd].command);
send_to_char(buf,ch);
}
break;
}
}
}
for (cmd = 0; wwf_gift_cmds[cmd].set_num != 0; cmd++)
{
if (wwf_gift_cmds[cmd].command == NULL)
continue;
if (IS_EXTRA(ch,TIED_UP) && strcmp("flex",wwf_gift_cmds[cmd].command))
{
send_to_char("You are all tied up..\n\r",ch);
return;
}
//Check for name first..
if (!str_prefix(arg,wwf_gift_cmds[cmd].command))
{
//Check power requierments.. each call has it's own.. so we do it here.
if (!power_req_check(ch,CLASS_SWWF,wwf_gift_cmds[cmd].set_type,
wwf_gift_cmds[cmd].set_num,
wwf_gift_cmds[cmd].gift_type))
continue;
//Check thier pool cost..
if (!power_pool_check(ch,CLASS_SWWF,wwf_gift_cmds[cmd].pool_cost))
return;
//Check everything else that we need..
if (!check_power(ch,argument,wwf_gift_cmds[cmd].command_type,CLASS_SWWF,wwf_gift_cmds[cmd].power_fun ))
{
//send_to_char("Your power failed.\n\r",ch);
return;
}
//post power checks here...
//Drain Pool...
if (!IS_NPC(ch))
ch->pcdata->rage_points -= wwf_gift_cmds[cmd].pool_cost;
//Delay them per table
WAIT_STATE(ch,wwf_gift_cmds[cmd].wait_time);
return;
}
}
}
break;
}
return;
}
int gain_paradox( CHAR_DATA *ch)
{
int paradox =0;
CHAR_DATA *rch;
for ( rch = ch->in_room->people; rch != NULL; rch = rch->next_in_room )
{
if (!IS_NPC(rch) && ch != rch && !IS_IMMORTAL(rch))
{
if (!IS_AVATAR(rch))
paradox += 3;
else if (!IS_MAGE(rch))
paradox += 1;
}
}
return paradox;
}
int mage_affect_slot(char * command)
{
int cmd;
for ( cmd = 0; mage_affect_table[cmd].spell_name[0] != '\0'; cmd++ )
{
if ( !str_prefix( command, mage_affect_table[cmd].spell_name))
return cmd;
}
return 666;
}
int sphere_lookup(char * sphere)
{
int cmd;
for ( cmd = 0; mage_sphere_table[cmd].sphere_name[0] != '\0'; cmd++ )
{
if ( !str_prefix( sphere, mage_sphere_table[cmd].sphere_name))
return cmd;
}
return 666;
}
int obj_sphere_count(OBJ_DATA *obj)
{
int sphere_count = 0;
int count;
for ( count = 0 ; count <= 8 ; count++ )
{
if ( obj->sphere[count] > 0 )
sphere_count++;
}
return sphere_count;
}
int obj_has_sphere( OBJ_DATA * obj, int discipline_no )
{
sh_int count;
for ( count = 0 ; count <= 9 ; count++ )
{
if ( obj->sphere[discipline_no] > count )
continue;
else
break;
}
return count;
}
bool check_has_foci( CHAR_DATA *ch, int Sphere_num, int Sphere_Lev)
{
OBJ_DATA *obj;
if (Sphere_Lev >= 2 && ((get_age(ch) - 17) * 2) <= 300)
{
if ( ( obj = get_obj_wear( ch, "foci" ) ) == NULL )
{
send_to_char("You need to be holding your Foci to use this sphere.\n\r",ch);
return FALSE;
}
if (obj_has_sphere(obj, Sphere_num) < Sphere_Lev)
return FALSE;
}
return TRUE;
}
int sphere_count(CHAR_DATA *ch)
{
int sphere_count = 0;
int count;
for ( count = 0 ; count <= 8 ; count++ )
{
if ( ch->pcdata->discipline[count] > 0 )
sphere_count++;
}
return sphere_count;
}
/*250 mana duration 10 * sphere rate*/
const struct mage_clan_type mage_clan_table [] =
{
{ "OrderHermes",CLAN_ORDER_OF_HERMES, SECT_TRADITIONS, SPHERE_FORCES, "Merlin" },
{ "Verbena",CLAN_VERBENA, SECT_TRADITIONS, SPHERE_LIFE, "Merlin" },
{ "Dreamspeakr",CLAN_DREAMSPEAKERS, SECT_TRADITIONS, SPHERE_SPIRIT, "Merlin" },
{ "CultEcstacy",CLAN_CULT_OF_ECSTASY, SECT_TRADITIONS, SPHERE_TIME, "Merlin" },
{ "Akashic ",CLAN_AKASHIC_BROTHERHOOD, SECT_TRADITIONS, SPHERE_MIND,"Merlin" },
{ "CelestrialC",CLAN_CELESTRIAL_CHORUS, SECT_TRADITIONS, SPHERE_MIND, "Merlin" },
{ "Euthanatos ",CLAN_EUTHANATOS, SECT_TRADITIONS, SPHERE_MIND, "Merlin" },
{ "HollowOnes ",CLAN_HOLLOW_ONES, SECT_TRADITIONS, SPHERE_MIND, "Merlin" },
{ "SonsofEther",CLAN_SONS_OF_ETHER, SECT_TRADITIONS, SPHERE_MIND, "Merlin" },
{ "IterationX ",CLAN_ITERATION_X, SECT_TRADITIONS, SPHERE_MIND, "Merlin" },
{ "Progenitors",CLAN_PROGENITORS, SECT_TRADITIONS, SPHERE_MIND, "Merlin" },
{ "Syndicate ",CLAN_SYNDICATE, SECT_TRADITIONS, SPHERE_MIND, "Merlin" },
{ "NewWorldOrd",CLAN_NEW_WORLD_ORDER, SECT_TRADITIONS, SPHERE_MIND, "Merlin" },
{ "VoidEnginer",CLAN_VOID_ENGINEERS, SECT_TRADITIONS, SPHERE_MIND, "Merlin" },
};
void do_mage( CHAR_DATA *ch, char *argument )
{
char arg [MAX_INPUT_LENGTH];
argument = one_argument( argument, arg );
if (IS_NPC(ch)) return;
if (IS_IMMUNE(ch, IMM_MAGE))
{
send_to_char("You will now allow mages to teach you.\n\r",ch);
REMOVE_BIT(ch->immune, IMM_MAGE);
return;
}
send_to_char("You will no longer allow mages to teach you.\n\r",ch);
SET_BIT(ch->immune, IMM_MAGE);
return;
}
int mage_iclan_lookup (const char *name)
{
int vamp_clan;
for ( vamp_clan = 0; vamp_clan < MAX_MAGE_CLAN ;vamp_clan++)
{
if (LOWER(name[0]) == LOWER(iclan_table[vamp_clan].pretty_name[0])
&& !str_prefix( name,iclan_table[vamp_clan].pretty_name ))
return vamp_clan;
}
return -1;
}
int mage_clan_lookup (const char *name)
{
int vamp_clan;
for ( vamp_clan = 0; vamp_clan < MAX_MAGE_CLAN ;vamp_clan++)
{
if (LOWER(name[0]) == LOWER(mage_clan_table[vamp_clan].name[0])
&& !str_prefix( name,mage_clan_table[vamp_clan].name ))
return vamp_clan;
}
return -1;
}
void do_sphereaffects( CHAR_DATA *ch, char *argument )
{
char buf[MAX_STRING_LENGTH];
SPHERE_DATA *paf;
if ( ch->sphere_affected != NULL )
{
send_to_char( "\n\r{CYou are affected by the following sphere affects:{x\n\r\n\r", ch );
for ( paf = ch->sphere_affected; paf != NULL; paf = paf->next )
{
sprintf( buf, "{M%21s{x", mage_affect_table[paf->spell_number].spell_name );
send_to_char( buf, ch );
if ( ch->level >= 0 )
{
sprintf( buf, " for {W%4d{x hrs", paf->duration );
send_to_char( buf, ch );
}
send_to_char( "\n\r", ch );
}
}
else
send_to_char("\n\r{CYou are not affected by any other sphere affects.{x\n\r",ch);
return;
}
bool create_foci(CHAR_DATA *ch, OBJ_DATA *obj, int want_sphere)
{
if ( (ch->arete - 1 ) < (obj_sphere_count(obj) + 1) )
{
send_to_char("You need more Arete to add another sphere.\n\r",ch);
return FALSE;
}
obj->item_type = ITEM_FOCI;
obj->sphere[want_sphere] = ch->arete;
return TRUE;
}
void do_teach( CHAR_DATA *ch, char *argument )
{
CHAR_DATA *victim;
char arg1 [MAX_INPUT_LENGTH];
char arg2 [MAX_INPUT_LENGTH];
char buf [MAX_INPUT_LENGTH];
sh_int count;
sh_int clan = -1,iclan = 0;
int spell_count;
argument = one_argument( argument, arg1);
argument = one_argument( argument, arg2);
if (IS_NPC(ch)) return;
if (!IS_CLASS(ch, CLASS_MAGE) && !IS_IMMORTAL(ch))
{
send_to_char("Huh?\n\r",ch);
return;
}
if (IS_IMMORTAL(ch) && ch->level <= LEVEL_JUDGE)
{
send_to_char("Huh?\n\r",ch);
return;
}
if (!IS_SET(ch->special, SPC_PRINCE) && !IS_IMMORTAL(ch))
{
send_to_char("You are not able to create any apprentices.\n\r",ch);
return;
}
if (ch->clan == CLAN_NONE && !IS_IMMORTAL(ch))
{
send_to_char( "First you need to found a clan.\n\r", ch );
return;
}
if ( arg1[0] == '\0' )
{
send_to_char( "Who do you want to make an apprentice?\n\r", ch );
return;
}
if ( ( victim = get_char_room( ch, arg1 ) ) == NULL )
{
send_to_char( "They aren't here.\n\r", ch );
return;
}
if ( IS_NPC(victim) )
{
send_to_char( "Not on NPC's.\n\r", ch );
return;
}
if ( victim->max_mana < 10000 )
{
send_to_char("They don't have the required 10,000 mana.\n\r",ch);
return;
}
for ( spell_count = 0; spell_count >= 5; spell_count++ )
{
if (victim->spl[spell_count] < 200 )
{
send_to_char("They are not ready for your training in the magical arts.\n\r",ch);
return;
}
}
if ( ch == victim )
{
send_to_char( "You cannot make yourself a Mage.\n\r", ch );
return;
}
if (IS_CLASS(victim, CLASS_WRAITH))
{
send_to_char( "You cannot turn wraiths in to Mages.\n\r", ch );
return;
}
if (IS_CLASS(victim, CLASS_VAMPIRE))
{
send_to_char( "You cannot turn vampires in to Mages.\n\r", ch );
return;
}
if ( victim->level != LEVEL_AVATAR && !IS_IMMORTAL(victim) )
{
send_to_char( "You can only teach avatars.\n\r", ch );
return;
}
if (IS_SWWF(victim))
{
send_to_char("Do I really have to tell you that you can't do this?\n\r",ch);
return;
}
if (IS_CLASS(victim, CLASS_WEREWOLF))
{
send_to_char( "You are unable to create weremages!!\n\r", ch );
send_to_char( "Although that would be kewl as hell. -S\n\r", ch );
return;
}
if (IS_CLASS(victim, CLASS_MAGE))
{
send_to_char( "But they are already a mage!\n\r", ch );
return;
}
if (IS_IMMUNE(victim,IMM_MAGE))
{
send_to_char( "You cannot teach an unwilling person.\n\r", ch );
return;
}
if (ch->clan == CLAN_NONE && ch->level < 4 )
{
send_to_char("You cannot create any apprentices.\n\r",ch);
return;
}
if (ch->exp < 1000000)
{
send_to_char("You cannot afford the 1,000,000 exp to create an apprentice.\n\r",ch);
return;
}
for ( count = 0 ; count < MAX_SPHERE ; count++ )
{
if ( has_sphere(victim,count) > 0 || IS_VAMPPASS(victim,count) )
return;
}
if ( IS_IMMORTAL(ch) )
{
if ( arg2[0] == '\0' )
{
send_to_char("Usage: teach <player> <clan|'random'>\n\r",ch);
return;
}
if ( (clan = mage_clan_lookup(arg2)) == -1)
{
if (!str_cmp(arg2,"random"))
clan = number_range(0,MAX_MAGE_CLAN - 1);
else
{
send_to_char("Usage: teach <player> <clan|'random'>\n\r",ch);
return;
}
}
if ( (iclan = mage_iclan_lookup(arg2)) == -1)
{
if (!str_cmp(arg2,"random"))
iclan = number_range(0,MAX_MAGE_CLAN - 1);
else
{
send_to_char("Usage: teach <player> <clan|'random'>\n\r",ch);
return;
}
}
}
ch->exp = ch->exp - 100000;
act("You teach $N the ways of your clan.", ch, NULL, victim, TO_CHAR);
act("$n starts to talk about things that you don't understand.", ch, NULL, victim, TO_NOTVICT);
act("You are taught the ways of $n's clan.", ch, NULL, victim, TO_VICT);
victim->creature=CLASS_MAGE;
send_to_char( "You are now a mage.\n\r", victim );
victim->pcdata->stats[UNI_GEN] = (IS_IMMORTAL(ch) ? 4 : ch->pcdata->stats[UNI_GEN] + 1);
sprintf(buf,"%s %s",ch->lord->str,ch->name->str);
victim->lord = g_string_assign(victim->lord,buf);
if ( clan == -1 )
{
if (victim->pcdata->stats[UNI_CURRENT] == -1)
{
for ( count = 0 ; count < MAX_SPHERE ; count++ )
{
if ( has_sphere(victim,count) < 0 )
victim->pcdata->inherited[count] = 1;
}
}
if ( (clan = mage_clan_lookup(iclan_table[ch->clan].pretty_name)) != -1)
{
victim->pcdata->discipline[mage_clan_table[clan].sphere] = 1;
victim->clan = clan;
victim->sect = mage_clan_table[clan].sect;
}
}
else
{
if (victim->pcdata->stats[UNI_CURRENT] == -1)
{
for ( count = 0 ; count < MAX_SPHERE ; count++ )
{
if ( has_sphere(victim,count) < 0 )
victim->pcdata->inherited[count] = 1;
}
}
/* Remove any old powers they might have */
for ( count = 0 ; count < MAX_SPHERE ; count++ )
{
victim->pcdata->discipline[count] = 0;
}
if ( (clan = mage_clan_lookup(iclan_table[ch->clan].pretty_name)) != -1)
{
victim->sect = mage_clan_table[clan].sect;
}
/* Give the vampire the base powers of their sire */
for ( count = 0 ; count < MAX_SPHERE; count++ )
{
if ( ch->pcdata->inherited[count] )
{
victim->pcdata->inherited[count] = 1;
victim->pcdata->discipline[count] = 1;
}
}
victim->clan = iclan;
}
if (IS_IMMORTAL(ch))
victim->sect = SECT_INDEPENDENT;
else
victim->sect = ch->sect;
save_char_obj(ch);
save_char_obj(victim);
return;
}
/*******************************************************************************
Maint Utilitys
*******************************************************************************/
bool check_disc(CHAR_DATA *ch, CHAR_DATA *victim, int flag)
{
if ( IS_SET(flag,CDISC_PK))
{
if (check_pk(ch,victim,CHECK_DELAY|CHECK_ATTACK))
return TRUE;
}
if (IS_SET(flag,CDISC_REINA))
{
if (IS_RAFFECTED(ch->in_room, ROOM_AFF_REINA ))
{
send_to_char("This room is a temporary safe haven. You don't wanna do that here.\n\r",ch);
return TRUE;
}
}
if (IS_SET(flag,CDISC_PLANE))
{
if (!is_same_plane(ch,victim))
{
send_to_char("The target must be on the same plane.\n\r",ch);
return TRUE;
}
}
if (IS_SET(flag,CDISC_TSAFE))
{
if (IS_ITEMAFF(ch,ITEMA_PEACE) )
return TRUE;
if (IS_ITEMAFF(victim,ITEMA_PEACE) )
return TRUE;
if ( check_safe_imm(ch) )
return TRUE;
if (is_tempsafe(ch))
{
send_to_char("Not in safe rooms.\n\r",ch);
return TRUE;
}
}
return FALSE;
}
bool count_gifts( CHAR_DATA *ch )
{
int ch_age = (get_age(ch) - 17) * 2; /* hours calculation */
int ccount = 0;
int sn = 0;
int agebonus =0;
for ( sn = 0; sn <= BREED_MAX; sn++ )
{
if (ch->pcdata->breed[sn] == -1 || ch->pcdata->breed[sn] > 0)
ccount += 1;
}
for ( sn = 0; sn <= AUSPICE_MAX; sn++ )
{
if (ch->pcdata->auspice[sn] == -1 || ch->pcdata->auspice[sn] > 0)
ccount += 1;
}
for ( sn = 0; sn <= TRIBE_MAX; sn++ )
{
if (ch->pcdata->tribes[sn] == -1 || ch->pcdata->tribes[sn] > 0)
ccount += 1;
}
if (ch_age >= 400) agebonus++;
if (ch_age >= 800) agebonus++;
if (ch_age >= 1500) agebonus++;
if ((ccount - agebonus) > 6 )
return TRUE;
return FALSE;
}
void do_teachgift( CHAR_DATA *ch, char *argument )
{
char buf [MAX_INPUT_LENGTH];
char arg1 [MAX_INPUT_LENGTH];
char arg2 [MAX_INPUT_LENGTH];
CHAR_DATA *victim;
int improve, col, gtype;
char buf2[MAX_STRING_LENGTH];
int cmd,gt;
smash_tilde(argument);
argument = one_argument( argument, arg1 );
str_cpy(arg2,argument);
if (IS_NPC(ch)) return;
if (!IS_SWWF(ch) && !IS_IMMORTAL(ch) )
{
send_to_char("Huh?\n\r",ch);
return;
}
if ( arg1[0] == '\0' || arg2[0] == '\0' )
{
send_to_char( "Syntax: teach <person> <gift>\n\r", ch );
send_to_char( "The following list contains your gifts and the level you can teach to.\n\r", ch );
send_to_char( "--------------------------------------------------------------------------------\n\r", ch );
col = 0;
sprintf(buf,"Breed: \n\r");
send_to_char(buf,ch);
for (cmd = 0; cmd <= BREED_MAX;cmd++)
{
if (ch->pcdata->breed[cmd] > 2)
{
if (ch->pcdata->breed[cmd] == -1)
gt = 0;
else
gt = ch->pcdata->breed[cmd];
sprintf(buf2," {R%s{W: {W({B%d{W){x",breed_table[cmd].haunt,gt );
if (strlen(buf) >= 70)
{
strcat(buf,"\n\r");
send_to_char(buf,ch);
strcpy(buf,buf2);
}
else
strcat(buf,buf2);
}
}
if (buf[0] != '\0')
{
strcat(buf,"\n\r");
send_to_char(buf,ch);
}
sprintf(buf,"Auspice: \n\r");
send_to_char(buf,ch);
for (cmd = 0; cmd <= AUSPICE_MAX;cmd++)
{
if (ch->pcdata->auspice[cmd] > 2)
{
if (ch->pcdata->auspice[cmd] == -1)
gt = 0;
else
gt = ch->pcdata->auspice[cmd];
sprintf(buf2," {R%s{W: {W({B%d{W){x",auspice_table[cmd].haunt,gt );
if (strlen(buf) >= 70)
{
strcat(buf,"\n\r");
send_to_char(buf,ch);
strcpy(buf,buf2);
}
else
strcat(buf,buf2);
}
}
if (buf[0] != '\0')
{
strcat(buf,"\n\r");
send_to_char(buf,ch);
}
sprintf(buf,"Tribe: \n\r");
send_to_char(buf,ch);
for (cmd = 0; cmd <= TRIBE_MAX;cmd++)
{
if (ch->pcdata->tribes[cmd] > 2)
{
if (ch->pcdata->tribes[cmd] == -1)
gt = 0;
else
gt = ch->pcdata->tribes[cmd];
sprintf(buf2," {R%s{W: {W({B%d{W){x",tribe_table[cmd].haunt,gt );
if (strlen(buf) >= 70)
{
strcat(buf,"\n\r");
send_to_char(buf,ch);
strcpy(buf,buf2);
}
else
strcat(buf,buf2);
}
}
if (buf[0] != '\0')
{
strcat(buf,"\n\r");
send_to_char(buf,ch);
}
send_to_char( "--------------------------------------------------------------------------------\n\r", ch );
return;
}
if ( ( victim = get_char_room( ch, arg1 ) ) == NULL )
{
send_to_char( "They aren't here.\n\r", ch );
return;
}
if ( ch == victim )
{
send_to_char( "You cannot teach yourself!\n\r", ch );
return;
}
if (IS_IMMUNE(victim,IMM_WEREWOLF))
{
send_to_char( "You cannot teach to a unwilling person.\n\r", ch );
return;
}
if (IS_NPC(victim))
{
send_to_char( "Not on NPC's.\n\r", ch );
return;
}
if (!str_cmp(arg2,"homid"))
{improve = BREED_HOMID;gtype = 0;}
else if (!str_cmp(arg2,"lupus"))
{improve = BREED_LUPUS;gtype = 0;}
else if (!str_cmp(arg2,"metis"))
{improve = BREED_METIS;gtype = 0;}
else if (!str_cmp(arg2,"ragabash"))
{improve = AUSPICE_RAGABASH;gtype = 1;}
else if (!str_cmp(arg2,"theurge"))
{improve = AUSPICE_THEURGE;gtype = 1;}
else if (!str_cmp(arg2,"philodox"))
{improve = AUSPICE_PHILODOX;gtype = 1;}
else if (!str_cmp(arg2,"galliard"))
{improve = AUSPICE_GALLIARD;gtype = 1;}
else if (!str_cmp(arg2,"ahroun"))
{improve = AUSPICE_AHROUN;gtype = 1;}
else if (!str_cmp(arg2,"black furies"))
{improve = TRIBE_BLACK_FURIES;gtype = 2;}
else if (!str_cmp(arg2,"bone gnawers"))
{improve = TRIBE_BONE_GNAWERS;gtype = 2;}
else if (!str_cmp(arg2,"children of gaia"))
{improve = TRIBE_CHILDREN_OF_GAIA;gtype = 2;}
else if (!str_cmp(arg2,"child of spiral"))
{improve = TRIBE_CHILD_OF_SPIRAL;gtype = 2;}
else if (!str_cmp(arg2,"fianna"))
{improve = TRIBE_FIANNA;gtype = 2;}
else if (!str_cmp(arg2,"get of fenris"))
{improve = TRIBE_GET_OF_FENRIS;gtype = 2;}
else if (!str_cmp(arg2,"get of fenris"))
{improve = TRIBE_GET_OF_FENRIS;gtype = 2;}
else if (!str_cmp(arg2,"glass walkers"))
{improve = TRIBE_GLASS_WALKERS;gtype = 2;}
else if (!str_cmp(arg2,"red talons"))
{improve = TRIBE_RED_TALONS;gtype = 2;}
else if (!str_cmp(arg2,"shadow lords"))
{improve = TRIBE_SHADOW_LORDS;gtype = 2;}
else if (!str_cmp(arg2,"silent striders"))
{improve = TRIBE_SILENT_STRIDERS;gtype = 2;}
else if (!str_cmp(arg2,"silver fangs"))
{improve = TRIBE_SILVER_FANGS;gtype = 2;}
else if (!str_cmp(arg2,"stargazers"))
{improve = TRIBE_STARGAZERS;gtype = 2;}
else if (!str_cmp(arg2,"uktena"))
{improve = TRIBE_UKTENA;gtype = 2;}
else if (!str_cmp(arg2,"wendigos"))
{improve = TRIBE_WENDIGO;gtype = 2;}
else
{
send_to_char("You know of no such gift.\n\r",ch);
return;
}
if (get_renown(ch) < 3 && !IS_IMMORTAL(ch)){
send_to_char("You require 3 Renown to teach gifts.\n\r",ch);
return;
}
switch (gtype)
{
default:
if (ch->pcdata->breed[improve] == 0 && !IS_IMMORTAL(ch))
{
send_to_char("You know of no such breed power.\n\r",ch);
return;
}
if (ch->pcdata->breed[improve] < 3 && !IS_IMMORTAL(ch))
{
send_to_char("You require level 3 in a gift before you can teach it.\n\r",ch);
return;
}
break;
case 1:
if (ch->pcdata->auspice[improve] == 0 && !IS_IMMORTAL(ch))
{
send_to_char("You know of no such auspice power.\n\r",ch);
return;
}
if (ch->pcdata->auspice[improve] < 3 && !IS_IMMORTAL(ch))
{
send_to_char("You require level 3 in a gift before you can teach it.\n\r",ch);
return;
}
break;
case 2:
if (!IS_SET(ch->special, SPC_PRINCE) && !IS_SET(ch->special, SPC_BETA)){
send_to_char("You must be a Alpha or Beta to teach tribal gifts.\n\r",ch);
return;
}
if (ch->pcdata->tribes[improve] == 0 && !IS_IMMORTAL(ch))
{
send_to_char("You know of no such tribe power.\n\r",ch);
return;
}
if (ch->pcdata->tribes[improve] < 3 && !IS_IMMORTAL(ch))
{
send_to_char("You require level 3 in a gift before you can teach it.\n\r",ch);
return;
}
break;
}
if (!IS_SWWF(victim))
{
send_to_char("They are unable to learn gifts.\n\r",ch);
return;
}
if (!IS_IMMUNE(victim, IMM_VAMPIRE))
{
send_to_char("They refuse to learn any gifts.\n\r",ch);
return;
}
if (count_gifts(victim))
{
send_to_char("They cannot have anymore gifts.\n\r",ch);
return;
}
switch (gtype)
{
default:
if (victim->pcdata->breed[improve] != 0 )
{
send_to_char("They already know that gift.\n\r",ch);
return;
}
victim->pcdata->breed[improve] = -1;
break;
case 1:
if (victim->pcdata->auspice[improve] != 0)
{
send_to_char("They already know that gift.\n\r",ch);
return;
}
victim->pcdata->auspice[improve] = -1;
break;
case 2:
if (victim->pcdata->tribes[improve] != 0 )
{
send_to_char("They already know that gift.\n\r",ch);
return;
}
victim->pcdata->tribes[improve] = -1;
break;
}
sprintf(buf,"You teach $N how to use the %s gift.",capitalize(arg2));
act(buf,ch,NULL,victim,TO_CHAR);
sprintf(buf,"$n teaches you how to use the %s gift.",capitalize(arg2));
act(buf,ch,NULL,victim,TO_VICT);
return;
}
int tribe_lookup (const char *name)
{
int tribe;
for ( tribe = 0; tribe < MAX_ICLAN ;tribe++)
{
if (LOWER(name[0]) == LOWER(iclan_table[tribe].pretty_name[0])
&& !str_prefix( name,iclan_table[tribe].pretty_name ))
return tribe;
}
return -1;
}
void do_spclaw( CHAR_DATA *ch, char *argument )
{
CHAR_DATA *victim;
char arg [MAX_INPUT_LENGTH];
char arg2 [MAX_INPUT_LENGTH];
char buf [MAX_INPUT_LENGTH];
int tribe = -1;
int brand,arand;
bool can_sire;
argument = one_argument( argument, arg );
argument = one_argument( argument, arg2 );
if (IS_NPC(ch))
return;
if (!IS_SWWF(ch) && !IS_IMMORTAL(ch) )
{
send_to_char("huh?",ch);
return;
}
if (IS_IMMORTAL(ch) && ch->level <= LEVEL_JUDGE)
{
send_to_char("Huh?\n\r",ch);
return;
}
if ( arg[0] == '\0' )
{
send_to_char( "Claw whom?\n\r", ch );
return;
}
if ( ( victim = get_char_room( ch, arg ) ) == NULL )
{
send_to_char( "They aren't here.\n\r", ch );
return;
}
if (IS_SET(ch->special, SPC_BETA)
|| IS_SET(ch->special, SPC_PRINCE)) can_sire = TRUE;
else can_sire = FALSE;
if (!can_sire)
{
send_to_char("You are unable to spread your gift.\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( "You cannot claw yourself.\n\r", ch );
return;
}
if (IS_MAGE(victim))
{
send_to_char( "You cannot claw mages.\n\r", ch );
return;
}
if (IS_CLASS(ch,CLASS_WRAITH))
{
send_to_char( "You are unable to create werewraiths!\n\r", ch );
return;
}
if (IS_VAMPIRE(victim))
{
send_to_char( "You are unable to create werevamps!\n\r", ch );
return;
}
if (IS_WEREWOLF(victim) || IS_SWWF(victim))
{
send_to_char( "You already notice that they are really furry!\n\r", ch );
return;
}
if (IS_IMMUNE(victim,IMM_WEREWOLF))
{
send_to_char( "You cannot claw an unwilling person.\n\r", ch );
return;
}
if (!IS_VAMPAFF(ch,VAM_CLAWS) && !IS_IMMORTAL(ch))
{
send_to_char("First you better get your claws out!\n\r",ch);
return;
}
if ( IS_IMMORTAL(ch) )
{
if ( arg2[0] == '\0' )
{
send_to_char("Usage: claw <player> <tribe|'random'>\n\r",ch);
return;
}
if ( (tribe = tribe_lookup(arg2)) == -1)
{
if (!str_cmp(arg2,"random"))
tribe = number_range(0,TRIBE_MAX - 1);
else
{
send_to_char("Usage: clan <player> <tribe|'random'>\n\r",ch);
return;
}
}
}
act("You plunge your claws into $N.", ch, NULL, victim, TO_CHAR);
act("$n plunges $s claws into $N.", ch, NULL, victim, TO_NOTVICT);
act("$n plunges $s claws into your chest.", ch, NULL, victim, TO_VICT);
victim->creature = CLASS_SWWF;
victim->level = LEVEL_AVATAR;
brand = number_range(0,2);
arand = weather_info[ch->in_room->sector_type].moon;
victim->pcdata->breed[brand] = -1;
victim->pcdata->auspice[arand] = -1;
victim->pcdata->sgift[1] = brand;
victim->pcdata->sgift[2] = arand;
switch (victim->pcdata->sgift[2])
{
case AUSPICE_RAGABASH:
victim->pcdata->renown[RENOWN_HONOR] = ragabash_table[1].honor;
victim->pcdata->renown[RENOWN_GLORY] = ragabash_table[1].glory;
victim->pcdata->renown[RENOWN_WISDOM] = ragabash_table[1].wisdom;
break;
case AUSPICE_THEURGE:
victim->pcdata->renown[RENOWN_HONOR] = theurge_table[1].honor;
victim->pcdata->renown[RENOWN_GLORY] = theurge_table[1].glory;
victim->pcdata->renown[RENOWN_WISDOM] = theurge_table[1].wisdom;
break;
case AUSPICE_PHILODOX:
victim->pcdata->renown[RENOWN_HONOR] = philodox_table[1].honor;
victim->pcdata->renown[RENOWN_GLORY] = philodox_table[1].glory;
victim->pcdata->renown[RENOWN_WISDOM] = philodox_table[1].wisdom;
break;
case AUSPICE_GALLIARD:
victim->pcdata->renown[RENOWN_HONOR] = galliard_table[1].honor;
victim->pcdata->renown[RENOWN_GLORY] = galliard_table[1].glory;
victim->pcdata->renown[RENOWN_WISDOM] = galliard_table[1].wisdom;
break;
case AUSPICE_AHROUN:
victim->pcdata->renown[RENOWN_HONOR] = ahroun_table[1].honor;
victim->pcdata->renown[RENOWN_GLORY] = ahroun_table[1].glory;
victim->pcdata->renown[RENOWN_WISDOM] = ahroun_table[1].wisdom;
break;
}
send_to_char( "You thrash the cowering form beneath you, raking your claws along it's soul.\n\r", ch )
;
send_to_char( "Then, in the final death throes, you chomp it's neck, tearing out it's essence.\n\r", ch );
send_to_char( "You breathe your Tribal strength into the bloody corpse.\n\r", ch );
send_to_char( "They are now forever submissive to your tribe!\n\r", ch );
send_to_char( "You feel your soul ripped asunder as the Garou Claws your very soul to shreds!!\n\r", victim );
send_to_char( "As it tears your throat out, and you begin to submit to death itself.\n\r", victim );
send_to_char( "You suddenly feel a strong, earthly essence overcome your soul.\n\r", victim );
send_to_char( "As the strength of the Garou begins to fill your veins, your mind is flooded \n\r", victim );
send_to_char( "with the sudden knowledge of Tribal power and everlasting loyalty to the Eldest.\n\r",
victim );
act( "$n suddenly reaches out and claws $N to shreds!", ch, NULL, victim, TO_NOTVICT );
act( "$n then takes $N's throat in $s mouth, and tears it out!", ch, NULL, victim, TO_NOTVICT );
act( "$N goes into convulsions, then slowly steadies, then peers up at $n with adoration.", ch, NULL,
victim, TO_NOTVICT );
send_to_char( "You are now a werewolf.\n\r", victim );
sprintf(buf,"%s has been mauled by a pack of wolves!",victim->name->str);
do_info(ch,buf);
victim->pcdata->stats[UNI_GEN] = ch->pcdata->stats[UNI_GEN] + 1;
if (ch->pcdata->stats[UNI_GEN] == 1)
victim->lord = g_string_assign(victim->lord,ch->name->str);
else
{
sprintf(buf,"%s %s",ch->lord->str,ch->name->str);
victim->lord = g_string_assign(victim->lord,buf);
}
if ( IS_IMMORTAL(ch) && tribe != -1 )
{
victim->clan = tribe;
victim->pcdata->tribes[iclan_table[tribe].number] = 1;
victim->pcdata->sgift[3] = iclan_table[tribe].number;
victim->sect = SECT_INDEPENDENT;
}
if (!IS_IMMORTAL(ch))
{
victim->clan=ch->clan;
victim->pcdata->tribes[iclan_table[ch->clan].number] = 1;
victim->pcdata->sgift[3] = ch->pcdata->sgift[iclan_table[ch->clan].number];
victim->sect = ch->sect;
}
sprintf(buf,"I am %s, loyal to tribe %s and to sept %s.",victim->name->str,iclan_table[victim->clan].pretty_name,sect_table[victim->sect].pretty_name);
do_say(victim,buf);
SET_BIT(victim->immune,IMM_WEREWOLF);
do_autosave(ch,"");
do_autosave(victim,"");
return;
}
void do_learn_gift( CHAR_DATA *ch, char *argument)
{
CHAR_DATA *teacher;
bool tFound = FALSE;
char arg1[MAX_STRING_LENGTH];
char buf[MAX_STRING_LENGTH];
int improve, gtype;
GSList *desc_list = descriptor_list;
DESCRIPTOR_DATA *d;
CHAR_DATA *wch;
smash_tilde(argument);
one_argument(argument,arg1);
if (!IS_SWWF(ch) )
{
send_to_char("Huh?\n\r",ch);
return;
}
for (teacher = ch->in_room->people; teacher != NULL; teacher = teacher->next_in_room)
{
if (IS_NPC(teacher) && IS_SET(teacher->mob_con, MOBCON_TEACHER))
tFound = TRUE;
}
if (tFound == FALSE)
{
send_to_char("You don't see a teacher here.\n\r",ch);
return;
}
if ( arg1[0] == '\0' )
{
send_to_char( "Syntax: learngift <gift>\n\r", ch );
send_to_char( "Cost of Learning: 10 Roleplaying Points\n\r", ch);
return;
}
while ( desc_list != NULL )
{
d = (DESCRIPTOR_DATA*)desc_list->data;
wch = d->character;
if (IS_SWWF(wch) && wch != ch)
{
do_say(teacher,"There are others that you can learn from, leave me be.");
g_slist_free(desc_list);
return;
}
desc_list = g_slist_next(desc_list);
}
g_slist_free(desc_list);
if (!str_cmp(arg1,"homid"))
{improve = BREED_HOMID;gtype = 0;}
else if (!str_cmp(arg1,"lupus"))
{improve = BREED_LUPUS;gtype = 0;}
else if (!str_cmp(arg1,"metis"))
{improve = BREED_METIS;gtype = 0;}
else if (!str_cmp(arg1,"ragabash"))
{improve = AUSPICE_RAGABASH;gtype = 1;}
else if (!str_cmp(arg1,"theurge"))
{improve = AUSPICE_THEURGE;gtype = 1;}
else if (!str_cmp(arg1,"philodox"))
{improve = AUSPICE_PHILODOX;gtype = 1;}
else if (!str_cmp(arg1,"galliard"))
{improve = AUSPICE_GALLIARD;gtype = 1;}
else if (!str_cmp(arg1,"ahroun"))
{improve = AUSPICE_AHROUN;gtype = 1;}
else if (!str_cmp(arg1,"black furies"))
{improve = TRIBE_BLACK_FURIES;gtype = 2;}
else if (!str_cmp(arg1,"bone gnawers"))
{improve = TRIBE_BONE_GNAWERS;gtype = 2;}
else if (!str_cmp(arg1,"children of gaia"))
{improve = TRIBE_CHILDREN_OF_GAIA;gtype = 2;}
else if (!str_cmp(arg1,"child of spiral"))
{improve = TRIBE_CHILD_OF_SPIRAL;gtype = 2;}
else if (!str_cmp(arg1,"fianna"))
{improve = TRIBE_FIANNA;gtype = 2;}
else if (!str_cmp(arg1,"get of fenris"))
{improve = TRIBE_GET_OF_FENRIS;gtype = 2;}
else if (!str_cmp(arg1,"get of fenris"))
{improve = TRIBE_GET_OF_FENRIS;gtype = 2;}
else if (!str_cmp(arg1,"glass walkers"))
{improve = TRIBE_GLASS_WALKERS;gtype = 2;}
else if (!str_cmp(arg1,"red talons"))
{improve = TRIBE_RED_TALONS;gtype = 2;}
else if (!str_cmp(arg1,"shadow lords"))
{improve = TRIBE_SHADOW_LORDS;gtype = 2;}
else if (!str_cmp(arg1,"silent striders"))
{improve = TRIBE_SILENT_STRIDERS;gtype = 2;}
else if (!str_cmp(arg1,"silver fangs"))
{improve = TRIBE_SILVER_FANGS;gtype = 2;}
else if (!str_cmp(arg1,"stargazers"))
{improve = TRIBE_STARGAZERS;gtype = 2;}
else if (!str_cmp(arg1,"uktena"))
{improve = TRIBE_UKTENA;gtype = 2;}
else if (!str_cmp(arg1,"wendigos"))
{improve = TRIBE_WENDIGO;gtype = 2;}
else
{
send_to_char("They know of no such gift.\n\r",ch);
return;
}
if (count_gifts(ch))
{
send_to_char("You cannot have anymore gifts.\n\r",ch);
return;
}
switch (gtype)
{
default:
if (ch->pcdata->breed[improve] != 0)
{
send_to_char("You already know that gift.\n\r",ch);
return;
}
ch->pcdata->breed[improve] = -1;
break;
case 1:
if (ch->pcdata->auspice[improve] != 0)
{
send_to_char("You already know that gift.\n\r",ch);
return;
}
ch->pcdata->auspice[improve] = -1;
break;
case 2:
if (ch->pcdata->tribes[improve] != 0)
{
send_to_char("You already know that gift.\n\r",ch);
return;
}
ch->pcdata->tribes[improve] = -1;
break;
}
sprintf(buf,"%s teaches you how to use the %s gift.",teacher->short_descr->str,capitalize(arg1));
send_to_char(buf,ch);
sprintf(buf,"%s teaches %s the %s gift.",teacher->name->str,ch->name->str,capitalize(arg1));
log_string2(buf);
return;
}
void do_unmist(CHAR_DATA *ch, char *argument )
{
if (!IS_AFFECTED(ch, AFF_POLYMORPH))
{
send_to_char( "You are already in human form.\n\r", ch );
return;
}
if ( ch->mana < 500 )
{
send_to_char("You don't have enough mana!\n\r",ch);
return;
}
if (IS_VAMPAFF(ch, VAM_CHANGED) && IS_SET(ch->pcdata->powers[WOLF_POLYAFF], POLY_MIST))
{
REMOVE_BIT(ch->pcdata->powers[WOLF_POLYAFF], POLY_MIST);
}
else
{
/* In case they try to change to human from a non-vamp form */
send_to_char( "You seem to be stuck in this form.\n\r", ch );
return;
}
act( "You transform into human form.", ch, NULL, NULL, TO_CHAR );
act( "$n transforms into human form.", ch, NULL, NULL, TO_ROOM );
REMOVE_BIT(ch->affected_by, AFF_POLYMORPH);
REMOVE_BIT(ch->pcdata->stats[UNI_AFF], VAM_CHANGED);
clear_stats(ch);
ch->morph = g_string_assign(ch->morph,"");
ch->mana -= 200;
ch->paradox[0] += gain_paradox(ch);
return;
}
void do_tap_caern( CHAR_DATA *ch, char *argument)
{
if (!IS_CLASS(ch,CLASS_MAGE))
{
send_to_char("huh?\n\r",ch);
return;
}
if (ch->in_room->vnum != ROOM_VNUM_CAERN)
{
send_to_char("You not in a caern! go find one!\n\r",ch);
return;
}
SET_BIT(ch->act,ACT_TAPPING);
send_to_char("You dance around the room and chat incantations.\n\r",ch);
act("$n starts to dance around the room, chanting incatations.",ch,NULL,NULL,TO_ROOM);
}
void do_scry( CHAR_DATA *ch, char *argument )
{
CHAR_DATA *victim;
ROOM_INDEX_DATA *chroom;
ROOM_INDEX_DATA *victimroom;
char arg [MAX_INPUT_LENGTH];
argument = one_argument( argument, arg );
if (IS_NPC(ch)) return;
if (!IS_ITEMAFF(ch, ITEMA_VISION))
{
send_to_char( "Huh?\n\r", ch );
return;
}
if ( arg[0] == '\0' )
{
send_to_char( "Scry on whom?\n\r", ch );
return;
}
if ( ( victim = get_char_world( ch, arg ) ) == NULL )
{
send_to_char( "They aren't here.\n\r", ch );
return;
}
if (!knows_char(ch,victim))
{
send_to_char( "They aren't here.\n\r", ch );
return;
}
if (!IS_NPC(victim) && IS_IMMUNE(victim,IMM_SHIELDED) && !IS_ITEMAFF(ch, ITEMA_VISION))
{
send_to_char("You are unable to locate them.\n\r",ch);
return;
}
if (!IS_NPC(victim) && IS_SET(victim->sphere_spaffect,AFSPHERE_SHIELD) && !IS_ITEMAFF(ch, ITEMA_VISION))
{
send_to_char("You are unable to locate them.\n\r",ch);
return;
}
chroom = ch->in_room;
victimroom = victim->in_room;
char_from_room(ch);
char_to_room(ch,victimroom);
do_look(ch,"auto");
char_from_room(ch);
char_to_room(ch,chroom);
return;
}
void do_readaura( CHAR_DATA *ch, char *argument )
{
CHAR_DATA *victim;
OBJ_DATA *obj;
char arg [MAX_INPUT_LENGTH];
char buf [MAX_INPUT_LENGTH];
char buf2 [MAX_INPUT_LENGTH];
sh_int count;
argument = one_argument( argument, arg );
if (IS_NPC(ch)) return;
if (!IS_ITEMAFF(ch, ITEMA_VISION))
{
send_to_char( "Huh?\n\r", ch );
return;
}
if ( arg[0] == '\0' )
{
send_to_char( "Read the aura on what?\n\r", ch );
return;
}
if ( ( victim = get_char_room( ch, arg ) ) == NULL )
{
if ( ( obj = get_obj_carry( ch, arg ) ) == NULL )
{
send_to_char( "Read the aura on what?\n\r", ch );
return;
}
act("$n examines $p intently.",ch,obj,NULL,TO_ROOM);
spell_identify( skill_lookup( "identify" ), ch->level, ch, obj );
return;
}
if (check_disc(ch,victim,CDISC_PLANE))
return;
if (!IS_NPC(victim) && IS_IMMUNE(victim,IMM_SHIELDED) && !IS_ITEMAFF(ch, ITEMA_VISION))
{
send_to_char("You are unable to read their aura.\n\r",ch);
return;
}
if (!IS_NPC(victim) && IS_SET(victim->sphere_spaffect,AFSPHERE_SHIELD) && !IS_ITEMAFF(ch, ITEMA_VISION))
{
send_to_char("You are unable to read their aura.\n\r",ch);
return;
}
act("$n examines $N intently.",ch,NULL,victim,TO_NOTVICT);
act("$n examines you intently.",ch,NULL,victim,TO_VICT);
if (IS_NPC(victim)) sprintf(buf, "%s is an NPC.\n\r",victim->short_descr->str);
else
{
if (victim->level == 12) sprintf(buf, "%s is an Implementor.\n\r", victim->name->str);
else if (victim->level == 11) sprintf(buf, "%s is a High Judge.\n\r", victim->name->str);
else if (victim->level == 10) sprintf(buf, "%s is a Judge.\n\r", victim->name->str);
else if (victim->level == 9 ) sprintf(buf, "%s is an Enforcer.\n\r", victim->name->str);
else if (victim->level == 8 ) sprintf(buf, "%s is a Quest Maker.\n\r", victim->name->str);
else if (victim->level == 7 ) sprintf(buf, "%s is a Builder.\n\r", victim->name->str);
else if (victim->level >= 3 ) sprintf(buf, "%s is an Avatar.\n\r", victim->name->str);
else sprintf(buf, "%s is a Mortal.\n\r", PERS(victim,ch));
}
send_to_char(buf,ch);
if (!IS_NPC(victim))
{
sprintf(buf,"Str:%d, Int:%d, Wis:%d, Dex:%d, Con:%d.\n\r",get_curr_str(victim),get_curr_int(victim),get_curr_wis(victim),get_curr_dex(victim),get_curr_con(victim));
send_to_char(buf,ch);
}
sprintf(buf,"Hp:%d/%d, Mana:%d/%d, Move:%d/%d.\n\r",victim->hit,victim->max_hit,victim->mana,victim->max_mana,victim->move,victim->max_move);
send_to_char(buf,ch);
if (!IS_NPC(victim)) sprintf(buf,"Hitroll:%d, Damroll:%d, AC:%d.\n\r",char_hitroll(victim),char_damroll(victim),char_ac(victim));
else sprintf(buf,"AC:%d.\n\r",char_ac(victim));
send_to_char(buf,ch);
if (!IS_NPC(victim))
{
sprintf(buf,"Status:%d, ",victim->race);
send_to_char(buf,ch);
if (IS_CLASS(victim, CLASS_VAMPIRE))
{
sprintf(buf,"Blood:%d, ",victim->pcdata->condition[COND_THIRST]);
send_to_char(buf,ch);
}
}
sprintf(buf,"Alignment:%d.\n\r",victim->alignment);
send_to_char(buf,ch);
if (!IS_NPC(victim) && IS_EXTRA(victim, EXTRA_PREGNANT))
act("$N is pregnant.",ch,NULL,victim,TO_CHAR);
if (!IS_NPC(victim) && IS_CLASS(victim, CLASS_VAMPIRE))
{
send_to_char("Disciplines:",ch);
for ( count = 0 ; count < MAX_DISCIPLINE ; count++ )
{
if ( get_disc(victim,count) > 0 )
{
sprintf(buf2, " %s %d ", discipline_table[count].name, get_disc(victim,count));
strcat(buf, buf2);
}
}
/*buf[strlen(buf)] = '.'; hack off the final comma, replace it with a period. */
send_to_char(buf,ch);
send_to_char("\n\r",ch);
}
return;
}
void do_focistat(CHAR_DATA *ch, char *argument)
{
char buf[MAX_STRING_LENGTH];
OBJ_DATA *obj;
int count;
if ( ( obj = get_obj_wear( ch, "foci" ) ) == NULL )
{
send_to_char("You need to be holding your Foci to stat it.\n\r",ch);
return;
}
send_to_char("Current Spheres on this Foci:\n\r",ch);
send_to_char(" Sphere: Level:\n\r",ch);
for ( count = 0 ; count <= 8 ; count++ )
{
if ( obj->sphere[count] > 0 )
{
sprintf(buf," %18s %3d\n\r", mage_sphere_table[count].sphere_name, obj->sphere[count]);
send_to_char(buf,ch);
}
}
}
void do_learndisc(CHAR_DATA *ch, char *argument)
{
char arg[MSL];
char arg2[MSL];
int count, discipline;
char buf[MSL];
int clancount = 0, clanmax = 10;
CHAR_DATA *victim;
argument = one_argument(argument,arg);
argument = one_argument(argument,arg2);
if (arg[0] == '\0')
{
send_to_char("Who do you want to teach?\n\r",ch);
return;
}
if (arg2[0] == '\0')
{
send_to_char("What do you want to teach them?\n\r",ch);
return;
}
if ((victim = get_char_room(ch,arg)) == NULL)
{
send_to_char("There not here.\n\r",ch);
return;
}
if (ch == victim){
send_to_char("Nope.\n\r",ch);
return;
}
if (!IS_CLASS(victim,CLASS_VAMPIRE) && !IS_IMMORTAL(victim))
{
send_to_char("There not a vampire.. yea right.\n\r",ch);
return;
}
if (IS_IMMUNE(victim,IMM_VAMPIRE))
{
send_to_char("They are unwilling to learn.\n\r",ch);
return;
}
if ((discipline = discipline_lookup(arg2)) == -1)
{
send_to_char("No discipline by that name.\n\r",ch);
return;
}
if (victim->pcdata->stats[UNI_CURRENT] == -1)
{
for ( count = 0 ; count < MAX_DISC ; count++ )
{
if ( get_disc(victim,count) > 0 )
victim->pcdata->Ninherited[count] = 1;
}
}
if (victim->pcdata->stats[UNI_GEN] >= 2)
{
clanmax = 12;
}
if (victim->pcdata->stats[UNI_GEN] >= 4)
{
clanmax = UMAX( 3, ( 14 - victim->pcdata->stats[UNI_GEN] ) );
}
if (victim->pcdata->stats[UNI_GEN] >= 5) clanmax += 1;
// if (ch->pcdata->stats[UNI_GEN] >= 6) ratemax = 5;
// if (ch->pcdata->stats[UNI_GEN] >= 8) ratemax = 4;
if (victim->pcdata->rank == AGE_ANCILLA ) clanmax += 1;
if (victim->pcdata->rank == AGE_ELDER ) clanmax += 2;
if (victim->pcdata->rank == AGE_METHUSELAH )
{
clanmax += 3;
//extra Disc for those Meth Vamps
}
for ( count = 0 ; count < MAX_DISC; count++ )
{
if ( get_disc(victim,count) > 0 || IS_VAMPPASS(victim,count) )
clancount++;
}
if (clancount >= clanmax)
{
send_to_char("You can learn no more disciplines.\n\r",ch);
return;
}
if (ch->pcdata->Ninherited[discipline] != 1)
{
send_to_char("That is not your clan discipline. They cannot teach you that one.\n\r",ch);
return;
}
if (ch->pcdata->disc[discipline] < 3)
{
send_to_char("You have not gotten above 3 in your discipline, you can learn nothing from them.\n\r",ch);
return;
}
if (victim->practice < 100)
{
send_to_char("Then don't have the requiered primal.\n\r",ch);
return;
}
sprintf(buf,"You learn the ways of %s.\n\r",discipline_table[discipline].name);
send_to_char(buf,victim);
sprintf(buf,"$N learns the ways of %s from you.\n\r",discipline_table[discipline].name);
act(buf,victim,NULL,ch,TO_VICT);
//*FIXME*
victim->pcdata->disc[discipline]++;
victim->practice -= 100;
victim->pcdata->spent[SPENT_P] += 100;
sprintf(buf,"%s teaches %s the %s discipline.",ch->name->str,victim->name->str,discipline_table[discipline].name);
log_string2(buf);
return;
}
void do_sidestep( CHAR_DATA *ch, char *argument )
{
if (!IS_SWWF(ch))
{
send_to_char("Your not Garou.. shoo!\n\r",ch);
return;
}
if (ch->fighting != NULL)
{
send_to_char("Not while fighting.\n\r",ch);
return;
}
if (ch->plane == PLANE_NORMAL){
ch->plane = PLANE_UMBRA;
shift_obj_plane(ch);
send_to_char("You sidestep in to the umbra.\n\r",ch);
}
else if (ch->plane == PLANE_UMBRA){
ch->plane = PLANE_NORMAL;
shift_obj_plane(ch);
send_to_char("You sidestep back in to the normal plane.\n\r",ch);
}
else{
send_to_char("Not on this plane.\n\r",ch);
return;
}
do_look(ch,"auto");
return;
}
int count_discs( CHAR_DATA *ch ){
int count,clancount = 0;
if (ch->pcdata->stats[UNI_CURRENT] == -1)
{
for ( count = 0 ; count < MAX_DISC ; count++ )
{
if ( get_disc(ch,count) > 0 )
ch->pcdata->Ninherited[count] = 1;
}
}
for ( count = 0 ; count < MAX_DISC; count++ )
{
if ( get_disc(ch,count) > 0)
clancount++;
}
return clancount;
}
int clan_max( CHAR_DATA *ch ){
int clanmax = 0;
if (ch->pcdata->stats[UNI_GEN] >= 2)
{
clanmax = 12;
}
if (ch->pcdata->stats[UNI_GEN] >= 4)
{
clanmax = UMAX( 3, ( 14 - ch->pcdata->stats[UNI_GEN] ) );
}
if (ch->pcdata->stats[UNI_GEN] >= 5) clanmax += 1;
// if (ch->pcdata->stats[UNI_GEN] >= 6) ratemax = 5;
// if (ch->pcdata->stats[UNI_GEN] >= 8) ratemax = 4;
if (ch->pcdata->rank == AGE_ANCILLA ) clanmax += 1;
if (ch->pcdata->rank == AGE_ELDER ) clanmax += 2;
if (ch->pcdata->rank == AGE_METHUSELAH )
{
clanmax += 3;
//extra Disc for those Meth Vamps
}
return clanmax;
}
void do_gain_disc( CHAR_DATA *ch, char *argument)
{
CHAR_DATA *teacher;
bool tFound = FALSE;
char arg1[MAX_STRING_LENGTH];
char buf[MAX_STRING_LENGTH];
int improve;
DESCRIPTOR_DATA *d;
CHAR_DATA *wch;
GSList *desc_list = descriptor_list;
smash_tilde(argument);
one_argument(argument,arg1);
if (!IS_VAMPIRE(ch) )
{
send_to_char("Huh?\n\r",ch);
return;
}
for (teacher = ch->in_room->people; teacher != NULL; teacher = teacher->next_in_room)
{
if (IS_NPC(teacher) && IS_SET(teacher->mob_con, MOBCON_TEACHER))
tFound = TRUE;
}
if (tFound == FALSE)
{
send_to_char("You don't see a teacher here.\n\r",ch);
return;
}
if ( arg1[0] == '\0' )
{
send_to_char( "Syntax: gaindisc <discipline>\n\r", ch );
send_to_char( "Cost of Learning: 10 Roleplaying Points\n\r", ch);
return;
}
while ( desc_list != NULL )
{
d = (DESCRIPTOR_DATA*)desc_list->data;
wch = d->character;
if (IS_VAMPIRE(wch) && wch != ch)
{
do_say(teacher,"There are others that you can learn from, leave me be.");
return;
}
desc_list = g_slist_next(desc_list);
}
g_slist_free(desc_list);
if (!str_cmp(arg1,"potence"))
{improve = DISC_POTENCE;}
else if (!str_cmp(arg1,"fortitude"))
{improve = DISC_FORTITUDE;}
else if (!str_cmp(arg1,"celerity"))
{improve = DISC_CELERITY;}
else if (!str_cmp(arg1,"protean"))
{improve = DISC_PROTEAN;}
else
{
send_to_char("They know of no such discipline.\n\r",ch);
return;
}
if (count_discs(ch) >= clan_max(ch))
{
send_to_char("You cannot have anymore disciplines.\n\r",ch);
return;
}
sprintf(buf,"%s teaches you how to use the %s discipline.",teacher->short_descr->str,capitalize(arg1));
send_to_char(buf,ch);
ch->pcdata->disc[improve]++;
ch->practice -= 100;
ch->pcdata->spent[SPENT_P] += 100;
return;
}