more.c

myth/src/more.c · 218.8 KB

From the archive myth.tar.gz

Download the archive   « Back to the archive contents

/***************************************************************************
 *  Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer,        *
 *  Michael Seifert, Hans Henrik St{rfeldt, Tom Madsen, and Katja Nyboe.   *
 *                                                                         *
 *  Merc Diku Mud improvments copyright (C) 1992, 1993 by Michael          *
 *  Chastain, Michael Quan, and Mitchell Tse.                              *
 *                                                                         *
 *  In order to use any part of this Merc Diku Mud, you must comply with   *
 *  both the original Diku license in 'license.doc' as well the Merc       *
 *  license in 'license.txt'.  In particular, you may not remove either of *
 *  these copyright notices.                                               *
 *                                                                         *
 *  Much time and thought has gone into this software and you are          *
 *  benefitting.  We hope that you share your changes too.  What goes      *
 *  around, comes around.                                                  *
 ***************************************************************************/

/***************************************************************************
 *  God Wars Mud improvements copyright (C) 1994, 1995, 1996 by Richard    *
 *  Woolcock.  This mud is NOT to be copied in whole or in part, or to be  *
 *  run without the permission of Richard Woolcock.  Nobody else has       *
 *  permission to authorise the use of this code.                          *
 ***************************************************************************/

#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"

/*
 * Local functions.
 */
void	show_disc		args( ( CHAR_DATA *ch ) );



void do_mindblast( CHAR_DATA *ch, char *argument )
{
    CHAR_DATA *victim;
    char      arg [MAX_INPUT_LENGTH];
    int       damage;

    argument = one_argument( argument, arg );

    if (IS_NPC(ch)) return;

    if (!IS_VAMPIRE(ch) && !IS_GHOUL(ch))
    {
	send_to_char( "Huh?\n\r", ch );
	return;
    }

    if (get_disc(ch,DISC_AUSPEX) < 8)
    {
	send_to_char("You require level 8 Auspex to use a Mind Blast.\n\r",ch);
	return;
    }

    if (IS_ITEMAFF(ch, ITEMA_PEACE)) do_majesty(ch,"");

    if ( arg[0] == '\0' )
    {
	send_to_char( "Who do you want to Mind Blast?\n\r", ch );
	return;
    }

    if ( ( victim = get_char_room( ch, arg ) ) == NULL )
    {
	send_to_char( "They are not here.\n\r", ch );
	return;
    }

    if (victim->position != POS_FIGHTING && victim->hit < victim->max_hit)
    {
	send_to_char( "Nothing happens.\n\r", ch );
	if (!IS_NPC(victim) && ch != victim && IS_MORE(victim, MORE_GUARDIAN))
	{
	    guardian_message( victim );
	    act("$n just failed to use Mind Blast on you.",ch,NULL,victim,TO_VICT);
	}
	return;
    }

    if (IS_IMMUNE(victim,IMM_SHIELDED) )
    {
	send_to_char( "Nothing happens.\n\r", ch );
	if (!IS_NPC(victim) && ch != victim && IS_MORE(victim, MORE_GUARDIAN))
	{
	    guardian_message( victim );
	    act("$n just failed to use Mind Blast on you.",ch,NULL,victim,TO_VICT);
	}
	return;
    }

    if (is_safe(ch,victim))
    {
	if (!IS_NPC(victim) && ch != victim && IS_MORE(victim, MORE_GUARDIAN))
	{
	    guardian_message( victim );
	    act("$n just failed to use Mind Blast on you.",ch,NULL,victim,TO_VICT);
	}
	return;
    }

    damage = victim->max_hit * 0.1;

    act( "A look of concentration crosses $n's face.", ch, NULL, NULL, TO_ROOM );

    send_to_char("You clutch your head as your mind seems to explode!\n\r",victim);
    act("$n clutches $s head in agony!",victim,NULL,NULL,TO_ROOM);

    if (!IS_NPC(victim) && ch != victim && IS_MORE(victim, MORE_GUARDIAN))
    {
	guardian_message( victim );
	act("$n just used Mind Blast on you.",ch,NULL,victim,TO_VICT);
    }

    victim->hit -= damage;
    if ((IS_NPC(victim) && victim->hit < 1) || 
	(!IS_NPC(victim) && victim->hit < -10))
    {
	act("$n's body falls limply to the ground.",victim,NULL,NULL,TO_ROOM);
	demon_gain(ch,victim);
	group_gain(ch,victim);
	victim->form = 8;
	killperson(ch,victim);
	WAIT_STATE( ch, 12 );
	return;
    }
    stop_fighting(victim,TRUE);
    update_pos(victim);
    if (victim->position > POS_STUNNED)
	victim->position = POS_STUNNED;
    if (IS_NPC(victim)) do_kill(victim,ch->name);
    WAIT_STATE( ch, 12 );
    return;
}

void do_willpower( 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 (arg[0] == '\0')
    {
	send_to_char("--------------------------------------------------------------------------------\n\r",ch);
	send_to_char("                                -= Will Power =-\n\r",ch);
	send_to_char("--------------------------------------------------------------------------------\n\r",ch);
	if (IS_WILLPOWER(ch, RES_ANIMALISM))
	    send_to_char("Animalism: You automatically try to resist Beast Within and Song of Serenity.\n\r",ch);
	else
	    send_to_char("Animalism: You don't try to resist Beast Within and Song of Serenity.\n\r",ch);
	if (IS_WILLPOWER(ch, RES_AUSPEX))
	    send_to_char("Auspex: You automatically try to resist Unveil the Shrouded Mind.\n\r",ch);
	else
	    send_to_char("Auspex: You don't try to resist Unveil the Shrouded Mind.\n\r",ch);
	if (IS_WILLPOWER(ch, RES_DOMINATE))
	    send_to_char("Dominate: You automatically try to resist Dominate attempts.\n\r",ch);
	else
	    send_to_char("Dominate: You don't try to resist Dominate attempts.\n\r",ch);
	if (IS_WILLPOWER(ch, RES_PRESENCE))
	    send_to_char("Presence: You automatically try to resist Dread Gaze and Entrancement.\n\r",ch);
	else
	    send_to_char("Presence: You don't try to resist Dread Gaze and Entrancement.\n\r",ch);
	if (IS_WILLPOWER(ch, RES_TOGGLE))
	    send_to_char("Toggle: You automatically keep burning willpower to resist attempts.\n\r",ch);
	else
	    send_to_char("Toggle: You will only burn willpower to resist each first attempt.\n\r",ch);
	send_to_char("--------------------------------------------------------------------------------\n\r",ch);
	send_to_char("You may change any of the above by typing: willpower <value>\n\r",ch);
	send_to_char("--------------------------------------------------------------------------------\n\r",ch);
	send_to_char("Remaining resistance in seconds:\n\r", ch );
	sprintf( buf,"Animalism: %d.  Auspex: %d.  Presence: %d.  Dominate: %d.\n\r",
	ch->pcdata->resist[WILL_ANIMALISM], ch->pcdata->resist[WILL_AUSPEX],
	ch->pcdata->resist[WILL_PRESENCE],  ch->pcdata->resist[WILL_DOMINATE]);
	send_to_char( buf, ch );
	send_to_char("--------------------------------------------------------------------------------\n\r",ch);
	return;
    }

    if (!str_cmp(arg,"animalism"))
    {
	if (IS_WILLPOWER(ch, RES_ANIMALISM))
	{
	    send_to_char("You will no longer try to resist Beast Within and Song of Serenity.\n\r",ch);
	    REMOVE_BIT(ch->pcdata->resist[0], RES_ANIMALISM);
	}
	else
	{
	    send_to_char("You will now automatically try to resist Beast Within and Song of Serenity.\n\r",ch);
	    SET_BIT(ch->pcdata->resist[0], RES_ANIMALISM);
	}
    }
    else if (!str_cmp(arg,"auspex"))
    {
	if (IS_WILLPOWER(ch, RES_AUSPEX))
	{
	    send_to_char("You will no longer try to resist Unveil the Shrouded Mind.\n\r",ch);
	    REMOVE_BIT(ch->pcdata->resist[0], RES_AUSPEX);
	}
	else
	{
	    send_to_char("You will now automatically try to resist Unveil the Shrouded Mind.\n\r",ch);
	    SET_BIT(ch->pcdata->resist[0], RES_AUSPEX);
	}
    }
    else if (!str_cmp(arg,"dominate"))
    {
	if (IS_WILLPOWER(ch, RES_DOMINATE))
	{
	    send_to_char("You will no longer try to resist Domination attempts.\n\r",ch);
	    REMOVE_BIT(ch->pcdata->resist[0], RES_DOMINATE);
	}
	else
	{
	    send_to_char("You will now automatically try to resist Domination attempts.\n\r",ch);
	    SET_BIT(ch->pcdata->resist[0], RES_DOMINATE);
	}
    }
    else if (!str_cmp(arg,"presence"))
    {
	if (IS_WILLPOWER(ch, RES_PRESENCE))
	{
	    send_to_char("You will no longer try to resist Dread Gaze and Entrancement.\n\r",ch);
	    REMOVE_BIT(ch->pcdata->resist[0], RES_PRESENCE);
	}
	else
	{
	    send_to_char("You will now automatically try to resist Dread Gaze and Entrancement.\n\r",ch);
	    SET_BIT(ch->pcdata->resist[0], RES_PRESENCE);
	}
    }
    else if (!str_cmp(arg,"toggle"))
    {
	if (IS_WILLPOWER(ch, RES_TOGGLE))
	{
	    send_to_char("You will now only burn willpower to resist each first attempt.\n\r",ch);
	    REMOVE_BIT(ch->pcdata->resist[0], RES_TOGGLE);
	}
	else
	{
	    send_to_char("You will now automatically keep burning willpower to resist attempts.\n\r",ch);
	    SET_BIT(ch->pcdata->resist[0], RES_TOGGLE);
	}
    }
    else
    {
	send_to_char("--------------------------------------------------------------------------------\n\r",ch);
	send_to_char("                                -= Will Power =-\n\r",ch);
	send_to_char("--------------------------------------------------------------------------------\n\r",ch);
	if (IS_WILLPOWER(ch, RES_ANIMALISM))
	    send_to_char("Animalism: You automatically try to resist Beast Within and Song of Serenity.\n\r",ch);
	else
	    send_to_char("Animalism: You don't try to resist Beast Within and Song of Serenity.\n\r",ch);
	if (IS_WILLPOWER(ch, RES_AUSPEX))
	    send_to_char("Auspex: You automatically try to resist Unveil the Shrouded Mind.\n\r",ch);
	else
	    send_to_char("Auspex: You don't try to resist Unveil the Shrouded Mind.\n\r",ch);
	if (IS_WILLPOWER(ch, RES_DOMINATE))
	    send_to_char("Dominate: You automatically try to resist Dominate attempts.\n\r",ch);
	else
	    send_to_char("Dominate: You don't try to resist Dominate attempts.\n\r",ch);
	if (IS_WILLPOWER(ch, RES_PRESENCE))
	    send_to_char("Presence: You automatically try to resist Dread Gaze and Entrancement.\n\r",ch);
	else
	    send_to_char("Presence: You don't try to resist Dread Gaze and Entrancement.\n\r",ch);
	if (IS_WILLPOWER(ch, RES_TOGGLE))
	    send_to_char("Toggle: You automatically keep burning willpower to resist attempts.\n\r",ch);
	else
	    send_to_char("Toggle: You will only burn willpower to resist each first attempt.\n\r",ch);
	send_to_char("--------------------------------------------------------------------------------\n\r",ch);
	send_to_char("You may change any of the above by typing: willpower <value>\n\r",ch);
	send_to_char("--------------------------------------------------------------------------------\n\r",ch);
	send_to_char("Remaining resistance in seconds:\n\r", ch );
	sprintf( buf,"Animalism: %d.  Auspex: %d.  Presence: %d.  Dominate: %d.\n\r",
	ch->pcdata->resist[WILL_ANIMALISM], ch->pcdata->resist[WILL_AUSPEX],
	ch->pcdata->resist[WILL_PRESENCE],  ch->pcdata->resist[WILL_DOMINATE]);
	send_to_char( buf, ch );
	send_to_char("--------------------------------------------------------------------------------\n\r",ch);
	return;
    }
    return;
}

void do_changeling( CHAR_DATA *ch, char *argument )
{
    CHAR_DATA *victim;
    char      arg [MAX_INPUT_LENGTH];
    char      buf [MAX_STRING_LENGTH];

    argument = one_argument( argument, arg );

    if (IS_NPC(ch)) return;

    if (!IS_VAMPIRE(ch) && !IS_GHOUL(ch))
    {
	send_to_char( "Huh?\n\r", ch );
	return;
    }

    if (get_disc(ch,DISC_VICISSITUDE) < 1)
    {
	send_to_char("You require level 1 Vicissitude to use Changeling.\n\r",ch);
	return;
    }

    if ( arg[0] == '\0' )
    {
	send_to_char( "Change to look like whom?\n\r", ch );
	return;
    }

    if (IS_AFFECTED(ch,AFF_POLYMORPH) && !IS_VAMPAFF(ch,VAM_DISGUISED))
    {
	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 ( ( 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) && 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);
	act(buf,ch,NULL,NULL,TO_ROOM);
	REMOVE_BIT(ch->polyaff, POLY_CHANGELING);
	REMOVE_BIT(ch->affected_by, AFF_POLYMORPH);
	REMOVE_BIT(ch->vampaff, VAM_DISGUISED);
	REMOVE_BIT(ch->extra, EXTRA_VICISSITUDE);
    	free_string( ch->morph );
    	ch->morph = str_dup( "" );
	act("Your features twist and distort until you looks like $n.",ch,NULL,NULL,TO_CHAR);
	return;
    }
    if (IS_VAMPAFF(ch,VAM_DISGUISED))
    {
	if (!IS_POLYAFF(ch, POLY_CHANGELING))
	{
	    send_to_char( "Nothing happens.\n\r", ch );
	    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);
    	free_string( ch->morph );
    	ch->morph = str_dup( victim->name );
	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->vampaff, VAM_DISGUISED);
    SET_BIT(ch->extra, EXTRA_VICISSITUDE);
    free_string( ch->morph );
    ch->morph = str_dup( victim->name );
    return;
}

