angel.c
demise/src/angel.c · 56.3 KB
From the archive dodbackup-final.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. *
***************************************************************************/
#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "merc.h"
/*************************************************************************
* Filename: Angel.c *
* Function: Angel class for 'Dark Realities' MUD. *
* Started by: Malstar, who copyed the quickening system *
* Coder: Corim, ranks and actual powers, and mysql *
* Credits: Thanks to Twist, Xymos, Xanthos and Tyrael for ideas. *
*************************************************************************/
void
do_warp (CHAR_DATA * ch, char *argument)
{
char buf[MSL];
int warp, max, cost;
if (IS_NPC (ch))
return;
if (!IS_ANGELW (ch))
{
send_to_char ("Huh?\n\r", ch);
return;
}
if (!IS_BETRAYER (ch))
{
if (ch->arank == 0)
{
max = 4;
warp = number_range (1, 4);
}
else if (ch->arank == 1)
{
max = 6;
warp = number_range (5, 6);
}
else if (ch->arank == 2)
{
max = 8;
warp = number_range (7, 8);
}
else if (ch->arank == 3)
{
max = 11;
warp = number_range (9, 11);
}
else if (ch->arank == 4)
{
max = 14;
warp = number_range (12, 14);
}
else
{
max = 14;
warp = number_range (1, 14);
}
}
else
{
if (ch->arank == 0)
{
max = 4;
warp = number_range (1, 4);
}
else if (ch->arank == 1)
{
max = 6;
warp = number_range (5, 6);
}
else if (ch->arank == 2)
{
max = 8;
warp = number_range (7, 8);
}
else if (ch->arank == 3)
{
max = 11;
warp = number_range (15, 17);
}
else if (ch->arank == 4)
{
max = 14;
warp = number_range (18, 20);
}
else
{
max = 14;
warp = number_range (1, 20);
if (warp == 9)
warp = 15;
if (warp == 10)
warp = 16;
if (warp == 11)
warp = 17;
if (warp == 12)
warp = 18;
if (warp == 13)
warp = 19;
if (warp == 14)
warp = 20;
//If you dont understand this, leave it alone! Corim
}
}
if (ch->apwrcnt >= 14)
{
send_to_char
("You have already enwarped as many times as possible!\n\r", ch);
return;
}
if (ch->apwrcnt >= max)
{
send_to_char
("You have already enwarped as many times as possible at your rank!\n\r",
ch);
return;
}
cost = (ch->apwrcnt + 1 * 15);
if (ch->practice < cost)
{
sprintf (buf,
"You need another %d primal power before enwarping another gift!\n\r",
(cost - ch->practice));
send_to_char (buf, ch);
return;
}
ch->practice -= cost;
add_warp (ch, warp);
return;
}
int
get_purity (CHAR_DATA * ch)
{
int pure = 0;
if (IS_RNPC (ch) || !IS_ANGELW (ch))
return pure;
if (IS_SET (ch->apowers, APOWER_PURE1))
pure++;
if (IS_SET (ch->apowers, APOWER_PURE2))
pure++;
if (IS_SET (ch->apowers, APOWER_PURE3))
pure++;
if (IS_BETRAYER (ch) && IS_SET (ch->apowers, APOWER_PURE4))
REMOVE_BIT(ch->apowers, APOWER_PURE4);
if (IS_BETRAYER (ch) && IS_SET (ch->apowers, APOWER_PURE5))
REMOVE_BIT(ch->apowers, APOWER_PURE5);
if (IS_SET (ch->apowers, APOWER_PURE4))
pure++;
if (IS_SET (ch->apowers, APOWER_PURE5))
pure++;
return pure;
}
void
add_warp (CHAR_DATA * ch, int value)
{
char buf[MSL];
char str[MSL];
int bit;
if (IS_NPC (ch))
return;
if (value == 0)
return;
switch (value)
{
case 1:
sprintf (buf, "Supreme Vision");
bit = APOWER_VISION;
break;
case 2:
sprintf (buf, "Angelic Halo");
bit = APOWER_HALOBLESS;
break;
case 3:
sprintf (buf, "Angel Form");
bit = APOWER_ANGELFORM;
break;
case 4:
sprintf (buf, "Sword Form");
bit = APOWER_SWORDFORM;
break;
case 5:
sprintf (buf, "Prayer");
bit = APOWER_PRAYER;
break;
case 6:
sprintf (buf, "Angel Gate");
bit = APOWER_ANGELGATE;
break;
case 7:
sprintf (buf, "Celestial Speed");
bit = APOWER_GODLYSPEED;
break;
case 8:
sprintf (buf, "Cherub");
bit = APOWER_CHERUB;
break;
case 9:
sprintf (buf, "Obeah");
bit = APOWER_OBEAH;
break;
case 10:
sprintf (buf, "Lights Crusader");
bit = APOWER_CRUSADER;
break;
case 11:
sprintf (buf, "Righteous Voice");
bit = APOWER_RIGHTEOUS;
break;
case 12:
sprintf (buf, "Justice Protection");
bit = APOWER_JUSTICE;
break;
case 13:
sprintf (buf, "Confrontation");
bit = APOWER_CONFRONT;
break;
case 14:
sprintf (buf, "Retaliation");
bit = APOWER_HOUSE;
break;
case 15:
sprintf (buf, "Chaosshroud");
bit = APOWER_CHAOSSHROUD;
break;
case 16:
sprintf (buf, "Chaos Claws");
bit = APOWER_CHAOSCLAWS;
break;
case 17:
sprintf (buf, "Fury Strike");
bit = APOWER_CHAOSSTRIKE;
break;
case 18:
sprintf (buf, "Final Stand");
bit = APOWER_FINALSTAND;
break;
case 19:
sprintf (buf, "Tattoo");
bit = APOWER_TATTOO;
break;
case 20:
sprintf (buf, "Conscience");
bit = APOWER_CONSCIENCE;
break;
}
if (IS_SET (ch->apowers, bit))
{
if (IS_BETRAYER (ch))
{
if (ch->arank == 0)
add_warp (ch, number_range (1, 4));
else if (ch->arank == 1)
add_warp (ch, number_range (5, 6));
else if (ch->arank == 2)
add_warp (ch, number_range (7, 8));
else if (ch->arank == 3)
add_warp (ch, number_range (15, 17));
else if (ch->arank == 4)
add_warp (ch, number_range (18, 20));
else
{
int warp;
warp = number_range (1, 20);
if (warp == 9)
warp = 15;
if (warp == 10)
warp = 16;
if (warp == 11)
warp = 17;
if (warp == 12)
warp = 18;
if (warp == 13)
warp = 19;
if (warp == 14)
warp = 20;
add_warp (ch, warp);
//If you dont understand this, leave it alone! Corim
}
return;
}
else
{
if (ch->arank == 0)
add_warp (ch, number_range (1, 4));
else if (ch->arank == 1)
add_warp (ch, number_range (5, 6));
else if (ch->arank == 2)
add_warp (ch, number_range (7, 8));
else if (ch->arank == 3)
add_warp (ch, number_range (9, 11));
else if (ch->arank == 4)
add_warp (ch, number_range (12, 14));
else
add_warp (ch, number_range (1, 14));
return;
}
}
sprintf (str,
"Your body glows with intense light, as you gain the knowledge of %s.\n\r",
buf);
send_to_char (str, ch);
SET_BIT (ch->apowers, bit);
if (bit == APOWER_OBEAH)
{
do_train (ch, "");
stc ("Dont forget to Train your Obeah.\n\r", ch);
}
ch->apwrcnt++;
return;
}
void
do_purity (CHAR_DATA * ch, char *argument)
{
char arg[MIL];
char buf[MSL];
int pure = 0;
int cost = 0;
int rank = 0;
int bit = 0;
one_argument (argument, arg);
if (IS_RNPC (ch))
return;
if (!IS_ANGELW (ch) && !IS_CREATOR (ch))
{
do_huh (ch, "");
return;
}
pure = get_purity (ch);
rank = ch->arank;
rank += 1;
if (arg[0] == '\0' || pure > 4 || IS_CREATOR (ch) && !IS_ANGELW (ch) || IS_BETRAYER (ch) && pure > 2)
{
send_to_char
("#7-----------------------------------------------------------------#n\n\r",
ch);
send_to_char
("#y ^^#7 Angelic Purity#y ^^#n \n\r",
ch);
send_to_char
("#7-----------------------------------------------------------------#n\n\r",
ch);
if (pure < 1)
stc ("#7You are no more pure then any other creature.#n\n\r", ch);
if (pure > 0)
stc ("#7Your purity allows you to call upon your Angelic Wrath (awrath).#n\n\r", ch);
if (pure > 1)
stc ("#7You are surrounded by a swirl of feathers that burns the wicked.#n\n\r", ch);
if (pure > 2)
stc ("#7You can purify the souls of your enemies (holypurify).#n\n\r", ch);
if (pure > 3)
stc ("#7.#n\n\r", ch);
if (pure > 4)
stc ("#7.#n\n\r", ch);
if (IS_BETRAYER (ch))
{
if (pure < 3)
stc ("#7Syntax to Purify your Aura further: purity improve.#n\n\r", ch);
}
else if (pure < rank)
{
stc ("#7Syntax to Purify your Aura further: purity improve.#n\n\r", ch);
}
send_to_char
("#7-----------------------------------------------------------------#n\n\r",
ch);
return;
}
else if (!str_cmp (arg, "improve"))
{
cost = (pure + 1) * 10000;
if (pure >= rank)
{
stc ("#7You need to Ascend before you can Purify your Aura any further.#n\n\r", ch);
return;
}
if (ch->pcdata->power[POWER_CURRENT] < cost)
{
sprintf (buf, "#7You need#y %d#7 more %s#7 Power Points before you can improve your purity.#n\n\r", (cost - ch->pcdata->power[POWER_CURRENT]), get_class (ch));
stc (buf, ch);
return;
}
if (pure > 4)
{
stc ("Bug, Tell Corim!", ch);
return;
}
else if (pure > 3)
bit = APOWER_PURE5;
else if (pure > 2)
bit = APOWER_PURE4;
else if (pure > 1)
bit = APOWER_PURE3;
else if (pure > 0)
bit = APOWER_PURE2;
else if (pure < 1)
bit = APOWER_PURE1;
else
{
stc ("Bug, Tell Corim!", ch);
return;
}
if (!IS_SET (ch->apowers, bit))
SET_BIT (ch->apowers, bit);
ch->pcdata->power[POWER_CURRENT] -= cost;
stc ("#7You shine brightly as you Purify your Aura.#n\n\r", ch);
act ("$n#7 shines brightly for a few seconds.", ch, NULL, NULL, TO_ROOM);
return;
}
else
{
do_purity (ch, "");
return;
}
return;
}
void
do_angelpowers (CHAR_DATA * ch, char *argument)
{
if (IS_NPC (ch))
return;
if (!IS_ANGELW (ch))
{
send_to_char ("Huh?\n\r", ch);
return;
}
send_to_char
("-----------------------------------------------------------------\n\r",
ch);
send_to_char
(" ^^ Angelic Upkeep ^^ \n\r",
ch);
send_to_char
("-----------------------------------------------------------------\n\r",
ch);
if (ch->apwrcnt == 0)
{
send_to_char ("You haven't enwarped any gifts!\n\r", ch);
send_to_char
("-----------------------------------------------------------------\n\r",
ch);
return;
}
if (IS_SET (ch->apowers, APOWER_VISION))
send_to_char ("Supreme Vision: Heighten, Readaura, Scry.\n\r", ch);
if (IS_SET (ch->apowers, APOWER_ANGELFORM))
send_to_char ("Angelform: Turn into the true crusader of Light.\n\r", ch);
if (IS_SET (ch->apowers, APOWER_GODLYSPEED))
send_to_char ("Celestial Speed: You are moving with an holy speed.\n\r",
ch);
if (IS_SET (ch->apowers, APOWER_SWORDFORM))
send_to_char ("Sword form: Turn into the blessed golden sword.\n\r", ch);
if (IS_SET (ch->apowers, APOWER_PRAYER))
send_to_char
("Prayer: Send a prayer to the Light for the strength to punish the wicked.\n\r",
ch);
if (IS_SET (ch->apowers, APOWER_CHERUB))
send_to_char
("Cherub: A creature who can warn you of different things.\n\r", ch);
if (IS_SET (ch->apowers, APOWER_OBEAH))
send_to_char ("Panacea: Heal up wounds of goodaligned warriors.\n\r", ch);
if (IS_SET (ch->apowers, APOWER_OBEAH2))
send_to_char ("Anestetic Touch: Stop pain from affecting you.\n\r", ch);
if (IS_SET (ch->apowers, APOWER_OBEAH3))
send_to_char ("Unburden: Help Vampire's lose their beast.\n\r", ch);
if (IS_SET (ch->apowers, APOWER_OBEAH4))
send_to_char ("Neutral: Neutral the room.\n\r", ch);
if (IS_SET (ch->apowers, APOWER_OBEAH5))
send_to_char ("Renew: Fully heal any warrior.\n\r", ch);
if (IS_SET (ch->apowers, APOWER_ANGELGATE))
send_to_char ("Angelgate: Open an golden gate to victims.\n\r", ch);
if (IS_SET (ch->apowers, APOWER_CRUSADER))
send_to_char
("Lights Crusader: Gives you bonus to hitroll and damroll (auto).\n\r",
ch);
if (IS_SET (ch->apowers, APOWER_HOUSE))
send_to_char
("Retaliation: Eye for an eye, deal wounds back onto them who would wound you.\n\r",
ch);
if (IS_SET (ch->apowers, APOWER_RIGHTEOUS))
send_to_char
("Righteous voice: Speak frightening words unstancing victims.\n\r",
ch);
if (IS_SET (ch->apowers, APOWER_JUSTICE))
send_to_char
("Justice Protection: Give weapons protection of justice.\n\r", ch);
if (IS_SET (ch->apowers, APOWER_CONFRONT))
send_to_char ("Confrontation: Confront victims with their past sins.\n\r",
ch);
if (IS_SET (ch->apowers, APOWER_HALOBLESS))
send_to_char ("Halo: Form you Halo of Sunlight.\n\r", ch);
send_to_char
("-----------------------------------------------------------------\n\r",
ch);
return;
}
void
do_prayer (CHAR_DATA * ch, char *argument)
{
if (IS_NPC (ch))
return;
if (!IS_ANGELW (ch))
{
do_huh (ch, "");
return;
}
if (!IS_SET (ch->apowers, APOWER_PRAYER))
{
stc ("You haven't enwarped this gift.\n\r", ch);
return;
}
if (IS_COR (ch, COR_PRAYER))
{
stc ("You already have been granted extra strength from the Light.\n\r",
ch);
return;
}
stc ("You pray to the Light, and you are granted extra strength.\n\r", ch);
SET_BIT (ch->corbits, COR_PRAYER);
return;
}
void
do_swordform (CHAR_DATA * ch, char *argument)
{
OBJ_DATA *obj;
if (IS_NPC (ch))
return;
if (!IS_ANGELW (ch))
{
send_to_char ("Huh?\n\r", ch);
return;
}
if (!IS_SET (ch->apowers, APOWER_SWORDFORM))
{
send_to_char ("You haven't enwarped this gift.\n\r", ch);
return;
}
else if (IS_AFFECTED (ch, AFF_POLYMORPH))
{
send_to_char ("You cannot do this while polymorphed.\n\r", ch);
return;
}
if (has_artifact (ch))
{
stc ("Not with an artifact.\n\r", ch);
return;
}
if (has_fighttimer (ch))
return;
if ((obj =
create_object (get_obj_index (OBJ_VNUM_ANGELICSWORD), 60)) == NULL)
{
send_to_char ("You don't have the ability to change into a weapon.\n\r",
ch);
return;
}
if (IS_AFFECTED (ch, AFF_WEBBED))
{
send_to_char ("Not with all this sticky webbing on.\n\r", ch);
return;
}
obj_to_room (obj, ch->in_room);
SET_BIT (obj->quest, QUEST_VANISH);
act ("$n transforms into $p and falls to the ground.", ch, obj, NULL,
TO_ROOM);
act ("You transform into $p and fall to the ground.", ch, obj, NULL,
TO_CHAR);
ch->pcdata->obj_vnum = OBJ_VNUM_ANGELICSWORD;
obj->chobj = ch;
ch->pcdata->chobj = obj;
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
do_righteous (CHAR_DATA * ch, char *argument)
{
CHAR_DATA *victim;
if (!IS_ANGELW (ch))
{
stc ("Huh?\n\r", ch);
return;
}
if (!IS_SET (ch->apowers, APOWER_RIGHTEOUS))
{
send_to_char ("You haven't enwarped this gift.\n\r", ch);
return;
}
if (argument[0] == '\0')
{
stc ("Who do you wish to speak with righteous voice to?\n\r", ch);
return;
}
if ((victim = get_char_room (ch, argument)) == NULL)
{
stc ("They aren't here.\n\r", ch);
return;
}
waiting (ch, 10);
if (number_range (1, 4) > 1)
{
waiting (victim, 15);
do_say (ch, "Contice morte de Dembella!");
do_stance (victim, "");
return;
}
do_say (ch, "Contice morte de Dembella!");
send_to_char ("Nothing happens.\n\r", ch);
return;
}
void
do_justice (CHAR_DATA * ch, char *argument)
{
OBJ_DATA *obj;
if (!IS_ANGELW (ch))
{
stc ("Huh?\n\r", ch);
return;
}
if (!IS_SET (ch->apowers, APOWER_JUSTICE))
{
send_to_char ("You haven't enwarped this gift.\n\r", ch);
return;
}
if (argument[0] == '\0')
{
send_to_char
("Which item do you wish to give justice protection to?\n\r", ch);
return;
}
if ((obj = get_obj_carry (ch, argument)) == NULL)
{
send_to_char ("You are not carrying that item.\n\r", ch);
return;
}
if (ch->pcdata->crystal < 5)
{
send_to_char ("You dont have the required 5 power crystals\n\r", ch);
return;
}
if (obj->item_type != ITEM_WEAPON)
{
send_to_char ("That is not a weapon!\n\r", ch);
return;
}
if (IS_SET (obj->extra_flags, ITEM_VANISH))
{
stc ("Not on Illusions.\n\r", ch);
return;
}
if (IS_WEAP (obj, WEAPON_HOLY))
{
act ("$p is already holy.", ch, obj, NULL, TO_CHAR);
return;
}
act ("$p bursts into blue flames.", ch, obj, NULL, TO_CHAR);
act ("$n whispers some words, and suddenly $p bursts into blue flames.", ch,
obj, NULL, TO_ROOM);
waiting (ch, 8);
ch->pcdata->crystal -= 5;
SET_BIT (obj->weapflags, WEAPON_HOLY);
return;
}
void
do_angelgate (CHAR_DATA * ch, char *argument)
{
CHAR_DATA *victim;
OBJ_DATA *obj;
char arg[MIL];
char buf[MSL];
int duration;
one_argument (argument, arg);
if (IS_NPC (ch))
return;
if (!IS_ANGELW (ch))
{
send_to_char ("Huh?\n\r", ch);
return;
}
if (!IS_SET (ch->apowers, APOWER_ANGELGATE))
{
send_to_char ("You haven't enwarped this gift.\n\r", ch);
return;
}
if (has_fighttimer (ch))
return;
if (arg[0] == '\0')
{
send_to_char ("Who do you wish to create a Angelgate to?\n\r", ch);
return;
}
if (!str_cmp (arg, "heaven"))
{
int oldroom;
duration = number_range (2, 3) * 15;
oldroom = ch->in_room->vnum;
if (is_inarena (ch))
return;
if (ch->in_room->area->plane != PLANE_NEXUS)
{
stc ("You can only do this from Nexus.\n\r", ch);
return;
}
obj = create_object (get_obj_index (OBJ_VNUM_PORTAL), 0);
obj->value[0] = ROOM_VNUM_HEAVEN;
obj->value[3] = ch->in_room->vnum;
obj->timer = duration;
free_string (obj->name);
sprintf (buf, "%s gate angelgate portal", ch->name);
obj->name = str_dup (buf);
free_string (obj->short_descr);
obj->short_descr = str_dup ("a angelgate");
free_string (obj->description);
obj->description = str_dup ("A cloudy gate floats here.");
if (IS_AFFECTED (ch, AFF_SHADOWPLANE))
obj->extra_flags = ITEM_SHADOWPLANE;
if (IS_NYM (ch, NYM_DEATHPLANE))
obj->extra_flags = ITEM_DEATHPLANE;
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] = ROOM_VNUM_HEAVEN;
obj->timer = duration;
free_string (obj->name);
sprintf (buf, "%s gate angelgate portal", ch->name);
obj->name = str_dup (buf);
free_string (obj->short_descr);
obj->short_descr = str_dup ("a angelgate");
free_string (obj->description);
obj->description = str_dup ("A cloudy gate floats here.");
if (IS_AFFECTED (ch, AFF_SHADOWPLANE))
obj->extra_flags = ITEM_SHADOWPLANE;
if (IS_NYM (ch, NYM_DEATHPLANE))
obj->extra_flags = ITEM_DEATHPLANE;
obj_to_room (obj, get_room_index (ROOM_VNUM_HEAVEN));
act ("$p appears in front of $n.", ch, obj, NULL, TO_ROOM);
act ("$p appears in front of you.", ch, obj, NULL, TO_CHAR);
char_from_room (ch);
char_to_room (ch, get_room_index (ROOM_VNUM_HEAVEN));
act ("$p appears in the room.", ch, obj, NULL, TO_ROOM);
char_from_room (ch);
char_to_room (ch, get_room_index (oldroom));
return;
}
if (!str_cmp (arg, "limbo") && IS_BETRAYER (ch))
{
int oldroom;
duration = number_range (2, 3) * 15;
oldroom = ch->in_room->vnum;
if (is_inarena (ch))
return;
if (ch->in_room->area->plane != PLANE_NEXUS)
return;
obj = create_object (get_obj_index (OBJ_VNUM_PORTAL), 0);
obj->value[0] = 45901;
obj->value[3] = ch->in_room->vnum;
obj->timer = duration;
free_string (obj->name);
sprintf (buf, "%s gate angelgate portal", ch->name);
obj->name = str_dup (buf);
free_string (obj->short_descr);
obj->short_descr = str_dup ("a angelgate");
free_string (obj->description);
obj->description = str_dup ("A cloudy gate floats here.");
if (IS_AFFECTED (ch, AFF_SHADOWPLANE))
obj->extra_flags = ITEM_SHADOWPLANE;
if (IS_NYM (ch, NYM_DEATHPLANE))
obj->extra_flags = ITEM_DEATHPLANE;
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] = 45901;
obj->timer = duration;
free_string (obj->name);
sprintf (buf, "%s gate angelgate portal", ch->name);
obj->name = str_dup (buf);
free_string (obj->short_descr);
obj->short_descr = str_dup ("a angelgate");
free_string (obj->description);
obj->description = str_dup ("A cloudy gate floats here.");
if (IS_AFFECTED (ch, AFF_SHADOWPLANE))
obj->extra_flags = ITEM_SHADOWPLANE;
if (IS_NYM (ch, NYM_DEATHPLANE))
obj->extra_flags = ITEM_DEATHPLANE;
obj_to_room (obj, get_room_index (ROOM_VNUM_HEAVEN));
act ("$p appears in front of $n.", ch, obj, NULL, TO_ROOM);
act ("$p appears in front of you.", ch, obj, NULL, TO_CHAR);
char_from_room (ch);
char_to_room (ch, get_room_index (ROOM_VNUM_HEAVEN));
act ("$p appears in the room.", ch, obj, NULL, TO_ROOM);
char_from_room (ch);
char_to_room (ch, get_room_index (oldroom));
return;
}
if (!str_cmp (arg, "nexus"))
{
int oldroom;
duration = number_range (2, 3) * 15;
oldroom = ch->in_room->vnum;
if (is_inarena (ch))
return;
if (ch->in_room->area->plane != PLANE_HEAVEN)
return;
obj = create_object (get_obj_index (OBJ_VNUM_PORTAL), 0);
obj->value[0] = 3001;
obj->value[3] = ch->in_room->vnum;
obj->timer = duration;
free_string (obj->name);
sprintf (buf, "%s gate angelgate portal", ch->name);
obj->name = str_dup (buf);
free_string (obj->short_descr);
obj->short_descr = str_dup ("a angelgate");
free_string (obj->description);
obj->description = str_dup ("A cloudy gate floats here.");
if (IS_AFFECTED (ch, AFF_SHADOWPLANE))
obj->extra_flags = ITEM_SHADOWPLANE;
if (IS_NYM (ch, NYM_DEATHPLANE))
obj->extra_flags = ITEM_DEATHPLANE;
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] = 3001;
obj->timer = duration;
free_string (obj->name);
sprintf (buf, "%s gate angelgate portal", ch->name);
obj->name = str_dup (buf);
free_string (obj->short_descr);
obj->short_descr = str_dup ("a angelgate");
free_string (obj->description);
obj->description = str_dup ("A cloudy gate floats here.");
if (IS_AFFECTED (ch, AFF_SHADOWPLANE))
obj->extra_flags = ITEM_SHADOWPLANE;
if (IS_NYM (ch, NYM_DEATHPLANE))
obj->extra_flags = ITEM_DEATHPLANE;
obj_to_room (obj, get_room_index (ROOM_VNUM_HEAVEN));
act ("$p appears in front of $n.", ch, obj, NULL, TO_ROOM);
act ("$p appears in front of you.", ch, obj, NULL, TO_CHAR);
char_from_room (ch);
char_to_room (ch, get_room_index (ROOM_VNUM_HEAVEN));
act ("$p appears in the room.", ch, obj, NULL, TO_ROOM);
char_from_room (ch);
char_to_room (ch, get_room_index (oldroom));
return;
}
if ((victim = get_char_world (ch, arg)) == NULL)
{
send_to_char ("They aren't here.\n\r", ch);
return;
}
if (is_inarena (ch))
return;
if (is_inarena (victim))
return;
if (travelsafe (ch, victim))
return;
if (ch->in_room != NULL && victim->in_room != NULL && ch->in_room == victim->in_room)
{
stc ("Noting happens.\n\r", ch);
return;
}
if (victim == ch
|| (!IS_NPC (victim) && !IS_IMMUNE (victim, IMM_SUMMON))
|| victim->in_room == NULL)
{
if (!IS_NPC (victim) && ch != victim && IS_MORE (victim, MORE_GUARDIAN))
{
guardian_message (victim);
act ("$n just failed to create a Angelgate to you.", ch, NULL,
victim, TO_VICT);
}
send_to_char ("You failed.\n\r", ch);
return;
}
duration = number_range (2, 3) * 15;
obj = create_object (get_obj_index (OBJ_VNUM_PORTAL), 0);
obj->value[0] = victim->in_room->vnum;
obj->value[3] = ch->in_room->vnum;
obj->timer = duration;
free_string (obj->name);
sprintf (buf, "%s gate angelgate portal", ch->name);
obj->name = str_dup (buf);
free_string (obj->short_descr);
obj->short_descr = str_dup ("a angelgate");
free_string (obj->description);
obj->description = str_dup ("A cloudy gate floats here.");
if (IS_AFFECTED (ch, AFF_SHADOWPLANE))
obj->extra_flags = ITEM_SHADOWPLANE;
if (IS_NYM (ch, NYM_DEATHPLANE))
obj->extra_flags = ITEM_DEATHPLANE;
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->name);
sprintf (buf, "%s gate angelgate portal", ch->name);
obj->name = str_dup (buf);
free_string (obj->short_descr);
obj->short_descr = str_dup ("a angelgate");
free_string (obj->description);
obj->description = str_dup ("A cloudy gate floats here.");
if (IS_AFFECTED (victim, AFF_SHADOWPLANE))
obj->extra_flags = ITEM_SHADOWPLANE;
if (IS_NYM (victim, NYM_DEATHPLANE))
obj->extra_flags = ITEM_DEATHPLANE;
obj_to_room (obj, victim->in_room);
act ("$p appears in front of $n.", ch, obj, NULL, TO_ROOM);
act ("$p appears in front of you.", ch, obj, NULL, TO_CHAR);
act ("$p appears in front of $n.", victim, obj, NULL, TO_ROOM);
act ("$p 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 a Angelgate to you.", ch, NULL, victim, TO_VICT);
}
return;
}
void
do_angelform (CHAR_DATA * ch, char *argument)
{
char arg[MIL];
char buf[MSL];
argument = one_argument (argument, arg);
if (IS_NPC (ch))
return;
if (!IS_ANGELW (ch))
{
send_to_char ("Huh?\n\r", ch);
return;
}
if (!IS_SET (ch->apowers, APOWER_ANGELFORM))
{
send_to_char ("You haven't enwarped this gift.\n\r", ch);
return;
}
if (IS_POLYAFF (ch, POLY_ANGELFORM))
{
act ("You transform into human form.", ch, NULL, NULL, TO_CHAR);
act ("$n's shrinks back into human form.", ch, NULL, NULL, TO_ROOM);
REMOVE_BIT (ch->polyaff, POLY_ANGELFORM);
free_string (ch->morph);
ch->morph = str_dup (get_form (ch));
if (strlen (ch->morph) < 2)
{
REMOVE_BIT (ch->affected_by, AFF_POLYMORPH);
REMOVE_BIT (ch->vampaff, VAM_DISGUISED);
}
return;
}
if (IS_AFFECTED (ch, AFF_POLYMORPH) && !IS_SET (ch->vampaff, VAM_DISGUISED))
{
send_to_char ("You can't angel form when changed.\n\r", ch);
return;
}
if (ch->stance[0] != -1)
do_stance (ch, "");
if (ch->mounted == IS_RIDING)
do_dismount (ch, "");
act ("Your body grows and transforms.", ch, NULL, NULL, TO_CHAR);
act ("$n's body grows and transforms.", ch, NULL, NULL, TO_ROOM);
SET_BIT (ch->polyaff, POLY_ANGELFORM);
SET_BIT (ch->affected_by, AFF_POLYMORPH);
SET_BIT (ch->vampaff, VAM_DISGUISED);
free_string (ch->morph);
ch->morph = str_dup (get_form (ch));
return;
}
void
do_smite (CHAR_DATA * ch, char *argument)
{
CHAR_DATA *victim, *vch, *vch_next;
char arg[MIL];
char buf[MSL];
int dam = 0;
int mult = 12;
int rank = 1;
int number_hit = 0;
int totdam = 0;
int dam2 = 0;
int pure = 1;
bool agg_dam = TRUE;
argument = one_argument (argument, arg);
if (IS_NPC (ch))
return;
if (!IS_ANGELW (ch) || IS_BETRAYER (ch))
{
send_to_char ("Huh?\n\r", ch);
return;
}
rank += ch->arank;
mult -= rank;
dam = ch->max_mana;
dam /= mult;
pure += get_purity(ch);
if (dam > (2000 * pure))
dam = 2000 * pure;
dam += number_range (350, 1375);
if (ch->in_room != NULL && ch->in_room->area->plane == PLANE_HEAVEN)
dam *= 1.5;
if (arg[0] == '\0' && ch->fighting == NULL)
{
send_to_char ("Please give a target or 'all'?\n\r", ch);
return;
}
if (!str_cmp (arg, "all"))
{
dam /= 2;
dam2 = dam;
if (IS_COR (ch, COR_HYBRID))
dam2 *= 2;
act
("$n#7 calls down several beams of light smiting everyone in the room.",
ch, NULL, NULL, TO_ROOM);
act
("#7You call down several beams of light to smite everyone in the room.",
ch, NULL, NULL, TO_CHAR);
for (vch = ch->in_room->people; vch != NULL; vch = vch_next)
{
vch_next = vch->next_in_room;
if (vch == ch)
continue;
if (number_hit > 9)
continue;
if (!IS_NPC (vch))
{
if (is_same_group (vch, ch))
continue;
}
if (is_safe (ch, vch))
continue;
if (can_see (ch, vch))
{
totdam += dam2 * 2;
number_hit++;
if (IS_NPC (vch))
{
damage (ch, vch, totdam, gsn_smite, DAM_LIGHT, FALSE, FALSE,
FALSE);
}
else
{
damage (ch, vch, dam, gsn_smite, DAM_LIGHT, FALSE, FALSE,
FALSE);
}
}
}
waiting (ch, 12);
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 ("Thou shall not smite thyself?\n\r", ch);
return;
}
if (is_safe (ch, victim))
return;
if (IS_EVIL (victim) && !IS_DEMON (victim))
{
dam *= 1.5;
agg_dam = TRUE;
}
else if (IS_DEMON (victim))
{
dam = dam;
agg_dam = TRUE;
}
else if (IS_GOOD (victim))
{
dam /= 1.5;
}
else
{
dam = dam;
}
act
("$n#7 points at you and yells '#yWicked Being, Thy reckoning has come!#7'.\n\r\n\r#7Suddenly a beam of light strikes you from the heavens, burning you to the depths of your soul.#n",
ch, NULL, victim, TO_VICT);
act
("#7You point at $N#7 and yell '#yWicked Being, Thy reckoning has come!#7'.\n\r\n\r#7Suddenly a beam of light strikes $M, burning $S soul.#n",
ch, NULL, victim, TO_CHAR);
act
("$n#7 points at $N#7 and yells '#yWicked Being, Thy reckoning has come!#7'.\n\r\n\r#7Suddenly a beam of light strikes $M, burning $S soul.",
ch, NULL, victim, TO_NOTVICT);
if (!agg_dam)
damage (ch, victim, dam, gsn_smite, DAM_LIGHT, FALSE, FALSE, FALSE);
else
damage (ch, victim, dam, gsn_smite, DAM_LIGHT, TRUE, FALSE, FALSE);
waiting (ch, 12);
return;
}
void
do_confront (CHAR_DATA * ch, char *argument)
{
CHAR_DATA *victim;
int stat = 0;
if (IS_NPC (ch))
return;
if (!IS_ANGELW (ch))
{
send_to_char ("Huh?\n\r", ch);
return;
}
if (!IS_SET (ch->apowers, APOWER_CONFRONT))
{
send_to_char ("You haven't enwarped this gift.\n\r", ch);
return;
}
if (argument[0] == '\0')
{
send_to_char ("Who do you want to Confront?\n\r", ch);
return;
}
if ((victim = get_char_room (ch, argument)) == NULL)
{
send_to_char ("They aren't here.\n\r", ch);
return;
}
if (ch->position == POS_FIGHTING)
{
send_to_char ("Not while fighting!\n\r", ch);
return;
}
if (is_safe (ch, victim))
return;
stat = victim->max_hit;
stat /= 10;
stat *= 9;
waiting (ch, 9);
if (number_range (1, 3) != 2)
{
if (victim->hit >= stat)
{
act
("You lay your hand on $N's forhead and whisper '#RNeontate de justica#n'.",
ch, NULL, victim, TO_CHAR);
act
("$n lays $s hand on your forhead and whispers '#RNeontate de justica#n'.",
ch, NULL, victim, TO_VICT);
act
("$n lays $s hand on $N's forhead and whispers '#RNeontate de justica#n'.",
ch, NULL, victim, TO_NOTVICT);
victim->position = POS_STUNNED;
return;
}
}
act
("You lay your hand on $N's forhead and whisper '#RNeontate de justica#n'. Nothing happens.",
ch, NULL, victim, TO_CHAR);
act
("$n lays $s hand on your forhead and whispers '#RNeontate de justica#n'. Nothing happens.",
ch, NULL, victim, TO_VICT);
act
("$n lays $s hand on $N's forhead and whispers '#RNeontate de justica#n'. Nothing happens.",
ch, NULL, victim, TO_NOTVICT);
return;
}
void
do_retaliation (CHAR_DATA * ch, char *argument)
{
if (IS_NPC (ch))
return;
if (!IS_ANGELW (ch))
{
send_to_char ("Huh?\n\r", ch);
return;
}
if (!IS_SET (ch->apowers, APOWER_HOUSE))
{
send_to_char ("You haven't enwarped this gift.\n\r", ch);
return;
}
if (IS_XXX (ch, XXX_RETAL))
{
stc
("You decide to refrain from punishing any who dare to wound you.\n\r",
ch);
act ("$n decides to refrain from punishing any who dare to wound $m.",
ch, NULL, NULL, TO_ROOM);
REMOVE_BIT (ch->xxxbits, XXX_RETAL);
return;
}
stc ("You swear to punish any who dare to wound you.\n\r", ch);
act ("$n pledges to punish any who dare to wound $m.", ch, NULL, NULL,
TO_ROOM);
SET_BIT (ch->xxxbits, XXX_RETAL);
return;
}
void
do_houseofgod (CHAR_DATA * ch, char *argument)
{
CHAR_DATA *victim;
if (IS_NPC (ch))
return;
if (!IS_ANGELW (ch))
{
send_to_char ("Huh?\n\r", ch);
return;
}
if (!IS_SET (ch->apowers, APOWER_HOUSE))
{
send_to_char ("You haven't enwarped this gift.\n\r", ch);
return;
}
if (is_inarena (ch))
return;
if (IS_AFFECTED (ch, AFF_CURSE))
{
send_to_char ("Not while cursed.\n\r", ch);
return;
}
if (IS_AFFECTED (ch, AFF_WEBBED))
{
send_to_char ("Not with all this sticky webbing on.\n\r", ch);
return;
}
if (ch->in_room != NULL && ch->in_room->area->plane == PLANE_HEAVEN)
{
stc ("You are already in the heaven.\n\r", ch);
return;
}
if (ch->position != POS_FIGHTING)
{
if (ch->fight_timer > 0)
return stc ("Not with a timer.\n\r", ch);;
act ("$n shoots up into the sky.", ch, NULL, NULL, TO_ROOM);
stc ("You shoot up into the sky.\n\r", ch);
char_from_room (ch);
char_to_room (ch, get_room_index (ROOM_VNUM_HEAVEN));
do_look (ch, "");
send_to_char ("You float down from the sky.\n\r", ch);
act ("$n floats down from the sky.", ch, NULL, NULL, TO_ROOM);
waiting (ch, 9);
return;
}
if (ch->position == POS_FIGHTING)
{
victim = ch->fighting;
if (IS_NPC (victim))
{
stc ("No you can't do this to mobs.\n\r", ch);
waiting (ch, 9);
return;
}
if (number_percent () >= 25)
{
stc ("You failed.\n\r", ch);
if (!IS_NPC (victim) && ch != victim
&& IS_MORE (victim, MORE_GUARDIAN))
{
guardian_message (victim);
act ("$n just failed to drag you off to Heaven.", ch, NULL,
victim, TO_VICT);
}
waiting (ch, 9);
return;
}
stop_fighting (ch, TRUE);
act ("You grab $N and drags $M up into the sky.", ch, NULL, victim,
TO_CHAR);
act ("$n grabs $N and shoots up into the sky.", ch, NULL, victim,
TO_NOTVICT);
act ("$n grabs you and pulls you up into the sky.", ch, NULL, victim,
TO_VICT);
char_from_room (ch);
char_to_room (ch, get_room_index (ROOM_VNUM_HEAVEN));
char_from_room (victim);
char_to_room (victim, get_room_index (ROOM_VNUM_HEAVEN));
act
("You drop $N then dive down at $M striking $M with your wings.\n\r",
ch, NULL, victim, TO_CHAR);
act
("$n drops you from the sky, strangely enough your landing seems to be cushioned by some kind of clouds,\n\rthe realisation of where you are strikes you at the same time as $n hard wings hits you in the back.",
ch, NULL, victim, TO_VICT);
act
("$N suddenly drops out of the sky, closely followed by $n, as $e slams $s wings into $N's back.\n\r",
ch, NULL, victim, TO_NOTVICT);
do_look (ch, "");
do_look (victim, "");
one_hit (ch, victim, gsn_awings, 0, 0, FALSE);
one_hit (ch, victim, gsn_awings, 0, 0, FALSE);
act ("You throw a glowing web over $N.", ch, NULL, victim, TO_CHAR);
act ("$n throws a glowing web over $N.", ch, NULL, victim, TO_NOTVICT);
act ("$n throws a glowing web over you.", ch, NULL, victim, TO_VICT);
SET_BIT (victim->affected_by, AFF_WEBBED);
waiting (ch, 9);
return;
}
return;
}
void
do_defenders (CHAR_DATA * ch, char *argument)
{
char buf[MSL];
char arg[MIL];
CHAR_DATA *gch;
if (IS_NPC (ch))
return;
if (!IS_ANGELW (ch) && !IS_IMMORTAL (ch))
{
send_to_char ("Huh?\n\r", ch);
return;
}
send_to_char ("The following Celestial Defenders are present.\n\r", ch);
send_to_char
("#G[ #gName #G] [ #gRank #G] [ #gHits #G] [ #gMana #G] [ #gMove #G]#n\n\r",
ch);
for (gch = char_list; gch != NULL; gch = gch->next)
{
if (IS_NPC (gch))
continue;
if (!IS_ANGELW (gch))
continue;
if (can_see (ch, gch))
{
sprintf (buf,
"#G[#3%-12s#G] [#3%-10s#G] [#3%8d#G] [#3%8d#G] [#3%8d#G]#n\n\r",
capitalize (gch->name), get_arankname (gch), gch->hit,
gch->mana, gch->move);
send_to_char (buf, ch);
}
}
return;
}
void
do_ascend (CHAR_DATA * ch, char *argument)
{
char buf[MSL];
char bfr[MSL];
char afr[MSL];
int max;
int cost;
cost = ((1 + ch->arank) * 25000);
cost += 25000;
if (IS_NPC (ch))
return;
if (!IS_ANGELW (ch))
{
do_huh (ch, "");
return;
}
if (ch->class == CLASS_ANGELW || IS_BETRAYER (ch))
max = 4;
else if (IS_PLANARSOHEI (ch))
max = 3;
else
max = 2;
if (ch->arank >= max)
{
stc ("You have already reached your highest rank.\n\r", ch);
return;
}
if (ch->arank == 0)
{
if (ch->apwrcnt < 4)
return
stc
("You need all the powers your rank can attain before you can Ascend.\n\r",
ch);
if (ch->pcdata->power[POWER_CURRENT] < cost)
{
sprintf (buf,
"You need %d more angelic power before you can Ascend.\n\r",
(cost - ch->pcdata->power[POWER_CURRENT]));
return stc (buf, ch);
}
sprintf (bfr, "%s", get_arankname (ch));
ch->arank++;
sprintf (afr, "%s", get_arankname (ch));
sprintf (buf,
"#y%s#7 has Ascended from the rank of#y %s#7 to the rank of#y %s#7 in the Celestial Hierarchy.#n",
ch->name, bfr, afr);
do_info (ch, buf);
ch->pcdata->power[POWER_CURRENT] -= cost;
return stc ("You Ascend a rank in the Celestial Hierarchy.\n\r", ch);
}
else if (ch->arank == 1)
{
if (ch->apwrcnt < 6)
return
stc
("You need all the powers your rank can attain before you can Ascend.\n\r",
ch);
if (ch->pcdata->power[POWER_CURRENT] < cost)
{
sprintf (buf,
"You need %d more angelic power before you can Ascend.\n\r",
(cost - ch->pcdata->power[POWER_CURRENT]));
return stc (buf, ch);
}
sprintf (bfr, "%s", get_arankname (ch));
ch->arank++;
sprintf (afr, "%s", get_arankname (ch));
sprintf (buf,
"#y%s#7 has Ascended from the rank of#y %s#7 to the rank of#y %s#7 in the Celestial Hierarchy.#n",
ch->name, bfr, afr);
do_info (ch, buf);
ch->pcdata->power[POWER_CURRENT] -= cost;
return stc ("You Ascend a rank in the Celestial Hierarchy.\n\r", ch);
}
else if (ch->arank == 2)
{
if (ch->apwrcnt < 8)
return
stc
("You need all the powers your rank can attain before you can Ascend.\n\r",
ch);
if (ch->pcdata->power[POWER_CURRENT] < cost)
{
sprintf (buf,
"You need %d more angelic power before you can Ascend.\n\r",
(cost - ch->pcdata->power[POWER_CURRENT]));
return stc (buf, ch);
}
sprintf (bfr, "%s", get_arankname (ch));
ch->arank++;
sprintf (afr, "%s", get_arankname (ch));
sprintf (buf,
"#y%s#7 has Ascended from the rank of#y %s#7 to the rank of#y %s#7 in the Celestial Hierarchy.#n",
ch->name, bfr, afr);
do_info (ch, buf);
ch->pcdata->power[POWER_CURRENT] -= cost;
return stc ("You Ascend a rank in the Celestial Hierarchy.\n\r", ch);
}
else if (ch->arank == 3)
{
if (ch->apwrcnt < 11)
return
stc
("You need all the powers your rank can attain before you can Ascend.\n\r",
ch);
if (ch->pcdata->power[POWER_CURRENT] < cost)
{
sprintf (buf,
"You need %d more angelic power before you can Ascend.\n\r",
(cost - ch->pcdata->power[POWER_CURRENT]));
return stc (buf, ch);
}
sprintf (bfr, "%s", get_arankname (ch));
ch->arank++;
sprintf (afr, "%s", get_arankname (ch));
sprintf (buf,
"#y%s#7 has Ascended from the rank of#y %s#7 to the rank of#y %s#7 in the Celestial Hierarchy.#n",
ch->name, bfr, afr);
do_info (ch, buf);
ch->pcdata->power[POWER_CURRENT] -= cost;
return stc ("You Ascend a rank in the Celestial Hierarchy.\n\r", ch);
}
else
{
return stc ("You have already reached your highest rank.\n\r", ch);
}
return;
}
void
do_saintlymight (CHAR_DATA * ch, char *argument)
{
if (IS_NPC (ch))
return;
if (!IS_SAINT (ch))
{
do_huh (ch, "");
return;
}
if (ch->monkab[HOLY] < 5)
{
stc ("You don't have that power yet.\n\r", ch);
return;
}
if (ch->move < 6000)
{
stc
("You don't have the vitality to activate this power at the moment.\n\r",
ch);
return;
}
if (ch->saintly > 60)
{
stc ("You are unable to take on any more Saintly Might", ch);
return;
}
else if (ch->saintly < 60 && ch->saintly > 0)
{
stc ("You are Imbued with more Saintly Might.\n\r", ch);
act ("$n is Imbued with more Saintly Might!", ch, NULL, NULL, TO_ROOM);
}
else
{
send_to_char ("You feel Imbued with Saintly Might!\n\r", ch);
act ("$n is Imbued with Saintly Might!", ch, NULL, NULL, TO_ROOM);
}
ch->saintly += 60;
ch->move -= 5000;
return;
}
void
do_tattoo (CHAR_DATA * ch, char *argument)
{
OBJ_DATA *obj;
char arg[MIL];
char buf[MSL];
argument = one_argument (argument, arg);
if (IS_NPC (ch))
return;
if (!IS_BETRAYER (ch))
{
stc ("Huh?\n\r", ch);
return;
}
if (!IS_SET (ch->apowers, APOWER_TATTOO))
{
send_to_char ("You haven't enwarped this gift.\n\r", ch);
return;
}
if (arg[0] == '\0')
{
send_to_char ("What object do you wish to tattoo?\n\r", ch);
return;
}
if (!(obj = get_obj_carry (ch, arg)))
{
send_to_char ("You don't have that.\n\r", ch);
return;
}
if (obj->chobj != NULL)
{
send_to_char ("Somehow the object seems to resist gaia's touch.\n\r",
ch);
return;
}
if (IS_SET (obj->quest, QUEST_ARTIFACT))
{
stc ("not on artis.\n\r", ch);
return;
}
if (IS_SET (obj->extra_flags, ITEM_VANISH))
{
stc ("Not on Illusions.\n\r", ch);
return;
}
if (IS_SET (obj->weapflags, WEAPON_TATTOOED))
{
act ("$p is already tattooed.", ch, obj, NULL, TO_CHAR);
return;
}
if (IS_SET (obj->spectype, SITEM_MASTERY))
{
act ("$p is a mastery item.", ch, obj, NULL, TO_CHAR);
return;
}
if (ch->pcdata->quest < 5000)
{
sprintf
(buf, "You must have 5000 credits to tattoo an item.\n\r",
get_class (ch));
stc (buf, ch);
return;
}
if (ch->pcdata->crystal < 10)
{
send_to_char ("You dont have the required 10 power crystals\n\r", ch);
return;
}
ch->pcdata->quest -= 5000;
ch->pcdata->crystal -= 10;
SET_BIT (obj->weapflags, WEAPON_TATTOOED);
add_affect (obj, APPLY_HITROLL, (number_fuzzy (10) * (ch->apwrcnt / 2)));
add_affect (obj, APPLY_DAMROLL, (number_fuzzy (10) * (ch->apwrcnt / 2)));
if (!str_cmp (ch->name, obj->questowner))
add_affect (obj, APPLY_DAMCAP, (number_fuzzy (10) * (ch->apwrcnt / 2)));
else
add_affect (obj, APPLY_DAMCAP, (number_fuzzy (5) * (ch->apwrcnt / 2)));
act ("$p lookes pretty as the ink seeps into it.", ch, obj, NULL, TO_CHAR);
act ("$p looks pretty as $n applys the ink.", ch, obj, NULL, TO_ROOM);
return;
}
void
do_fstand (CHAR_DATA * ch, char *argument)
{
OBJ_DATA *obj;
if (IS_NPC (ch))
return;
if (!IS_BETRAYER (ch))
{
do_huh (ch, "");
return;
}
if (IS_BETRAYER (ch) && IS_SET (ch->apowers, APOWER_PURE4))
REMOVE_BIT(ch->apowers, APOWER_PURE4);
if (IS_BETRAYER (ch) && IS_SET (ch->apowers, APOWER_PURE5))
REMOVE_BIT(ch->apowers, APOWER_PURE5);
if (!IS_SET (ch->apowers, APOWER_FINALSTAND))
{
send_to_char ("You haven't enwarped this gift.\n\r", ch);
return;
}
obj = get_eq_char (ch, WEAR_SPECIAL);
if (obj == NULL || !IS_SET (obj->weapflags, WEAPON_BETRAYER))
{
stc ("You dont have an active Demon Doll.\n\r", ch);
return;
}
if (ch->pcdata->cpowers[0] > 0)
{
do_mclear (ch, "self");
ch->max_hit -= 10000;
ch->max_move -= 10000;
ch->max_mana -= 10000;
ch->pcdata->cpowers[0] = 0;
stc ("Small bug fixed, sing, dance and be happy.\n\r", ch);
return;
}
if (IS_XX (ch, XX_FSTAND))
{
stc ("You are no longer making your final stand.\n\r", ch);
act
("$n looks less scary as $e is no longer making $s final stand.", ch,
NULL, NULL, TO_ROOM);
ch->max_hit -= 10000;
ch->max_move -= 10000;
ch->max_mana -= 10000;
REMOVE_BIT (ch->xxbits, XX_FSTAND);
return;
}
ch->max_hit += 10000;
ch->max_move += 10000;
ch->max_mana += 10000;
SET_BIT (ch->xxbits, XX_FSTAND);
stc
("You are imbued with immense power as you make your final stand.\n\r",
ch);
act ("$n looks scary as $e makes $s final stand.\n\r", ch, NULL, NULL,
TO_ROOM);
return;
}
void
do_fstanditem (CHAR_DATA * ch, char *argument)
{
OBJ_INDEX_DATA *pObjIndex;
OBJ_DATA *obj;
char buf[MSL];
int vnum = 0;
if (IS_NPC (ch))
return;
if (!IS_BETRAYER (ch))
{
do_huh (ch, "");
return;
}
if (!IS_SET (ch->apowers, APOWER_FINALSTAND))
{
send_to_char ("You haven't enwarped this gift.\n\r", ch);
return;
}
if (ch->level < 12 && ch->practice < 50)
{
stc ("You require 50 primal for this.\n\r", ch);
return;
}
vnum = 29680;
if (vnum == 0 || (pObjIndex = get_obj_index (vnum)) == NULL)
{
stc ("Missing object, please inform Corim.\n\r", ch);
return;
}
obj = create_object (pObjIndex, 50);
obj_to_char (obj, ch);
obj->condition = 100;
obj->toughness = 100;
obj->resistance = 1;
SET_BIT (obj->quest, QUEST_RELIC);
SET_BIT (obj->weapflags, WEAPON_BETRAYER);
add_affect (obj, APPLY_DAMCAP, 2500);
SET_BIT (obj->quest, QUEST_RELIC);
SET_BIT (obj->spectype, SITEM_DEMONIC);
if (ch->level < 12)
ch->practice -= 50;
sprintf (buf, "#rA #RD#re#Rm#ro#Rn #rD#Ro#rl#Rl#n#n");
free_string (obj->short_descr);
obj->short_descr = str_dup (buf);
sprintf (buf, "#rA #RD#re#Rm#ro#Rn #rD#Ro#rl#Rl#n");
free_string (obj->description);
obj->description = str_dup (buf);
free_string (obj->questmaker);
obj->questmaker = str_dup (ch->name);
free_string (obj->creator);
sprintf (buf, "%s (#RD#re#Rm#ro#Rn #rD#Ro#rl#Rl#n)", ch->name);
obj->creator = str_dup (buf);
free_string (obj->questowner);
obj->questowner = str_dup (ch->name);
act
("You think about your past, and your future, and all of a suddon $p falls into your hand from out of no where.\n\r",
ch, obj, NULL, TO_CHAR);
act
("$n thinks about $s past, and $s future, and all of a suddon $p falls into his hand from out of no where.\n\r",
ch, obj, NULL, TO_ROOM);
return;
}
void
do_betfurystrike (CHAR_DATA * ch, char *argument)
{
CHAR_DATA *victim;
char arg[MIL];
char buf[MSL];
int dam = 0, stat, max, pure;
argument = one_argument (argument, arg);
if (IS_NPC (ch))
return;
if (IS_BETRAYER (ch) && IS_SET (ch->apowers, APOWER_PURE4))
REMOVE_BIT(ch->apowers, APOWER_PURE4);
if (IS_BETRAYER (ch) && IS_SET (ch->apowers, APOWER_PURE5))
REMOVE_BIT(ch->apowers, APOWER_PURE5);
if (!IS_BETRAYER (ch))
{
if (!IS_NEWWW (ch))
{
do_huh (ch, "");
return;
}
else
{
do_fury (ch, arg);
return;
}
}
if (!IS_SET (ch->apowers, APOWER_CHAOSSTRIKE))
{
send_to_char ("You haven't enwarped this gift.\n\r", ch);
return;
}
dam = number_range (1, 30);
if (dam < 1)
dam = number_range (10, 40);
if (dam < 1)
dam = 1;
pure = get_purity (ch);
max = number_range (2, 5);
stat = ch->max_hit / 1000;
stat *= ch->apwrcnt;
dam += stat;
dam += number_range (1, 999);
if (dam > 4000)
dam = 3000 + number_range (199, 1399);
if (pure > 0)
{
pure *= number_range (250, 750);
dam += pure;
}
dam *= 1.5;
if (arg[0] == '\0' && ch->fighting == NULL)
{
send_to_char ("Who do you wish to scare with your Fury Strike?\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 (is_safe (ch, victim))
{
if (!IS_NPC (victim) && ch != victim && IS_MORE (victim, MORE_GUARDIAN))
{
guardian_message (victim);
act ("$n just failed to scare you with Fury Strike.", ch, NULL,
victim, TO_VICT);
}
return;
}
if (ch == victim)
{
send_to_char ("Now that would be just plain stupid.\n\r", ch);
return;
}
act ("$n shouts #sGo #sFury #sStrike#n at you, scareing you.\n\r", ch, NULL,
victim, TO_VICT);
act ("You shout #sGo #sFury #sStrike#n at $N, scareing $M.\n\r", ch, NULL,
victim, TO_CHAR);
act ("$n shouts #sGo #sFury #sStrike#n at $N, scareing $M.\n\r", ch, NULL,
victim, TO_NOTVICT);
sev_hit (ch, victim, dam, gsn_betfurystrike, DAM_SHADOW, max, TRUE, TRUE,
FALSE);
waiting (ch, 12);
return;
}
void
do_chaosshroud (CHAR_DATA * ch, char *argument)
{
CHAR_DATA *victim;
char arg[MIL];
argument = one_argument (argument, arg);
if (IS_NPC (ch))
return;
if (!IS_BETRAYER (ch))
{
send_to_char ("Huh?\n\r", ch);
return;
}
if (!IS_SET (ch->apowers, APOWER_CHAOSSHROUD))
{
send_to_char ("You haven't enwarped this gift.\n\r", ch);
return;
}
if (arg[0] == '\0')
{
send_to_char ("Who do you wish to use Chaosshroud 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 (IS_NPC (victim))
{
send_to_char ("Not on NPC's.\n\r", ch);
return;
}
if (is_safe (ch, victim))
{
act ("not while in a safe room.", ch, NULL, victim, TO_CHAR);
if (!IS_NPC (victim) && ch != victim && IS_MORE (victim, MORE_GUARDIAN))
{
guardian_message (victim);
act ("$n just failed to use chaos shroud against you.", ch, NULL,
victim, TO_VICT);
}
return;
}
act ("A look of concentration crosses $n's face.", ch, NULL, NULL, TO_ROOM);
if (IS_MORE (victim, MORE_CONFUSED))
{
send_to_char ("You no longer feel so confused.\n\r", victim);
REMOVE_BIT (victim->more, MORE_CONFUSED);
waiting (ch, 12);
return;
}
send_to_char ("You suddenly feel very confused!\n\r", victim);
act ("$n looks around, appearing to find out where $s at.", victim, NULL,
NULL, TO_ROOM);
SET_BIT (victim->more, MORE_CONFUSED);
waiting (ch, 12);
return;
}
void
do_wrath (CHAR_DATA * ch, char *argument)
{
if (IS_NPC (ch))
return;
if (!IS_ANGELW (ch))
{
do_huh (ch, "");
return;
}
if (!IS_SET (ch->apowers, APOWER_PURE1))
{
stc ("You lack the purity to use this power.\n\r", ch);
return;
}
if (IS_XXX (ch, XXX_WRATH))
{
stc ("You toggle your Angelic Wrath to only hit mobs.\n\r", ch);
REMOVE_BIT (ch->xxxbits, XXX_WRATH);
return;
}
stc ("You toggle your Angelic Wrath to only hit players.\n\r", ch);
SET_BIT (ch->xxxbits, XXX_WRATH);
return;
}
void
do_apurify (CHAR_DATA * ch, char *argument)
{
CHAR_DATA *victim;
char buf[MSL];
char arg[MIL];
int dam = 1000;
argument = one_argument (argument, arg);
if (IS_NPC (ch))
return;
if (!IS_ANGELW (ch))
{
do_huh (ch, "");
return;
}
if (!IS_SET (ch->apowers, APOWER_PURE3))
{
stc ("You lack the purity to use this power.\n\r", ch);
return;
}
if (arg[0] == '\0' && ch->fighting == NULL)
{
send_to_char ("Who do you wish to purify?\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 (is_safe (ch, victim))
return;
if (ch == victim)
{
send_to_char ("Thou shall not smite thyself?\n\r", ch);
return;
}
dam *= get_purity (ch);
if (victim->alignment < 1)
dam *= 1.5;
if (ch->in_room != NULL && ch->in_room->area->plane == PLANE_HEAVEN)
dam *= 1.5;
act ("$n#7 points at you and yells '#yYour Soul shall be Purified!#7'.\n\r\n\r#7A thin ray of light shoots out of $s finger striking you in the chest, burning all the magic from your being.#n", ch, NULL, victim, TO_VICT);
act ("#7You point at #n$N#7 and yell '#yYour Soul shall be Purified!#7'.\n\r\n\r#7A thin ray of light shoots out of your finger striking $M in the chest.#n", ch, NULL, victim, TO_CHAR);
act ("$n#7 points at #n$N#7 and yells '#yYour Soul shall be Purified!#7'.\n\r\n\r#7#7A thin ray of light shoots out of $s finger striking $M in the chest.#n", ch, NULL, victim, TO_NOTVICT);
damage (ch, victim, dam, gsn_purify, DAM_LIGHT, TRUE, FALSE, FALSE);
waiting (ch, 12);
if (victim == NULL || (IS_RNPC (ch) && victim->position == POS_DEAD))
return;
if (!(victim->affected))
{
send_to_char ("Nothing happens.\n\r", ch);
return;
}
while (victim->affected)
affect_remove (victim, victim->affected);
act ("#7You remove all magical affects from#n $N#7.#n", ch, NULL, victim, TO_CHAR);
act ("$n#7 has removed all magical affects from#n $N#7.#n", ch, NULL, victim, TO_NOTVICT);
act ("$n#7 has removed all magical affects from you.#n", ch, NULL, victim, TO_VICT);
return;
}
void
wrath (CHAR_DATA * ch, bool msg, int type)
{
CHAR_DATA *vch;
CHAR_DATA *vch_next;
bool npc;
int number_hit = 0;
char buf[MSL];
if (IS_NPC (ch))
return;
if (type == HFIRE_DEF)
{
if (!IS_SET (ch->apowers, APOWER_PURE1))
return;
if (IS_XXX (ch, XXX_WRATH))
{
npc = FALSE;
}
else
{
npc = TRUE;
}
}
else if (type == HFIRE_PC)
{
npc = FALSE;
}
else if (type == HFIRE_NPC)
{
npc = TRUE;
}
else
{
if (IS_XXX (ch, XXX_WRATH))
{
npc = FALSE;
}
else
{
npc = TRUE;
}
}
if (msg)
{
stc ("#7You call upon the heavens and release a Righteous Wrath.#n\n\r",
ch);
sprintf (buf,
"$n #7calls upon the heavens and release a Righteous Wrath.#n");
act (buf, ch, NULL, NULL, TO_ROOM);
}
for (vch = ch->in_room->people; vch != NULL; vch = vch_next)
{
vch_next = vch->next_in_room;
if (vch == ch)
continue;
if (number_hit > 9)
continue;
if (is_safe (ch, vch))
continue;
if (!IS_NPC (vch))
{
if (is_same_group (vch, ch))
continue;
}
if (npc)
{
if (!IS_NPC (vch))
continue;
one_hit (ch, vch, gsn_wrath, 0, DAM_FIRE, FALSE);
one_hit (ch, vch, gsn_wrath, 0, DAM_FIRE, FALSE);
one_hit (ch, vch, gsn_wrath, 0, DAM_FIRE, FALSE);
number_hit++;
}
else
{
if (IS_NPC (vch))
continue;
one_hit (ch, vch, gsn_wrath, 0, DAM_FIRE, FALSE);
number_hit++;
}
}
return;
}