/***************************************************************************
* 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 <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <merc.h>
#include <interp.h>
#include <tables.h>
#include <power.h>
#include <fight.h>
extern bool check_dumbshit args( (char *command) );
extern void set_fighting args( ( CHAR_DATA *ch, CHAR_DATA *victim ) );
extern void add_agony args( ( CHAR_DATA *victim ) );
extern void add_snooper args((DESCRIPTOR_DATA *ch, DESCRIPTOR_DATA *victim));
extern void remove_snooper args((CHAR_DATA *ch, CHAR_DATA *target));
void power_pigeon( CHAR_DATA *ch, CHAR_DATA *victim, char *argument )
{
char arg1[MAX_INPUT_LENGTH];
OBJ_DATA *obj;
argument = one_argument( argument, arg1 );
if ( arg1[0] == '\0' )
{
send_to_char( "Transport which object?\n\r", ch );
return;
}
if (!IS_NPC(victim) && !IS_IMMUNE(victim, IMM_TRANSPORT))
{
send_to_char( "You are unable to transport anything to them.\n\r", ch );
return;
}
if ( ( obj = get_obj_carry( ch, arg1 ) ) == NULL )
{
send_to_char( "You are not carrying that item.\n\r", ch );
return;
}
if (obj->weight > 100)
{
send_to_char( "That item weighs too much for the pigeon to carry.\n\r", ch );
return;
}
if (!IS_NPC(victim) && !IS_IMMUNE(victim, IMM_TRANSPORT))
{
send_to_char( "You are unable to transport anything to them.\n\r", ch );
return;
}
if ( victim->carry_number + 1 > can_carry_n( victim ) )
{
act( "$N has $S hands full.", ch, NULL, victim, TO_CHAR );
return;
}
if ( victim->carry_weight + get_obj_weight( obj ) > can_carry_w( victim ) )
{
act( "$N can't carry that much weight.", ch, NULL, victim, TO_CHAR );
return;
}
if ( !can_see_obj( victim, obj ) )
{
act( "$N can't see it.", ch, NULL, victim, TO_CHAR );
return;
}
send_to_char( "A pigeon flies down from the sky and lands on your shoulder.\n\r", ch );
act("A pigeon flies down from the sky and lands on $n's shoulder.",ch,NULL,NULL,TO_ROOM);
act("You place $p in the pigeon's beak.",ch,obj,NULL,TO_CHAR);
act("$n places $p in the pigeon's beak.",ch,obj,NULL,TO_ROOM);
send_to_char( "The pigeon takes off from your shoulder and flies away.\n\r", ch );
act("The pigeon takes off from $n's shoulder and flies away.",ch,NULL,NULL,TO_ROOM);
obj_from_char(obj);
obj_to_char(obj,victim);
send_to_char( "A pigeon flies down from the sky and lands on your shoulder.\n\r", victim );
act("A pigeon flies down from the sky and lands on $n's shoulder.",victim,NULL,NULL,TO_ROOM);
act("You take $p from the pigeon's beak.",victim,obj,NULL,TO_CHAR);
act("$n takes $p from the pigeon's beak.",victim,obj,NULL,TO_ROOM);
send_to_char( "The pigeon takes off from your shoulder and flies away.\n\r", victim );
act("The pigeon takes off from $n's shoulder and flies away.",victim,NULL,NULL,TO_ROOM);
do_autosave(ch,"");
do_autosave(victim,"");
return;
}
void power_unveil( CHAR_DATA *ch, CHAR_DATA *victim, char *argument )
{
if (IS_NPC(victim))
{
send_to_char( "Not on NPC's.\n\r", ch );
return;
}
if ( victim == ch )
{
remove_snooper(ch,ch);
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;
}
if (victim->pcdata->willpower > number_range(10,20))
{
send_to_char("You failed.\n\r",ch);
return;
}
add_snooper(ch->desc, victim->desc);
return;
}
void power_anima( CHAR_DATA *ch,CHAR_DATA *victim, char *argument )
{
if ( victim == ch
|| victim->in_room == NULL
|| IS_NPC(ch)
// || IS_NPC(victim) -dc
|| victim->level > 50
|| (!IS_NPC(victim) && !IS_IMMUNE(victim, IMM_SUMMON) )
|| IS_SET(ch->in_room->room_flags, ROOM_PRIVATE)
|| IS_SET(ch->in_room->room_flags, ROOM_SOLITARY)
|| IS_SET(ch->in_room->room_flags, ROOM_NO_RECALL)
|| IS_SET(victim->in_room->room_flags, ROOM_PRIVATE)
|| IS_SET(victim->in_room->room_flags, ROOM_SOLITARY)
|| IS_SET(victim->in_room->room_flags, ROOM_NO_RECALL)
|| victim->in_room->vnum == 1
|| victim->in_room->vnum == 2
|| victim->in_room->vnum == 1200
|| (ch->pk_timer > 0 && is_tempsafe(ch))
|| ( strstr(victim->in_room->area->builders, "Unlinked" ) )
|| victim->in_room->vnum == ch->in_room->vnum)
{
send_to_char( "You failed.\n\r", ch );
return;
}
send_to_char("You start walking.\n\r",ch);
char_from_room( ch );
char_to_room( ch, victim->in_room );
do_look( ch,"auto");
act( "$n appears in front of $N.", ch, NULL, victim, TO_ROOM );
act( "$N appears in front of you.", ch, NULL, victim, TO_VICT );
return;
}
void power_mirrorimage( CHAR_DATA *ch,CHAR_DATA *victim, char *argument )
{
OBJ_DATA *obj;
OBJ_DATA *obj2;
if (ch->pcdata->followers > 4)
{
send_to_char("Nothing happens.\n\r",ch);
return;
}
ch->pcdata->followers++;
victim=create_mobile( get_mob_index( MOB_VNUM_CLONE ) );
char_to_room(victim,get_room_index(ROOM_VNUM_DISCONNECTION));
victim->lord = g_string_assign(victim->lord,ch->name->str);
victim->name = g_string_assign(victim->name,ch->name->str);
victim->short_descr = g_string_assign(victim->short_descr,ch->name->str);
victim->long_descr = g_string_assign(victim->long_descr,"");
if (IS_CLASS(ch,CLASS_TESTVAMP))
victim->creature = CLASS_TESTVAMP;
victim->alignment = ch->alignment;
if (ch->description->len > 1)
{
victim->description = g_string_assign(victim->description,ch->description->str);
}
SET_BIT(victim->act, ACT_NOPARTS);
SET_BIT(victim->added, ADDED_ILLUSION);
{
OBJ_DATA *obj_next;
for ( obj = ch->carrying; obj != NULL; obj = obj_next )
{
obj_next = obj->next_content;
if ( obj->wear_loc != WEAR_NONE )
{
if (( obj2 = create_object( obj->pIndexData, 0 )) != NULL )
{
obj_to_char(obj2, victim);
wear_obj( victim, obj2, obj->wear_loc );
}
}
}
}
victim->level = 50;
victim->hit = ch->hit;
victim->max_hit = ch->max_hit;
victim->mana = ch->mana;
victim->max_mana = ch->max_mana;
victim->move = ch->move;
victim->max_move = ch->max_move;
victim->hitroll = char_hitroll(ch);
victim->damroll = char_damroll(ch);
victim->armor = char_ac(ch);
char_from_room(victim);
char_to_room(victim,ch->in_room);
send_to_char("A mirror image of you shimmers into existance.\n\r",ch);
act("A mirror image of $n appears in the room.",ch,NULL,NULL,TO_ROOM);
return;
}
void power_rename( CHAR_DATA *ch, CHAR_DATA *victim, char *argument )
{
OBJ_DATA *obj;
char arg1[MAX_INPUT_LENGTH];
char arg2[MAX_INPUT_LENGTH];
char buf [MAX_STRING_LENGTH];
char endchar[15];
smash_tilde( argument );
argument = one_argument( argument, arg1 );
argument = one_argument( argument, arg2 );
if ( arg1[0] == '\0' || arg2[0] == '\0' || argument[0] == '\0' )
{
send_to_char( "Syntax: False <object> rename <short description>\n\r", ch );
send_to_char( "Syntax: False <object> keyword <extra keyword/s>\n\r", ch );
return;
}
if ( ( obj = get_obj_carry( ch, arg1 ) ) == NULL )
{
send_to_char( "You are not carrying that object.\n\r", ch );
return;
}
if ( !str_cmp( arg2, "rename" ) )
{
if (IS_SET(obj->quest, QUEST_RELIC))
{
send_to_char("Not on a relic.\n\r",ch);
return;
}
if (IS_CLASS(ch, CLASS_VAMPIRE))
ch->pcdata->condition[COND_THIRST] -= 20;
if (strlen(argument) < 5)
{
send_to_char("Name should be at least 5 characters long.\n\r",ch);
return;
}
strcpy(argument,capitalize(argument));
argument[0] = LOWER(argument[0]);
endchar[0] = (argument[strlen(argument)-1]);
endchar[1] = '\0';
if (!str_cmp(endchar,".")) argument[strlen(argument)-1] = '\0';
obj->name = g_string_assign(obj->name,argument);
obj->short_descr = g_string_assign(obj->short_descr,argument);
if (is_in(argument,"|pair of*"))
sprintf(buf, "%s are lying here.",argument);
else
sprintf(buf, "%s is lying here.",argument);
buf[0] = UPPER(buf[0]);
obj->description = g_string_assign(obj->description,buf);
send_to_char("Ok.\n\r",ch);
obj->questmaker = g_string_assign(obj->questmaker,ch->name->str);
return;
}
if ( !str_cmp( arg2, "keyword" ) || !str_cmp( arg2, "keywords" ) )
{
if (IS_SET(obj->quest, QUEST_RELIC))
{
send_to_char("Not on a relic.\n\r",ch);
return;
}
if (strlen(argument) < 3)
{
send_to_char("Keywords should be at least 3 characters long.\n\r",ch);
return;
}
strcpy(argument,capitalize(argument));
argument[0] = LOWER(argument[0]);
endchar[0] = (argument[strlen(argument)-1]);
endchar[1] = '\0';
if (!str_cmp(endchar,".")) argument[strlen(argument)-1] = '\0';
strcpy(buf,obj->name->str);
if (strlen(buf) > 80)
{
send_to_char("You cannot fit any more keywords on this object.\n\r",ch);
return;
}
strcat(buf," ");
strcat(buf,argument);
obj->name = g_string_assign(obj->name,buf);
send_to_char("Ok.\n\r",ch);
obj->questmaker = g_string_assign(obj->questmaker,ch->name->str);
return;
}
send_to_char( "Syntax: False <object> rename <short description>\n\r", ch );
send_to_char( "Syntax: False <object> keyword <extra keyword/s>\n\r", ch );
return;
}
void power_control( CHAR_DATA *ch, CHAR_DATA *victim, char *argument )
{
CHAR_DATA *familiar;
if ( ( familiar = ch->pcdata->familiar ) != NULL )
{
send_to_char( "Nothing happens.\n\r", ch );
return;
}
if ( !IS_NPC(victim) )
{
send_to_char( "Not on players.\n\r", ch );
return;
}
if ( ( familiar = victim->wizard ) != NULL )
{
send_to_char( "Nothing happens.\n\r", ch );
return;
}
if (!IS_ADDED(victim, ADDED_ILLUSION))
{
send_to_char( "Nothing happens.\n\r", ch );
return;
}
act("You use your power over illusions to control $N.",ch,NULL,victim,TO_CHAR);
ch->pcdata->familiar = victim;
victim->wizard = ch;
return;
}
void power_portal( CHAR_DATA *ch, CHAR_DATA *victim, char *argument )
{
OBJ_DATA *obj;
int duration;
if ( victim == ch
|| victim->in_room == NULL
|| ch->in_room == NULL
|| IS_NPC(victim) )
{
send_to_char( "You failed.\n\r", ch );
return;
}
if ( !IS_IMMUNE(victim, IMM_SUMMON)
|| IS_SET(ch->in_room->room_flags, ROOM_PRIVATE)
|| IS_SET(ch->in_room->room_flags, ROOM_SOLITARY)
|| IS_SET(ch->in_room->room_flags, ROOM_NO_RECALL)
|| IS_SET(victim->in_room->room_flags, ROOM_PRIVATE)
|| IS_SET(victim->in_room->room_flags, ROOM_SOLITARY)
|| IS_SET(victim->in_room->room_flags, ROOM_NO_RECALL)
|| victim->in_room->vnum == ch->in_room->vnum)
{
send_to_char( "You failed.\n\r", ch );
return;
}
duration = number_range(2,3) * 15;
obj = create_object( get_obj_index( OBJ_VNUM_PORTAL ), 0 );
obj->value[0] = victim->in_room->vnum;
obj->value[3] = ch->in_room->vnum;
obj->timer = duration;
obj->short_descr = g_string_assign(obj->short_descr,"an infernal portal");
obj->description = g_string_assign(obj->description,"An infernal portal of burning flames floats here.");
obj_to_room( obj, ch->in_room );
obj = create_object( get_obj_index( OBJ_VNUM_PORTAL ), 0 );
obj->value[0] = ch->in_room->vnum;
obj->value[3] = victim->in_room->vnum;
obj->timer = duration;
obj->short_descr = g_string_assign(obj->short_descr,"an infernal portal");
obj->description = g_string_assign(obj->description,"An infernal portal of burning flames floats here.");
obj_to_room( obj, victim->in_room );
act( "$p bursts from the ground in front of $n.", ch, obj, NULL, TO_ROOM );
act( "$p bursts from the ground appears in front of you.", ch, obj, NULL, TO_CHAR );
act( "$p bursts from the ground appears in front of $n.", victim, obj, NULL, TO_ROOM );
act( "$p bursts from the ground appears in front of you.", ch, obj, victim, TO_VICT );
return;
}
void power_soultwist( CHAR_DATA *ch, CHAR_DATA *victim, char *argument )
{
int damage;
if (!IS_EVIL(ch))
{
send_to_char( "You are not evil enough to use Soul Twist.\n\r", ch );
return;
}
if (victim->alignment < 1)
{
send_to_char( "They are not good enough to use Soul Twist on.\n\r", ch );
return;
}
damage = victim->alignment;
act( "A look of concentration crosses $n's face.", ch, NULL, NULL, TO_ROOM );
send_to_char("You scream in agony as your very soul seems to be torn apart!\n\r",victim);
act("$n clutches $s chest and screams in agony!",victim,NULL,NULL,TO_ROOM);
victim->hit -= damage;
update_pos(victim);
return;
}
void power_curse( CHAR_DATA *ch,CHAR_DATA *victim, char *argument )
{
OBJ_DATA *obj;
int critical = number_range(1,4);
act( "A look of concentration crosses $n's face.", ch, NULL, NULL, TO_ROOM );
if (number_percent() > (ch->pcdata->stats[UNI_GEN] * get_disc(ch,DISC_DAIMOINON)))
{
send_to_char("Nothing happens.\n\r",ch);
return;
}
if (critical == 1)
{
if (IS_ARM_L(victim,LOST_ARM))
{
send_to_char( "Nothing happens.\n\r", ch );
return;
}
SET_BIT(victim->loc_hp[2],LOST_ARM);
if (IS_BLEEDING(victim,BLEEDING_HAND_L))
REMOVE_BIT(victim->loc_hp[6],BLEEDING_HAND_L);
send_to_char("Your scream in agony as your left arm falls off!\n\r",victim);
act("$n screams in agony as $s left arm falls off!",victim,NULL,NULL,TO_ROOM);
make_part(victim,"arm");
if (IS_ARM_L(victim,LOST_ARM) && IS_ARM_R(victim,LOST_ARM))
{
if ((obj = get_eq_char( victim, WEAR_ARMS )) != NULL)
take_item(victim,obj);
}
if ((obj = get_eq_char( victim, WEAR_HOLD )) != NULL)
take_item(victim,obj);
if ((obj = get_eq_char( victim, WEAR_HANDS )) != NULL)
take_item(victim,obj);
if ((obj = get_eq_char( victim, WEAR_WRIST_L )) != NULL)
take_item(victim,obj);
if ((obj = get_eq_char( victim, WEAR_FINGER_L )) != NULL)
take_item(victim,obj);
return;
}
else if (critical == 2)
{
if (IS_ARM_R(victim,LOST_ARM))
{
send_to_char( "Nothing happens.\n\r", ch );
return;
}
SET_BIT(victim->loc_hp[3],LOST_ARM);
if (IS_BLEEDING(victim,BLEEDING_HAND_R))
REMOVE_BIT(victim->loc_hp[6],BLEEDING_HAND_R);
send_to_char("Your scream in agony as your right arm falls off!\n\r",victim);
act("$n screams in agony as $s right arm falls off!",victim,NULL,NULL,TO_ROOM);
make_part(victim,"arm");
if (IS_ARM_L(victim,LOST_ARM) && IS_ARM_R(victim,LOST_ARM))
{
if ((obj = get_eq_char( victim, WEAR_ARMS )) != NULL)
take_item(victim,obj);
}
if ((obj = get_eq_char( victim, WEAR_WIELD )) != NULL)
take_item(victim,obj);
if ((obj = get_eq_char( victim, WEAR_HANDS )) != NULL)
take_item(victim,obj);
if ((obj = get_eq_char( victim, WEAR_WRIST_R )) != NULL)
take_item(victim,obj);
if ((obj = get_eq_char( victim, WEAR_FINGER_R )) != NULL)
take_item(victim,obj);
return;
}
else if (critical == 3)
{
if (IS_LEG_L(victim,LOST_LEG))
{
send_to_char( "Nothing happens.\n\r", ch );
return;
}
SET_BIT(victim->loc_hp[4],LOST_LEG);
if (IS_BLEEDING(victim,BLEEDING_FOOT_L))
REMOVE_BIT(victim->loc_hp[6],BLEEDING_FOOT_L);
send_to_char("Your scream in agony as your left leg falls off!\n\r",victim);
act("$n screams in agony as $s left leg falls off!",victim,NULL,NULL,TO_ROOM);
make_part(victim,"leg");
if (IS_LEG_L(victim,LOST_LEG) && IS_LEG_R(victim,LOST_LEG))
{
if ((obj = get_eq_char( victim, WEAR_LEGS )) != NULL)
take_item(victim,obj);
}
if ((obj = get_eq_char( victim, WEAR_FEET )) != NULL)
take_item(victim,obj);
return;
}
else if (critical == 4)
{
if (IS_LEG_R(victim,LOST_LEG))
{
send_to_char( "Nothing happens.\n\r", ch );
return;
}
SET_BIT(victim->loc_hp[5],LOST_LEG);
if (IS_BLEEDING(victim,BLEEDING_FOOT_R))
REMOVE_BIT(victim->loc_hp[6],BLEEDING_FOOT_R);
send_to_char("Your scream in agony as your right leg falls off!\n\r",victim);
act("$n screams in agony as $s right leg falls off!",victim,NULL,NULL,TO_ROOM);
make_part(victim,"leg");
if (IS_LEG_L(victim,LOST_LEG) && IS_LEG_R(victim,LOST_LEG))
{
if ((obj = get_eq_char( victim, WEAR_LEGS )) != NULL)
take_item(victim,obj);
}
if ((obj = get_eq_char( victim, WEAR_FEET )) != NULL)
take_item(victim,obj);
return;
}
send_to_char("Nothing happens.\n\r",ch);
return;
}
void power_murmur( CHAR_DATA *ch, CHAR_DATA *victim, char *argument )
{
char arg2[MAX_INPUT_LENGTH];
smash_quote(argument);
argument = one_argument( argument, arg2);
if (IS_NPC(victim))
{
send_to_char("You can only do this on players.\n\r",ch);
return;
}
if ( arg2[0] == '\0' )
{
send_to_char( "What do you wish to murmur?\n\r", ch );
return;
}
if ( !check_dumbshit(arg2))
{
send_to_char("You can't force them to do that!\n\r",ch);
return;
}
/*do the dumb shit :P */
smash_tilde( arg2 );
victim->murmur_name = g_string_assign(victim->murmur_name,ch->name->str);
victim->murmur_command = g_string_assign(victim->murmur_command,arg2);
act("You murmur something to $N",ch,NULL,victim,TO_CHAR);
send_to_char("Someone says something you didn't catch.\n\r",victim);
return;
}
void power_loyalty( CHAR_DATA *ch, CHAR_DATA *victim, char *argument )
{
if ( IS_NPC(victim) )
{
send_to_char( "Not on NPC's\n\r", ch );
return;
}
if (!IS_NPC(victim) && victim->pcdata->willpower >= number_range(1,20))
{
act("You shake off $N's attempt to make you loyal.",victim,NULL,ch,TO_CHAR);
act("$n shakes off $N's attempt to make $m loyal.",victim,NULL,ch,TO_NOTVICT);
act("$n shakes off your attempt to make $m loyal.",victim,NULL,ch,TO_VICT);
return;
}
if (strlen(victim->pcdata->conding) < 2 ||
str_cmp(victim->pcdata->conding,ch->name->str))
{
send_to_char( "They are not conditioned to you.\n\r", ch );
return;
}
act("You stare deeply into $N's eyes.",ch,NULL,victim,TO_CHAR);
act("$n stares deeply into $N's eyes.",ch,NULL,victim,TO_NOTVICT);
act("$n stares deeply into your eyes.",ch,NULL,victim,TO_VICT);
if (IS_ADDED(victim,ADDED_LOYAL) )
{
act("You remove $N's loyalty to you.", ch, NULL, victim, TO_CHAR);
act("You no longer feel quite so loyal to $n.", ch, NULL, victim, TO_VICT);
REMOVE_BIT(victim->added, ADDED_LOYAL);
return;
}
act("You make $N completely loyal to you.", ch, NULL, victim, TO_CHAR);
act("You suddenly feel completely loyal to $n.", ch, NULL, victim, TO_VICT);
SET_BIT(victim->added, ADDED_LOYAL);
return;
}
void power_reina( CHAR_DATA *ch, CHAR_DATA *victim, char *argument )
{
CHAR_DATA *rch;
AFFECT_DATA paf;
if (ch->in_room == NULL)
{
send_to_char("Nothing happens.\n\r",ch);
return;
}
if ( ch->in_room->sector_type == SECT_INSIDE )
{
send_to_char("You can only use this power outside.\n\r",ch);
return;
}
if (ch->in_room->vnum == 3001)
{
send_to_char("Degrade the sacred Temple of Midgaard??.\n\r",ch);
return;
}
if ( ch->silent_time != 0 )
{
send_to_char("You can't reina this room at this time.\n\r",ch);
return;
}
if ( IS_RAFFECTED(ch->in_room, ROOM_AFF_REINA ))
{
send_to_char("You cann't reina this room anymore.\n\r",ch);
return;
}
send_to_char("You sing the Song of Reina.\n\r", ch);
act("$n sings a beautiful, haunting song.", ch, NULL, NULL, TO_ROOM );
send_to_char("The air is filled with peaceful harmony.\n\r", ch);
act("The air is filled with peaceful harmony.",ch,NULL,NULL,TO_ROOM);
paf.duration = 5;
paf.bitvector = ROOM_AFF_REINA;
affect_to_room( ch->in_room, &paf );
ch->silent_time = 10;
for ( rch = ch->in_room->people; rch != NULL; rch = rch->next_in_room )
{
if ( rch->fighting != NULL )
stop_fighting( rch, TRUE );
}
return;
}
void power_courage( CHAR_DATA *ch, CHAR_DATA *victim, char *argument )
{
if (IS_NPC(victim))
{
send_to_char( "Not on NPC's.\n\r", ch );
return;
}
send_to_char("You sing the Song of Courage.\n\r", ch);
act("$n sings a beautiful, haunting song.", ch, NULL, NULL, TO_ROOM );
if (IS_ADDED(victim, ADDED_COURAGE))
{
if (!IS_NPC(victim) && victim->pcdata->willpower >= number_range(10,30) && ch != victim)
{
send_to_char("They resist you.\n\r",ch);
return;
}
if (ch != victim)
send_to_char("You remove their Courage.\n\r",ch);
send_to_char("You no longer feel quite so brave.\n\r",victim);
return;
}
if (ch != victim)
send_to_char("You grant them great Courage.\n\r",ch);
send_to_char("You suddenly feel very brave.\n\r",victim);
SET_BIT(ch->added, ADDED_COURAGE);
return;
}
void power_love( CHAR_DATA *ch, CHAR_DATA *victim, char *argument )
{
if ( IS_NPC(victim) )
{
send_to_char( "Not on NPC's\n\r", ch );
return;
}
send_to_char("You sing the Song of Love.\n\r", ch);
act("$n sings a beautiful, haunting song.", ch, NULL, NULL, TO_ROOM );
if (strlen(victim->pcdata->conding) > 2)
{
if (!str_cmp(victim->pcdata->conding,ch->name->str))
{
act("You remove $N's love for you!", ch, NULL, victim, TO_CHAR);
act("You are no longer in love with $n!", ch, NULL, victim, TO_VICT);
victim->pcdata->conding = g_strdup( "" );
}
else
{
send_to_char( "They are already in love with someone else.\n\r", ch );
}
return;
}
if (!IS_NPC(victim) && IS_CLASS(victim,CLASS_TESTVAMP) && get_disc(victim,DISC_PRESENCE) >= get_disc(ch,DISC_PRESENCE) )
{
send_to_char("They resist you.\n\r",ch);
return;
}
if (!IS_NPC(victim) && victim->pcdata->willpower >= number_range(10,30))
{
send_to_char("They resist you.\n\r",ch);
return;
}
if (IS_ADDED(victim,ADDED_LOYAL) )
{
act("You remove $N's love to you.", ch, NULL, victim, TO_CHAR);
act("You no longer feel quite so loving to $n.", ch, NULL, victim, TO_VICT);
REMOVE_BIT(victim->added, ADDED_LOYAL);
return;
}
act("You make $N fall in love with you!", ch, NULL, victim, TO_CHAR);
act("You fall in love with $n!", ch, NULL, victim, TO_VICT);
act("$N gazes lovingly into $n's eyes!", ch, NULL, victim, TO_NOTVICT);
SET_BIT(victim->added, ADDED_LOYAL);
return;
}
void power_anger( CHAR_DATA *ch, CHAR_DATA *victim, char *argument )
{
if (IS_NPC(victim))
{
send_to_char( "Not on NPC's.\n\r", ch );
return;
}
send_to_char("You sing the Song of Anger.\n\r", ch);
act("$n sings a beautiful, haunting song.", ch, NULL, NULL, TO_ROOM );
if (IS_ADDED(victim, ADDED_ANGER))
{
send_to_char("You no longer feel so angry.\n\r",victim);
act("$n regains $s temper.",victim,NULL,NULL,TO_ROOM);
REMOVE_BIT(victim->added, ADDED_ANGER);
return;
}
if (!IS_NPC(victim) && ch != victim)
{
send_to_char("They resist you.\n\r",ch);
return;
}
if (!IS_NPC(victim) && victim->pcdata->willpower >= number_range(10,30) && ch != victim)
{
send_to_char("They resist you.\n\r",ch);
return;
}
if (IS_ADDED(victim, ADDED_CALM))
{
send_to_char("You no longer feel so calm.\n\r",victim);
act("$n no longer seems quite so calm.",victim,NULL,NULL,TO_ROOM);
REMOVE_BIT(victim->added, ADDED_CALM);
WAIT_STATE( ch, 12 );
return;
}
send_to_char("You suddenly feel very angry!\n\r",victim);
act("$n snarls with anger.",victim,NULL,NULL,TO_ROOM);
SET_BIT(victim->added, ADDED_ANGER);
return;
}
void power_thanatopsis( CHAR_DATA *ch,CHAR_DATA *victim, char *argument )
{
OBJ_DATA *obj;
ROOM_INDEX_DATA *pRoomIndex;
ROOM_INDEX_DATA *location;
char arg[MAX_INPUT_LENGTH];
char buf[MAX_INPUT_LENGTH];
one_argument( argument, arg );
if ( ( obj = get_obj_here( ch, arg ) ) == NULL )
{
send_to_char( "You cannot seem to find that object.\n\r", ch );
return;
}
if (obj->item_type != ITEM_CORPSE_NPC && obj->item_type != ITEM_CORPSE_PC)
{
send_to_char( "That isn't a corpse.\n\r", ch );
return;
}
act("You examine $p carefully.",ch,obj,NULL,TO_CHAR);
act("$n examines $p carefully.",ch,obj,NULL,TO_ROOM);
if (obj->questmaker->len < 1 || obj->questowner->len < 1)
{
send_to_char( "You are unable to discover anything about the killer.\n\r", ch );
return;
}
sprintf(buf,"It seems that %s was killed by %s.\n\r",obj->questowner->str,obj->questmaker->str);
send_to_char(buf,ch);
if ( ( location = ch->in_room ) == NULL )
{
send_to_char("Bug - Please note Spiral or Dominion.\n\r",ch);
return;
}
if ( ( pRoomIndex = get_room_index(obj->specpower) ) == NULL )
{
sprintf(buf,"You are unsure where %s was killed.\n\r",obj->questowner->str);
send_to_char(buf,ch);
}
else
{
if (location == pRoomIndex)
sprintf(buf,"It seems that %s was killed right here.\n\r", obj->questowner->str);
else
{
char_from_room(ch);
char_to_room(ch,pRoomIndex);
sprintf(buf,"It seems that %s was killed at %s.\n\r", obj->questowner->str, ch->in_room->name);
char_from_room(ch);
char_to_room(ch,location);
}
send_to_char(buf,ch);
}
return;
}
void power_preservation( CHAR_DATA *ch,CHAR_DATA *victim, char *argument )
{
OBJ_DATA *obj;
char arg[MAX_INPUT_LENGTH];
char buf[MAX_INPUT_LENGTH];
one_argument( argument, arg );
if ( ( obj = get_obj_here( ch, arg ) ) == NULL )
{
send_to_char( "You cannot seem to find that object.\n\r", ch );
return;
}
if ( obj->chobj != NULL )
{
send_to_char( "You are unable to preserve it.\n\r", ch );
return;
}
if (obj->item_type == ITEM_CORPSE_PC)
send_to_char( "You cannot preserve that type of corpse.\n\r", ch );
else if (obj->item_type == ITEM_FOOD)
{
act("$p shrivels up.",ch,obj,NULL,TO_CHAR);
act("$p shrivels up.",ch,obj,NULL,TO_ROOM);
if (obj->value[0] > 1) obj->value[0] = (int)((double)obj->value[0] * 0.5);
ch->carry_weight -= obj->weight;
if (obj->weight > 1) obj->weight = (int)((double)obj->weight * 0.5);
ch->carry_weight += obj->weight;
obj->timer = -1;
}
else if (obj->item_type == ITEM_CORPSE_NPC)
{
if (obj->questowner->len < 1)
{
act("You are unable to preserve $p.",ch,obj,NULL,TO_CHAR);
return;
}
if (obj->timer < 1)
{
send_to_char( "It is already preserved.\n\r", ch );
return;
}
act("$p shrivels up.",ch,obj,NULL,TO_CHAR);
act("$p shrivels up.",ch,obj,NULL,TO_ROOM);
sprintf(buf, "the shriveled up corpse of %s",obj->questowner->str);
obj->short_descr = g_string_assign(obj->short_descr,buf);
sprintf(buf, "The shriveled up corpse of %s is lying here.",obj->questowner->str);
obj->description = g_string_assign(obj->description,buf);
ch->carry_weight -= obj->weight;
if (obj->weight > 1)
obj->weight =(int)((double)obj->weight * 0.5);
ch->carry_weight += obj->weight;
obj->timer = -1;
}
else
send_to_char( "You cannot preserve that object.\n\r", ch );
return;
}
void power_mortal( CHAR_DATA *ch, CHAR_DATA *vcitim, char *argument )
{
if (!IS_SET(ch->pcdata->stats[UNI_AFF], VAM_MORTAL))
{
/* 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,"");
if (IS_VAMPAFF(ch,VAM_FANGS) ) power_fangs(ch,ch,"");
if (IS_VAMPAFF(ch,VAM_CLAWS) ) power_claws(ch,ch,"");
if (IS_VAMPAFF(ch,VAM_NIGHTSIGHT) ) power_nightsight(ch,ch,"");
if (IS_SET(ch->act,PLR_HOLYLIGHT) ) power_truesight(ch,ch,"");
if (IS_VAMPAFF(ch,VAM_CHANGED) ) power_change(ch,ch,"human");
if (IS_POLYAFF(ch,POLY_SERPENT) ) power_serpent(ch,ch,"");
ch->pcdata->stats[UNI_RAGE] = 0;
ch->pcdata->condition[COND_THIRST] = 100;
send_to_char("Colour returns to your skin and you warm up a little.\n\r",ch);
act("Colour returns to $n's skin.", ch, NULL, NULL, TO_ROOM);
REMOVE_BIT(ch->creature, CLASS_VAMPIRE);
SET_BIT(ch->pcdata->stats[UNI_AFF], VAM_MORTAL);
}
else
{
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;
}
void power_nocturn( CHAR_DATA *ch,CHAR_DATA *victim, char *argument )
{
AFFECT_DATA paf;
if (ch->in_room->vnum == 3001)
{
send_to_char("Degrade the sacred Temple of Midgaard??.\n\r",ch);
return;
}
if ( ch->silent_time != 0 )
{
send_to_char("You can't darken this room at this time.\n\r",ch);
return;
}
if ( IS_RAFFECTED(ch->in_room, ROOM_AFF_DARK ))
{
send_to_char("You cann't darken this room anymore.\n\r",ch);
return;
}
paf.duration = 5;
paf.bitvector = ROOM_AFF_DARK;
affect_to_room( ch->in_room, &paf );
act( "All light fades into a complete darkness.", ch, NULL, NULL, TO_ROOM );
act( "All light fades into a complete darkness.", ch, NULL, NULL, TO_CHAR );
ch->silent_time = 10;
return;
}
void power_ahriman( CHAR_DATA *ch, CHAR_DATA *victim, char *argument )
{
int sn;
int level;
int spelltype;
if (ch->fighting == NULL)
set_fighting(ch,victim);
if ( ( sn = skill_lookup( "arms" ) ) < 0 ) return;
spelltype = skill_table[sn].target;
level = (int)((double)ch->spl[spelltype] * 0.25);
(*skill_table[sn].spell_fun) ( sn, level, ch, victim );
return;
}
void power_abyss( CHAR_DATA *ch, CHAR_DATA *victim, char *argument )
{
if (victim->plane != PLANE_SHADOW)
{
send_to_char("They are not in the shadow plane!.\n\r",ch);
return;
}
ch->plane = PLANE_NORMAL;
shift_obj_plane(ch);
send_to_char("You fade back into the real world.\n\r",victim);
act("The shadows flicker and $n fades into existance.",victim,NULL,NULL,TO_ROOM);
//check_killer( ch, victim );
set_fighting( ch, victim );
set_attack_flag(ch,victim);
multi_hit( ch, victim, TYPE_UNDEFINED );
return;
}
void power_nightfall( CHAR_DATA *ch,CHAR_DATA *victim, char * argument )
{
SPHERE_DATA af;
SPHERE_DATA *sp_paf;
if (IS_SET(ch->added,ADDED_NIGHTFALL) )
{
if ((sp_paf = find_spaffect(ch,ADDED_NIGHTFALL)) != NULL)
{
sphere_remove( ch, sp_paf );
return;
}
}
if ( weather_info[ch->in_room->sector_type].sunlight == SUN_DARK )
{
send_to_char("The night has already fallen.\n\r",ch);
return;
}
af.spell_number = mage_affect_slot("Nightfall");
af.type = TYPE_SPHERE_ADDED;
af.duration = get_disc(ch,DISC_OBTENEBRATION);
af.bitvector = ADDED_NIGHTFALL;
sphere_to_char( ch, &af );
send_to_char( mage_affect_table[mage_affect_slot("Nightfall")].on_msg, ch );
act( "$n grins as nightfall surrounds his body.", ch, NULL, NULL, TO_ROOM );
act( "You feel the nightfall surround your body.", ch, NULL, NULL, TO_CHAR );
return;
}
void power_tenebrous( CHAR_DATA *ch, CHAR_DATA *victim, char *argument )
{
char buf[MAX_STRING_LENGTH];
if (IS_POLYAFF(ch, POLY_ZULO))
{
send_to_char( "Not while in Zulo Form.\n\r", ch );
return;
}
if (IS_POLYAFF(ch, POLY_CHANGELING))
{
send_to_char( "Not while in changeling Form.\n\r", ch );
return;
}
if (IS_POLYAFF(ch, POLY_BONECRAFT))
{
send_to_char( "Not while in bonecraft Form.\n\r", ch );
return;
}
// Add MistyForm
if (!IS_AFFECTED(ch,AFF_POLYMORPH))
{
if (ch->stance[0] != -1) do_stance(ch,"");
if (ch->mounted == IS_RIDING) do_dismount(ch,"");
act( "You transform into shadow form.", ch, NULL, NULL, TO_CHAR );
act( "$n transforms into a shadow.", ch, NULL, NULL, TO_ROOM );
if (IS_EXTRA(ch, TIED_UP))
{
act("The ropes binding you fall through your ethereal form.",ch,NULL,NULL,TO_CHAR);
act("The ropes binding $n fall through $s ethereal form.",ch,NULL,NULL,TO_ROOM);
REMOVE_BIT(ch->extra, TIED_UP);
REMOVE_BIT(ch->extra, GAGGED);
REMOVE_BIT(ch->extra, BLINDFOLDED);
}
if (is_affected(ch, gsn_web))
{
act("The webbing entrapping $n falls through $s ethereal form.",ch,NULL,NULL,TO_ROOM);
send_to_char("The webbing entrapping you falls through your ethereal form.\n\r",ch);
affect_strip(ch, gsn_web);
}
SET_BIT(ch->pcdata->powers[WOLF_POLYAFF], POLY_MIST);
SET_BIT(ch->pcdata->stats[UNI_AFF], VAM_CHANGED);
SET_BIT(ch->affected_by, AFF_POLYMORPH);
ch->plane = PLANE_ETHEREAL;
shift_obj_plane(ch);
sprintf(buf, "%s the shadow", ch->name->str);
ch->morph = g_string_assign(ch->morph,buf);
strip_player(ch);
}
else
{
REMOVE_BIT(ch->pcdata->powers[WOLF_POLYAFF], POLY_MIST);
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);
ch->plane = PLANE_NORMAL;
shift_obj_plane(ch);
clear_stats(ch);
ch->morph = g_string_assign(ch->morph,"");
}
return;
}
void power_entrancement( CHAR_DATA *ch, CHAR_DATA *victim, char *argument )
{
int sn;
int level;
int spelltype;
if ( IS_NPC(victim) && ch->pcdata->followers > 4 )
{
send_to_char("Nothing happens.\n\r",ch);
return;
}
if ( IS_AFFECTED(victim, AFF_CHARM) )
{
send_to_char( "Nothing happens.\n\r", ch );
return;
}
if ( !IS_AFFECTED(victim, AFF_CHARM) )
{
act("You stare deeply into $N's eyes.",ch,NULL,victim,TO_CHAR);
act("$n stares deeply into $N's eyes.",ch,NULL,victim,TO_NOTVICT);
act("$n stares deeply into your eyes.",ch,NULL,victim,TO_VICT);
}
if ( ( sn = skill_lookup( "charm person" ) ) < 0 ) return;
spelltype = skill_table[sn].target;
level = get_disc(ch,DISC_PRESENCE) * 10;
if (!IS_NPC(victim) && (IS_VAMPIRE(victim)) &&
get_disc(victim,DISC_PRESENCE) >= get_disc(ch,DISC_PRESENCE) )
{
act("$N shrugs off your attempt to entrance $M.",ch,NULL,victim,TO_CHAR);
act("$N shrugs off $n's attempt to entrance $M.",ch,NULL,victim,TO_NOTVICT);
act("You shrug off $n's attempt to entrance you.",ch,NULL,victim,TO_VICT);
return;
}
if (!IS_NPC(victim) && ((victim->pcdata->willpower >= number_range(2,30) &&
IS_ADDED(victim, ADDED_LOYAL)) || victim->pcdata->willpower >= number_range(10,30)) &&
strlen(victim->pcdata->conding) > 1)
{
act("$N shrugs off your attempt to entrance $M.",ch,NULL,victim,TO_CHAR);
act("$N shrugs off $n's attempt to entrance $M.",ch,NULL,victim,TO_NOTVICT);
act("You shrug off $n's attempt to entrance you.",ch,NULL,victim,TO_VICT);
return;
}
(*skill_table[sn].spell_fun) ( sn, level, ch, victim );
if ( !IS_AFFECTED(victim, AFF_CHARM) )
{
act("$N shrugs off your attempt to entrance $M.",ch,NULL,victim,TO_CHAR);
act("$N shrugs off $n's attempt to entrance $M.",ch,NULL,victim,TO_NOTVICT);
act("You shrug off $n's attempt to entrance you.",ch,NULL,victim,TO_VICT);
}
act("$N gazes lovingly back at $n.",ch,NULL,victim,TO_NOTVICT);
if (IS_NPC(victim))
{
victim->lord = g_string_assign(victim->lord,ch->name->str);
ch->pcdata->followers++;
}
return;
}
void power_majesty( CHAR_DATA *ch, CHAR_DATA *victim, char *argument )
{
char arg1[MAX_INPUT_LENGTH];
char arg2[MAX_INPUT_LENGTH];
char buf[MAX_STRING_LENGTH];
int value;
smash_tilde( argument );
argument = one_argument( argument, arg1 );
str_cpy( arg2, argument );
if (arg1[0] != '\0' && !str_cmp(arg1,"on"))
{
if (IS_EXTRA(ch, EXTRA_FAKE_CON))
{send_to_char("You already have Majesty on.\n\r",ch); return;}
SET_BIT(ch->extra, EXTRA_FAKE_CON);
send_to_char("Your Majesty is now ON.\n\r",ch);
return;
}
if (arg1[0] != '\0' && !str_cmp(arg1,"off"))
{
if (!IS_EXTRA(ch, EXTRA_FAKE_CON))
{send_to_char("You already have Majesty off.\n\r",ch); return;}
REMOVE_BIT(ch->extra, EXTRA_FAKE_CON);
send_to_char("Your Majesty is now OFF.\n\r",ch);
return;
}
if ( arg1[0] == '\0' || arg2[0] == '\0' )
{
send_to_char("You have the following stats:\n\r",ch);
sprintf(buf,"Hitroll: %d, Actual: %d.\n\r",
ch->pcdata->fake_hit, char_hitroll(ch));
send_to_char(buf, ch);
sprintf(buf,"Damroll: %d, Actual: %d.\n\r",
ch->pcdata->fake_dam, char_damroll(ch));
send_to_char(buf, ch);
sprintf(buf,"Armour: %d, Actual: %d.\n\r",
ch->pcdata->fake_ac, char_ac(ch));
send_to_char(buf, ch);
sprintf(buf,"Hp: %d, Actual: %d.\n\r",
ch->pcdata->fake_hp, ch->hit);
send_to_char(buf, ch);
sprintf(buf,"Mana: %d, Actual: %d.\n\r",
ch->pcdata->fake_mana, ch->mana);
send_to_char(buf, ch);
sprintf(buf,"Move: %d, Actual: %d.\n\r",
ch->pcdata->fake_move, ch->move);
send_to_char(buf, ch);
return;
}
value = is_number( arg2 ) ? atoi( arg2 ) : -10000;
if (!str_cmp(arg1,"hit") || !str_cmp(arg1,"hitroll"))
{
if (value < 0 || value > 1000)
{
send_to_char("Please enter a value between 0 and 1000.\n\r",ch);
return;
}
ch->pcdata->fake_hit = value;
send_to_char("Ok.\n\r",ch);
return;
}
if (!str_cmp(arg1,"dam") || !str_cmp(arg1,"damroll"))
{
if (value < 0 || value > 1000)
{
send_to_char("Please enter a value between 0 and 1000.\n\r",ch);
return;
}
ch->pcdata->fake_dam = value;
send_to_char("Ok.\n\r",ch);
return;
}
if (!str_cmp(arg1,"ac") || !str_cmp(arg1,"armour") || !str_cmp(arg1,"armor"))
{
if (value < -1000 || value > 100)
{
send_to_char("Please enter a value between -1000 and 100.\n\r",ch);
return;
}
ch->pcdata->fake_ac = value;
send_to_char("Ok.\n\r",ch);
return;
}
if (!str_cmp(arg1,"hp") || !str_cmp(arg1,"hitpoints"))
{
if (value < 1 || value > 120000)
{
send_to_char("Please enter a value between 1 and 120000.\n\r",ch);
return;
}
ch->pcdata->fake_hp = value;
send_to_char("Ok.\n\r",ch);
return;
}
if (!str_cmp(arg1,"mana"))
{
if (value < 1 || value > 120000)
{
send_to_char("Please enter a value between 1 and 120000.\n\r",ch);
return;
}
ch->pcdata->fake_mana = value;
send_to_char("Ok.\n\r",ch);
return;
}
if (!str_cmp(arg1,"move"))
{
if (value < 1 || value > 120000)
{
send_to_char("Please enter a value between 1 and 120000.\n\r",ch);
return;
}
ch->pcdata->fake_move = value;
send_to_char("Ok.\n\r",ch);
return;
}
send_to_char("You can set: Hit, Dam, Ac, Hp, Mana, Move.\n\r",ch);
return;
}
void power_gaze( CHAR_DATA *ch, CHAR_DATA *victim, char *argument )
{
CHAR_DATA *mount;
int victimclass, chclass;
if (IS_CLASS(victim, CLASS_VAMPIRE) )
{
if ( get_disc(ch,DISC_PRESENCE) >= get_disc(victim,DISC_PRESENCE))
{
if (ch->race <= 0 ) chclass = 0;
else if (ch->race <= 4 ) chclass = 1;
else if (ch->race <= 9 ) chclass = 2;
else if (ch->race <= 14) chclass = 3;
else if (ch->race <= 19) chclass = 4;
else if (ch->race <= 24) chclass = 5;
else chclass = 6;
if (victim->race <= 0 ) victimclass = 0;
else if (victim->race <= 4 ) victimclass = 1;
else if (victim->race <= 9 ) victimclass = 2;
else if (victim->race <= 14) victimclass = 3;
else if (victim->race <= 19) victimclass = 4;
else if (victim->race <= 24) victimclass = 5;
else victimclass = 6;
if ( victimclass < chclass )
{
send_to_char( "You recall from combat!\n\r", victim );
stop_fighting( ch, TRUE );
act( "$N disappears.", ch, NULL, victim, TO_ROOM );
char_from_room( victim );
char_to_room( victim, get_room_index( ROOM_VNUM_TEMPLE ) );
act( "$N appears in the room.", ch, NULL, victim, TO_ROOM );
do_look( victim, "auto" );
if ( ( mount = victim->mount ) == NULL ) return;
char_from_room( mount );
char_to_room( mount, victim->in_room );
}
else
send_to_char("You failed!\n\r",ch);
}
}
else
send_to_char("You can only gaze upon other Kindred.\n\r",ch);
return;
}
void power_awe( CHAR_DATA *ch, CHAR_DATA *victim, char *argument )
{
int victimclass, chclass;
if (IS_CLASS(victim, CLASS_VAMPIRE) )
{
if ( get_disc(ch,DISC_PRESENCE) >= get_disc(victim,DISC_PRESENCE))
{
if (ch->race <= 0 ) chclass = 0;
else if (ch->race <= 4 ) chclass = 1;
else if (ch->race <= 9 ) chclass = 2;
else if (ch->race <= 14) chclass = 3;
else if (ch->race <= 19) chclass = 4;
else if (ch->race <= 24) chclass = 5;
else chclass = 6;
if (victim->race <= 0 ) victimclass = 0;
else if (victim->race <= 4 ) victimclass = 1;
else if (victim->race <= 9 ) victimclass = 2;
else if (victim->race <= 14) victimclass = 3;
else if (victim->race <= 19) victimclass = 4;
else if (victim->race <= 24) victimclass = 5;
else victimclass = 6;
if ( victimclass <= chclass )
{
do_follow(victim,ch->name->str);
}
else
send_to_char("You failed!\n\r",ch);
}
}
else
send_to_char("You can only awe other Kindred.\n\r",ch);
return;
}
void power_vsummon( CHAR_DATA *ch,CHAR_DATA *victim, char *argument )
{
CHAR_DATA *mount;
int sum_chance;
if ( ch->mana < 500 )
{
send_to_char("You have insufficient mana.\n\r",ch);
return;
}
sum_chance = number_percent();
ch->mana -= 500;
if ( victim == ch
|| victim->in_room == NULL
|| sum_chance > 50
|| is_tempsafe(ch)
|| IS_SET(victim->in_room->room_flags, ROOM_PRIVATE)
|| IS_SET(victim->in_room->room_flags, ROOM_SOLITARY)
|| IS_SET(victim->in_room->room_flags, ROOM_NO_RECALL)
|| (IS_NPC(victim) && victim->level >= 60)
|| (!IS_NPC(victim) && IS_IMMORTAL(victim))
|| (!IS_NPC(victim) && victim->pcdata->obeah > 0)
|| victim->fighting != NULL
|| victim->in_room->area != ch->in_room->area
|| (strstr(victim->in_room->area->builders, "Unlinked" )))
{
send_to_char( "You failed.\n\r", ch );
return;
}
act( "$n disappears suddenly.", victim, NULL, NULL, TO_ROOM );
char_from_room( victim );
char_to_room( victim, ch->in_room );
act( "$n arrives suddenly.", victim, NULL, NULL, TO_ROOM );
act( "$N has summoned you!", victim, NULL, ch, TO_CHAR );
do_look( victim, "auto" );
if ( (mount = victim->mount) == NULL ) return;
char_from_room( mount );
char_to_room( mount, get_room_index(victim->in_room->vnum) );
do_look( mount, "auto" );
return;
}
void power_change( CHAR_DATA *ch, CHAR_DATA *victim, char *argument )
{
char arg [MAX_INPUT_LENGTH];
char buf [MAX_STRING_LENGTH];
argument = one_argument( argument, arg );
if (IS_POLYAFF(ch, POLY_ZULO))
{
send_to_char( "Not while in Zulo Form.\n\r", ch );
return;
}
if (IS_POLYAFF(ch, POLY_CHANGELING))
{
send_to_char( "Not while in changeling Form.\n\r", ch );
return;
}
if (IS_POLYAFF(ch, POLY_BONECRAFT))
{
send_to_char( "Not while in bonecraft Form.\n\r", ch );
return;
}
if ( arg[0] == '\0' )
{
send_to_char( "You can change between 'human', 'bat', 'wolf' and 'mist' forms.\n\r", ch );
return;
}
if ( !str_cmp(arg,"bat") )
{
if (get_disc(ch,DISC_PROTEAN) < 3 )
{
send_to_char("You are not trained Protean 3 discipline.\n\r",ch);
return;
}
if (IS_AFFECTED(ch, AFF_POLYMORPH))
{
send_to_char( "You can only polymorph from human form.\n\r", ch );
return;
}
if (ch->stance[0] != -1) do_stance(ch,"");
if (ch->mounted == IS_RIDING) do_dismount(ch,"");
clear_stats(ch);
act( "You transform into bat form.", ch, NULL, NULL, TO_CHAR );
act( "$n transforms into a bat.", ch, NULL, NULL, TO_ROOM );
SET_BIT(ch->pcdata->stats[UNI_AFF], VAM_FLYING);
SET_BIT(ch->pcdata->stats[UNI_AFF], VAM_SONIC);
SET_BIT(ch->pcdata->powers[WOLF_POLYAFF], POLY_BAT);
SET_BIT(ch->pcdata->stats[UNI_AFF], VAM_CHANGED);
SET_BIT(ch->affected_by, AFF_POLYMORPH);
sprintf(buf, "%s the vampire bat", ch->name->str);
ch->morph = g_string_assign(ch->morph,buf);
return;
}
else if ( !str_cmp(arg,"wolf") )
{
if (get_disc(ch,DISC_PROTEAN) < 4 )
{
send_to_char("You are not trained Protean 4 discipline.\n\r",ch);
return;
}
if (IS_AFFECTED(ch, AFF_POLYMORPH))
{
send_to_char( "You can only polymorph from human form.\n\r", ch );
return;
}
if (ch->stance[0] != -1) do_stance(ch,"");
if (ch->mounted == IS_RIDING) do_dismount(ch,"");
act( "You transform into wolf form.", ch, NULL, NULL, TO_CHAR );
act( "$n transforms into a dire wolf.", ch, NULL, NULL, TO_ROOM );
clear_stats(ch);
if (ch->wpn[0] > 0)
{
ch->hitroll += (ch->wpn[0]);
ch->damroll += (ch->wpn[0]);
ch->armor -= (ch->wpn[0] * 3);
}
ch->pcdata->mod_str = 10;
SET_BIT(ch->pcdata->powers[WOLF_POLYAFF], POLY_WOLF);
SET_BIT(ch->affected_by, AFF_POLYMORPH);
SET_BIT(ch->pcdata->stats[UNI_AFF], VAM_CHANGED);
ch->max_hit = ch->max_hit + 500;
ch->hit = ch->hit + 500;
sprintf(buf, "%s the dire wolf", ch->name->str);
ch->morph = g_string_assign(ch->morph,buf);
return;
}
else if ( !str_cmp(arg,"mist") )
{
if (get_disc(ch,DISC_PROTEAN) < 5 )
{
send_to_char("You are not trained Protean 5 discipline.\n\r",ch);
return;
}
if (IS_AFFECTED(ch, AFF_POLYMORPH))
{
send_to_char( "You can only polymorph from human form.\n\r", ch );
return;
}
if (ch->stance[0] != -1) do_stance(ch,"");
if (ch->mounted == IS_RIDING) do_dismount(ch,"");
act( "You transform into mist form.", ch, NULL, NULL, TO_CHAR );
act( "$n transforms into a white mist.", ch, NULL, NULL, TO_ROOM );
if (IS_EXTRA(ch, TIED_UP))
{
act("The ropes binding you fall through your ethereal form.",ch,NULL,NULL,TO_CHAR);
act("The ropes binding $n fall through $s ethereal form.",ch,NULL,NULL,TO_ROOM);
REMOVE_BIT(ch->extra, TIED_UP);
REMOVE_BIT(ch->extra, GAGGED);
REMOVE_BIT(ch->extra, BLINDFOLDED);
}
if (is_affected(ch, gsn_web))
{
act("The webbing entrapping $n falls through $s ethereal form.",ch,NULL,NULL,TO_ROOM);
send_to_char("The webbing entrapping you falls through your ethereal form.\n\r",ch);
affect_strip(ch, gsn_web);
}
clear_stats(ch);
SET_BIT(ch->pcdata->powers[WOLF_POLYAFF], POLY_MIST);
SET_BIT(ch->pcdata->stats[UNI_AFF], VAM_CHANGED);
SET_BIT(ch->affected_by, AFF_POLYMORPH);
ch->plane = PLANE_ETHEREAL;
shift_obj_plane(ch);
sprintf(buf, "%s the white mist", ch->name->str);
ch->morph = g_string_assign(ch->morph,buf);
strip_player(ch);
return;
}
/* else if ( !str_cmp(arg,"human") )
{
if (!IS_AFFECTED(ch, AFF_POLYMORPH))
{
send_to_char( "You are already in human form.\n\r", ch );
free_string( ch->morph );
ch->morph = str_dup( buf );
return;
} */
else if ( !str_cmp(arg,"human") )
{
if (!IS_AFFECTED(ch, AFF_POLYMORPH))
{
send_to_char( "You are already in human form.\n\r", ch );
return;
}
if (IS_VAMPAFF(ch, VAM_CHANGED) && IS_SET(ch->pcdata->powers[WOLF_POLYAFF], POLY_BAT))
{
REMOVE_BIT(ch->pcdata->stats[UNI_AFF], VAM_FLYING);
REMOVE_BIT(ch->pcdata->stats[UNI_AFF], VAM_SONIC);
REMOVE_BIT(ch->pcdata->powers[WOLF_POLYAFF], POLY_BAT);
}
else if (IS_VAMPAFF(ch, VAM_CHANGED) && IS_SET(ch->pcdata->powers[WOLF_POLYAFF], POLY_WOLF))
{
REMOVE_BIT(ch->pcdata->powers[WOLF_POLYAFF], POLY_WOLF);
ch->max_hit = ch->max_hit - 500;
ch->hit = ch->hit - 500;
if (ch->hit < 1) ch->hit = 1;
}
else if (IS_VAMPAFF(ch, VAM_CHANGED) && IS_SET(ch->pcdata->powers[WOLF_POLYAFF], POLY_MIST))
{
REMOVE_BIT(ch->pcdata->powers[WOLF_POLYAFF], POLY_MIST);
ch->plane = PLANE_NORMAL;
shift_obj_plane(ch);
}
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,"");
return;
}
else
send_to_char("You can change between 'human', 'bat', 'wolf' and 'mist' forms.\n\r", ch);
return;
}
void power_earthmeld( CHAR_DATA *ch,CHAR_DATA *victim, char * argument )
{
if (ch->pcdata->stats[UNI_RAGE] > 0)
{
send_to_char("You cannot control your melding abilities while the beast is so strong.\n\r",ch);
return;
}
if ( ch->position == POS_FIGHTING )
{
send_to_char( "No way! You are fighting.\n\r", ch );
return;
}
if ( ch->pk_timer > 0 )
{
send_to_char("You can't meld while still frenzied from last combat.\n\r",ch);
return;
}
if ( ch->plane == PLANE_EARTH)
{
ch->plane = PLANE_NORMAL;
shift_obj_plane(ch);
act("$n reforms into thier normal stature.",ch,NULL,NULL,TO_ROOM);
send_to_char("You reform into your normal stature.\n\r",ch);
return;
}
else
{
ch->plane = PLANE_EARTH;
shift_obj_plane(ch);
send_to_char("You become one with the earth, as you seep into the ground.\n\r",ch);
act("$n becomes one with the earth, as they seep into the ground.",ch,NULL,NULL,TO_ROOM);
return;
}
return;
}
void power_marble( CHAR_DATA *ch, CHAR_DATA *victim, char * argument )
{
if ( IS_SET(ch->act,PLR_MARBLEFLESH))
{
REMOVE_BIT(ch->act,PLR_MARBLEFLESH);
send_to_char("Your marble skin reforms in to soft flesh.\n\r",ch);
}
else
{
SET_BIT(ch->act,PLR_MARBLEFLESH);
send_to_char("You soft flesh becomes hard as marble!\n\r",ch);
}
}
void power_spit( CHAR_DATA *ch, CHAR_DATA *victim, char *argument )
{
int dam;
int stance;
dam = number_range(10,20);
dam += char_damroll(ch);
if (dam == 0) dam = 1;
if ( !IS_AWAKE(victim) )
dam *= 2;
if ( !IS_NPC(ch) && get_disc(ch,DISC_POTENCE) > 0)
dam += dam * (int)((double)get_disc(ch,DISC_POTENCE) * 0.3);
if ( !IS_NPC(ch) ) dam = dam + (dam * (int)(((double)ch->wpn[0]) * 0.01));
/*
if ( !IS_NPC(ch) )
*/
{
stance = ch->stance[0];
if ( IS_STANCE(ch, STANCE_NORMAL) )
dam = (int)((double)dam * 1.25);
else dam = dambonus(ch,victim,dam,stance);
}
if ( dam <= 0 )
dam = 1;
damage( ch, victim, dam, TYPE_SPIT );
return;
}
void power_silent( CHAR_DATA *ch, CHAR_DATA *victim, char *argument )
{
AFFECT_DATA paf;
if ( IS_RAFFECTED(ch->in_room, ROOM_AFF_SILENT ))
{
send_to_char("You can't silence a silent room.\n\r",ch);
return;
}
paf.duration = 5;
paf.bitvector = ROOM_AFF_SILENT;
affect_to_room( ch->in_room, &paf );
act( "All sounds fade into a complete silence.", ch, NULL, NULL, TO_ROOM );
act( "All sounds fade into a complete silence.", ch, NULL, NULL, TO_CHAR );
ch->silent_time = 10;
return;
}
void power_weaken( CHAR_DATA *ch, CHAR_DATA *victim, char *argument)
{
char buf [MAX_STRING_LENGTH];
if (!IS_CLASS(victim, CLASS_VAMPIRE))
{
send_to_char( "That victim does not have any blood you can weaken!\n\r", ch );
return;
}
victim->pcdata->condition[COND_THIRST] -= 10;
sprintf(buf,"%s's hand seems to drain your lifeforce.\n\r",ch->name->str);
send_to_char(buf,victim);
sprintf(buf,"You drain %s with all you got!\n\r",victim->name->str);
send_to_char(buf,ch);
}
void power_disease( CHAR_DATA *ch, CHAR_DATA *victim, char *argument)
{
char buf [MAX_STRING_LENGTH];
AFFECT_DATA af;
if (!IS_CLASS(victim, CLASS_VAMPIRE))
{
send_to_char( "You cannot disease that victim!\n\r", ch );
return;
}
af.type = MAX_SKILL + 2;
af.duration = 5;
af.location = APPLY_NONE;
af.modifier = 0;
af.bitvector = AFF_DISEASE;
affect_to_char( victim, &af );
sprintf(buf,"Blood trickles out of %s's ears, nose and mouth.\n\r",victim->name->str);
send_to_char(buf,ch);
}
void power_agony(CHAR_DATA *ch,CHAR_DATA *victim, char *argument)
{
OBJ_DATA *obj;
AFFECT_DATA af;
/* find out what */
if (argument[0] == '\0')
{
send_to_char("Agony what item?\n\r",ch);
return;
}
obj = get_obj_list(ch,argument,ch->carrying);
if (obj== NULL)
{
send_to_char("You don't have that item.\n\r",ch);
return;
}
if (obj->item_type == ITEM_WEAPON)
{
if ( obj->value[0] != 0)
{
act("$p cannot be used.",ch,obj,NULL,TO_CHAR);
return;
}
af.where = TO_WEAPON;
af.type = gsn_poison;
af.duration = 5;
af.location = APPLY_NONE;
af.modifier = 0;
af.bitvector = WEAPON_POISON;
affect_to_obj(obj,&af);
obj->value[0] = 141;
act("$n coats $p with deadly blood.",ch,obj,NULL,TO_ROOM);
act("You coat $p with blood.",ch,obj,NULL,TO_CHAR);
return;
}
}
void power_darkheart( CHAR_DATA *ch, CHAR_DATA *victim, char *argument )
{
if (IS_IMMUNE(ch,IMM_STAKE) )
{
send_to_char("But you've already torn your heart out!\n\r",ch);
return;
}
send_to_char("You rip your heart from your body and toss it to the ground.\n\r",ch);
act("$n rips $s heart out and tosses it to the ground.", ch, NULL, NULL, TO_ROOM);
make_part( ch, "heart" );
ch->hit = ch->hit - number_range(10,20);
update_pos(ch);
if (ch->position == POS_DEAD && !IS_HERO(ch))
{
send_to_char( "{RYou have been KILLED!!{x\n\r\n\r", ch );
raw_kill(ch);
return;
}
SET_BIT(ch->immune, IMM_STAKE);
return;
}
void power_serpent( CHAR_DATA *ch,CHAR_DATA *victim, char *argument )
{
char buf [MAX_STRING_LENGTH];
if (IS_SET(ch->pcdata->powers[WOLF_POLYAFF], POLY_ZULO))
{
send_to_char( "Not while in Zulo Form.\n\r", ch );
return;
}
if (IS_SET(ch->pcdata->powers[WOLF_POLYAFF], POLY_CHANGELING))
{
send_to_char( "Not while in changeling Form.\n\r", ch );
return;
}
if (IS_SET(ch->pcdata->powers[WOLF_POLYAFF], POLY_BONECRAFT))
{
send_to_char( "Not while in bonecraft Form.\n\r", ch );
return;
}
if (IS_AFFECTED(ch, AFF_POLYMORPH))
{
if (!IS_POLYAFF(ch,POLY_SERPENT))
{
send_to_char( "You cannot polymorph from this form.\n\r", ch );
return;
}
act( "You transform back into human.", ch, NULL, NULL, TO_CHAR );
act( "$n transform into human form.", ch, NULL, NULL, TO_ROOM );
REMOVE_BIT(ch->polyaff, POLY_SERPENT);
REMOVE_BIT(ch->affected_by, AFF_POLYMORPH);
clear_stats(ch);
ch->morph = g_string_assign(ch->morph,"");
ch->max_hit = ch->max_hit - 250;
ch->hit = ch->hit - 250;
if (ch->hit < 1) ch->hit = 1;
ch->max_mana = ch->max_mana + 50;
return;
}
clear_stats(ch);
if (ch->wpn[0] > 0)
{
ch->hitroll += (int)((double)ch->wpn[0] * 0.75);
ch->damroll += (int)((double)ch->wpn[0] * 0.75);
ch->armor -= ch->wpn[0] * 3;
}
if (ch->stance[0] != -1) do_stance(ch,"");
if (ch->mounted == IS_RIDING) do_dismount(ch,"");
ch->pcdata->mod_str = 10;
act( "You transform into a huge serpent.", ch, NULL, NULL, TO_CHAR );
act( "$n transforms into a huge serpent.", ch, NULL, NULL, TO_ROOM );
SET_BIT(ch->polyaff, POLY_SERPENT);
SET_BIT(ch->affected_by, AFF_POLYMORPH);
sprintf(buf, "%s the huge serpent", ch->name->str);
ch->morph = g_string_assign(ch->morph,buf);
ch->max_hit = ch->max_hit + 250;
ch->hit = ch->hit + 250;
ch->max_mana = ch->max_mana - 50;
return;
}
void power_breath( CHAR_DATA *ch, CHAR_DATA *victim, char *argument)
{
int dam;
if (ch->fighting == NULL)
set_fighting(ch,victim);
dam = dice((int)((double)ch->spl[skill_table[1].target] * .25) * 10, 20 );
damage( ch, victim, dam, 1 );
}
void power_changeling( CHAR_DATA *ch, CHAR_DATA *victim, char *argument )
{
char buf [MAX_STRING_LENGTH];
if (IS_POLYAFF(ch, POLY_ZULO))
{
send_to_char( "Not while in Zulo Form.\n\r", ch );
return;
}
if (IS_POLYAFF(ch, POLY_BONECRAFT))
{
send_to_char( "Not while in bonecraft Form.\n\r", ch );
return;
}
if ( IS_NPC(victim) )
{
send_to_char( "Not on NPC's.\n\r", ch );
return;
}
if ( IS_IMMORTAL(victim) && victim != ch )
{
send_to_char( "You can only change to look like avatars or lower.\n\r", ch );
return;
}
if (victim->sex != ch->sex)
{
send_to_char( "You can only change to look like people of the same sex as you.\n\r", ch );
return;
}
if ( ch == victim )
{
if (!IS_AFFECTED(ch,AFF_POLYMORPH) && !IS_VAMPAFF(ch,VAM_DISGUISED))
{
send_to_char( "You already look like yourself!\n\r", ch );
return;
}
if (!IS_POLYAFF(ch, POLY_CHANGELING))
{
send_to_char( "Nothing happens.\n\r", ch );
return;
}
sprintf(buf,"$n's features twist and distort until $e looks like %s.",ch->name->str);
act(buf,ch,NULL,NULL,TO_ROOM);
REMOVE_BIT(ch->polyaff, POLY_CHANGELING);
REMOVE_BIT(ch->affected_by, AFF_POLYMORPH);
REMOVE_BIT(ch->pcdata->stats[UNI_AFF], VAM_CHANGED);
ch->morph = g_string_assign(ch->morph,"");
act("Your features twist and distort until you looks like $n.",ch,NULL,NULL,TO_CHAR);
return;
}
if (IS_AFFECTED(ch,AFF_POLYMORPH) && !IS_VAMPAFF(ch,VAM_DISGUISED))
{
send_to_char( "Not while polymorphed.\n\r", ch );
return;
}
if (IS_SET(ch->pcdata->stats[UNI_AFF], VAM_CHANGED))
{
if (!IS_POLYAFF(ch, POLY_CHANGELING))
{
send_to_char( "Nothing happens.\n\r", ch );
return;
}
SET_BIT(ch->polyaff, POLY_CHANGELING);
SET_BIT(ch->affected_by, AFF_POLYMORPH);
act("Your features twist and distort until you looks like $N.",ch,NULL,victim,TO_CHAR);
act("$n's features twist and distort until $e looks like you.",ch,NULL,victim,TO_VICT);
act("$n's features twist and distort until $e looks like $N.",ch,NULL,victim,TO_NOTVICT);
ch->morph = g_string_assign(ch->morph,victim->name->str);
return;
}
act("Your features twist and distort until you looks like $N.",ch,NULL,victim,TO_CHAR);
act("$n's features twist and distort until $e looks like you.",ch,NULL,victim,TO_VICT);
act("$n's features twist and distort until $e looks like $N.",ch,NULL,victim,TO_NOTVICT);
SET_BIT(ch->polyaff, POLY_CHANGELING);
SET_BIT(ch->affected_by, AFF_POLYMORPH);
SET_BIT(ch->pcdata->stats[UNI_AFF], VAM_CHANGED);
ch->morph = g_string_assign(ch->morph,victim->name->str);
return;
}
void power_bonecraft( CHAR_DATA *ch,CHAR_DATA *victim, char *argument )
{
char buf [MAX_STRING_LENGTH];
char arg1 [MAX_INPUT_LENGTH];
char arg3 [MAX_INPUT_LENGTH];
one_argument( argument, arg1 );
smash_tilde(argument);
if ( argument[0] == '\0' || arg1[0] == '\0' )
{
send_to_char( "Change to look like whom?\n\r", ch );
return;
}
if (!str_cmp(arg1,"mod") || !str_cmp(arg1,"modify"))
{
argument = one_argument( argument, arg1 );
argument = one_argument( argument, arg3 );
if (arg1[0] == '\0' || arg3[0] == '\0')
{
send_to_char("Syntax: Bonecraft Modify <target> <modification>\n\r",ch);
return;
}
if (IS_NPC(victim))
{
send_to_char( "You cannot bonecraft an unwilling person.\n\r", ch );
return;
}
if (!IS_IMMUNE(victim,IMM_VAMPIRE) && ch != victim)
{
send_to_char( "You cannot bonecraft an unwilling person.\n\r", ch );
return;
}
if (IS_POLYAFF(victim, POLY_ZULO))
{
send_to_char( "Not while in Zulo Form.\n\r", ch );
return;
}
if (IS_POLYAFF(victim, POLY_CHANGELING))
{
send_to_char( "Not while in changeling Form.\n\r", ch );
return;
}
if (!str_cmp(arg3,"tusks"))
{
if (IS_MOD(victim, MOD_TUSKS))
{
if (ch == victim)
{
send_to_char("You push your tusks back into your jaw bone!\n\r",ch);
act("$n pushes $s tusks back $s jaw bone!",ch,NULL,NULL,TO_ROOM);
}
else
{
act("You push $N's tusks back into $S jaw bone!",ch,NULL,victim,TO_CHAR);
act("$n pushes your tusks back into your jaw bone!",ch,NULL,victim,TO_VICT);
act("$n pushes $N's tusks back into $S jaw bone!",ch,NULL,victim,TO_NOTVICT);
}
REMOVE_BIT(victim->pcdata->bodymods, MOD_TUSKS);
}
else
{
if (ch == victim)
{
send_to_char("You pull a pair of tusks out of your jaw bone!\n\r",ch);
act("$n pulls a pair of tusks out of $s jaw bone!",ch,NULL,NULL,TO_ROOM);
}
else
{
act("You pull a pair of tusks out of $N's jaw bone!",ch,NULL,victim,TO_CHAR);
act("$n pulls a pair of tusks out of your jaw bone!",ch,NULL,victim,TO_VICT);
act("$n pulls a pair of tusks out of $N's jaw bone!",ch,NULL,victim,TO_NOTVICT);
}
SET_BIT(victim->pcdata->bodymods, MOD_TUSKS);
}
}
else if (!str_cmp(arg3,"horns"))
{
if (IS_MOD(victim, MOD_HORNS))
{
if (ch == victim)
{
send_to_char("You push your horns back into the bone of your skull!\n\r",ch);
act("$n pushes $s horns back into the bone of $s skull!",ch,NULL,NULL,TO_ROOM);
}
else
{
act("You push $N's horns back into the bone of $S skull!",ch,NULL,victim,TO_CHAR);
act("$n pushes your horns back into the bone of your skull!",ch,NULL,victim,TO_VICT);
act("$n pushes $N's horns back into the bone of $S skull!",ch,NULL,victim,TO_NOTVICT);
}
REMOVE_BIT(victim->pcdata->bodymods, MOD_HORNS);
}
else
{
if (ch == victim)
{
send_to_char("You pull a pair of horns out of the bone of your skull!\n\r",ch);
act("$n pulls a pair of horns out of the bone of $s skull!",ch,NULL,NULL,TO_ROOM);
}
else
{
act("You pull a pair of horns out of the bone of $N's skull!",ch,NULL,victim,TO_CHAR);
act("$n pulls a pair of horns out of the bone of your skull!",ch,NULL,victim,TO_VICT);
act("$n pulls a pair of horns out of the bone of $N's skull!",ch,NULL,victim,TO_NOTVICT);
}
SET_BIT(victim->pcdata->bodymods, MOD_HORNS);
}
}
else if (!str_cmp(arg3,"exoskeleton"))
{
if (IS_MOD(victim, MOD_EXOSKELETON))
{
if (ch == victim)
{
send_to_char("You push your exoskeleton back under your skin!\n\r",ch);
act("$n pushes $s exoskeleton back under $s skin!",ch,NULL,NULL,TO_ROOM);
}
else
{
act("You push $N's exoskeleton back under $S skin!",ch,NULL,victim,TO_CHAR);
act("$n pushes your exoskeleton back under your skin!",ch,NULL,victim,TO_VICT);
act("$n pushes $N's exoskeleton back under $S skin!",ch,NULL,victim,TO_NOTVICT);
}
REMOVE_BIT(victim->pcdata->bodymods, MOD_EXOSKELETON);
}
else
{
if (ch == victim)
{
send_to_char("You pull out an exoskeleton from under your skin!\n\r",ch);
act("$n pulls out an exoskeleton from under $s skin!",ch,NULL,NULL,TO_ROOM);
}
else
{
act("You pull out an exoskeleton from under $N's skin!",ch,NULL,victim,TO_CHAR);
act("$n pulls out an exoskeleton from under your skin!",ch,NULL,victim,TO_VICT);
act("$n pulls out an exoskeleton from under $N's skin!",ch,NULL,victim,TO_NOTVICT);
}
SET_BIT(victim->pcdata->bodymods, MOD_EXOSKELETON);
}
}
else send_to_char( "You cannot do that.\n\r", ch );
return;
}
if ( strlen(argument) > 20 )
{
send_to_char( "Please limit your name to 20 characters or less.\n\r", ch );
return;
}
if ( str_cmp(argument,"self") && !check_parse_name( argument ) )
{
send_to_char( "Illegal name.\n\r", ch );
return;
}
if (is_in(argument,"|kavir*dominoin*spiral*omega*arcite*enkindu*thanatos*fury*hypnos*jannick*"))
{
send_to_char( "Illegal name.\n\r", ch );
return;
}
if (IS_AFFECTED(ch,AFF_POLYMORPH) && !IS_SET(ch->pcdata->stats[UNI_AFF], VAM_CHANGED))
{
send_to_char( "Not while polymorphed.\n\r", ch );
return;
}
if (IS_POLYAFF(ch,POLY_ZULO))
{
send_to_char( "Not while in Zulo Form.\n\r", ch );
return;
}
if ( !str_cmp(argument,ch->name->str) || !str_cmp(argument,"self") )
{
//if (!IS_AFFECTED(ch,AFF_POLYMORPH))
//{
// send_to_char( "You already look like yourself!\n\r", ch );
// return;
//}
if (!IS_POLYAFF(ch, POLY_BONECRAFT))
{
send_to_char( "Nothing happens.\n\r", ch );
return;
}
sprintf(buf,"$n's features twist and distort until $e looks like %s.",ch->name->str);
act(buf,ch,NULL,NULL,TO_ROOM);
REMOVE_BIT(ch->polyaff, POLY_BONECRAFT);
REMOVE_BIT(ch->affected_by, AFF_POLYMORPH);
REMOVE_BIT(ch->pcdata->stats[UNI_AFF], VAM_CHANGED);
ch->morph = g_string_assign(ch->morph,"");
act("Your features twist and distort until you look like $n.",ch,NULL,NULL,TO_CHAR);
return;
}
if (IS_SET(ch->pcdata->stats[UNI_AFF], VAM_CHANGED))
{
if (!IS_SET(ch->pcdata->powers[WOLF_POLYAFF], POLY_BONECRAFT))
{
send_to_char( "Nothing happens.\n\r", ch );
return;
}
sprintf(buf,"Your features twist and distort until you look like %s.\n\r",argument);
send_to_char(buf,ch);
sprintf(buf,"$n's features twist and distort until $e looks like %s.",argument);
act(buf,ch,NULL,NULL,TO_ROOM);
ch->morph = g_string_assign(ch->morph,argument);
return;
}
sprintf(buf,"Your features twist and distort until you look like %s.\n\r",argument);
send_to_char(buf,ch);
sprintf(buf,"$n's features twist and distort until $e looks like %s.",argument);
act(buf,ch,NULL,NULL,TO_ROOM);
SET_BIT(ch->polyaff, POLY_BONECRAFT);
SET_BIT(ch->affected_by, AFF_POLYMORPH);
SET_BIT(ch->pcdata->stats[UNI_AFF], VAM_CHANGED);
ch->morph = g_string_assign(ch->morph,argument);
return;
}
void power_counterspell( CHAR_DATA *ch, CHAR_DATA *victim, char *argument )
{
AFFECT_DATA *paf;
AFFECT_DATA *paf_next = NULL;
if ( number_percent() > 70 )
{
send_to_char("You failed.\n\r",ch);
return;
}
if (!(victim->affected))
{
send_to_char( "Nothing happens.\n\r", ch );
return;
}
for ( paf = victim->affected; paf != NULL; paf = paf_next )
{
paf_next = paf->next;
if ( paf->type >= MAX_SKILL )
continue;
affect_remove(victim,paf);
}
if ( ch == victim )
{
act("You remove all magical affects from yourself.",ch,NULL,NULL,TO_CHAR);
act("$n has removed all magical affects from $mself.",ch,NULL,NULL,TO_ROOM);
}
else
{
act("You remove all magical affects from $N.",ch,NULL,victim,TO_CHAR);
act("$n has removed all magical affects from $N.",ch,NULL,victim,TO_NOTVICT);
act("$n has removed all magical affects from you.",ch,NULL,victim,TO_VICT);
}
return;
}
void power_zuloform( CHAR_DATA *ch, CHAR_DATA *victim, char *argument )
{
char buf [MAX_STRING_LENGTH];
if (IS_POLYAFF(ch, POLY_CHANGELING))
{
send_to_char( "Not while in changeling Form.\n\r", ch );
return;
}
if (IS_POLYAFF(ch, POLY_BONECRAFT))
{
send_to_char( "Not while in bonecraft Form.\n\r", ch );
return;
}
if (IS_VAMPAFF(ch, VAM_CHANGED) && IS_SET(ch->pcdata->powers[WOLF_POLYAFF], POLY_ZULO))
{
REMOVE_BIT(ch->pcdata->powers[WOLF_POLYAFF], POLY_ZULO);
ch->max_hit = ch->max_hit - 1000;
ch->hit = ch->hit - 1000;
ch->armor -= 500;
ch->damroll -= 250;
if (ch->hit < 1) ch->hit = 1;
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,"");
return;
}
if (IS_AFFECTED(ch, AFF_POLYMORPH))
{
send_to_char( "Your Bugged.\n\r", ch );
return;
}
if (ch->stance[0] != -1) do_stance(ch,"");
if (ch->mounted == IS_RIDING) do_dismount(ch,"");
act( "Your flesh transforms in to a horrid form.", ch, NULL, NULL, TO_CHAR );
act( "$n flesh twists and strechs in to a horrid shape.", ch, NULL, NULL, TO_ROOM );
clear_stats(ch);
SET_BIT(ch->pcdata->powers[WOLF_POLYAFF], POLY_ZULO);
SET_BIT(ch->affected_by, AFF_POLYMORPH);
SET_BIT(ch->pcdata->stats[UNI_AFF], VAM_CHANGED);
ch->pcdata->mod_str = 15;
ch->pcdata->mod_dex = 15;
ch->armor += 500;
ch->damroll += 250;
ch->max_hit = ch->max_hit + 1000;
ch->hit = ch->hit + 1000;
sprintf(buf, "%s, the horrid beast", ch->name->str);
ch->morph = g_string_assign(ch->morph,buf);
return;
}
void power_essence( CHAR_DATA *ch, CHAR_DATA *victim, char *argument )
{
OBJ_DATA *obj;
int object_num;
char buf [MAX_STRING_LENGTH];
if (ch->pcdata->stats[UNI_RAGE] > 0)
{
send_to_char("You cannot control your melding abilities while the beast is so strong.\n\r",ch);
return;
}
if ( ch->position == POS_FIGHTING )
{
send_to_char( "No way! You are fighting.\n\r", ch );
return;
}
if ( ch->pk_timer > 0 )
{
send_to_char("You can't meld while still frenzied from last combat.\n\r",ch);
return;
}
if (IS_AFFECTED(ch,AFF_POLYMORPH))
{
if ( ( obj = ch->pcdata->chobj ) == NULL )
{
send_to_char("You are already in human form.\n\r",ch);
return;
}
ch->pcdata->obj_vnum = 0;
obj->chobj = NULL;
ch->pcdata->chobj = NULL;
REMOVE_BIT(ch->affected_by, AFF_POLYMORPH);
REMOVE_BIT(ch->extra, EXTRA_OSWITCH);
ch->morph = g_string_assign(ch->morph,"");
act("$p transforms into $n.",ch,obj,NULL,TO_ROOM);
act("Your reform your human body.",ch,obj,NULL,TO_CHAR);
extract_obj(obj);
return;
}
if (!strcmp(argument,"head"))
object_num = OBJ_VNUM_SEVERED_HEAD;
else if (!strcmp(argument,"brain"))
object_num = OBJ_VNUM_QUIVERING_BRAIN;
else if (!strcmp(argument,"blood"))
object_num = OBJ_VNUM_SPILT_BLOOD;
else
{
send_to_char("Selections: blood,head,brain.\n\r",ch);
return;
}
if (IS_AFFECTED(ch,AFF_POLYMORPH))
{
send_to_char("Your cannot change in to something else!\n\r",ch);
return;
}
if ((obj = create_object(get_obj_index(object_num),ch->level)) == NULL)
{
send_to_char( "You don't have the ability to change into a object.\n\r", ch);
return;
}
if (strcmp(argument,"blood"))
{
sprintf( buf, obj->short_descr->str, ch->name->str );
obj->short_descr = g_string_assign(obj->short_descr,buf);
sprintf( buf, obj->name->str, ch->name->str );
obj->name = g_string_assign(obj->name,buf);
sprintf( buf, obj->description->str, ch->name->str );
obj->description = g_string_assign(obj->description,buf);
}
if (IS_AFFECTED(ch,AFF_WEBBED))
{
send_to_char( "Not with all this sticky webbing on.\n\r", ch);
return;
}
obj_to_room(obj,ch->in_room);
act("$n transforms into $p and falls to the ground.",ch,obj,NULL,TO_ROOM);
act("You transform into $p and fall to the ground.",ch,obj,NULL,TO_CHAR);
ch->pcdata->obj_vnum = object_num;
obj->chobj = ch;
ch->pcdata->chobj = obj;
SET_BIT(ch->affected_by, AFF_POLYMORPH);
SET_BIT(ch->extra, EXTRA_OSWITCH);
ch->morph = g_string_assign(ch->morph,obj->short_descr->str);
return;
}
void power_poison( CHAR_DATA *ch, CHAR_DATA *victim, char *argument )
{
OBJ_DATA *obj;
char arg [MAX_INPUT_LENGTH];
argument = one_argument( argument, arg );
if ( ( ( obj = get_eq_char( ch, WEAR_WIELD ) ) == NULL )
&& ( ( obj = get_eq_char( ch, WEAR_HOLD ) ) == NULL ) )
{
send_to_char( "You must wield the weapon you wish to poison.\n\r", ch );
return;
}
if ( obj->value[0] != 0 )
{
send_to_char( "This weapon cannot be poisoned.\n\r", ch );
return;
}
act("You run your tongue along $p, poisoning it.",ch,obj,NULL,TO_CHAR);
act("$n runs $s tongue along $p, poisoning it.",ch,obj,NULL,TO_ROOM);
obj->value[0] = 53;
obj->timer = number_range(10,20);
return;
}
void power_fcommand( CHAR_DATA *ch, CHAR_DATA *victim, char *argument )
{
char arg1[MSL];
argument = one_argument(argument,arg1);
if (victim != ch->pcdata->familiar)
{
send_to_char("They are not your familar.\n\r",ch);
return;
}
if ( !check_dumbshit(arg1))
{
send_to_char("You can't forthem to do that!\n\r",ch);
return;
}
interpret(victim,arg1);
return;
}
void power_cloak( CHAR_DATA *ch,CHAR_DATA *victim, char * argument )
{
if ( IS_SET(ch->added,ADDED_CLOAK))
{
REMOVE_BIT(ch->added,ADDED_CLOAK);
send_to_char("Your equipment becomes visible!.\n\r",ch);
}
else
{
SET_BIT(ch->added,ADDED_CLOAK);
send_to_char("You try to make your equipment disappear.\n\r",ch);
return;
}
return;
}
void power_fear( CHAR_DATA *ch, CHAR_DATA *victim, char *argument )
{
AFFECT_DATA af;
int sn;
int level;
if ( IS_AFFECTED(victim, AFF_FEAR) )
{
send_to_char( "They are already pretty scared.\n\r", ch );
return;
}
if ( IS_ADDED(victim, ADDED_COURAGE) )
{
send_to_char( "They are far too brave to be scared so easily.\n\r", ch );
return;
}
if (!IS_NPC(victim) && IS_CLASS(victim,CLASS_VAMPIRE) &&
get_disc(victim,DISC_DAIMOINON) >=
get_disc(ch,DISC_DAIMOINON))
{
send_to_char( "Your Consuming Fear has no effect on them.\n\r", ch );
return;
}
level = get_disc(ch,DISC_DAIMOINON) * 5;
if ( saves_spell( level, victim ) && victim->position >= POS_FIGHTING )
{
act("$E ignores you.",ch,NULL,victim,TO_CHAR);
act("You ignore $m.",ch,NULL,victim,TO_VICT);
act("$N ignores $n.",ch,NULL,victim,TO_NOTVICT);
return;
}
send_to_char("You scream in terror as you are Consumed with Infernal Fear!\n\r",victim);
act("$n screams in terror as $e is Consumed with Infernal Fear.",victim,NULL,NULL,TO_ROOM);
if ( ( sn = skill_lookup( "fear" ) ) < 0 )
{
send_to_char( "Bug - please note Spiral or Dominion.\n\r", ch );
return;
}
af.type = sn;
af.location = APPLY_HITROLL;
af.modifier = 0 - get_disc(ch,DISC_DAIMOINON);
af.duration = number_range(1,2);
af.bitvector = AFF_FEAR;
affect_to_char( victim, &af );
af.location = APPLY_DAMROLL;
af.modifier = 0 - get_disc(ch,DISC_DAIMOINON);
affect_to_char( victim, &af );
WAIT_STATE( ch, 12 );
return;
}
void power_ghoul( CHAR_DATA *ch, CHAR_DATA *victim, char *argument )
{
CHAR_DATA *familiar;
char buf[MAX_STRING_LENGTH];
if (!IS_NPC(victim))
{
send_to_char("Not on player characters\n\r",ch);
return;
}
if ( ( familiar = ch->pcdata->familiar ) != NULL)
{
sprintf(buf,"You break your hold over %s.\n\r",familiar->short_descr->str);
send_to_char( buf, ch );
familiar->wizard = NULL;
ch->pcdata->familiar = NULL;
return;
}
if (victim->wizard != NULL)
{
send_to_char( "You are unable to make them a ghoul.\n\r", ch );
return;
}
if (victim->level > (ch->spl[RED_MAGIC] * 0.25))
{
send_to_char( "They are too powerful.\n\r", ch );
return;
}
ch->pcdata->familiar = victim;
victim->wizard = ch;
act("You cut open your wrist and feed $N some blood.",ch,NULL,victim,TO_CHAR);
act("$n cuts open $s wrist and feeds you some blood.",ch,NULL,victim,TO_VICT);
act("$n cuts open $s wrist and feeds $N some blood.",ch,NULL,victim,TO_NOTVICT);
return;
}
void power_discern(CHAR_DATA *ch, CHAR_DATA *victim, char *argument)
{
if (IS_ADDED(ch, ADDED_DISCERN))
{
send_to_char("The whispers stop.\n\r",ch);
REMOVE_BIT(ch->added, ADDED_DISCERN);
}
else
{
send_to_char("You start hearing whispers.\n\r",ch);
SET_BIT(ch->added, ADDED_DISCERN);
}
return;
}
void power_chameleon(CHAR_DATA *ch, CHAR_DATA *victim, char *argument)
{
if (IS_ADDED(ch, ADDED_CHAMELEON))
{
send_to_char("You stop hiding and move again.\n\r",ch);
REMOVE_BIT(ch->added, ADDED_CHAMELEON);
}
else
{
send_to_char("You stand still and hide like the chameleon.\n\r",ch);
SET_BIT(ch->added, ADDED_CHAMELEON);
}
return;
}
void power_voices_of_castle(CHAR_DATA *ch, CHAR_DATA *victim, char *argument)
{
if (IS_ADDED(ch, ADDED_VOICESOFCASTLE))
{
send_to_char("The Voices Stop.\n\r",ch);
REMOVE_BIT(ch->added, ADDED_VOICESOFCASTLE);
}
else
{
send_to_char("You start hearing voices.\n\r",ch);
SET_BIT(ch->added, ADDED_VOICESOFCASTLE);
}
return;
}
void power_bond_terra( CHAR_DATA *ch,CHAR_DATA *victim, char * argument )
{
if (ch->pcdata->stats[UNI_RAGE] > 0)
{
send_to_char("You cannot control your melding abilities while the beast is so strong.\n\r",ch);
return;
}
if ( ch->position == POS_FIGHTING )
{
send_to_char( "No way! You are fighting.\n\r", ch );
return;
}
if ( ch->pk_timer > 0 )
{
send_to_char("You can't meld while still frenzied from last combat.\n\r",ch);
return;
}
if ( ch->plane == PLANE_EARTH)
{
ch->plane = PLANE_NORMAL;
shift_obj_plane(ch);
act("$n reforms into thier normal stature.",ch,NULL,NULL,TO_ROOM);
send_to_char("You reform into your normal stature.\n\r",ch);
return;
}
else
{
ch->plane = PLANE_NORMAL;
shift_obj_plane(ch);
send_to_char("You become one with the earth, as you seep into the ground.\n\r",ch);
act("$n becomes one with the earth, as they seep into the ground.",ch,NULL,NULL,TO_ROOM);
return;
}
return;
}
void power_tasteblood( CHAR_DATA *ch,CHAR_DATA *victim, char * argument )
{
char buf [MAX_INPUT_LENGTH];
char disc [40];
int col, sn;
if (IS_NPC(victim) || !IS_CLASS(victim,CLASS_VAMPIRE))
{
send_to_char("Only on other Vampires.\n\r",ch);
return;
}
act("You examine $N intently.",ch,NULL,victim,TO_CHAR);
act("$n examines $N intently.",ch,NULL,victim,TO_NOTVICT);
act("$n examines you intently.",ch,NULL,victim,TO_VICT);
send_to_char( "--------------------------------------------------------------------------------\n\r", ch );
if (IS_VAMPIRE(victim))
{
sprintf(buf,"Name: %-15s Clan: %-15s Generation: %d\n\r",
victim->name->str,
iclan_table[victim->clan].pretty_name, victim->pcdata->stats[UNI_GEN]);
send_to_char( buf, ch );
send_to_char( "--------------------------------------------------------------------------------\n\r", ch );
sprintf(buf,"Blood: %-15d\n\r",
victim->pcdata->condition[COND_THIRST]);
send_to_char(buf,ch);
send_to_char( "--------------------------------------------------------------------------------\n\r", ch );
}
col = 0;
for ( sn = 0; sn <= MAX_DISC; sn++ )
{
if ( get_disc(victim,sn) == 0 ) continue;
switch (sn)
{
default: strcpy(disc,"None"); break;
case DISC_ANIMALISM: strcpy(disc,"Animalism"); break;
case DISC_AUSPEX: strcpy(disc,"Auspex"); break;
case DISC_CELERITY: strcpy(disc,"Celerity"); break;
case DISC_CHIMERSTRY: strcpy(disc,"Chimerstry"); break;
case DISC_DAIMOINON: strcpy(disc,"Daimoinon"); break;
case DISC_DOMINATE: strcpy(disc,"Dominate"); break;
case DISC_FORTITUDE: strcpy(disc,"Fortitude"); break;
case DISC_MELPOMINEE: strcpy(disc,"Melpominee"); break;
case DISC_NECROMANCY: strcpy(disc,"Necromancy"); break;
case DISC_OBEAH: strcpy(disc,"Obeah"); break;
case DISC_OBFUSCATE: strcpy(disc,"Obfuscate"); break;
case DISC_OBTENEBRATION: strcpy(disc,"Obtenebration"); break;
case DISC_POTENCE: strcpy(disc,"Potence"); break;
case DISC_PRESENCE: strcpy(disc,"Presence"); break;
case DISC_PROTEAN: strcpy(disc,"Protean"); break;
case DISC_QUIETUS: strcpy(disc,"Quietus"); break;
case DISC_SERPENTIS: strcpy(disc,"Serpentis"); break;
case DISC_THANATOSIS: strcpy(disc,"Thanatosis"); break;
case DISC_THAUMATURGY: strcpy(disc,"Thaumaturgy"); break;
case DISC_VICISSITUDE: strcpy(disc,"Vicissitude"); break;
}
if ( get_disc(victim,sn) < 0 )
{
sprintf( buf, "%-15s: 0 ",
disc );
send_to_char( buf, ch );
if ( ++col % 3 == 0 ) send_to_char( "\n\r", ch );
}
else
{
sprintf( buf, "%-15s: %-2d ",
disc, get_disc(victim,sn) );
send_to_char( buf, ch );
if ( ++col % 3 == 0 ) send_to_char( "\n\r", ch );
}
if ( col % 3 != 0 ) send_to_char( "\n\r", ch );
}
send_to_char( "--------------------------------------------------------------------------------\n\r", ch );
return;
}
void power_bloodrage( CHAR_DATA *ch, CHAR_DATA *victim, char *argument )
{
if (IS_NPC(victim) || !IS_VAMPIRE(victim))
{
send_to_char( "You can only use this power on vampires.\n\r", ch );
return;
}
act("You focus and concentrate on $N's blood.",ch,NULL,victim,TO_CHAR);
do_regenerate(victim,"");
return;
}
void power_potency( CHAR_DATA *ch, CHAR_DATA *victim, char *argument )
{
AFFECT_DATA af;
int sn;
if ( ( sn = skill_lookup( "blood potency" ) ) < 0 ) return;
if ( is_affected( victim, sn ) )
{
send_to_char("You are unable to concentrate the potency of your blood any further.\n\r",ch);
return;
}
af.type = sn;
af.duration = (get_disc(ch,DISC_THAUMATURGY) * number_range(5,10));
af.location = APPLY_BLOOD_MAX;
af.modifier = 100;
af.bitvector = 0;
affect_to_char( ch, &af );
act( "A look of concentration crosses $n's face.", ch, NULL, NULL, TO_ROOM );
send_to_char("You concentrate the potency of your blood.\n\r",ch);
return;
}
void power_theftvitae( CHAR_DATA *ch, CHAR_DATA *victim, char *argument )
{
int blood = number_range(15,35);
if (is_safe(ch,victim))
return;
if (IS_NPC(victim) || !IS_CLASS(victim,CLASS_VAMPIRE))
{
send_to_char("Only on other Vampires.\n\r",ch);
return;
}
if (victim->pcdata->stats[UNI_BLOOD_POT] != 0)
{
blood *= victim->pcdata->stats[UNI_BLOOD_POT];
}
if ( victim->pcdata->condition[COND_THIRST] < blood )
blood = victim->pcdata->condition[COND_THIRST];
act("A stream of blood shoots from $N's body into yours.",ch,NULL,victim,TO_CHAR);
act("A stream of blood shoots from your body into $n's.",ch,NULL,victim,TO_VICT);
act("A stream of blood shoots from $N's body into $n's.",ch,NULL,victim,TO_NOTVICT);
victim->pcdata->condition[COND_THIRST] -= blood;
ch->pcdata->condition[COND_THIRST] += blood;
if (ch->pcdata->condition[COND_THIRST] >= 100 + ch->pcdata->stats[UNI_BLOOD_MAX])
{
ch->pcdata->condition[COND_THIRST] = ch->pcdata->stats[UNI_BLOOD_MAX];
if (IS_VAMPIRE(ch)) send_to_char("Your blood lust is sated.\n\r",ch);
}
if (IS_VAMPIRE(victim))
{
if (victim->pcdata->condition[COND_THIRST] > 0 && victim->pcdata->condition[COND_THIRST] <= 50)
{
act("$n sways weakly from bloodloss.",victim,NULL,NULL,TO_ROOM);
send_to_char("You feel weak from bloodloss.\n\r",victim);
}
}
if (IS_NPC(victim))
do_kill(victim,ch->name->str);
return;
}
void power_cauldronblood( CHAR_DATA *ch, CHAR_DATA *victim, char *argument )
{
int blood = number_range(10,20);
int damage;
if (is_tempsafe(ch)) return;
if (IS_NPC(victim) || !IS_CLASS(victim,CLASS_VAMPIRE))
{
send_to_char("Only on other Vampires.\n\r",ch);
return;
}
if(victim->position < POS_SLEEPING)
{
send_to_char("Nope, not gonna work.\n\r",ch);
return;
}
if ( victim->pcdata->condition[COND_THIRST] < blood )
blood = victim->pcdata->condition[COND_THIRST];
damage = (blood * number_range(1,5));
if ( !IS_NPC(victim) && get_disc(victim,DISC_FORTITUDE) > 0)
{
int per_red = 0;
switch( get_disc(victim,DISC_FORTITUDE) )
{
default: per_red = 0; break;
case 1: per_red = number_range(5,10); break;
case 2: per_red = number_range(10,20); break;
case 3: per_red = number_range(15,30); break;
case 4: per_red = number_range(20,40); break;
case 5: per_red = number_range(25,50); break;
case 6: per_red = number_range(30,60); break;
case 7: per_red = number_range(35,70); break;
case 8: per_red = number_range(40,80); break;
case 9: per_red = number_range(45,90); break;
case 10: per_red = number_range(50,100);break;
}
damage -= (damage * (int)((double)per_red * 0.01));
}
act( "A look of concentration crosses $n's face.", ch, NULL, NULL, TO_ROOM );
send_to_char("You scream in agony as your blood begins to boil!\n\r",victim);
act("$n screams in agony as $s blood begins to boil!",victim,NULL,NULL,TO_ROOM);
if (!IS_NPC(ch) && get_disc(victim,DISC_DAIMOINON) < 4)
{
victim->hit -= damage;
victim->pcdata->condition[COND_THIRST] -= blood;
}
if(ch->fighting == NULL)
set_fighting(ch,victim);
add_agony(victim);
update_pos(victim);
return;
}
void power_panacea( CHAR_DATA *ch, CHAR_DATA *victim, char *argument )
{
char buf [MAX_STRING_LENGTH];
AFFECT_DATA *paf;
if (ch->pcdata->obeah > 0)
{
if (ch->pcdata->obeah > 1)
sprintf(buf,"You cannot call upon your Obeah powers for another %d seconds.\n\r",ch->pcdata->obeah);
else
sprintf(buf,"You cannot call upon your Obeah powers for another 1 second.\n\r");
send_to_char(buf,ch);
return;
}
if (IS_EVIL(victim))
{
send_to_char( "They are too evil to benefit from the powers of Obeah.\n\r", ch );
return;
}
if (victim->loc_hp[6] > 0)
{
int sn = skill_lookup( "clot" );
act( "$n's third eye begins to glow with an intense white light.", ch, NULL, NULL, TO_ROOM );
send_to_char( "Your third eye begins to glow with an intense white light.\n\r", ch );
ch->pcdata->obeah = 5;
(*skill_table[sn].spell_fun) (sn,ch->level,ch,victim);
}
else
{
if ((victim->loc_hp[0] + victim->loc_hp[1] + victim->loc_hp[2] +
victim->loc_hp[3] + victim->loc_hp[4] + victim->loc_hp[5]) != 0)
{
act( "$n's third eye begins to glow with an intense white light.", ch, NULL, NULL, TO_ROOM );
send_to_char( "Your third eye begins to glow with an intense white light.\n\r", ch );
ch->pcdata->obeah = 10;
reg_mend(victim);
}
else if (victim->hit < victim->max_hit)
{
victim->hit += get_disc(ch, DISC_OBEAH) * 1000;
if (IS_AFFECTED(ch,AFF_AGGDAM))
{
if ((paf = find_affect(ch,AFF_AGGDAM)) != NULL)
affect_remove(ch, paf);
}
act( "$n's third eye begins to glow with an intense white light.", ch, NULL, NULL, TO_ROOM );
send_to_char( "Your third eye begins to glow with an intense white light.\n\r", ch );
ch->pcdata->obeah = 30;
update_pos(victim);
if (victim->hit >= victim->max_hit)
{
victim->hit = victim->max_hit;
send_to_char("You have been completely healed!\n\r",victim);
act("$n's wounds have been completely healed!",victim,NULL,NULL,TO_ROOM);
}
else
{
send_to_char("Your wounds begin to heal!\n\r",victim);
act("$n's wounds begin to heal!",victim,NULL,NULL,TO_ROOM);
}
}
else
{
send_to_char("They don't require any healing.\n\r",ch);
return;
}
}
return;
}
void power_anesthetic( CHAR_DATA *ch, CHAR_DATA *victim, char *argument )
{
char buf [MAX_STRING_LENGTH];
if (ch->pcdata->obeah > 0)
{
if (ch->pcdata->obeah > 1)
sprintf(buf,"You cannot call upon your Obeah powers for another %d seconds.\n\r",ch->pcdata->obeah);
else
sprintf(buf,"You cannot call upon your Obeah powers for another 1 second.\n\r");
send_to_char(buf,ch);
return;
}
if (IS_EVIL(victim))
{
send_to_char( "They are too evil to benefit from the powers of Obeah.\n\r", ch );
return;
}
act( "$n's third eye begins to glow with an intense white light.", ch, NULL, NULL, TO_ROOM );
send_to_char( "Your third eye begins to glow with an intense white light.\n\r", ch );
ch->pcdata->obeah = 30;
return;
}
void power_neutral( CHAR_DATA *ch, CHAR_DATA *victim, char *argument )
{
char buf [MAX_INPUT_LENGTH];
CHAR_DATA *rch;
if (IS_NPC(ch)) return;
if (ch->pcdata->obeah > 0 && !IS_ADDED(ch, ADDED_NEUTRAL))
{
if (ch->pcdata->obeah > 1)
sprintf(buf,"You cannot call upon your Obeah powers for another %d seconds.\n\r",ch->pcdata->obeah);
else
sprintf(buf,"You cannot call upon your Obeah powers for another 1 second.\n\r");
send_to_char(buf,ch);
return;
}
if (ch->in_room == NULL)
{
send_to_char("Nothing happens.\n\r",ch);
return;
}
if (IS_ADDED(ch, ADDED_NEUTRAL))
{
REMOVE_BIT(ch->added, ADDED_NEUTRAL);
REMOVE_BIT(ch->in_room->room_flags, ROOM_SAFE);
act("A look of concentration crosses $n's face.", ch, NULL, NULL, TO_ROOM );
send_to_char("The peaceful harmony in the air gradually fades away to nothing.\n\r", ch);
act("The peaceful harmony in the air gradually fades away to nothing.",ch,NULL,NULL,TO_ROOM);
ch->pcdata->obeah = 30;
return;
}
if (IS_SET(ch->in_room->room_flags, ROOM_SAFE))
{
send_to_char("You are unable to create a Neutral Guard here.\n\r", ch);
return;
}
SET_BIT(ch->in_room->room_flags, ROOM_SAFE);
SET_BIT(ch->added, ADDED_NEUTRAL);
act( "$n's third eye begins to glow with an intense white light.", ch, NULL, NULL, TO_ROOM );
send_to_char( "Your third eye begins to glow with an intense white light.\n\r", ch );
ch->pcdata->obeah = 30;
send_to_char("The air is filled with peaceful harmony.\n\r", ch);
act("The air is filled with peaceful harmony.",ch,NULL,NULL,TO_ROOM);
for ( rch = ch->in_room->people; rch != NULL; rch = rch->next_in_room )
{
if ( rch->fighting != NULL )
stop_fighting( rch, TRUE );
}
return;
}
void power_unburden( CHAR_DATA *ch, CHAR_DATA *victim, char *argument )
{
char buf [MAX_STRING_LENGTH];
if (ch->pcdata->obeah > 0)
{
if (ch->pcdata->obeah > 1)
sprintf(buf,"You cannot call upon your Obeah powers for another %d seconds.\n\r",ch->pcdata->obeah);
else
sprintf(buf,"You cannot call upon your Obeah powers for another 1 second.\n\r");
send_to_char(buf,ch);
return;
}
if (!IS_VAMPIRE(victim))
{
send_to_char( "You can only Unburden the Soul of a Kindred.\n\r", ch );
return;
}
if (!IS_IMMUNE(victim,IMM_VAMPIRE))
{
send_to_char( "They must lower their defences before you can try to Unburden their Soul.\n\r", ch );
return;
}
if (victim->position > POS_RESTING)
{
send_to_char( "You better get them to sit down first.\n\r", ch );
return;
}
if (victim->beast == 100)
{
send_to_char( "Their Soul is too Bestial to Unburden.\n\r", ch );
return;
}
if (IS_EVIL(victim))
{
send_to_char( "They are too evil to benefit from the powers of Obeah.\n\r", ch );
return;
}
act( "You place your hands against $N's chest.", ch, NULL, victim, TO_CHAR );
act( "$n places $s hands against your chest.", ch, NULL, victim, TO_VICT );
act( "$n places $s hands against $N's chest.", ch, NULL, victim, TO_NOTVICT );
if (victim->beast > 1)
{
act( "$n's third eye begins to glow with an intense white light.", ch, NULL, NULL, TO_ROOM );
send_to_char( "Your third eye begins to glow with an intense white light.\n\r", ch );
victim->beast -= get_disc(ch, DISC_OBEAH);
if ( victim->beast < 1 ) victim->beast = 1;
ch->pcdata->obeah = 30;
send_to_char("You feel their beast weaken it's grip!\n\r",ch);
send_to_char("You feel your beast weaken it's grip!\n\r",victim);
}
else
{
send_to_char("You are unable to help them any further.\n\r",ch);
return;
}
send_to_char("Your hands drop to your sides.\n\r",ch);
act( "$n's hands drop to $s sides.", ch, NULL, NULL, TO_ROOM );
return;
}
void power_renew( CHAR_DATA *ch, CHAR_DATA *victim, char *argument )
{
char buf [MAX_STRING_LENGTH];
int sn, check, oldcheck;
AFFECT_DATA *paf;
if (ch->position == POS_FIGHTING)
{
send_to_char("No way! You are still fighting!\n\r",ch);
return;
}
if (ch->pcdata->obeah > 0)
{
if (ch->pcdata->obeah > 1)
sprintf(buf,"You cannot call upon your Obeah powers for another %d seconds.\n\r",ch->pcdata->obeah);
else
sprintf(buf,"You cannot call upon your Obeah powers for another 1 second.\n\r");
send_to_char(buf,ch);
return;
}
if (IS_EVIL(victim))
{
send_to_char( "They are too evil to benefit from the powers of Obeah.\n\r", ch );
return;
}
if ((victim->loc_hp[0] + victim->loc_hp[1] + victim->loc_hp[2] +
victim->loc_hp[3] + victim->loc_hp[4] + victim->loc_hp[5] +
victim->loc_hp[6]) == 0 && victim->hit == victim->max_hit)
{
send_to_char("They don't require any healing.\n\r",ch);
return;
}
act( "$n's third eye begins to glow with an intense white light.", ch, NULL, NULL, TO_ROOM );
send_to_char( "Your third eye begins to glow with an intense white light.\n\r", ch );
ch->pcdata->obeah = 60;
if ( (check = victim->loc_hp[6]) > 0)
{
oldcheck = 0;
sn = skill_lookup( "clot" );
while ( oldcheck != (check = victim->loc_hp[6]) )
{
oldcheck = check;
(*skill_table[sn].spell_fun) (sn,ch->level,ch,victim);
}
}
if ((check = (victim->loc_hp[0] + victim->loc_hp[1] + victim->loc_hp[2] +
victim->loc_hp[3] + victim->loc_hp[4] + victim->loc_hp[5])) > 0)
{
oldcheck = 0;
while ( oldcheck != (check = victim->loc_hp[0] + victim->loc_hp[1] +
victim->loc_hp[2] + victim->loc_hp[3] + victim->loc_hp[4] +
victim->loc_hp[5]) )
{
oldcheck = check;
reg_mend(victim);
}
}
if (victim->hit < victim->max_hit)
{
victim->hit = victim->max_hit;
if (IS_AFFECTED(ch,AFF_AGGDAM))
{
if ((paf = find_affect(ch,AFF_AGGDAM)) != NULL)
affect_remove(ch, paf);
}
send_to_char("You have been completely healed!\n\r",victim);
act("$n's wounds have been completely healed!",victim,NULL,NULL,TO_ROOM);
update_pos(victim);
}
return;
}
void power_ash_to_ash( CHAR_DATA *ch, CHAR_DATA *victim, char *argument )
{
OBJ_DATA *obj;
int object_num;
if (ch->pcdata->stats[UNI_RAGE] > 0)
{
send_to_char("You cannot control your melding abilities while the beast is so strong.\n\r",ch);
return;
}
if ( ch->position == POS_FIGHTING )
{
send_to_char( "No way! You are fighting.\n\r", ch );
return;
}
if ( ch->pk_timer > 0 )
{
send_to_char("You can't meld while still frenzied from last combat.\n\r",ch);
return;
}
if (IS_AFFECTED(ch,AFF_POLYMORPH))
{
if ( ( obj = ch->pcdata->chobj ) == NULL )
{
send_to_char("You are already in human form.\n\r",ch);
return;
}
ch->pcdata->obj_vnum = 0;
obj->chobj = NULL;
ch->pcdata->chobj = NULL;
REMOVE_BIT(ch->affected_by, AFF_POLYMORPH);
REMOVE_BIT(ch->extra, EXTRA_OSWITCH);
ch->morph = g_string_assign(ch->morph,"");
act("$p transforms into $n.",ch,obj,NULL,TO_ROOM);
act("Your reform your human body.",ch,obj,NULL,TO_CHAR);
extract_obj(obj);
return;
}
object_num = OBJ_VNUM_SPILT_BLOOD;
if (IS_AFFECTED(ch,AFF_POLYMORPH))
{
send_to_char("Your cannot change in to something else!\n\r",ch);
return;
}
if ((obj = create_object(get_obj_index(object_num),ch->level)) == NULL)
{
send_to_char( "You don't have the ability to change into a object.\n\r", ch);
return;
}
if (strcmp(argument,"blood"))
{
obj->short_descr = g_string_assign(obj->short_descr,"ashes");
obj->name = g_string_assign(obj->name,"ashes");
obj->description = g_string_assign(obj->description,"a pile of ashes lies here.");
}
if (IS_AFFECTED(ch,AFF_WEBBED))
{
send_to_char( "Not with all this sticky webbing on.\n\r", ch);
return;
}
obj_to_room(obj,ch->in_room);
act("$n transforms into $p and falls to the ground.",ch,obj,NULL,TO_ROOM);
act("You transform into $p and fall to the ground.",ch,obj,NULL,TO_CHAR);
ch->pcdata->obj_vnum = object_num;
obj->chobj = ch;
ch->pcdata->chobj = obj;
SET_BIT(ch->affected_by, AFF_POLYMORPH);
SET_BIT(ch->extra, EXTRA_OSWITCH);
ch->morph = g_string_assign(ch->morph,obj->short_descr->str);
return;
}