void do_fleshcraft( CHAR_DATA *ch, char *argument )
{
    CHAR_DATA *victim;
    char      arg1 [MAX_INPUT_LENGTH];
    char      arg2 [MAX_INPUT_LENGTH];
    char      arg3 [MAX_INPUT_LENGTH];
    char      buf [MAX_STRING_LENGTH];

    one_argument( argument, arg1 );

    if (IS_NPC(ch)) return;

    if (!IS_VAMPIRE(ch) && !IS_GHOUL(ch))
    {
	send_to_char( "Huh?\n\r", ch );
	return;
    }

    if (get_disc(ch,DISC_VICISSITUDE) < 2)
    {
	send_to_char("You require level 2 Vicissitude to use Fleshcraft.\n\r",ch);
	return;
    }

    if ( 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, arg2 );
	argument = one_argument( argument, arg3 );
	if (arg1[0] == '\0' || arg2[0] == '\0' || arg3[0] == '\0')
	{
	    send_to_char("Syntax: Fleshcraft Modify <target> <modification>\n\r",ch);
	    return;
	}
	if ( ( victim = get_char_room( ch, arg2 ) ) == NULL )
	{
	    send_to_char( "They are not here.\n\r", ch );
	    return;
	}
	if (IS_NPC(victim))
	{
	    send_to_char( "You cannot fleshcraft an unwilling person.\n\r", ch );
	    return;
	}
	if (IS_MAGE(victim))
	{
	    send_to_char( "You cannot fleshcraft Mages.\n\r", ch );
	    return;
	}
	if (IS_WEREWOLF(victim))
	{
	    send_to_char( "You cannot fleshcraft Werewolfs.\n\r", ch );
	    return;
	}
	if (!IS_IMMUNE(victim,IMM_VAMPIRE) && ch != victim)
	{
	    send_to_char( "You cannot fleshcraft an unwilling person.\n\r", ch );
	    return;
	}
	if (!str_cmp(arg3,"fins"))
	{
	    if (IS_MOD(victim, MOD_FINS))
	    {
		if (ch == victim)
		{
		    send_to_char("You push your fins back into your body!\n\r",ch);
		    act("$n pushes $s fins back into $s body!",ch,NULL,NULL,TO_ROOM);
		}
		else
		{
		    act("You push $N's fins back into $S body!",ch,NULL,victim,TO_CHAR);
		    act("$n pushes your fins back into your body!",ch,NULL,victim,TO_VICT);
		    act("$n pushes $N's fins back into $S body!",ch,NULL,victim,TO_NOTVICT);
		}
		REMOVE_BIT(victim->pcdata->bodymods, MOD_FINS);
	    }
	    else
	    {
		if (ch == victim)
		{
		    send_to_char("You pull a pair of fins out of your body!\n\r",ch);
		    act("$n pulls a pair of fins out of $s body!",ch,NULL,NULL,TO_ROOM);
		}
		else
		{
		    act("You pull a pair of fins out of $N's body!",ch,NULL,victim,TO_CHAR);
		    act("$n pulls a pair of fins out of your body!",ch,NULL,victim,TO_VICT);
		    act("$n pulls a pair of fins out of $N's body!",ch,NULL,victim,TO_NOTVICT);
		}
		SET_BIT(victim->pcdata->bodymods, MOD_FINS);
	    }
	}
	else if (!str_cmp(arg3,"tail"))
	{
	    if (IS_MOD(victim, MOD_TAIL))
	    {
		if (ch == victim)
		{
		    send_to_char("You push your tail back into your body!\n\r",ch);
		    act("$n pushes $s tail back into $s body!",ch,NULL,NULL,TO_ROOM);
		}
		else
		{
		    act("You push $N's tail back into $S body!",ch,NULL,victim,TO_CHAR);
		    act("$n pushes your tail back into your body!",ch,NULL,victim,TO_VICT);
		    act("$n pushes $N's tail back into $S body!",ch,NULL,victim,TO_NOTVICT);
		}
		REMOVE_BIT(victim->pcdata->bodymods, MOD_TAIL);
	    }
	    else
	    {
		if (ch == victim)
		{
		    send_to_char("You pull a tail out of your backside!\n\r",ch);
		    act("$n pulls a tail out of $s backside!",ch,NULL,NULL,TO_ROOM);
		}
		else
		{
		    act("You pull a tail out of $N's backside!",ch,NULL,victim,TO_CHAR);
		    act("$n pulls a tail out of your backside!",ch,NULL,victim,TO_VICT);
		    act("$n pulls a tail out of $N's backside!",ch,NULL,victim,TO_NOTVICT);
		}
		SET_BIT(victim->pcdata->bodymods, MOD_TAIL);
	    }
	}
	else if (!str_cmp(arg3,"wings"))
	{
	    if (IS_MOD(victim, MOD_WINGS))
	    {
		if (IS_MOD(victim, MOD_UNFOLDED)) do_wings(victim,"");
		if (ch == victim)
		{
		    send_to_char("You push your wings back into your shoulders!\n\r",ch);
		    act("$n pushes $s wings back into $s shoulders!",ch,NULL,NULL,TO_ROOM);
		}
		else
		{
		    act("You push $N's wings back into $S shoulders!",ch,NULL,victim,TO_CHAR);
		    act("$n pushes your wings back into your shoulders!",ch,NULL,victim,TO_VICT);
		    act("$n pushes $N's wings back into $S shoulders!",ch,NULL,victim,TO_NOTVICT);
		}
		REMOVE_BIT(victim->pcdata->bodymods, MOD_WINGS);
	    }
	    else
	    {
		if (ch == victim)
		{
		    send_to_char("You pull a pair of wings out of your shoulders!\n\r",ch);
		    act("$n pulls a pair of wings out of $s shoulders!",ch,NULL,NULL,TO_ROOM);
		}
		else
		{
		    act("You pull a pair of wings out of $N's shoulders!",ch,NULL,victim,TO_CHAR);
		    act("$n pulls a pair of wings out of your shoulders!",ch,NULL,victim,TO_VICT);
		    act("$n pulls a pair of wings out of $N's shoulders!",ch,NULL,victim,TO_NOTVICT);
		}
		SET_BIT(victim->pcdata->bodymods, MOD_WINGS);
	    }
	}
	else send_to_char( "You cannot do that.\n\r", ch );
	return;
    }

    if (IS_AFFECTED(ch,AFF_POLYMORPH) && !IS_VAMPAFF(ch,VAM_DISGUISED))
    {
	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 ( ( victim = get_char_room( ch, arg1 ) ) == NULL )
    {
	send_to_char( "They aren't here.\n\r", ch );
	return;
    }

    if ( IS_IMMORTAL(victim) && victim != ch )
    {
	send_to_char( "You cannot disguise yourself as them.\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_FLESHCRAFT))
	{
	    send_to_char( "Nothing happens.\n\r", ch );
	    return;
	}
	sprintf(buf,"$n's features twist and distort until $e looks like %s.",ch->name);
	act(buf,ch,NULL,NULL,TO_ROOM);
	REMOVE_BIT(ch->polyaff, POLY_FLESHCRAFT);
	REMOVE_BIT(ch->affected_by, AFF_POLYMORPH);
	REMOVE_BIT(ch->vampaff, VAM_DISGUISED);
	REMOVE_BIT(ch->extra, EXTRA_VICISSITUDE);
    	free_string( ch->morph );
    	ch->morph = str_dup( "" );
	act("Your features twist and distort until you looks like $n.",ch,NULL,NULL,TO_CHAR);
    	free_string( ch->long_descr );
    	ch->long_descr = str_dup( "" );
	return;
    }
    if (IS_VAMPAFF(ch,VAM_DISGUISED))
    {
	if (!IS_POLYAFF(ch, POLY_FLESHCRAFT))
	{
	    send_to_char( "Nothing happens.\n\r", ch );
	    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);
    	free_string( ch->morph );
	if (IS_NPC(victim))
	{
	    ch->morph = str_dup( victim->short_descr );
	    free_string( ch->long_descr );
	    ch->long_descr = str_dup( victim->long_descr );
	}
	else
	{
	    ch->morph = str_dup( victim->name );
	    free_string( ch->long_descr );
	    ch->long_descr = str_dup( "" );
	}
	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_FLESHCRAFT);
    SET_BIT(ch->affected_by, AFF_POLYMORPH);
    SET_BIT(ch->vampaff, VAM_DISGUISED);
    SET_BIT(ch->extra, EXTRA_VICISSITUDE);
    free_string( ch->morph );
    if (IS_NPC(victim))
    {
	ch->morph = str_dup( victim->short_descr );
	free_string( ch->long_descr );
	ch->long_descr = str_dup( victim->long_descr );
    }
    else
    {
	ch->morph = str_dup( victim->name );
	free_string( ch->long_descr );
	ch->long_descr = str_dup( "" );
    }
    return;
}

void do_bonecraft( CHAR_DATA *ch, char *argument )
{
    char      buf [MAX_STRING_LENGTH];
    char      arg1 [MAX_INPUT_LENGTH];
    char      arg2 [MAX_INPUT_LENGTH];
    char      arg3 [MAX_INPUT_LENGTH];
    CHAR_DATA *victim;

    if (IS_NPC(ch)) return;

    one_argument( argument, arg1 );
    smash_tilde(argument);

    if (!IS_VAMPIRE(ch) && !IS_GHOUL(ch))
    {
	send_to_char( "Huh?\n\r", ch );
	return;
    }

    if (get_disc(ch,DISC_VICISSITUDE) < 3)
    {
	send_to_char("You require level 3 Vicissitude to use Bonecraft.\n\r",ch);
	return;
    }

    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, arg2 );
	argument = one_argument( argument, arg3 );
	if (arg1[0] == '\0' || arg2[0] == '\0' || arg3[0] == '\0')
	{
	    send_to_char("Syntax: Bonecraft Modify <target> <modification>\n\r",ch);
	    return;
	}
	if ( ( victim = get_char_room( ch, arg2 ) ) == NULL )
	{
	    send_to_char( "They are not here.\n\r", ch );
	    return;
	}
	if (IS_NPC(victim))
	{
	    send_to_char( "You cannot bonecraft an unwilling person.\n\r", ch );
	    return;
	}
	if (IS_MAGE(victim))
	{
	    send_to_char( "You cannot fleshcraft Mages.\n\r", ch );
	    return;
	}
	if (IS_WEREWOLF(victim))
	{
	    send_to_char( "You cannot fleshcraft Werewolfs.\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 (!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,"|Morglum*Rox*Alucard*Ryana*"))
    {
	send_to_char( "Illegal name.\n\r", ch );
	return;
    }

    if (IS_AFFECTED(ch,AFF_POLYMORPH) && !IS_VAMPAFF(ch,VAM_DISGUISED))
    {
	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_cmp(argument,"self") )
    {
	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_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);
	act(buf,ch,NULL,NULL,TO_ROOM);
	REMOVE_BIT(ch->polyaff, POLY_BONECRAFT);
	REMOVE_BIT(ch->affected_by, AFF_POLYMORPH);
	REMOVE_BIT(ch->vampaff, VAM_DISGUISED);
	REMOVE_BIT(ch->extra, EXTRA_VICISSITUDE);
    	free_string( ch->morph );
    	ch->morph = str_dup( "" );
	act("Your features twist and distort until you look like $n.",ch,NULL,NULL,TO_CHAR);
	return;
    }
    if (IS_VAMPAFF(ch,VAM_DISGUISED))
    {
	if (!IS_POLYAFF(ch, 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);
    	free_string( ch->morph );
	ch->morph = str_dup( 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->vampaff, VAM_DISGUISED);
    SET_BIT(ch->extra, EXTRA_VICISSITUDE);
    free_string( ch->morph );
    ch->morph = str_dup( argument );
    return;
}

DO_COM( do_zuloform )
{
    if (IS_NPC(ch)) return;

    if (get_disc(ch,DISC_VICISSITUDE) < 5
    &&	get_tribe(ch,TRIBE_FIANNA) < 5)
    {
    STC( "Huh?\n\r", ch );
    return;
    }

    if (IS_AFFECTED(ch,AFF_POLYMORPH) && !IS_VAMPAFF(ch,VAM_DISGUISED))
    {
	send_to_char( "Not while polymorphed.\n\r", ch );
	return;
    }

    if (IS_POLYAFF(ch,POLY_ZULO))
    {

    if (IS_ABOMINATION(ch) && IS_SET(ch->act, PLR_WOLFMAN))
        ch->morph = str_dup("a huge werewolf");
    else if (IS_BAALI(ch) && IS_POLYAFF(ch, POLY_ZULO))
	ch->morph = str_dup("A great demonic beast");
    if (IS_WEREWOLF(ch) && IS_SET(ch->act, PLR_WOLFMAN))
      ch->morph = str_dup("A huge werewolf");

	else
	{
	    FILL_STRING( ch->morph, "" );
	    REMOVE_BIT(ch->affected_by, AFF_POLYMORPH);
	    REMOVE_BIT(ch->vampaff, VAM_DISGUISED);
	    REMOVE_BIT(ch->vampaff, VAM_CLAWS);
	}

	REMOVE_BIT(ch->vampaff, VAM_NIGHTSIGHT);
	REMOVE_BIT(ch->extra, EXTRA_VICISSITUDE);
	REMOVE_BIT(ch->polyaff, POLY_ZULO);

	send_to_char("Your body shrinks and distorts back to its normal form.\n\r",ch);
    if (IS_ABOMINATION(ch) && IS_SET(ch->act, PLR_WOLFMAN))
        act("An enormous black hairy monster's body shrinks and distorts into the form of $n.",ch,NULL,NULL,TO_ROOM);
    if (IS_BAALI(ch) && IS_POLYAFF(ch, POLY_ZULO))
	  act("A hideous monstrosity shrinks and distorts into the form of $n.",ch,NULL,NULL,TO_ROOM);
    else if (IS_WEREWOLF(ch) && IS_SET(ch->act, PLR_WOLFMAN))
	  act("A gigantic furry werewolf's body shrinks into the form of $n.",ch,NULL,NULL,TO_ROOM);
    else if (IS_WEREWOLF(ch))
	  act("A giant's body shrinks into the form of $n.",ch,NULL,NULL,TO_ROOM);
    else
	    act("A huge black monster's body shrinks and distorts into the form of $n.",ch,NULL,NULL,TO_ROOM);
	return;
    }

    if (ch->mounted == IS_RIDING) do_dismount(ch,"");

    if (IS_ABOMINATION(ch) && IS_SET(ch->act, PLR_WOLFMAN))
    {
    send_to_char("Your body grows and distorts into an enormous black hairy monster.\n\r",ch);
    act("$n's body grows and distorts into an enormous black hairy monster.",ch,NULL,NULL,TO_ROOM);
    }
    else if (IS_BAALI(ch) && IS_POLYAFF(ch, POLY_ZULO))
    {
    send_to_char("Your body grows and distorts into a hideous monstrosity.\n\r",ch);
    act("$n's body grows and distorts into a hideous monstrosity.",ch,NULL,NULL,TO_ROOM);
    }
    else if ( IS_WEREWOLF(ch) && IS_SET(ch->act, PLR_WOLFMAN))
    {
	send_to_char("Your body grows into a gigantic furry werewolf.\n\r", ch );
	act("$n's body grows into a gigantic furry werewolf.",ch,NULL,NULL,TO_ROOM);
    }
    else if ( IS_WEREWOLF( ch ) )
    {
	send_to_char("Your body grows into a giant.\n\r", ch );
	act("$n's body grows into a giant.",ch,NULL,NULL,TO_ROOM);
    }
    else
    {
    send_to_char("Your body grows and distorts into a huge black monster.\n\r",ch);
    act("$n's body grows and distorts into a huge black monster.",ch,NULL,NULL,TO_ROOM);
    }
    SET_BIT(ch->vampaff, VAM_CLAWS);
    SET_BIT(ch->vampaff, VAM_NIGHTSIGHT);
    SET_BIT(ch->affected_by, AFF_POLYMORPH);
    SET_BIT(ch->vampaff, VAM_DISGUISED);
    SET_BIT(ch->extra, EXTRA_VICISSITUDE);
    SET_BIT(ch->polyaff, POLY_ZULO);

    if (IS_ABOMINATION(ch) && IS_SET(ch->act, PLR_WOLFMAN))
    ch->morph = str_dup("an enormous black hairy monster");
    else if (IS_WEREWOLF(ch) && IS_SET(ch->act, PLR_WOLFMAN))
    ch->morph = str_dup("A gigantic furry werewolf");
    else if (IS_WEREWOLF(ch))
    ch->morph = str_dup("A giant");
    else
    ch->morph = str_dup("A huge black monster");
    return;
}

void do_plasmaform( CHAR_DATA *ch, char *argument )
{
    OBJ_DATA *obj;
    if (IS_NPC(ch)) return;

    if ((!IS_VAMPIRE(ch) && !IS_GHOUL(ch)) || IS_HEAD(ch, LOST_HEAD))
    {
	send_to_char("Huh?\n\r",ch);
	return;
    }

    if (get_disc(ch,DISC_VICISSITUDE) < 4)
    {
	send_to_char("You require level 4 Vicissitude to change into Plasma Form.\n\r",ch);
	return;
    }

    if (!IS_MORE(ch, MORE_PLASMA) && IS_AFFECTED(ch,AFF_POLYMORPH))
    {
	send_to_char("Not from this form.\n\r",ch);
	return;
    }

    if ( ( obj = ch->pcdata->chobj ) != NULL && IS_EXTRA(ch, EXTRA_OSWITCH))
    {
	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);
	REMOVE_BIT(ch->more, MORE_PLASMA);
	free_string(ch->morph);
	ch->morph = str_dup("");
	act("$p transforms into $n.",ch,obj,NULL,TO_ROOM);
	act("Your reform your human body.",ch,obj,NULL,TO_CHAR);
	extract_obj(obj);
	if (ch->in_room->vnum == ROOM_VNUM_IN_OBJECT)
	{
	    char_from_room(ch);
	    char_to_room(ch,get_room_index(ROOM_VNUM_ALTAR));
	}
	return;
    }
    if (IS_AFFECTED(ch,AFF_POLYMORPH))
    {
	send_to_char( "You cannot do this while polymorphed.\n\r", ch);
	return;
    }
    if ((obj = create_object(get_obj_index(OBJ_VNUM_SPILT_BLOOD),0)) == NULL)
    {
	send_to_char( "Bug - please inform Morglum.\n\r", ch );
	return;
    }
    if (ch->mounted == IS_RIDING) do_dismount(ch,"");
    obj_to_room(obj,ch->in_room);
    SET_BIT(obj->quest, QUEST_VANISH);
    act("$n transforms into $p and splashes to the ground.",ch,obj,NULL,TO_ROOM);
    act("You transform into $p and splash to the ground.",ch,obj,NULL,TO_CHAR);
    if (IS_EXTRA(ch, TIED_UP))
    {
	act("The ropes binding you fall through your liquid form.",ch,NULL,NULL,TO_CHAR);
	act("The ropes binding $n fall through $s liquid 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 liquid form.",ch,NULL,NULL,TO_ROOM);
	send_to_char("The webbing entrapping you falls through your liquid form.\n\r",ch);
	affect_strip(ch, gsn_web);
    }
    if (IS_AFFECTED(ch, AFF_WEBBED))
    {
	act("The webbing entrapping $n falls through $s liquid form.",ch,NULL,NULL,TO_ROOM);
	send_to_char("The webbing entrapping you falls through your liquid form.\n\r",ch);
	REMOVE_BIT(ch->affected_by, AFF_WEBBED);
    }
    if (is_affected(ch, gsn_tendrils))
    {
	act("The tendrils of darkness entrapping $n fall through $s liquid form.",ch,NULL,NULL,TO_ROOM);
	send_to_char("The tendrils of darkness entrapping you fall through your liquid form.\n\r",ch);
	affect_strip(ch, gsn_tendrils);
    }
    if (IS_AFFECTED(ch, AFF_SHADOW))
    {
	act("The tendrils of darkness entrapping $n fall through $s liquid form.",ch,NULL,NULL,TO_ROOM);
	send_to_char("The tendrils of darkness entrapping you fall through your liquid form.\n\r",ch);
	REMOVE_BIT(ch->affected_by, AFF_SHADOW);
    }
    if (is_affected(ch, gsn_jail))
    {
	act("The band of water entrapping $n splash to the ground.",ch,NULL,NULL,TO_ROOM);
	send_to_char("The bands of water entrapping you splash to the ground.\n\r",ch);
	affect_strip(ch, gsn_jail);
    }
    if (IS_AFFECTED(ch, AFF_JAIL))
    {
	act("The band of water entrapping $n splash to the ground.",ch,NULL,NULL,TO_ROOM);
	send_to_char("The bands of water entrapping you splash to the ground.\n\r",ch);
	REMOVE_BIT(ch->affected_by, AFF_JAIL);
    }
    ch->pcdata->obj_vnum = OBJ_VNUM_SPILT_BLOOD;
    obj->chobj = ch;
    ch->pcdata->chobj = obj;
    SET_BIT(ch->affected_by, AFF_POLYMORPH);
    SET_BIT(ch->extra, EXTRA_OSWITCH);
    SET_BIT(ch->more, MORE_PLASMA);
    free_string(ch->morph);
    ch->morph = str_dup(obj->short_descr);
    return;
}

void do_portal( CHAR_DATA *ch, char *argument )
{
    CHAR_DATA *victim;
    OBJ_DATA  *obj;
    char       arg [MAX_INPUT_LENGTH];
    int        duration;

    one_argument( argument, arg );

    if (IS_NPC(ch)) return;

    if (!IS_VAMPIRE(ch) && !IS_GHOUL(ch) && (!IS_DEMON(ch) || IS_ANGEL(ch)))
    {
	send_to_char("Huh?\n\r",ch);
	return;
    }

    if (get_disc(ch,DISC_DAIMOINON) < 3)
    {
	send_to_char("You require level 3 Daimoinon to create an Infernal Portal.\n\r",ch);
	return;
    }

    if ( arg[0] == '\0')
    {
	send_to_char( "Who do you wish to create a portal to?\n\r", ch );
	return;
    }

    victim = get_char_world( ch, arg );

    if ( ( victim = get_char_world( ch, arg ) ) == NULL
    ||   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 );
	if (!IS_NPC(victim) && ch != victim && IS_MORE(victim, MORE_GUARDIAN))
	{
	    guardian_message( victim );
	    act("$n just failed to create an Infernal Portal to you.",ch,NULL,victim,TO_VICT);
	}
	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;
    free_string(obj->short_descr);
    obj->short_descr = str_dup("an infernal portal");
    free_string(obj->description);
    obj->description = str_dup("An infernal portal of burning flames floats here.");
    if (IS_AFFECTED(ch,AFF_SHADOWPLANE))
	obj->extra_flags = ITEM_SHADOWPLANE;
    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;
    free_string(obj->short_descr);
    obj->short_descr = str_dup("an infernal portal");
    free_string(obj->description);
    obj->description = str_dup("An infernal portal of burning flames floats here.");
    if (IS_AFFECTED(victim,AFF_SHADOWPLANE))
	obj->extra_flags = ITEM_SHADOWPLANE;
    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 );
    if (!IS_NPC(victim) && ch != victim && IS_MORE(victim, MORE_GUARDIAN))
    {
	guardian_message( victim );
	act("$n just created an Infernal Portal to you.",ch,NULL,victim,TO_VICT);
    }
    return;
}

void do_soultwist( CHAR_DATA *ch, char *argument )
{
    CHAR_DATA *victim;
    char      arg [MAX_INPUT_LENGTH];
    int       damage;

    argument = one_argument( argument, arg );

    if (IS_NPC(ch)) return;

    if (!IS_VAMPIRE(ch) && !IS_GHOUL(ch) && (!IS_DEMON(ch) || IS_ANGEL(ch)))
    {
	send_to_char( "Huh?\n\r", ch );
	return;
    }

    if (get_disc(ch,DISC_DAIMOINON) < 5)
    {
	send_to_char("You require level 5 Daimoinon to use Soul Twist.\n\r",ch);
	return;
    }

    if (IS_ITEMAFF(ch, ITEMA_PEACE)) do_majesty(ch,"");

    if ( arg[0] == '\0' )
    {
	send_to_char( "Who do you wish to use Soul Twist on?\n\r", ch );
	return;
    }

    if ( ( victim = get_char_room( ch, arg ) ) == NULL )
    {
	send_to_char( "They are not here.\n\r", ch );
	return;
    }

    if ( ch == victim )
    {
	send_to_char( "Your soul isn't yours to destroy!\n\r", ch );
	return;
    }

    if ( is_safe(ch, victim) )
    {
	if (!IS_NPC(victim) && ch != victim && IS_MORE(victim, MORE_GUARDIAN))
	{
	    guardian_message( victim );
	    act("$n just failed to use Soul Twist on you.",ch,NULL,victim,TO_VICT);
	}
	return;
    }

    if (!IS_EVIL(ch))
    {
	send_to_char( "You are not evil enough to use Soul Twist.\n\r", ch );
	if (!IS_NPC(victim) && ch != victim && IS_MORE(victim, MORE_GUARDIAN))
	{
	    guardian_message( victim );
	    act("$n just failed to use Soul Twist on you.",ch,NULL,victim,TO_VICT);
	}
	return;
    }

    if (victim->alignment < 1)
    {
	send_to_char( "They are not good enough to use Soul Twist on.\n\r", ch );
	if (!IS_NPC(victim) && ch != victim && IS_MORE(victim, MORE_GUARDIAN))
	{
	    guardian_message( victim );
	    act("$n just failed to use Soul Twist on you.",ch,NULL,victim,TO_VICT);
	}
	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);

    if (!IS_NPC(victim) && ch != victim && IS_MORE(victim, MORE_GUARDIAN))
    {
	guardian_message( victim );
	act("$n just used Soul Twist on you.",ch,NULL,victim,TO_VICT);
    }

    victim->hit -= damage;
    if ((IS_NPC(victim) && victim->hit < 1) || 
	(!IS_NPC(victim) && victim->hit < -10))
    {
	act("$n's body falls limply to the ground.",victim,NULL,NULL,TO_ROOM);
	demon_gain(ch,victim);
	group_gain(ch,victim);
	victim->form = 9;
	killperson(ch,victim);
	WAIT_STATE( ch, 12 );
	return;
    }
    update_pos(victim);
    if (IS_NPC(victim)) do_kill(victim,ch->name);
    WAIT_STATE( ch, 12 );
    return;
}

void do_curse( CHAR_DATA *ch, char *argument )
{
    CHAR_DATA *victim;
    OBJ_DATA  *obj;
    char      arg [MAX_INPUT_LENGTH];
    int       critical = number_range(1,4);

    argument = one_argument( argument, arg );

    if (IS_NPC(ch)) return;

    if (!IS_VAMPIRE(ch) && !IS_GHOUL(ch) && (!IS_DEMON(ch) || IS_ANGEL(ch)))
    {
	send_to_char( "Huh?\n\r", ch );
	return;
    }

    if (get_disc(ch,DISC_DAIMOINON) < 4)
    {
	send_to_char("You require level 4 Daimoinon to use Curse.\n\r",ch);
	return;
    }

    if (IS_ITEMAFF(ch, ITEMA_PEACE)) do_majesty(ch,"");

    if ( arg[0] == '\0' )
    {
	send_to_char( "Who do you wish to curse?\n\r", ch );
	return;
    }

    if ( ( victim = get_char_room( ch, arg ) ) == NULL )
    {
	send_to_char( "They are not here.\n\r", ch );
	return;
    }

    if (ch == victim)
    {
	send_to_char( "Now that would be really silly...\n\r", ch );
	return;
    }

    act( "A look of concentration crosses $n's face.", ch, NULL, NULL, TO_ROOM );
    WAIT_STATE( ch, 12 );

    if ( is_safe(ch, victim) )
    {
	if (!IS_NPC(victim) && ch != victim && IS_MORE(victim, MORE_GUARDIAN))
	{
	    guardian_message( victim );
	    act("$n just failed to use Curse on you.",ch,NULL,victim,TO_VICT);
	}
	return;
    }

    if (number_percent() > (14 - ch->vampgen)*get_disc(ch,DISC_DAIMOINON))
    {
	send_to_char("Nothing happens.\n\r",ch);
	if (!IS_NPC(victim) && ch != victim && IS_MORE(victim, MORE_GUARDIAN))
	{
	    guardian_message( victim );
	    act("$n just failed to use Curse on you.",ch,NULL,victim,TO_VICT);
	}
	return;
    }

    if (critical == 1)
    {
	if (IS_ARM_L(victim,LOST_ARM)) 
	{
	    send_to_char( "Nothing happens.\n\r", ch );
	    if (!IS_NPC(victim) && ch != victim && IS_MORE(victim, MORE_GUARDIAN))
	    {
		guardian_message( victim );
		act("$n just failed to use Curse on you.",ch,NULL,victim,TO_VICT);
	    }
	    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);
	if (!IS_NPC(victim) && ch != victim && IS_MORE(victim, MORE_GUARDIAN))
	{
	    guardian_message( victim );
	    act("$n just used Curse on you.",ch,NULL,victim,TO_VICT);
	}
	if (IS_NPC(victim)) do_kill(victim,ch->name);
	return;
    }
    else if (critical == 2)
    {
	if (IS_ARM_R(victim,LOST_ARM))
	{
	    send_to_char( "Nothing happens.\n\r", ch );
	    if (!IS_NPC(victim) && ch != victim && IS_MORE(victim, MORE_GUARDIAN))
	    {
		guardian_message( victim );
		act("$n just failed to use Curse on you.",ch,NULL,victim,TO_VICT);
	    }
	    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);
	if (!IS_NPC(victim) && ch != victim && IS_MORE(victim, MORE_GUARDIAN))
	{
	    guardian_message( victim );
	    act("$n just used Curse on you.",ch,NULL,victim,TO_VICT);
	}
	if (IS_NPC(victim)) do_kill(victim,ch->name);
	return;
    }
    else if (critical == 3)
    {
	if (IS_LEG_L(victim,LOST_LEG))
	{
	    send_to_char( "Nothing happens.\n\r", ch );
	    if (!IS_NPC(victim) && ch != victim && IS_MORE(victim, MORE_GUARDIAN))
	    {
		guardian_message( victim );
		act("$n just failed to use Curse on you.",ch,NULL,victim,TO_VICT);
	    }
	    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);
	if (!IS_NPC(victim) && ch != victim && IS_MORE(victim, MORE_GUARDIAN))
	{
	    guardian_message( victim );
	    act("$n just used Curse on you.",ch,NULL,victim,TO_VICT);
	}
	if (IS_NPC(victim)) do_kill(victim,ch->name);
	return;
    }
    else if (critical == 4)
    {
	if (IS_LEG_R(victim,LOST_LEG))
	{
	    send_to_char( "Nothing happens.\n\r", ch );
	    if (!IS_NPC(victim) && ch != victim && IS_MORE(victim, MORE_GUARDIAN))
	    {
		guardian_message( victim );
		act("$n just failed to use Curse on you.",ch,NULL,victim,TO_VICT);
	    }
	    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);
	if (!IS_NPC(victim) && ch != victim && IS_MORE(victim, MORE_GUARDIAN))
	{
	    guardian_message( victim );
	    act("$n just used Curse on you.",ch,NULL,victim,TO_VICT);
	}
	if (IS_NPC(victim)) do_kill(victim,ch->name);
	return;
    }
    send_to_char("Nothing happens.\n\r",ch);
    if (!IS_NPC(victim) && ch != victim && IS_MORE(victim, MORE_GUARDIAN))
    {
	guardian_message( victim );
	act("$n just failed to use Curse on you.",ch,NULL,victim,TO_VICT);
    }
    return;
}

void do_conditioning( CHAR_DATA *ch, char *argument )
{
    CHAR_DATA *victim;
    char arg [MAX_INPUT_LENGTH];

    argument = one_argument( argument, arg );

    if (IS_NPC(ch)) return;

    if (!IS_VAMPIRE(ch) && !IS_GHOUL(ch))
    {
	send_to_char( "Huh?\n\r", ch );
	return;
    }

    if (get_disc(ch,DISC_DOMINATE) < 2)
    {
	send_to_char("You require level 2 Dominate to use Conditioning.\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 can't condition yourself!\n\r", ch );
	return;
    }

    if ( IS_NPC(victim) )
    {
	send_to_char( "Not on NPC's.\n\r", ch );
	return;
    }

    if (is_safe(ch,victim)) return;

    if (IS_ITEMAFF(victim, ITEMA_SHADES) || IS_ITEMAFF(ch, ITEMA_SHADES) || 
	!can_see(victim,ch))
    {
	if (!IS_SET(ch->act,PLR_HOLYLIGHT) && get_disc(ch,DISC_DOMINATE) < 6)
	{
	    send_to_char( "You are unable to make eye contact with them.\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 (strlen(victim->pcdata->conding) > 2 && 
	!str_cmp(victim->pcdata->conding,ch->name))
    {
	free_string(victim->pcdata->conding);
	victim->pcdata->conding = str_dup( "" );
	REMOVE_BIT(victim->more, MORE_LOYAL);
	act("You remove $N's conditioning.",ch,NULL,victim,TO_CHAR);
	act("$n removes your conditioning.",ch,NULL,victim,TO_VICT);
	if (!IS_NPC(victim) && ch != victim && IS_MORE(victim, MORE_GUARDIAN))
	{
	    guardian_message( victim );
	    act("$n just used Conditioning on you.",ch,NULL,victim,TO_VICT);
	}
	return;
    }

    if (!IS_NPC(victim) && IS_VAMPIRE(victim) && victim->vampgen < ch->vampgen)
    {
	act("You shake off $N's attempt to Condition you.",victim,NULL,ch,TO_CHAR);
	act("$n shakes off $N's attempt to Condition $m.",victim,NULL,ch,TO_NOTVICT);
	act("$n shakes off your attempt to Condition $m.",victim,NULL,ch,TO_VICT);
	act("$s mind is too strong to overcome.",victim,NULL,ch,TO_VICT);
	if (!IS_NPC(victim) && ch != victim && IS_MORE(victim, MORE_GUARDIAN))
	{
	    guardian_message( victim );
	    act("$n just failed to use Conditioning on you.",ch,NULL,victim,TO_VICT);
	}
	return;
    }

    if (!IS_NPC(victim) && victim->pcdata->resist[WILL_DOMINATE] > 0)
    {
	act("You shake off $N's attempt to Condition you.",victim,NULL,ch,TO_CHAR);
	act("$n shakes off $N's attempt to Condition $m.",victim,NULL,ch,TO_NOTVICT);
	act("$n shakes off your attempt to Condition $m.",victim,NULL,ch,TO_VICT);
	if (!IS_NPC(victim) && ch != victim && IS_MORE(victim, MORE_GUARDIAN))
	{
	    guardian_message( victim );
	    act("$n just failed to use Conditioning on you.",ch,NULL,victim,TO_VICT);
	}
	return;
    }

    if (!IS_NPC(victim) && ((victim->pcdata->willpower[0] >= 2 && 
	IS_MORE(victim, MORE_LOYAL)) || victim->pcdata->willpower[0] >= 5) &&
	strlen(victim->pcdata->conding) > 1)
    {
	if (IS_MORE(victim, MORE_LOYAL)) victim->pcdata->willpower[0] -= 2;
	else victim->pcdata->willpower[0] -= 5;
	victim->pcdata->resist[WILL_DOMINATE] = 60;
	send_to_char("You burn some willpower to resist Conditioning.\n\r",victim);
	act("You shake off $N's attempt to Condition you.",victim,NULL,ch,TO_CHAR);
	act("$n shakes off $N's attempt to Condition $m.",victim,NULL,ch,TO_NOTVICT);
	act("$n shakes off your attempt to Condition $m.",victim,NULL,ch,TO_VICT);
	if (!IS_NPC(victim) && ch != victim && IS_MORE(victim, MORE_GUARDIAN))
	{
	    guardian_message( victim );
	    act("$n just failed to use Conditioning on you.",ch,NULL,victim,TO_VICT);
	}
	return;
    }

    if (!IS_NPC(victim) && IS_WILLPOWER(victim, RES_DOMINATE) && 
	victim->pcdata->willpower[0] >= 10)
    {
	victim->pcdata->willpower[0] -= 10;
	victim->pcdata->resist[WILL_DOMINATE] = 60;
	if (!IS_WILLPOWER(victim, RES_TOGGLE))
	    REMOVE_BIT(victim->pcdata->resist[0], RES_DOMINATE);
	send_to_char("You burn some willpower to resist Conditioning.\n\r",victim);
	act("You shake off $N's attempt to Condition you.",victim,NULL,ch,TO_CHAR);
	act("$n shakes off $N's attempt to Condition $m.",victim,NULL,ch,TO_NOTVICT);
	act("$n shakes off your attempt to Condition $m.",victim,NULL,ch,TO_VICT);
	if (!IS_NPC(victim) && ch != victim && IS_MORE(victim, MORE_GUARDIAN))
	{
	    guardian_message( victim );
	    act("$n just failed to use Conditioning on you.",ch,NULL,victim,TO_VICT);
	}
	return;
    }

    if (strlen(victim->pcdata->conding) > 1)
    {
	free_string(victim->pcdata->conding);
	victim->pcdata->conding = str_dup( "" );
	REMOVE_BIT(victim->more, MORE_LOYAL);
	act("You remove $N's conditioning.",ch,NULL,victim,TO_CHAR);
	act("$n removes your conditioning.",ch,NULL,victim,TO_VICT);
	if (!IS_NPC(victim) && ch != victim && IS_MORE(victim, MORE_GUARDIAN))
	{
	    guardian_message( victim );
	    act("$n just used Conditioning on you.",ch,NULL,victim,TO_VICT);
	}
	return;
    }

    free_string(victim->pcdata->conding);
    victim->pcdata->conding = str_dup( ch->name );
    REMOVE_BIT(victim->more, MORE_LOYAL);
    act("You condition $N's mind.",ch,NULL,victim,TO_CHAR);
    act("$n conditions your mind.",ch,NULL,victim,TO_VICT);
    WAIT_STATE( ch, 12 );
    if (!IS_NPC(victim) && ch != victim && IS_MORE(victim, MORE_GUARDIAN))
    {
	guardian_message( victim );
	act("$n just used Conditioning on you.",ch,NULL,victim,TO_VICT);
    }
    return;
}

int true_generation( 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      arg7 [MAX_INPUT_LENGTH];
    char      arg8 [MAX_INPUT_LENGTH];
    char      arg9 [MAX_INPUT_LENGTH];
    char      arg10[MAX_INPUT_LENGTH];
    char      arg11[MAX_INPUT_LENGTH];
    char      arg12[MAX_INPUT_LENGTH];
    int       vampgen = 1;

    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 );
    argument = one_argument( argument, arg7 );
    argument = one_argument( argument, arg8 );
    argument = one_argument( argument, arg9 );
    argument = one_argument( argument, arg10 );
    argument = one_argument( argument, arg11 );
    argument = one_argument( argument, arg12 );

    if (IS_NPC(ch)) return 0;

    if (arg1[0] != '\0')  {arg1[0] = UPPER(arg1[0]);vampgen = 2;}
    if (arg2[0] != '\0')  {arg2[0] = UPPER(arg2[0]);vampgen = 3;}
    if (arg3[0] != '\0')  {arg3[0] = UPPER(arg3[0]);vampgen = 4;}
    if (arg4[0] != '\0')  {arg4[0] = UPPER(arg4[0]);vampgen = 5;}
    if (arg5[0] != '\0')  {arg5[0] = UPPER(arg5[0]);vampgen = 6;}
    if (arg6[0] != '\0')  {arg6[0] = UPPER(arg6[0]);vampgen = 7;}
    if (arg7[0] != '\0')  {arg7[0] = UPPER(arg7[0]);vampgen = 8;}
    if (arg8[0] != '\0')  {arg8[0] = UPPER(arg8[0]);vampgen = 9;}
    if (arg9[0] != '\0')  {arg9[0] = UPPER(arg9[0]);vampgen = 10;}
    if (arg10[0] != '\0') {arg10[0] = UPPER(arg10[0]);vampgen = 11;}
    if (arg11[0] != '\0') {arg11[0] = UPPER(arg11[0]);vampgen = 12;}
    if (arg12[0] != '\0') {arg12[0] = UPPER(arg12[0]);vampgen = 13;}

    return vampgen;
}

void do_status( CHAR_DATA *ch, char *argument )
{
    if (IS_NPC(ch)) return;

    if (ch->race > 0)
    {
	send_to_char("You already have a reputation.\n\r",ch);
	return;
    }

    if (ch->race < 0)
    {
	send_to_char("Your reputation is too bad already.\n\r",ch);
	return;
    }

    if (ch->exp < 1)
    {
	send_to_char("It costs 1 exp to make yourself Known.\n\r",ch);
	return;
    }

    ch->race = 1;
    ch->exp--;
    send_to_char("You are now Known.\n\r",ch);
    return;
}

void do_tongue( CHAR_DATA *ch, char *argument )
{
    char arg [MAX_INPUT_LENGTH];
    CHAR_DATA *victim;
    OBJ_DATA *obj;
    int dam;
    int stance;

    one_argument( argument, arg );

    if (IS_NPC(ch)) return;

    if (!IS_VAMPIRE(ch) && !IS_GHOUL(ch))
    {
	send_to_char( "Huh?\n\r", ch );
	return;
    }

    if (get_disc(ch,DISC_SERPENTIS) < 1)
    {
	send_to_char("You require level 1 Serpentis to use Tongue of the Serpent.\n\r",ch);
	return;
    }

    if (arg[0] == '\0' && ch->fighting == NULL)
    {
	send_to_char("Who do you wish to use Tongue of the Serpent on?\n\r",ch);
	return;
    }

    if ( ( victim = ch->fighting ) == NULL )
    {
	if ( ( victim = get_char_room( ch, arg ) ) == NULL )
	{
	    if ( ( obj = get_obj_carry( ch, arg ) ) != NULL )
	    {
		if ( obj->item_type != ITEM_WEAPON )
		{
		    send_to_char( "You can only poison weapons with your serpentine tongue.\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 long serpentine tongue along $p, poisoning it.",ch,obj,NULL,TO_CHAR);
		act("$n runs $s long serpentine tongue along $p, poisoning it.",ch,obj,NULL,TO_ROOM);
		obj->level = 5 * get_disc(ch,DISC_SERPENTIS);
		obj->value[0] = 53;
		return;
	    }
	    send_to_char( "They aren't here.\n\r", ch );
	    return;
	}
    }

    if ( ch == victim )
    {
	act( "You touch your nose with your long serpentine tongue.",ch,NULL,victim,TO_CHAR);
	act( "$n touches $s nose with his long serpentine tongue.",ch,NULL,victim,TO_ROOM );
	return;
    }

    if (IS_ITEMAFF(ch, ITEMA_PEACE)) do_majesty(ch,"");

    if (is_safe(ch,victim))
    {
	if (!IS_NPC(victim) && ch != victim && IS_MORE(victim, MORE_GUARDIAN))
	{
	    guardian_message( victim );
	    act("$n just failed to use Tongue of the Serpent on you.",ch,NULL,victim,TO_VICT);
	}
	return;
    }

    WAIT_STATE( ch, 6 );

    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 * get_disc(ch,DISC_POTENCE) * 0.5;
    else if ( !IS_NPC(ch) && (IS_SET(ch->act, PLR_CHAMPION) ||
	IS_SET(ch->act, PLR_DEMON)) && 
	IS_SET(ch->pcdata->disc[C_POWERS], DEM_MIGHT) )
	dam *= 1.5;

    if ( !IS_NPC(ch) ) dam = dam + (dam * ((ch->wpn[0]) * 0.01));

/*
    if ( !IS_NPC(ch) )
*/
    {
	stance = ch->stance[0];
	if ( IS_STANCE(ch, STANCE_NORMAL) ) dam *= 1.25;
	else dam = dambonus(ch,victim,dam,stance);
    }

    if ( dam <= 0 )
	dam = 1;

    damage( ch, victim, dam, gsn_tongue );
    return;
}

void do_mummify( CHAR_DATA *ch, char *argument )
{
    OBJ_DATA *obj;
    if (IS_NPC(ch)) return;

    if (!IS_VAMPIRE(ch) && !IS_GHOUL(ch))
    {
	send_to_char("Huh?\n\r",ch);
	return;
    }

    if (get_disc(ch,DISC_SERPENTIS) < 2)
    {
	send_to_char("You require level 2 Serpentis to Mummify yourself.\n\r",ch);
	return;
    }

    if ( ( obj = ch->pcdata->chobj ) != NULL && IS_EXTRA(ch, EXTRA_OSWITCH))
    {
	REMOVE_BIT(ch->more, MORE_MUMMIFIED);
	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);
	free_string(ch->morph);
	ch->morph = str_dup("");
	act("$p clambers to $s feet.",ch,obj,NULL,TO_ROOM);
	act("Your body unshrivels and returns to normal.",ch,obj,NULL,TO_CHAR);
	extract_obj(obj);
	if (ch->in_room->vnum == ROOM_VNUM_IN_OBJECT)
	{
	    char_from_room(ch);
	    char_to_room(ch,get_room_index(ROOM_VNUM_ALTAR));
	}
	return;
    }
    if (IS_AFFECTED(ch,AFF_POLYMORPH))
    {
	send_to_char( "You cannot do this while polymorphed.\n\r", ch);
	return;
    }
    if ((obj = create_object(get_obj_index(OBJ_VNUM_CORPSE_PC),0)) == NULL)
    {
	send_to_char( "Bug - please inform Morglum.\n\r", ch );
	return;
    }
    mummify_corpse(ch,obj);
    if (ch->mounted == IS_RIDING) do_dismount(ch,"");
    obj_to_room(obj,ch->in_room);
    SET_BIT(obj->quest, QUEST_VANISH);
    act("$n shrivels up and falls to the ground.",ch,NULL,NULL,TO_ROOM);
    act("You shrivel up and fall to the ground.",ch,NULL,NULL,TO_CHAR);
    ch->pcdata->obj_vnum = OBJ_VNUM_CORPSE_PC;
    obj->chobj = ch;
    ch->pcdata->chobj = obj;
    SET_BIT(ch->more, MORE_MUMMIFIED);
    SET_BIT(ch->affected_by, AFF_POLYMORPH);
    SET_BIT(ch->extra, EXTRA_OSWITCH);
    free_string(ch->morph);
    ch->morph = str_dup(obj->short_descr);
    return;
}

void mummify_corpse( CHAR_DATA *ch, OBJ_DATA *obj )
{
    char buf[MAX_STRING_LENGTH];

    if (IS_NPC(ch)) return;

    if (obj->pIndexData->vnum != OBJ_VNUM_CORPSE_PC)
    {
	send_to_char( "Bug - please inform Morglum.\n\r", ch );
	return;
    }

    sprintf(buf, obj->short_descr, ch->name);
    free_string(obj->short_descr);
    obj->short_descr = str_dup( buf );

    sprintf(buf, obj->description, ch->name);
    free_string(obj->description);
    obj->description = str_dup( buf );

    SET_BIT(obj->quest, QUEST_VANISH);

    return;
}

void staked_corpse( CHAR_DATA *ch, OBJ_DATA *obj )
{
    char buf[MAX_STRING_LENGTH];

    if (IS_NPC(ch)) return;

    if (obj->pIndexData->vnum != OBJ_VNUM_CORPSE_PC)
    {
	send_to_char( "Bug - please inform Morglum.\n\r", ch );
	return;
    }

    sprintf(buf, "corpse body %s", ch->name);
    free_string(obj->name);
    obj->name = str_dup( buf );

    sprintf(buf, obj->short_descr, ch->name);
    free_string(obj->short_descr);
    obj->short_descr = str_dup( buf );

    sprintf(buf, "The body of %s is lying here with a stake through its chest.", ch->name);
    free_string(obj->description);
    obj->description = str_dup( buf );

    obj->weight = 150;
    obj->wear_flags = ITEM_TAKE;
    SET_BIT(obj->quest, QUEST_VANISH);

    return;
}

void do_baal( CHAR_DATA *ch, char *argument )
{
    AFFECT_DATA af;
    int sn, blood, potence, celerity, fortitude;

    if (IS_NPC(ch)) return;

    if (!IS_VAMPIRE(ch) && !IS_GHOUL(ch))
    {
	send_to_char( "Huh?\n\r", ch );
	return;
    }

    if (get_disc(ch,DISC_DAIMOINON) < 9)
    {
	send_to_char("You require level 9 Daimoinon to become Baal's Avatar.\n\r",ch);
	return;
    }

    if (is_affected(ch, gsn_demon))
    {
	send_to_char("You are already possessed by the spirit of Baal.\n\r",ch);
	return;
    }

    if (get_disc(ch,DISC_POTENCE) < 5)
	potence = 5 - get_disc(ch,DISC_POTENCE);
    else if (get_disc(ch,DISC_POTENCE) < 10) potence = 1;
    else potence = 0;

    if (get_disc(ch,DISC_CELERITY) < 5)
	celerity = 5 - get_disc(ch,DISC_CELERITY);
    else if (get_disc(ch,DISC_CELERITY) < 10) celerity = 1;
    else celerity = 0;

    if (get_disc(ch,DISC_FORTITUDE) < 5)
	fortitude = 5 - get_disc(ch,DISC_FORTITUDE);
    else if (get_disc(ch,DISC_FORTITUDE) < 10) fortitude = 1;
    else fortitude = 0;

    blood = (potence + celerity + fortitude) * 10;

    if (blood < 1)
    {
	send_to_char("The spirit of Baal doesn't answer your call.\n\r",ch);
	return;
    }

    if (ch->blood[0] < blood)
    {
	send_to_char("You have insufficient blood.\n\r",ch);
	return;
    }

    ch->blood[0] -= blood;

    if ( ( sn = skill_lookup( "demonic possession" ) ) < 0 ) return;

    af.type      = sn;
    af.duration  = get_disc(ch,DISC_DAIMOINON);
    af.bitvector = 0;
    if (potence > 0)
    {
	af.location  = APPLY_POTENCE;
	af.modifier  = potence;
	affect_to_char( ch, &af );
    }
    if (celerity > 0)
    {
	af.location  = APPLY_CELERITY;
	af.modifier  = celerity;
	affect_to_char( ch, &af );
    }
    if (fortitude > 0)
    {
	af.location  = APPLY_FORTITUDE;
	af.modifier  = fortitude;
	affect_to_char( ch, &af );
    }

    act( "$n's eyes burn with unholy strength!", ch, NULL, NULL, TO_ROOM );
    send_to_char("Your eyes glow as you are infused with some of the power of Baal!\n\r",ch);

    WAIT_STATE( ch, 12 );
    return;
}

void do_servant( CHAR_DATA *ch, char *argument )
{
    char buf [MAX_INPUT_LENGTH];
    CHAR_DATA *victim;
    AFFECT_DATA af;
    int sn;

    if (IS_NPC(ch)) return;

    if (!IS_VAMPIRE(ch) && !IS_GHOUL(ch))
    {
	send_to_char( "Huh?\n\r", ch );
	return;
    }

    if (get_disc(ch,DISC_DAIMOINON) < 8)
    {
	send_to_char("You require level 8 Daimoinon to summon a Demonic Servant.\n\r",ch);
	return;
    }

    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_GUARDIAN ) );
    char_to_room(victim,get_room_index(ROOM_VNUM_DISCONNECTION));
    free_string(victim->lord);
    victim->lord = str_dup(ch->name);
    free_string(victim->name);
    victim->name = str_dup("demon servant");
    free_string(victim->short_descr);
    victim->short_descr = str_dup("a demonic servant");
    free_string(victim->long_descr);
    victim->long_descr = str_dup("A demonic servant stands here, awaiting orders.\n\r");
    victim->sex = 1;
    victim->alignment = -1000;
    free_string(victim->description);
    victim->description = str_dup("He looks extremely powerful.\n\r");

    victim->level = 100;
    victim->hit = 30000;
    victim->max_hit = 30000;
    victim->mana = 0;
    victim->max_mana = 1000;
    victim->move = 1000;
    victim->max_move = 1000;
    victim->hitroll = char_hitroll(ch) - 20;
    victim->damroll = char_damroll(ch) - 20;
    victim->armor = char_ac(ch) + 100;
    char_from_room(victim);
    char_to_room(victim,ch->in_room);

    strcpy(buf,"Come forth, creature of darkness, and do my bidding!");
    do_say( ch, buf );

    send_to_char( "A demon bursts from the ground and bows before you.\n\r",ch );
    act( "$N bursts from the ground and bows before $n.", ch, NULL, victim, TO_ROOM );

    if ( ( sn = skill_lookup( "guardian" ) ) < 0 )
    {
	send_to_char( "Bug - please inform Morglum.\n\r", ch );
	return;
    }

    add_follower( victim, ch );
    af.type      = sn;
    af.duration  = 6666;
    af.location  = APPLY_NONE;
    af.modifier  = 0;
    af.bitvector = AFF_CHARM;
    affect_to_char( victim, &af );
    return;
}

void do_controlbeast( CHAR_DATA *ch, char *argument )
{
    char arg [MAX_INPUT_LENGTH];
    char buf [MAX_STRING_LENGTH];
    int  cost = (100 - ch->truebeast);

    argument = one_argument( argument, arg );

    if (IS_NPC(ch)) return;

    if (!IS_VAMPIRE(ch))
    {
	send_to_char("Huh?\n\r",ch);
	return;
    }

    if (ch->pcdata->wolf > 0)
    {
	send_to_char("Not while the beast is in control!\n\r",ch);
	return;
    }

    if (ch->beast > 99 || ch->truebeast > 99)
    {
	send_to_char("The beast has already taken over.\n\r",ch);
	return;
    }

    if (ch->pcdata->diableries[DIAB_EVER] > 0)
    {
	send_to_char("Those who drink of the hearts blood may not attain Golconda.\n\r",ch);
	return;
    }

    if (ch->beast < 1)
    {
	send_to_char("But you have already attained Golconda!\n\r",ch);
	return;
    }

    if (ch->truebeast < 1)
    {
	send_to_char("You are unable to exert any further control over your beast.\n\r",ch);
	return;
    }

    if (ch->practice < cost )
    {
	sprintf(buf,"You need %d primal to try and control your beast.\n\r",cost);
	send_to_char(buf,ch);
	return;
    }

    if (arg[0] == '\0' || str_cmp(arg,"buy"))
    {
	sprintf(buf,"To lower your beast for the cost of %d primal, type: 'controlbeast buy'.\n\r",cost);
	send_to_char(buf,ch);
	return;
    }

    ch->practice -= cost;
    ch->truebeast--;
    send_to_char("You exert some control over your beast.\n\r",ch);
    return;
}

void do_shroudnight( CHAR_DATA *ch, char *argument )
{
    char buf [MAX_INPUT_LENGTH];

    if (IS_NPC(ch)) return;

    if (IS_ABOMINATION(ch))
    {
	if (get_disc(ch,DISC_OBTENEBRATION) < 1 && get_tribe(ch,TRIBE_UKTENA) < 1)
	{
	    send_to_char("You require either level 1 Uktena or level 1 Obtenebration to summon darkness.\n\r",ch);
	    return;
	}
    }
    else if (!IS_VAMPIRE(ch) && !IS_GHOUL(ch))
    {
	if (!IS_WEREWOLF(ch))
	{
	    send_to_char( "Huh?\n\r", ch );
	    return;
	}
	if (get_tribe(ch,TRIBE_UKTENA) < 1)
 	{
	    send_to_char("You require the level 1 power of the Uktena to call the Shroud of Night.\n\r",ch);
	    return;
	}
    }
    else if (!IS_WEREWOLF(ch) && get_disc(ch,DISC_OBTENEBRATION) < 1)
    {
	send_to_char("You require level 1 Obtenebration to use Shroud of Night.\n\r",ch);
	return;
    }

    if (ch->in_room == NULL)
    {
	send_to_char("Nothing happens.\n\r",ch);
	return;
    }

    if (IS_MORE(ch, MORE_DARKNESS))
    {
	REMOVE_BIT(ch->more, MORE_DARKNESS);
	REMOVE_BIT(ch->in_room->room_flags, ROOM_TOTAL_DARKNESS);
	send_to_char("You banish the darkness from the room!\n\r", ch);
	act("A look of concentration crosses $n's face.", ch, NULL, NULL, TO_ROOM );
	act("$n banishes the darkness from the room!",ch,NULL,NULL,TO_ROOM);
	ch->pcdata->darkness = 60;
	return;
    }

    if (IS_SET(ch->in_room->room_flags, ROOM_TOTAL_DARKNESS))
    {
	send_to_char("The room is already in darkness.\n\r", ch);
	return;
    }

    if (ch->pcdata->darkness > 0)
    {
	if (ch->pcdata->darkness > 1)
	    sprintf(buf,"You cannot call upon the Shroud of Night for another %d seconds.\n\r",ch->pcdata->darkness);
	else
	    sprintf(buf,"You cannot call upon the Shroud of Night for another 1 second.\n\r");
	send_to_char(buf,ch);
	return;
    }

    SET_BIT(ch->in_room->room_flags, ROOM_TOTAL_DARKNESS);
    SET_BIT(ch->more, MORE_DARKNESS);
    ch->pcdata->darkness = 60;
    send_to_char("You call forth the Shroud of Night to darken the room!\n\r", ch);
    act("A look of concentration crosses $n's face.", ch, NULL, NULL, TO_ROOM );
    act("The room is filled with darkness!",ch,NULL,NULL,TO_ROOM);
    return;
}  

void do_silencedeath( CHAR_DATA *ch, char *argument )
{
    char buf [MAX_INPUT_LENGTH];

    if (IS_NPC(ch)) return;

    if (get_disc(ch,DISC_QUIETUS) < 1
    &&	get_auspice(ch,AUSPICE_RAGABASH) < 4)
    {
	send_to_char( "Huh?\n\r", ch );
	return;
    }

    if (ch->in_room == NULL)
    {
	send_to_char("Nothing happens.\n\r",ch);
	return;
    }

    if (IS_MORE(ch, MORE_SILENCE))
    {
	REMOVE_BIT(ch->more, MORE_SILENCE);
	REMOVE_BIT(ch->in_room->added_flags, ROOM2_SILENCE);
	send_to_char("You banish the silence from the room!\n\r", ch);
	act("A look of concentration crosses $n's face.", ch, NULL, NULL, TO_ROOM );
	act("The room is no longer silent.",ch,NULL,NULL,TO_ROOM);
	ch->pcdata->silence = 60;
	return;
    }

    if (IS_SET(ch->in_room->added_flags, ROOM2_SILENCE))
    {
	send_to_char("The room is already silent.\n\r", ch);
	return;
    }

    if (ch->pcdata->silence > 0)
    {
	if (ch->pcdata->silence > 1)
	    sprintf(buf,"You cannot call upon the Silence of Death for another %d seconds.\n\r",ch->pcdata->silence);
	else
	    sprintf(buf,"You cannot call upon the Silence of Death for another 1 second.\n\r");
	send_to_char(buf,ch);
	return;
    }

    SET_BIT(ch->in_room->added_flags, ROOM2_SILENCE);
    SET_BIT(ch->more, MORE_SILENCE);
    ch->pcdata->silence = 60;
    send_to_char("You call forth the Silence of Death!\n\r", ch);
    act("A look of concentration crosses $n's face.", ch, NULL, NULL, TO_ROOM );
    act("The room suddenly goes completely silent!",ch,NULL,NULL,TO_ROOM);
    return;
}  

void do_weakness( CHAR_DATA *ch, char *argument )
{
    CHAR_DATA *victim;
    AFFECT_DATA af;
    char arg [MAX_INPUT_LENGTH];
    int sn;

    argument = one_argument( argument, arg );

    if (IS_NPC(ch)) return;

    if (!IS_VAMPIRE(ch) && !IS_GHOUL(ch))
    {
	send_to_char( "Huh?\n\r", ch );
	return;
    }

    if (get_disc(ch,DISC_QUIETUS) < 2)
    {
	send_to_char("You require level 2 Quietus to use Weakness.\n\r",ch);
	return;
    }

    if (IS_ITEMAFF(ch, ITEMA_PEACE)) do_majesty(ch,"");

    if (arg[0] == '\0')
    {
	send_to_char("Who do you wish to use Weakness on?\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( "Now that would just be plain stupid...\n\r", ch );
	return;
    }

    if ( ( sn = skill_lookup( "weakness" ) ) < 0 )
    {
	send_to_char( "Bug - please inform Morglum.\n\r", ch );
	return;
    }

    if ( is_safe(ch, victim) )
    {
	if (!IS_NPC(victim) && ch != victim && IS_MORE(victim, MORE_GUARDIAN))
	{
	    guardian_message( victim );
	    act("$n just failed to use Weakness on you.",ch,NULL,victim,TO_VICT);
	}
	return;
    }

    act( "A look of concentration crosses $n's face.", ch, NULL, NULL, TO_ROOM );
    send_to_char("You feel weaker!\n\r",victim);
    act("$n looks weaker.",victim,NULL,NULL,TO_ROOM);

    af.type      = sn;
    af.location  = APPLY_STR;
    af.modifier  = 0 - get_disc(ch,DISC_QUIETUS);
    af.duration  = number_range(1,2);
    af.bitvector = 0;
    affect_join( victim, &af );
    WAIT_STATE( ch, 12 );
    if (!IS_NPC(victim) && ch != victim && IS_MORE(victim, MORE_GUARDIAN))
    {
	guardian_message( victim );
	act("$n just used Weakness on you.",ch,NULL,victim,TO_VICT);
    }
    return;
}

void do_infirmity( CHAR_DATA *ch, char *argument )
{
    CHAR_DATA *victim;
    AFFECT_DATA af;
    char arg [MAX_INPUT_LENGTH];
    int sn;

    argument = one_argument( argument, arg );

    if (IS_NPC(ch)) return;

    if (!IS_VAMPIRE(ch) && !IS_GHOUL(ch))
    {
	send_to_char( "Huh?\n\r", ch );
	return;
    }

    if (get_disc(ch,DISC_QUIETUS) < 3)
    {
	send_to_char("You require level 3 Quietus to use Infirmity.\n\r",ch);
	return;
    }

    if (IS_ITEMAFF(ch, ITEMA_PEACE)) do_majesty(ch,"");

    if (arg[0] == '\0')
    {
	send_to_char("Who do you wish to use Infirmity on?\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( "Now that would just be plain stupid...\n\r", ch );
	return;
    }

    if ( is_safe(ch, victim) )
    {
	if (!IS_NPC(victim) && ch != victim && IS_MORE(victim, MORE_GUARDIAN))
	{
	    guardian_message( victim );
	    act("$n just failed to use Infirmity on you.",ch,NULL,victim,TO_VICT);
	}
	return;
    }

    if ( ( sn = skill_lookup( "weakness" ) ) < 0 )
    {
	send_to_char( "Bug - please inform Morglum.\n\r", ch );
	return;
    }

    act( "A look of concentration crosses $n's face.", ch, NULL, NULL, TO_ROOM );
    send_to_char("You feel weaker!\n\r",victim);
    send_to_char("You feel slower!\n\r",victim);
    send_to_char("You feel less healthy!\n\r",victim);
    act("$n looks weaker.",victim,NULL,NULL,TO_ROOM);
    act("$n looks slower.",victim,NULL,NULL,TO_ROOM);
    act("$n looks less healthy.",victim,NULL,NULL,TO_ROOM);

    af.type      = sn;
    af.location  = APPLY_STR;
    af.modifier  = 0 - get_disc(ch,DISC_QUIETUS);
    af.duration  = number_range(1,2);
    af.bitvector = 0;
    affect_join( victim, &af );

    if ( ( sn = skill_lookup( "slowness" ) ) < 0 )
    {
	send_to_char( "Bug - please inform Morglum.\n\r", ch );
	return;
    }

    af.type      = sn;
    af.location  = APPLY_DEX;
    af.modifier  = 0 - get_disc(ch,DISC_QUIETUS);
    af.duration  = number_range(1,2);
    af.bitvector = 0;
    affect_join( victim, &af );

    if ( ( sn = skill_lookup( "infirmity" ) ) < 0 )
    {
	send_to_char( "Bug - please inform Morglum.\n\r", ch );
	return;
    }

    af.type      = sn;
    af.location  = APPLY_CON;
    af.modifier  = 0 - get_disc(ch,DISC_QUIETUS);
    af.duration  = number_range(1,2);
    af.bitvector = 0;
    affect_join( victim, &af );
    WAIT_STATE( ch, 12 );
    if (!IS_NPC(victim) && ch != victim && IS_MORE(victim, MORE_GUARDIAN))
    {
	guardian_message( victim );
	act("$n just used Infirmity on you.",ch,NULL,victim,TO_VICT);
    }
    return;
}

void do_bloodagony( CHAR_DATA *ch, char *argument )
{
    OBJ_DATA  *obj;
    char arg [MAX_INPUT_LENGTH];
    char buf [MAX_INPUT_LENGTH];

    argument = one_argument( argument, arg );

    if (IS_NPC(ch)) return;

    if (!IS_VAMPIRE(ch) && !IS_GHOUL(ch))
    {
	send_to_char( "Huh?\n\r", ch );
	return;
    }

    if (get_disc(ch,DISC_QUIETUS) < 4)
    {
	send_to_char("You require level 4 Quietus to use Blood Agony.\n\r",ch);
	return;
    }

    if (ch->pcdata->bpoints > 0)
    {
	if (ch->pcdata->bpoints > 1)
	    sprintf(buf,"You cannot use Blood Agony for another %d seconds.\n\r",ch->pcdata->bpoints);
	else
	    sprintf(buf,"You cannot use Blood Agony for another 1 second.\n\r");
	send_to_char(buf,ch);
	return;
    }

    if ( ch->blood[BLOOD_CURRENT] < 10 )
    {
	send_to_char("You have insufficient blood.\n\r",ch);
	return;
    }

    if ( arg[0] == '\0' )
    {
	send_to_char( "What weapon do you wish to use Blood Agony on?\n\r", ch );
	return;
    }

    if ( ( obj = get_obj_carry( ch, arg ) ) == NULL )
    {
	send_to_char( "You are not carrying that object.\n\r", ch );
	return;
    }

    if ( obj->item_type != ITEM_WEAPON )
    {
	send_to_char( "You may only use Blood Agony on a weapon.\n\r", ch );
	return;
    }

    if ( IS_SET(obj->quest, QUEST_BLOODAGONY) )
    {
	send_to_char( "This weapon is already covered in blood.\n\r", ch );
	return;
    }

    if ( IS_SET(obj->quest, QUEST_BLOODAGONY)
    ||   IS_SET(obj->quest, QUEST_ARTIFACT)
    ||   IS_SET(obj->quest, QUEST_RELIC)
    ||   obj->chobj != NULL )
    {
	send_to_char("You are unable to smear any blood on this weapon.\n\r",ch);
	return;
    }

    act("You cut open your wrist and smear some blood onto $p.",ch,obj,NULL,TO_CHAR);
    act("$n cuts open $s wrist and smears some blood onto $p.",ch,obj,NULL,TO_ROOM);
    SET_BIT(obj->quest, QUEST_BLOODAGONY);
    ch->blood[BLOOD_CURRENT] -= 10;
    ch->pcdata->bpoints = 60;

    if ( obj->spectype == 0 || obj->spectype == SITEM_SILVER )
    {
	SET_BIT(obj->spectype, SITEM_MESSAGE);
	free_string(obj->chpoweruse);
	obj->chpoweruse = str_dup( "A few drops of blood drip from $p." );
	free_string(obj->victpoweruse);
	obj->victpoweruse = str_dup( "A few drops of blood drip from $p carried by $n." );
	obj->specpower = ch->specpower = get_disc(ch, DISC_QUIETUS) << 2;
    }

    return;
}

void do_spit( CHAR_DATA *ch, char *argument )
{
    char arg [MAX_INPUT_LENGTH];
    CHAR_DATA *victim;
    OBJ_DATA *obj_lose;
    OBJ_DATA *obj_next;
    int dam;

    one_argument( argument, arg );

    if (IS_NPC(ch)) return;

    if (!IS_VAMPIRE(ch) && !IS_GHOUL(ch))
    {
	send_to_char( "Huh?\n\r", ch );
	return;
    }

    if (get_disc(ch,DISC_QUIETUS) < 5)
    {
	send_to_char("You require level 5 Quietus to use Taste of Death.\n\r",ch);
	return;
    }

    if (IS_ITEMAFF(ch, ITEMA_PEACE)) do_majesty(ch,"");

    if (arg[0] == '\0' && ch->fighting == NULL)
    {
	send_to_char("Who do you wish to use Taste of Death on?\n\r",ch);
	return;
    }

    if ( ( victim = ch->fighting ) == NULL )
    {
	if ( ( victim = get_char_room( ch, arg ) ) == NULL )
	{
	    send_to_char( "They aren't here.\n\r", ch );
	    return;
	}
    }

/* Morglum : Stop people using spit on themselves */
    if ( ch == victim )
    {
	send_to_char( "1 agg, 2 agg, 3 agg, DEAD!\n\r", ch );
	return;
    }

    if (is_safe(ch,victim))
    {
	if (!IS_NPC(victim) && ch != victim && IS_MORE(victim, MORE_GUARDIAN))
	{
	    guardian_message( victim );
	    act("$n just failed to use Taste of Death on you.",ch,NULL,victim,TO_VICT);
	}
	return;
    }

    WAIT_STATE( ch, 12 );

    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 * get_disc(ch,DISC_POTENCE) * 0.5;
    else if ( !IS_NPC(ch) && IS_DEMON(ch) && 
	IS_SET(ch->pcdata->disc[C_POWERS], DEM_MIGHT) )
	dam *= 1.5;

    if ( !IS_NPC(ch) ) dam = dam + (dam * ((ch->wpn[0]) * 0.01));

    if ( dam <= 0 )
	dam = 1;

    else
    	damage( ch, victim, dam, gsn_spit + TYPE_ADD_AGG );

    if ( number_percent( ) < get_disc(ch,DISC_QUIETUS) )
    {
	for (obj_lose = victim->carrying; obj_lose != NULL; obj_lose = obj_next)
	{
	    obj_next = obj_lose->next_content;

	    if ( IS_SET( obj_lose->quest, QUEST_SPELLPROOF ) )
		continue;

	    if ( IS_SET( obj_lose->quest, QUEST_RELIC )
	    ||	 IS_SET( obj_lose->quest, QUEST_ARTIFACT ) )
		continue;

	    if ( obj_lose->points > 0 )
		continue;

	    if ( number_bits( 2 ) != 0 )
		continue;

	    if ( obj_lose->wear_loc == WEAR_NONE )
		continue;

	    if ( obj_lose->item_type == ITEM_BOOK ||
		 obj_lose->item_type == ITEM_PAGE )
		continue;

	    switch ( obj_lose->item_type )
	    {
	    case ITEM_ARMOR:
		if ( obj_lose->condition > 0 )
		{
		    act( "$p is pitted and etched!",
			victim, obj_lose, NULL, TO_CHAR );
		    obj_lose->condition -= 25;
		    if ( obj_lose->condition < 1 )
			extract_obj( obj_lose );
		}
		break;

	    case ITEM_SCROLL:
	    case ITEM_WAND:
	    case ITEM_STAFF:
	    case ITEM_TRASH:
	    case ITEM_POTION:
	    case ITEM_FURNITURE:
	    case ITEM_FOOD:
	    case ITEM_BOAT:
	    case ITEM_PILL:
	    case ITEM_CORPSE_NPC:
	    case ITEM_DRINK_CON:
	    case ITEM_CONTAINER:
		act( "$p fumes and dissolves!",
		    victim, obj_lose, NULL, TO_CHAR );
		extract_obj( obj_lose );
		break;
	    }
	}
    }
    return;
}

void do_shadowbody( CHAR_DATA *ch, char *argument )
{
    char buf [MAX_STRING_LENGTH]; 

    if (IS_NPC(ch)) return;

    if (!IS_VAMPIRE(ch) && !IS_GHOUL(ch))
    {
	send_to_char("Huh?\n\r",ch);
	return;
    }

    if (get_disc(ch,DISC_OBTENEBRATION) < 3)
    {
	send_to_char("You require level 3 Obtenebration to transform into your Shadow Body.\n\r",ch);
	return;
    }

    if (IS_AFFECTED(ch, AFF_POLYMORPH))
    {
	if (IS_POLYAFF(ch, POLY_SHADOW))
	{
	    REMOVE_BIT(ch->polyaff, POLY_SHADOW);
	    REMOVE_BIT(ch->affected_by, AFF_ETHEREAL);
	}
	else
	{
	    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);
	clear_stats(ch);
  	free_string( ch->morph );
    	ch->morph = str_dup( "" );
    }
    else
    {
	if (ch->stance[0] != -1) do_stance(ch,"");
	if (ch->mounted == IS_RIDING) do_dismount(ch,"");
	act( "You transform into a black smoke.", ch, NULL, NULL, TO_CHAR );
	act( "$n transforms into a black smoke.", 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);
	}
	if (is_affected(ch, gsn_jail))
	{
	    act("The band of water entrapping $n splash to the ground.",ch,NULL,NULL,TO_ROOM);
	    send_to_char("The bands of water entrapping you splash to the ground.\n\r",ch);
	    affect_strip(ch, gsn_jail);
	}
	if (IS_AFFECTED(ch, AFF_JAIL))
	{
	    act("The band of water entrapping $n splash to the ground.",ch,NULL,NULL,TO_ROOM);
	    send_to_char("The bands of water entrapping you splash to the ground.\n\r",ch);
	    REMOVE_BIT(ch->affected_by, AFF_JAIL);
	}
	SET_BIT(ch->polyaff, POLY_SHADOW);
	clear_stats(ch);
	SET_BIT(ch->affected_by, AFF_POLYMORPH);
	SET_BIT(ch->affected_by, AFF_ETHEREAL);
	sprintf(buf, "%s the black smoke", ch->name);
    	free_string( ch->morph );
    	ch->morph = str_dup( buf );
    }
    return;
}

void do_arms( CHAR_DATA *ch, char *argument )
{
    CHAR_DATA *victim;
    char arg [MAX_INPUT_LENGTH];
    int sn;
    int level;
    int spelltype;

    argument = one_argument( argument, arg );

    if (IS_NPC(ch)) return;

    if (!IS_VAMPIRE(ch) && !IS_GHOUL(ch))
    {
	send_to_char("Huh?\n\r",ch);
	return;
    }

    if (get_disc(ch,DISC_OBTENEBRATION) < 2)
    {
	send_to_char("You require level 2 Obtenebration to use Arms of the Abyss.\n\r",ch);
	return;
    }

    if (IS_ITEMAFF(ch, ITEMA_PEACE)) do_majesty(ch,"");

    if (arg[0] == '\0' && ch->fighting == NULL)
    {
	send_to_char("Who do you wish to use the Arms of the Abyss on?\n\r",ch);
	return;
    }

    if ( ( victim = ch->fighting ) == NULL )
    {
	if ( ( victim = get_char_room( ch, arg ) ) == NULL )
	{
	    send_to_char( "They aren't here.\n\r", ch );
	    return;
	}
    }

    if ( ch == victim )
    {
	if (is_affected(ch, gsn_tendrils))
	{
	    act("The tendrils of darkness entrapping $n fall away.",ch,NULL,NULL,TO_ROOM);
	    send_to_char("The tendrils of darkness entrapping you fall away.\n\r",ch);
	    affect_strip(ch, gsn_tendrils);
	}
	else if (IS_AFFECTED(ch, AFF_SHADOW))
	{
	    act("The tendrils of darkness entrapping $n fall away.",ch,NULL,NULL,TO_ROOM);
	    send_to_char("The tendrils of darkness entrapping you fall away.\n\r",ch);
	    REMOVE_BIT(ch->affected_by, AFF_SHADOW);
	}
	else send_to_char( "Nothing happens.\n\r", ch );
	return;
    }

    if ( IS_AFFECTED(victim, AFF_ETHEREAL) )
    {
	send_to_char( "You cannot use Arms of the Abyss on an ethereal person.\n\r", ch );
	if (!IS_NPC(victim) && ch != victim && IS_MORE(victim, MORE_GUARDIAN))
	{
	    guardian_message( victim );
	    act("$n just failed to use Arms of the Abyss on you.",ch,NULL,victim,TO_VICT);
	}
	return;
    }

    if (is_safe(ch,victim))
    {
	if (!IS_NPC(victim) && ch != victim && IS_MORE(victim, MORE_GUARDIAN))
	{
	    guardian_message( victim );
	    act("$n just failed to use Arms of the Abyss on you.",ch,NULL,victim,TO_VICT);
	}
	return;
    }

    if ( ( sn = skill_lookup( "tendrils" ) ) < 0 ) return;
    spelltype = skill_table[sn].target;
    level = get_disc(ch,DISC_OBTENEBRATION) * 5;
    (*skill_table[sn].spell_fun) ( sn, level, ch, victim );
    WAIT_STATE( ch, 12 );
    return;
}

void power_ghoul( CHAR_DATA *ch, CHAR_DATA *victim )
{
    int sn, disc;
    bool enhanced = FALSE;
    bool gain_disc;

    if ( IS_NPC(ch) || IS_NPC(victim) || !IS_HERO(victim) || !IS_VAMPIRE(ch)) 
	return;
    if (victim->class == CLASS_NONE) victim->class = CLASS_GHOUL;
    else if (victim->class != CLASS_GHOUL) return;
    for ( sn = 0; sn <= DISC_MAX; sn++ )
    {
	gain_disc = TRUE;
	switch ( sn )
	{
	    case DISC_ANIMALISM:
	    case DISC_AUSPEX:
	    case DISC_CELERITY:
	    case DISC_DOMINATE:
	    case DISC_FORTITUDE:
	    case DISC_OBFUSCATE:
	    case DISC_POTENCE:
	    case DISC_PRESENCE:
	    case DISC_PROTEAN:
	    case DISC_SERPENTIS:
	    case DISC_THAUMATURGY:
	    case DISC_VICISSITUDE:
		break;
	    default:
		gain_disc = FALSE;
		break;
	}
	if (!gain_disc) continue;
	if (ch->pcdata->powers[sn] > 0)
	    disc = (1 + ch->pcdata->powers[sn]) * 0.5;
	else disc = 0;

	if (disc > victim->pcdata->powers[sn])
	{
	    victim->pcdata->powers[sn] = disc;
	    enhanced = TRUE;
	}
    }

    if (enhanced)
	send_to_char("You feel the potency of the blood run through your body.\n\r",victim);

    return;
}

void do_lamprey( CHAR_DATA *ch, char *argument )
{
    CHAR_DATA *victim;
    char arg [MAX_INPUT_LENGTH];
    int level, dam;
    int blood = number_range(1,10);

    argument = one_argument( argument, arg );

    if (IS_NPC(ch)) return;

    if (!IS_VAMPIRE(ch) && !IS_GHOUL(ch))
    {
	send_to_char("Huh?\n\r",ch);
	return;
    }

    if (get_disc(ch,DISC_OBTENEBRATION) < 4)
    {
	send_to_char("You require level 4 Obtenebration to Call the Lamprey.\n\r",ch);
	return;
    }

    if (IS_ITEMAFF(ch, ITEMA_PEACE)) do_majesty(ch,"");

    if (arg[0] == '\0' && ch->fighting == NULL)
    {
	send_to_char("Who do you wish to Call the Lamprey on?\n\r",ch);
	return;
    }

    if ( ( victim = ch->fighting ) == NULL )
    {
	if ( ( victim = get_char_room( ch, arg ) ) == NULL )
	{
	    send_to_char( "They aren't here.\n\r", ch );
	    return;
	}
    }

    if ( ch == victim )
    {
	send_to_char( "That would not be a good idea.\n\r", ch );
	return;
    }

    if ( IS_AFFECTED(victim, AFF_ETHEREAL) )
    {
	send_to_char( "You cannot Call the Lamprey on an ethereal person.\n\r", ch );
	if (!IS_NPC(victim) && ch != victim && IS_MORE(victim, MORE_GUARDIAN))
	{
	    guardian_message( victim );
	    act("$n just failed to use Call the Lamprey on you.",ch,NULL,victim,TO_VICT);
	}
	return;
    }

    if (is_safe(ch,victim))
    {
	if (!IS_NPC(victim) && ch != victim && IS_MORE(victim, MORE_GUARDIAN))
	{
	    guardian_message( victim );
	    act("$n just failed to use Call the Lamprey on you.",ch,NULL,victim,TO_VICT);
	}
	return;
    }

    level = get_disc(ch,DISC_OBTENEBRATION) * 5;
    dam = blood * get_disc(ch,DISC_OBTENEBRATION) * level;
    damage(ch,victim,dam,gsn_tendrils);

    if (victim == NULL || victim->position == POS_DEAD) return;

    if ( victim->blood[BLOOD_CURRENT] < blood )
	blood = victim->blood[BLOOD_CURRENT];

    victim->blood[BLOOD_CURRENT] -= blood;
    ch->blood[BLOOD_CURRENT] += (blood * victim->blood[BLOOD_POTENCY]);
    if (ch->blood[BLOOD_CURRENT] >= ch->blood[BLOOD_POOL])
    {
	ch->blood[BLOOD_CURRENT] = ch->blood[BLOOD_POOL];
	if (IS_VAMPIRE(ch)) send_to_char("Your blood lust is sated.\n\r",ch);
    }
    if (IS_NPC(victim) || !IS_VAMPIRE(victim))
    {
	power_ghoul(victim,ch);
	if (!IS_NPC(ch) && ch->pcdata->dpoints < (victim->blood[2] * 1000))
	{
	    ch->pcdata->dpoints += (blood * 60);
	    if (ch->pcdata->dpoints > (victim->blood[2] * 100))
		ch->pcdata->dpoints = (victim->blood[2] * 100);
	}
	if (victim->blood[0] > 0 && victim->blood[0] <= 50)
	{
	    act("$n sways weakly from bloodloss.",victim,NULL,NULL,TO_ROOM);
	    send_to_char("You feel weak from bloodloss.\n\r",victim);
	}
	else if (victim->blood[0] < 1)
	{
	    act("$n's body falls limply to the ground.",victim,NULL,NULL,TO_ROOM);
	    group_gain(ch,victim);
	    victim->form = 3;
	    killperson(ch,victim);
	    WAIT_STATE( ch, 12 );
	    return;
	}
    }
    if (IS_NPC(victim)) do_kill(victim,ch->name);
    WAIT_STATE( ch, 12 );
    return;
}

void do_thanatopsis( CHAR_DATA *ch, 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 (IS_NPC(ch)) return;

    if (!IS_VAMPIRE(ch) && !IS_GHOUL(ch))
    {
	send_to_char( "Huh?\n\r", ch );
	return;
    }

    if (get_disc(ch,DISC_NECROMANCY) < 1)
    {
	send_to_char("You require level 1 Necromancy to perform Thanatopsis on a corpse.\n\r",ch);
	return;
    }

    if ( arg[0] == '\0' )
    {
	send_to_char( "What do you wish to perform Thanatopsis on?\n\r", ch );
	return;
    }

    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 (strlen(obj->questmaker) < 1 || strlen(obj->questowner) < 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,obj->questmaker);
    send_to_char(buf,ch);

    if ( ( location = ch->in_room ) == NULL )
    {
	send_to_char("Bug - Please inform Morglum.\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);
	send_to_char(buf,ch);
    }
    else
    {
	if (location == pRoomIndex)
	    sprintf(buf,"It seems that %s was killed right here.\n\r", obj->questowner);
	else
	{
	    char_from_room(ch);
	    char_to_room(ch,pRoomIndex);
	    sprintf(buf,"It seems that %s was killed at %s.\n\r", obj->questowner, ch->in_room->name);
	    char_from_room(ch);
	    char_to_room(ch,location);
	}
	send_to_char(buf,ch);
    }

    return;
}

void do_spiritgate( CHAR_DATA *ch, char *argument )
{
    OBJ_DATA  *corpse;
    OBJ_DATA  *obj;
    ROOM_INDEX_DATA *pRoomIndex;
    ROOM_INDEX_DATA *location;
    char       arg [MAX_INPUT_LENGTH];
    int        duration, destination;

    one_argument( argument, arg );

    if (IS_NPC(ch)) return;

    if (!IS_VAMPIRE(ch) && !IS_GHOUL(ch))
    {
	send_to_char("Huh?\n\r",ch);
	return;
    }

    if (get_disc(ch,DISC_NECROMANCY) < 3)
    {
	send_to_char("You require level 3 Necromancy to create a Spirit Gate.\n\r",ch);
	return;
    }

    if ( arg[0] == '\0')
    {
	send_to_char( "Which corpse do you wish to use to make a Spirit Gate?\n\r", ch );
	return;
    }

    if ( ( corpse = get_obj_here( ch, arg ) ) == NULL )
    {
	send_to_char( "You cannot seem to find that object.\n\r", ch );
	return;
    }

    if (corpse->item_type == ITEM_CORPSE_PC)
    {
	send_to_char( "Not on that type of corpse.\n\r", ch );
	return;
    }

    if (corpse->item_type != ITEM_CORPSE_NPC)
    {
	send_to_char( "That isn't a corpse.\n\r", ch );
	return;
    }

    duration = number_range(2,3) * 15;

    if ( ( location = ch->in_room ) == NULL )
    {
	send_to_char("Bug - Please inform Morglum.\n\r",ch);
	return;
    }
    if ( ( pRoomIndex = get_room_index(corpse->specpower) ) == NULL )
    {
	send_to_char("Nothing happens.\n\r",ch);
	return;
    }
    if (location == pRoomIndex)
    {
	send_to_char("Nothing happens.\n\r",ch);
	return;
    }

    destination = ch->in_room->vnum;

    obj = create_object( get_obj_index( OBJ_VNUM_PORTAL ), 0 );
    obj->value[0] = corpse->specpower;
    obj->value[3] = destination;
    obj->timer = duration;
    free_string(obj->name);
    obj->name = str_dup("spirit gate portal");
    free_string(obj->short_descr);
    obj->short_descr = str_dup("a spirit gate");
    free_string(obj->description);
    obj->description = str_dup("A glowing spirit gate floats here.");
    if (IS_AFFECTED(ch,AFF_SHADOWPLANE))
	obj->extra_flags = ITEM_SHADOWPLANE;
    obj_to_room( obj, location );
    act( "$p shimmers into existance in front of $n.", ch, obj, NULL, TO_ROOM );
    act( "$p shimmers into existance in front of you.", ch, obj, NULL, TO_CHAR );

    char_from_room(ch);
    char_to_room(ch,pRoomIndex);

    obj = create_object( get_obj_index( OBJ_VNUM_PORTAL ), 0 );
    obj->value[0] = destination;
    obj->value[3] = corpse->specpower;
    obj->timer = duration;
    free_string(obj->name);
    obj->name = str_dup("spirit gate portal");
    free_string(obj->short_descr);
    obj->short_descr = str_dup("a spirit gate");
    free_string(obj->description);
    obj->description = str_dup("A glowing spirit gate floats here.");
    if (IS_AFFECTED(ch,AFF_SHADOWPLANE))
	obj->extra_flags = ITEM_SHADOWPLANE;
    obj_to_room( obj, ch->in_room );
    act( "$p shimmers into existance.", ch, obj, NULL, TO_ROOM );

    char_from_room(ch);
    char_to_room(ch,location);

    act("$p crumbles to dust.",ch,corpse,NULL,TO_CHAR);
    act("$n crumbles to dust.",ch,corpse,NULL,TO_ROOM);
    extract_obj(corpse);
    return;
}

void do_preservation( CHAR_DATA *ch, char *argument )
{
    OBJ_DATA *obj;
    char arg[MAX_INPUT_LENGTH];
    char buf[MAX_INPUT_LENGTH];

    one_argument( argument, arg );

    if (IS_NPC(ch)) return;

    if (!IS_VAMPIRE(ch) && !IS_GHOUL(ch))
    {
	send_to_char( "Huh?\n\r", ch );
	return;
    }

    if (get_disc(ch,DISC_NECROMANCY) < 2)
    {
	send_to_char("You require level 2 Necromancy to perform Preservation.\n\r",ch);
	return;
    }

    if ( arg[0] == '\0' )
    {
	send_to_char( "What do you wish to perform Preservation on?\n\r", ch );
	return;
    }

    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] *= 0.5;
	ch->carry_weight -= obj->weight;
	if (obj->weight > 1) obj->weight *= 0.5;
	ch->carry_weight += obj->weight;
	obj->timer = -1;
    }
    else if (obj->item_type == ITEM_CORPSE_NPC)
    {
	if (strlen(obj->questowner) < 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);

	free_string(obj->short_descr);
	sprintf(buf, "the shriveled up corpse of %s",obj->questowner);
	obj->short_descr = str_dup(buf);

	free_string(obj->description);
	sprintf(buf, "The shriveled up corpse of %s is lying here.",obj->questowner);
	obj->description = str_dup(buf);

	ch->carry_weight -= obj->weight;
	if (obj->weight > 1) 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 do_zombie( CHAR_DATA *ch, char *argument )
{
    char arg [MAX_INPUT_LENGTH];
    char buf [MAX_STRING_LENGTH];
    OBJ_DATA		*obj;
    OBJ_DATA		*obj_content;
    OBJ_DATA		*obj_next;
    CHAR_DATA		*victim;
    MOB_INDEX_DATA	*pMobIndex;
    AFFECT_DATA af;
    int sn;

    one_argument( argument, arg );

    if (IS_NPC(ch)) return;

    if (!IS_VAMPIRE(ch) && !IS_GHOUL(ch))
    {
	send_to_char( "Huh?\n\r", ch );
	return;
    }

    if (get_disc(ch,DISC_NECROMANCY) < 5)
    {
	send_to_char("You require level 5 Necromancy to transform a corpse into a Zombie.\n\r",ch);
	return;
    }

    if (ch->pcdata->necromancy > 0)
    {
	if (ch->pcdata->necromancy > 1)
	    sprintf(buf,"You cannot animate a Zombie for another %d seconds.\n\r",ch->pcdata->necromancy);
	else
	    sprintf(buf,"You cannot animate a Zombie for another 1 second.\n\r");
	send_to_char(buf,ch);
	return;
    }

    if ( arg[0] == '\0' )
    {
	send_to_char( "What do you wish to animate as a Zombie?\n\r", ch );
	return;
    }

    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)
    {
	send_to_char( "You cannot animate that as a Zombie.\n\r", ch );
	return;
    }

    if (obj->in_room == NULL)
    {
	send_to_char( "You better drop it first...don't want the little bugger animating in your pants.\n\r", ch );
	return;
    }

    act( "A look of concentration crosses $n's face.", ch, NULL, NULL, TO_ROOM );

    if ( ( pMobIndex = get_mob_index( obj->value[2] ) ) == NULL )
    {
	send_to_char( "Nothing happens.\n\r", ch );
	return;
    }

    victim = create_mobile( pMobIndex );

    if (victim->level > 200) victim->level = 200;
    victim->hitroll = victim->level;
    victim->damroll = victim->level;

    char_to_room(victim,ch->in_room);
    sprintf(buf,"The zombie of %s stands here.\n\r",victim->short_descr);
    free_string(victim->long_descr);
    victim->long_descr = str_dup(buf);
    sprintf(buf,"zombie %s",victim->name);
    free_string(victim->name);
    victim->name = str_dup(buf);
    sprintf(buf,"the zombie of %s",victim->short_descr);
    free_string(victim->short_descr);
    victim->short_descr = str_dup(buf);
    act("$n clambers to $s feet.",victim,NULL,NULL,TO_ROOM);
    free_string(victim->powertype);
    victim->powertype = str_dup("zombie");
    for ( obj_content = obj->contains; obj_content != NULL; obj_content = obj_next )
    {
	obj_next = obj_content->next_content;
	obj_from_obj(obj_content);
	obj_to_char(obj_content,victim);
    }
    extract_obj(obj);
    do_wear(victim,"all");

    ch->pcdata->necromancy = 60;

    if (ch->pcdata->followers > 4) return;

    free_string(victim->lord);
    victim->lord = str_dup(ch->name);

    ch->pcdata->followers++;

    if ( ( sn = skill_lookup( "charm person" ) ) < 0 )
    {
	send_to_char( "Bug - please inform Morglum.\n\r", ch );
	return;
    }

    add_follower( victim, ch );
    af.type      = sn;
    af.duration  = 5000;
    af.location  = APPLY_NONE;
    af.modifier  = 0;
    af.bitvector = AFF_CHARM;
    affect_to_char( victim, &af );

    return;
}

void do_hagswrinkles( CHAR_DATA *ch, char *argument )
{
    CHAR_DATA *victim;
    char      arg [MAX_INPUT_LENGTH];
    char      buf [MAX_STRING_LENGTH];

    argument = one_argument( argument, arg );

    if (IS_NPC(ch)) return;

    if ( get_disc(ch,DISC_THANATOSIS) < 1
    &&	 get_tribe(ch,TRIBE_BLACK_FURIES) < 4 )
    {
	send_to_char( "Huh?\n\r", ch );
	return;
    }

    if ( arg[0] == '\0' )
    {
	send_to_char( "Change to look like whom?\n\r", ch );
	return;
    }

Showing the first 100 KB of 218.8 KB. Download the archive for the full file.

Site Stats

Snippets: 1791
Codebases: 571