rituals.c
demise/src/rituals.c · 31.4 KB
From the archive dodbackup-final.tar.gz
Download the archive « Back to the archive contents
/************************************************
* *
* Rituals Coded for *
* *
* Dreams of Demise *
* *
* by *
* *
* Gunnar Trulsrud *
* *
* aka *
* *
* Corim *
* *
************************************************/
#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"
char *
get_ritual (CHAR_DATA * ch)
{
static char ritu[100];
ritu[0] = '\0';
switch (ch->pcdata->rituals[R7])
{
default:
{
sprintf (ritu, "#R#bBUGGED#n");
break;
}
case R7_CURSE:
{
sprintf (ritu, "#rCurse#0 of#c Tagaririm#n");
break;
}
case R7_SOULBIND:
{
sprintf (ritu, "#rHarab#0-#rSerapel#0'#rs#c Soul Binding#n");
break;
}
case R7_PLAGUE:
{
sprintf (ritu, "#rOro#0-#rKibalthuse#0'#rs #cPlague#n");
break;
}
case R7_FURY:
{
sprintf (ritu, "#rBalaam#0'#rs#c Fury#n");
break;
}
case R7_STORM:
{
sprintf (ritu, "#rStorm#0 of #cBelial#n");
break;
}
case R7_XAPHAN:
sprintf (ritu, "#rX#Rapha#rn#n");
}
return ritu;
}
void
do_rituals (CHAR_DATA * ch, char *argument)
{
char buf[MSL];
char rit[MSL];
char arg[MIL];
int cost;
int max = 6;
argument = one_argument (argument, arg);
if (IS_NPC (ch))
return;
if (!IS_NEPHANDI (ch) && !IS_CREATOR (ch) && !IS_VAMPIRE (ch))
{
do_huh (ch, "");
return;
}
if (IS_VAMPIRE (ch))
{
do_vampritual (ch, argument);
return;
}
if (arg[0] == '\0')
{
if (ch->pcdata->rituals[9] < 1)
{
stc ("#0You have not learned any #rDiabolic#c Rituals#0.#n\n\r",
ch);
stc
("#0To learn these most heinous of magic's, type: #7demonology study#0.\n\r",
ch);
return;
}
else
{
stc
("#0You have already studied these #rDiabolic #cRituals#0.#n\n\r",
ch);
if (ch->pcdata->rituals[9] > 0)
stc ("#71#0. #rCurse#0 of#c Tagaririm#0.#n\n\r", ch);
if (ch->pcdata->rituals[9] > 1)
stc ("#72#0. #rHarab#0-#rSerapel#0'#rs#c Soul Binding#0.#n\n\r",
ch);
if (ch->pcdata->rituals[9] > 2)
stc ("#73#0. #rOro#0-#rKibalthuse#0'#rs #cPlague#0.#n\n\r", ch);
if (ch->pcdata->rituals[9] > 3)
stc ("#74#0. #rBalaam#0'#rs#c Fury#0.#n\n\r", ch);
if (ch->pcdata->rituals[9] > 4)
stc ("#75#0. #rStorm#0 of #cBelial#0.#n\n\r", ch);
if (ch->pcdata->rituals[9] > 5)
stc ("#76#0. #rX#Rapha#rn#n\n\r", ch);
if (ch->pcdata->rituals[9] < max)
stc
("\n\r#0To learn more of these most heinous of magic's, type: #7demonology study#0.\n\r",
ch);
return;
}
return;
}
else if (!str_cmp (arg, "study"))
{
cost = (1 + ch->pcdata->rituals[9]) * 1000000;
if (ch->pcdata->rituals[9] >= max)
{
stc
("#0You have already completed your study into the #rDiabolic #cRituals#0.#n\n\r",
ch);
return;
}
if (ch->pcdata->power[POWER_CURRENT] < cost)
{
sprintf (buf,
"#0You need#R %d#0 more %s power points before you can study a #rDiabolic#c Ritual#0.#n\n\r",
(cost - ch->pcdata->power[POWER_CURRENT]), get_class (ch));
stc (buf, ch);
return;
}
ch->pcdata->rituals[9]++;
if (ch->pcdata->rituals[9] == 1)
sprintf (rit, "#rCurse#0 of#c Tagaririm#n");
if (ch->pcdata->rituals[9] == 2)
sprintf (rit, "#rHarab#0-#rSerapel#0'#rs#c Soul Binding#n");
if (ch->pcdata->rituals[9] == 3)
sprintf (rit, "#rOro#0-#rKibalthuse#0'#rs #cPlague#n");
if (ch->pcdata->rituals[9] == 4)
sprintf (rit, "#rBalaam#0'#rs#c Fury#n");
if (ch->pcdata->rituals[9] == 5)
sprintf (rit, "#rStorm#0 of #cBelial#n");
if (ch->pcdata->rituals[9] == 6)
sprintf (rit, "#rX#Rapha#rn#n");
sprintf (buf, "#0You study the %s#0 ritual.\n\r", rit);
stc (buf, ch);
if (ch->pcdata->rituals[9] >= max)
stc ("#0You have studied all the #rDiabolic #cRituals#0.#n\n\r", ch);
return;
}
else
{
do_rituals (ch, "");
return;
}
return;
}
bool
rit_timer (CHAR_DATA * ch)
{
char buf[MSL];
if (IS_NPC (ch))
return TRUE;
if (IS_CREATOR (ch) && ch->pcdata->rituals[R8] > 0)
{
ch->pcdata->rituals[R8] = 0;
}
if (ch->pcdata->rituals[R8] > 0)
{
sprintf (buf,
"#0You can not perform a #rDiabolic #cRituals#0 for another %s#0.#n\n\r",
get_time (ch->pcdata->rituals[R8], "#0"));
stc (buf, ch);
return TRUE;
}
return FALSE;
}
bool
check_soul (CHAR_DATA * ch, OBJ_DATA * obj, int soul, int cost)
{
char buf[MSL];
bool answer = TRUE;
int count = 0;
switch (soul)
{
default:
case ANY_SOUL:
{
if (obj->value[0] > 0)
count += obj->value[0];
if (obj->value[1] > 0)
count += obj->value[1];
if (obj->value[2] > 0)
count += obj->value[2];
if (count < cost)
{
sprintf (buf,
"#0You need at least #R%d#0 soul%s trapped in your#n $p#0 in order to perform this #rDiabolic#c Ritual#0.#n",
cost, cost == 1 ? "" : "s");
act (buf, ch, obj, NULL, TO_CHAR);
answer = FALSE;
}
break;
}
case GOOD_SOUL:
{
if (obj->value[0] < 1)
{
sprintf (buf,
"#0You need at least #R%d #7Angelic#0 soul%s trapped in your#n $p#0 in order to perform this #rDiabolic#c Ritual#0.#n",
cost, cost == 1 ? "" : "s");
act (buf, ch, obj, NULL, TO_CHAR);
answer = FALSE;
}
break;
}
case NEUTRAL_SOUL:
{
if (obj->value[1] < 1)
{
sprintf (buf,
"#0You need at least #R%d#C Neutral#0 soul%s trapped in your#n $p#0 in order to perform this #rDiabolic#c Ritual#0.#n",
cost, cost == 1 ? "" : "s");
act (buf, ch, obj, NULL, TO_CHAR);
answer = FALSE;
}
break;
}
case EVIL_SOUL:
{
if (obj->value[2] < 1)
{
sprintf (buf,
"#0You need at least #R%d#c Demonic#0 soul%s trapped in your#n $p#0 in order to perform this #rDiabolic#c Ritual#0.#n",
cost, cost == 1 ? "" : "s");
act (buf, ch, obj, NULL, TO_CHAR);
answer = FALSE;
}
break;
}
}
return answer;
}
void
take_soul (CHAR_DATA * ch, OBJ_DATA * obj, int soul, int cost)
{
char buf[MSL];
bool paid = FALSE;
int cost1 = 0;
int cost2 = 0;
int cost3 = 0;
int count = 0;
switch (soul)
{
default:
case ANY_SOUL:
{
if (obj->value[1] > 0 && !paid)
{
if (obj->value[1] < cost)
{
cost1 += obj->value[1];
obj->value[1] = 0;
}
else
{
obj->value[1] -= cost;
paid = TRUE;
}
}
if (obj->value[2] > 0 && !paid)
{
if (obj->value[2] < cost)
{
cost2 += obj->value[2];
obj->value[2] = 0;
}
else
{
obj->value[2] -= cost;
paid = TRUE;
}
}
if (obj->value[1] > 0 && !paid)
{
if (obj->value[1] < cost)
{
cost3 += obj->value[1];
obj->value[1] = 0;
}
else
{
obj->value[1] -= cost;
paid = TRUE;
}
}
if (cost1 > 0)
obj->value[1] -= cost1;
if (cost2 > 0)
obj->value[0] -= cost2;
if (cost3 > 0)
obj->value[2] -= cost3;
if (cost < 1)
cost = cost1 + cost2 + cost3;
sprintf (buf,
"#0You sacrifice #R%d#0 soul%s to power your #rDiabolic#c Ritual#0.#n",
cost, cost == 1 ? "" : "s");
act (buf, ch, obj, NULL, TO_CHAR);
break;
}
case GOOD_SOUL:
{
sprintf (buf,
"#0You sacrifice #R%d #7Angelic#0 soul%s to power your #rDiabolic#c Ritual#0.#n",
cost, cost == 1 ? "" : "s");
act (buf, ch, obj, NULL, TO_CHAR);
obj->value[0] -= cost;
break;
}
case NEUTRAL_SOUL:
{
sprintf (buf,
"#0You sacrifice #R%d#C Neutral#0 soul%s to power your #rDiabolic#c Ritual#0.#n",
cost, cost == 1 ? "" : "s");
act (buf, ch, obj, NULL, TO_CHAR);
obj->value[1] -= cost;
break;
}
case EVIL_SOUL:
{
sprintf (buf,
"#0You sacrifice #R%d#c Demonic#0 soul%s to power your #rDiabolic#c Ritual#0.#n",
cost, cost == 1 ? "" : "s");
act (buf, ch, obj, NULL, TO_CHAR);
obj->value[2] -= cost;
break;
}
}
return;
}
void
do_ritual (CHAR_DATA * ch, char *argument)
{
CHAR_DATA *victim;
CHAR_DATA *gch;
OBJ_DATA *obj;
char buf[MSL];
char arg1[MIL];
char arg2[MIL];
int level = 0;
argument = one_argument (argument, arg1);
argument = one_argument (argument, arg2);
if (IS_NPC (ch))
return;
if (!IS_NEPHANDI (ch) && !IS_CREATOR (ch))
{
do_huh (ch, "");
return;
}
if (!IS_CREATOR (ch))
{
if (ch->pcdata->rituals[9] < 1)
{
stc ("#0You have not learned any #rDiabolic#c Rituals#0.#n\n\r",
ch);
stc
("#0To learn these most heinous of magic's, type: #7demonology study#0.\n\r",
ch);
return;
}
}
if (IS_CREATOR (ch))
{
level = 5;
}
else
{
level = ch->pcdata->rituals[9];
}
if (rit_timer (ch))
{
return;
}
if (ch->pcdata->rituals[R9] > 0)
{
sprintf (buf,
"#0You will complete the #rDiabolic#c Ritual#0: %s#0 in about %s#0.#n\n\r",
get_ritual (ch), get_time (ch->pcdata->rituals[R9], "#0"));
stc (buf, ch);
return;
}
if (!IS_CREATOR (ch))
{
if (ch->in_room->area->plane != PLANE_HELL)
{
stc
("#0You can't perfom a #rDiabolic #cRitual#0 outside of #RHell#0.#n\n\r",
ch);
return;
}
if (ch->position != POS_MEDITATING)
{
stc
("#0You need to be meditating to perform a #rDiabolic#c Ritual#0.#n\n\r",
ch);
return;
}
obj = get_eq_char (ch, WEAR_SPECIAL);
if (obj == NULL || !IS_SET (obj->weapflags, WEAPON_SOULJAR))
{
stc
("#0You can't perform a #rDiabolic#c Ritual#0 with out an active Soul Jar.#n\n\r",
ch);
return;
}
}
if (arg1[0] == '\0')
{
stc ("#0What #rDiabolic#c Ritual #0do you wish to attempt?#n\n\r", ch);
if (level < 1)
stc
("#0To learn more of these most heinous of magic's, type: #7demonology study#0.\n\r",
ch);
if (level > 0)
stc ("#71#0. #rCurse#0 of#c Tagaririm#0 (#ccurse#0).#n\n\r", ch);
if (level > 1)
stc
("#72#0. #rHarab#0-#rSerapel#0'#rs#c Soul Binding#0 (#csoulbind#0).#n\n\r",
ch);
if (level > 2)
stc
("#73#0. #rOro#0-#rKibalthuse#0'#rs #cPlague#0 (#cplague#0).#n\n\r",
ch);
if (level > 3)
stc ("#74#0. #rBalaam#0'#rs#c Fury#0 (#cfury#0).#n\n\r", ch);
if (level > 4)
stc ("#75#0. #rStorm#0 of #cBelial#0 (#cstorm#0).#n\n\r", ch);
if (level > 5)
stc ("#76#0. #rX#Rapha#rn#0 (#cxaphan#0).#n\n\r", ch);
return;
}
else if (!str_cmp (arg1, "curse") && level > 0)
{
if (rit_timer (ch))
return;
if (!check_soul (ch, obj, ANY_SOUL, 1))
return;
if ((victim = find_pc_mud (ch, arg2)) == NULL)
{
stc
("#0Who do you wish to afflict with the #rCurse#0 of#c Tagaririm#0.#n\n\r",
ch);
return;
}
if (global_safe (ch, victim))
return;
stc
("#0You start the #rDiabolic#c Ritual#0: #rCurse#0 of#c Tagaririm#0.#n\n\r",
ch);
ch->pcdata->rituals[R7] = R7_CURSE;
free_string (ch->pcdata->ritualvictim);
ch->pcdata->ritualvictim = str_dup (victim->name);
if (IS_CREATOR (ch))
{
ch->pcdata->rituals[R9] = 1;
}
else
{
take_soul (ch, obj, ANY_SOUL, 1);
ch->pcdata->rituals[R9] = 30;
}
return;
}
else if (!str_cmp (arg1, "soulbind") && level > 1)
{
if (rit_timer (ch))
return;
if (!check_soul (ch, obj, GOOD_SOUL, 1))
return;
stc
("#0You start the #rDiabolic#c Ritual#0: #rHarab#0-#rSerapel#0'#rs#c Soul Binding#0.#n\n\r",
ch);
ch->pcdata->rituals[R7] = R7_SOULBIND;
if (IS_CREATOR (ch))
{
ch->pcdata->rituals[R9] = 1;
}
else
{
ch->pcdata->rituals[R9] = 60;
take_soul (ch, obj, GOOD_SOUL, 1);
}
return;
}
else if (!str_cmp (arg1, "plague") && level > 2)
{
if (rit_timer (ch))
return;
if (!check_soul (ch, obj, EVIL_SOUL, 1))
return;
if ((victim = find_pc_mud (ch, arg2)) == NULL)
{
stc
("#0Who do you wish to afflict with #rOro#0-#rKibalthuse#0'#rs #cPlague#0.#n\n\r",
ch);
return;
}
if (global_safe (ch, victim))
return;
stc
("#0You start the #rDiabolic#c Ritual#0: #rOro#0-#rKibalthuse#0'#rs #cPlague#0.#n\n\r",
ch);
ch->pcdata->rituals[R7] = R7_PLAGUE;
free_string (ch->pcdata->ritualvictim);
ch->pcdata->ritualvictim = str_dup (victim->name);
if (IS_CREATOR (ch))
{
ch->pcdata->rituals[R9] = 1;
}
else
{
ch->pcdata->rituals[R9] = 90;
take_soul (ch, obj, EVIL_SOUL, 1);
}
return;
}
else if (!str_cmp (arg1, "fury") && level > 3)
{
if (rit_timer (ch))
return;
if (!check_soul (ch, obj, ANY_SOUL, 2))
return;
stc
("#0You start the #rDiabolic#c Ritual#0: #rBalaam#0'#rs#c Fury#0.#n\n\r",
ch);
ch->pcdata->rituals[R7] = R7_FURY;
if (IS_CREATOR (ch))
{
ch->pcdata->rituals[R9] = 1;
}
else
{
ch->pcdata->rituals[R9] = 120;
take_soul (ch, obj, ANY_SOUL, 2);
}
return;
}
else if (!str_cmp (arg1, "storm") && level > 4)
{
if (rit_timer (ch))
return;
if (mudconfig->helltimer > 0)
{
sprintf (buf,
"#0The forces of #rHell#0 need to gather for another #R%s#0 before the #rStorm#0 of #cBelial#0 can be unleashed again.#n\n\r",
get_time (mudconfig->helltimer, "#R"));
stc (buf, ch);
return;
}
// if (!IS_CREATOR (ch))
//{
if (!check_soul (ch, obj, EVIL_SOUL, 3))
return;
//}
stc
("#0You start the #rDiabolic#c Ritual#0: #rStorm#0 of #cBelial#0.#n\n\r",
ch);
ch->pcdata->rituals[R7] = R7_STORM;
if (IS_CREATOR (ch))
{
ch->pcdata->rituals[R9] = 1;
}
else
{
ch->pcdata->rituals[R9] = 180;
take_soul (ch, obj, EVIL_SOUL, 3);
}
return;
}
else if (!str_cmp (arg1, "Xaphan") && level > 5)
{
OBJ_DATA *obj2;
if (rit_timer (ch))
return;
if (!check_soul (ch, obj, GOOD_SOUL, 3))
return;
if ((obj2 = get_obj_carry (ch, arg2)) == NULL)
{
stc ("#0You dont have that object!#n\n\r", ch);
return;
}
if (str_cmp (obj2->questowner, ch->name))
{
stc ("#0That isn't yours!#n\n\r", ch);
return;
}
if (obj2->item_type != ITEM_ARMOR)
{
stc ("#0This can only be used on armor!#n\n\r", ch);
return;
}
if (IS_SET (obj2->weapflags, WEAPON_NEPHED))
{
act
("$p#0 has already been forged in the #rF#yi#Rr#ye#rs#0 of #rH#Re#rl#Rl#0.#n",
ch, obj, NULL, TO_CHAR);
return;
}
stc ("#0You start the #rDiabolic#c Ritual#0: #rX#Rapha#rn#n.#n\n\r",
ch);
ch->pcdata->rituals[R7] = R7_XAPHAN;
ch->pcdata->ritualobject = obj2;
if (IS_CREATOR (ch) || IS_LINKSYS (ch))
{
ch->pcdata->rituals[R9] = 1;
}
else
{
ch->pcdata->rituals[R9] = 60;
take_soul (ch, obj, GOOD_SOUL, 3);
}
return;
}
else
{
do_ritual (ch, "");
return;
}
return;
}
void
do_souljar (CHAR_DATA * ch, char *argument)
{
OBJ_INDEX_DATA *pObjIndex;
OBJ_DATA *obj;
char buf[MSL];
char arg[MIL];
int vnum = 0;
argument = one_argument (argument, arg);
if (IS_NPC (ch))
return;
if (!IS_NEPHANDI (ch))
{
do_huh (ch, "");
return;
}
if (ch->in_room->area->plane != PLANE_HELL)
{
stc
("#0You can not perfom a #rDiabolic #cRitual#0 outside of #RHell#0.#n\n\r",
ch);
return;
}
if (ch->position != POS_MEDITATING)
{
stc
("#0You need to be meditating to perform a #rDiabolic#c Ritual#0.#n\n\r",
ch);
return;
}
if (!IS_IMMORTAL (ch) && IS_NYM (ch, NYM_SOULJAR))
{
stc ("#0You have already created a Soul Jar.#n\n\r", ch);
return;
}
if (arg[0] == '\0')
{
stc
("#0To create s Soul Jar, you must give up a part of your Life Force (#R5000 Hit Points#0)\n\rWhich will be lost to you once the Jar is created.\n\r",
ch);
stc
("#0To create a Soul Jar and #RSacrifice 5000 Hit Points#c type: souljar create#0.#n\n\r",
ch);
return;
}
else if (!str_cmp (arg, "create"))
{
if (ch->level < 12 && ch->max_hit < 5000)
{
stc
("#0You dont have enough Life Force to create the Soul Jar.\n\r",
ch);
return;
}
vnum = 29626;
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;
obj->value[3] = 24;
SET_BIT (obj->quest, QUEST_RELIC);
SET_BIT (obj->weapflags, WEAPON_SOULJAR);
SET_BIT (ch->nymbits, NYM_SOULJAR);
SET_BIT (obj->spectype, SITEM_DEMONIC);
SET_BIT (obj->extra_flags, ITEM_ANTI_GOOD);
add_affect (obj, APPLY_DAMROLL, 800);
add_affect (obj, APPLY_HITROLL, 800);
add_affect (obj, APPLY_DAMCAP, 500);
add_affect (obj, APPLY_HIT, 2000);
if (ch->level < 12)
ch->max_hit -= 5000;
free_string (obj->questmaker);
obj->questmaker = str_dup (ch->name);
free_string (obj->creator);
sprintf (buf, "%s (Soul Jar)", ch->name);
obj->creator = str_dup (buf);
free_string (obj->questowner);
obj->questowner = str_dup (ch->name);
act
("#0You perform the Soul Jar ritual, creating $p with your #rDiabolic #cMagic#0 and infusing it with your own Life Force.#n",
ch, obj, NULL, TO_CHAR);
act
("$n #0performs the Soul Jar ritual, creating $p with $s #rDiabolic #cMagic#0 and infusing it with $s own Life Force.#n",
ch, obj, NULL, TO_ROOM);
return;
}
else
{
do_souljar (ch, "");
return;
}
return;
}
void
addsoul (CHAR_DATA * ch, CHAR_DATA * victim)
{
OBJ_DATA *jar;
char buf[MSL];
if (IS_NPC (ch))
{
bug ("Mob trying to add a soul", 0);
return;
}
if (IS_NPC (victim))
{
sprintf (buf, "Bug: %s trying to add Mob soul", ch->name);
bug (buf, 0);
return;
}
jar = get_eq_char (ch, WEAR_SPECIAL);
if (jar == NULL || !IS_SET (jar->weapflags, WEAPON_SOULJAR))
{
sprintf (buf, "Bug: %s is not holding a Soul Jar", ch->name);
bug (buf, 0);
return;
}
if (victim->alignment >= 500)
{
jar->value[0]++;
}
else if (victim->alignment <= -500)
{
jar->value[2]++;
}
else
{
jar->value[1]++;
}
act ("#0You channel part of #n$N#0 soul into#n $p#n", ch, jar, victim,
TO_CHAR);
act ("$n#0 channels part of your soul into#n $p#n", ch, jar, victim,
TO_VICT);
act ("$n#0 channels part #n$N#0 soul into#n $p#n", ch, jar, victim,
TO_NOTVICT);
return;
}
void
do_checksoul (CHAR_DATA * ch, char *argument)
{
OBJ_DATA *obj;
char buf[MSL];
char arg1[MIL];
char arg2[MIL];
int cost = 0;
argument = one_argument (argument, arg1);
argument = one_argument (argument, arg2);
if (IS_NPC (ch))
return;
if (!IS_NEPHANDI (ch))
{
do_huh (ch, "");
return;
}
obj = get_eq_char (ch, WEAR_SPECIAL);
if (obj == NULL || !IS_SET (obj->weapflags, WEAPON_SOULJAR))
{
stc ("You dont have an active Soul Jar.\n\r", ch);
return;
}
if (arg1[0] == '\0')
{
stc ("\n\r#r========================================#n\n\r", ch);
if ((obj->value[0] > 0) || (obj->value[1] > 0)
|| (obj->value[2] > 0) || (obj->value[3] > 0))
{
stc ("#7 This Soul Jar Holds.#n\n\r", ch);
stc ("#r========================================#n\n\r", ch);
if (obj->value[0] > 0)
{
sprintf (buf, "#7 Angelic Souls#c: #R%d#n\n\r", obj->value[0]);
stc (buf, ch);
}
if (obj->value[1] > 0)
{
sprintf (buf, "#7 Neutral Souls#c: #R%d#n\n\r", obj->value[1]);
stc (buf, ch);
}
if (obj->value[2] > 0)
{
sprintf (buf, "#7 Demonic Souls#c: #R%d#n\n\r", obj->value[2]);
stc (buf, ch);
}
if (obj->value[3] > 0)
{
sprintf (buf, "#7 Soul Shards#c: #R%d#n\n\r", obj->value[3]);
stc (buf, ch);
}
}
else
{
stc ("#7 This Soul Jar is Empty.#n\n\r", ch);
}
stc ("#r========================================#n\n\r", ch);
stc ("#7 To buy Soul Shards type#c:#7 Souls Buy.#n\n\r", ch);
stc ("#7 To Create Souls#c:#7 Souls Create.#n\n\r", ch);
stc ("#r========================================#n\n\r", ch);
}
else if (!str_cmp (arg1, "buy"))
{
cost = 125;
if (ch->in_room->area->plane != PLANE_HELL)
{
stc
("#0You can not perfom a #rDiabolic #cRitual#0 outside of #RHell#0.#n\n\r",
ch);
return;
}
if (ch->position != POS_MEDITATING)
{
stc
("#0You need to be meditating to perform a #rDiabolic#c Ritual#0.#n\n\r",
ch);
return;
}
if (ch->practice < cost)
{
sprintf (buf,
"#0You need #R%d#0 more primal to buy a #rSoul#c Shard#0.#n\n\r",
(cost - ch->practice));
stc (buf, ch);
return;
}
obj->value[3]++;
act
("#0You perform a #rDiabolic#c Ritual#0 to channel a Shard of a condemned Soul into#n $p#0.#n",
ch, obj, NULL, TO_CHAR);
act
("$n#0 performs a #rDiabolic#c Ritual#0 to channel a Shard of a condemned Soul into#n $p#0.#n",
ch, obj, NULL, TO_ROOM);
ch->practice -= cost;
return;
}
else if (!str_cmp (arg1, "create"))
{
cost = 4;
if (ch->in_room->area->plane != PLANE_HELL)
{
stc
("#0You can not perfom a #rDiabolic #cRitual#0 outside of #RHell#0.#n\n\r",
ch);
return;
}
if (ch->position != POS_MEDITATING)
{
stc
("#0You need to be meditating to perform a #rDiabolic#c Ritual#0.#n\n\r",
ch);
return;
}
if (arg2[0] == '\0')
{
stc
("#0What kind of #rSoul#0 do you wish to create? #c<#RAngelic#c/#RNeutral#c/#RDemonic#c>#0.\n\r",
ch);
return;
}
if (obj->value[3] < cost)
{
sprintf (buf,
"#0You need #R%d#0 more #rSoul#c Shards#0 before you can perform this #rDiabolic#c Ritual#0.#n",
(cost - obj->value[3]));
stc (buf, ch);
return;
}
if (!str_cmp (arg2, "angelic"))
{
if (obj->value[0] < 1)
{
stc
("#0You need atleast #R1#7 Angelic #rSoul#0 in order to mirror that kind of #rSoul#0.#n\n\r",
ch);
return;
}
act
("$n #0performs a curroptive #rDiabolic#c Ritual#0 with the power of the #n$p#0 creating an #7Angelic#r Soul#0.",
ch, NULL, NULL, TO_ROOM);
act
("You #0perform a curroptive #rDiabolic#c Ritual#0 with the power of the #n$p#0 creating an #7Angelic#r Soul#0.",
ch, NULL, NULL, TO_CHAR);
obj->value[0]++;
obj->value[3] -= 4;
return;
}
else if (!str_cmp (arg2, "neutral"))
{
if (obj->value[1] < 1)
{
stc
("#0You need atleast #R1#C Neutral #rSoul#0 in order to mirror that kind of #rSoul#0.#n\n\r",
ch);
return;
}
act
("$n #0performs a curroptive #rDiabolic#c Ritual#0 with the power of the #n$p#0 creating a #CNeutral#r Soul#0.",
ch, NULL, NULL, TO_ROOM);
act
("You #0perform a curroptive #rDiabolic#c Ritual#0 with the power of the #n$p#0 creating a #CNeutral#r Soul#0.",
ch, NULL, NULL, TO_CHAR);
obj->value[1]++;
obj->value[3] -= 4;
return;
}
else if (!str_cmp (arg2, "demonic"))
{
if (obj->value[2] < 1)
{
stc
("#0You need atleast #R1#c Demonic #rSoul#0 in order to mirror that kind of #rSoul#0.#n\n\r",
ch);
return;
}
act
("$n #0performs a curroptive #rDiabolic#c Ritual#0 with the power of the #n$p#0 creating a #cDemonic#r Soul#0.",
ch, NULL, NULL, TO_ROOM);
act
("You #0perform a curroptive #rDiabolic#c Ritual#0 with the power of the #n$p#0 creating a #cDemonic#r Soul#0.",
ch, NULL, NULL, TO_CHAR);
obj->value[2]++;
obj->value[3] -= 4;
return;
}
else
{
do_checksoul (ch, "create");
return;
}
return;
}
else
{
do_checksoul (ch, "");
return;
}
return;
}
void
do_nephcurse (CHAR_DATA * ch, char *argument)
{
char buf[MSL];
int sn;
CHAR_DATA *victim;
char arg[MIL];
argument = one_argument (argument, arg);
if (IS_NPC (ch))
return;
if (!IS_NEPHANDI (ch) && !IS_CREATOR (ch))
{
do_huh (ch, "");
return;
}
if ((victim = find_pc_mud (ch, arg)) == NULL)
{
stc ("Your victim has escaped you.\n\r", ch);
rit_miss (ch, "");
return;
}
if ((sn = skill_lookup ("nephandi curse")) < 0)
return;
act
("#0You complete the #rDiabolic#c Ritual#0 afflicting#n $N#0 with the #rCurse#0 of#c Tagaririm#0.#n",
ch, NULL, victim, TO_CHAR);
act ("$n #0completes $s #rDiabolic#c Ritual#0.#n", ch, NULL, NULL, TO_ROOM);
(*skill_table[sn].spell_fun) (sn, 100, ch, victim);
ch->pcdata->rituals[R8] = 360;
return;
}
void
do_nephsoulbind (CHAR_DATA * ch, char *argument)
{
char buf[MSL];
if (IS_NPC (ch))
return;
if (!IS_NEPHANDI (ch) && !IS_CREATOR (ch))
{
do_huh (ch, "");
return;
}
if (IS_NYM (ch, NYM_SOULBIND))
{
stc ("#0You have already bonded with an #7Angelic#0 soul.\n\r", ch);
rit_miss (ch, "");
return;
}
stc
("#0You complete the #rDiabolic#c Ritual#0 bonding with the #7Angelic#0 soul through #rHarab#0-#rSerapel#0'#rs#c Soul Binding#0.#n\n\r",
ch);
act ("$n #0completes $s #rDiabolic#c Ritual#0.#n", ch, NULL, NULL, TO_ROOM);
SET_BIT (ch->nymbits, NYM_SOULBIND);
ch->pcdata->rituals[R8] = 420;
return;
}
void
do_nephplague (CHAR_DATA * ch, char *argument)
{
char buf[MSL];
CHAR_DATA *victim;
char arg[MIL];
argument = one_argument (argument, arg);
if (IS_NPC (ch))
return;
if (!IS_NEPHANDI (ch) && !IS_CREATOR (ch))
{
do_huh (ch, "");
return;
}
if ((victim = find_pc_mud (ch, arg)) == NULL)
{
stc ("Your victim has escaped you.\n\r", ch);
rit_miss (ch, "");
return;
}
if (IS_NPC (victim))
{
stc ("Not on NPC's.\n\r", ch);
rit_miss (ch, "");
return;
}
if (IS_NEPHANDI (victim))
{
stc ("Not on Nephandi's.\n\r", ch);
rit_miss (ch, "");
return;
}
act
("#0You complete the #rDiabolic#c Ritual#0 afflicting#n $N#0 with #rOro#0-#rKibalthuses #cPlague#0.#n",
ch, NULL, victim, TO_CHAR);
act ("$n #0completes $s #rDiabolic#c Ritual#0.#n", ch, NULL, NULL, TO_ROOM);
act
("#0You feel terrible as you are afflicted with #rOro#0-#rKibalthuses#c Plague#0.#n",
victim, NULL, NULL, TO_CHAR);
act ("$n#0 suddenly turns very pale.#n", victim, NULL, NULL, TO_ROOM);
victim->pcdata->nephplague = 300;
free_string (ch->pcdata->ritualvictim);
ch->pcdata->ritualvictim = str_dup ("");
ch->pcdata->rituals[R8] = 480;
return;
}
void
do_nephfury (CHAR_DATA * ch, char *argument)
{
char buf[MSL];
if (IS_NPC (ch))
return;
if (!IS_NEPHANDI (ch) && !IS_CREATOR (ch))
{
do_huh (ch, "");
return;
}
if (IS_NYM (ch, NYM_NEPHFURY))
{
stc ("#0You are already affected by #rBalaam#0'#rs#c Fury#0.\n\r", ch);
rit_miss (ch, "");
return;
}
stc
("#0You complete the #rDiabolic#c Ritual#0 calling on #rBalaam#0'#rs#c Fury#0.#n\n\r",
ch);
act ("$n #0completes $s #rDiabolic#c Ritual#0.#n", ch, NULL, NULL, TO_ROOM);
send_to_char ("You are engulfed in infernal flames!\n\r", ch);
act ("$n is engulfed in infernal flames!", ch, NULL, NULL, TO_ROOM);
SET_BIT (ch->affected_by, AFF_FLAMING);
SET_BIT (ch->more, MORE_FLAMES);
SET_BIT (ch->nymbits, NYM_NEPHFURY);
ch->pcdata->rituals[R8] = 540;
return;
}
void
do_nephstorm (CHAR_DATA * ch, char *argument)
{
OBJ_DATA *obj;
char buf[MSL];
bool found = FALSE;
if (IS_NPC (ch))
return;
if (!IS_NEPHANDI (ch) && !IS_CREATOR (ch))
{
do_huh (ch, "");
return;
}
if (IS_SET (mudconfig->world_affects, WORLD_HELLSTORM))
{
stc ("#0The #rStorm#0 of #cBelial#0 is already raging.#n\n\r", ch);
rit_miss (ch, "");
return;
}
if (has_artifact (ch))
{
for (obj = object_list; obj != NULL; obj = obj->next)
{
if (!IS_SET (obj->quest, QUEST_ARTIFACT))
continue;
if (!str_cmp (obj->carried_by->name, ch->name))
{
found = TRUE;
free_string (obj->questowner);
obj->questowner = str_dup (ch->name);
}
}
}
stc
("#0You complete the #rDiabolic#c Ritual#0 and the #rStorm#0 of #cBelial#0 is released as your body and soul is consumed by invisible flames.#n\n\r",
ch);
act
("$n #0completes $s #rDiabolic#c Ritual#0 and is utterly consumed by an invisible flame.#n",
ch, NULL, NULL, TO_ROOM);
global_act
("#0The #rStorm#0 of #cBelial#0 is unleashed upon the world with #c$n's#0 self sacrifice.#n",
ch, NULL, NULL);
if (!IS_IMMORTAL (ch))
{
raw_kill (ch, ch);
}
if (found)
{
for (obj = object_list; obj != NULL; obj = obj->next)
{
if (!IS_SET (obj->quest, QUEST_ARTIFACT))
continue;
if (!str_cmp (obj->questowner, ch->name))
{
free_string (obj->questowner);
obj->questowner = str_dup ("");
}
}
}
ch->pdeath++;
SET_BIT (mudconfig->world_affects, WORLD_HELLSTORM);
mudconfig->hellstorm = 3600;
ch->pcdata->rituals[R8] = 600;
return;
}
void
rit_miss (CHAR_DATA * ch, char *argument)
{
if (IS_NPC (ch))
return;
if (!IS_NEPHANDI (ch) && !IS_CREATOR (ch))
{
do_huh (ch, "");
return;
}
stc
("#0You lucked out, #cRitual#0 missfire isen't fully coded yet. So all that just happened is that you lost the souls you paid for it.#n\n\r",
ch);
return;
}
void
do_soulcharge (CHAR_DATA * ch, char *argument)
{
return;
}
void
plague (CHAR_DATA * ch, char *argument)
{
MOB_INDEX_DATA *pMobIndex;
CHAR_DATA *victim;
char buf[MSL];
if (IS_NPC (ch))
return;
if (ch->pcdata->nephplague == 0)
return;
if (IS_NEPHANDI (ch) || IS_IMMORTAL (ch) || IS_NEWBIE (ch)
|| !can_arti (ch))
{
ch->pcdata->nephplague = 0;
return;
}
if ((pMobIndex = get_mob_index (29619)) == NULL)
{
ch->pcdata->nephplague = 0;
return;
}
if (ch->in_room->area->plane == PLANE_VALHALLA)
{
ch->pcdata->nephplague = 0;
return;
}
victim = create_mobile (pMobIndex);
char_to_room (victim, ch->in_room);
SET_BIT (victim->act, ACT_NOEXP);
SET_BIT (victim->corbits, COR_SEEALL);
if (IS_SET (ch->affected_by, AFF_SHADOWPLANE))
SET_BIT (victim->affected_by, AFF_SHADOWPLANE);
if (IS_NYM (ch, NYM_DEATHPLANE))
SET_BIT (victim->nymbits, NYM_DEATHPLANE);
if (IS_SET (ch->xxbits, XX_DREAMWORLD))
SET_BIT (victim->xxbits, XX_DREAMWORLD);
if (IS_SET (ch->affected_by, AFF_ETHEREAL))
SET_BIT (victim->affected_by, AFF_ETHEREAL);
victim->max_hit = ch->max_hit;
victim->hit = ch->max_hit;
victim->demontimer = number_range (180, 600);
act
("#0One of the boils covering your body bursts and #n$N#0 leaps out, instantly growing.",
ch, NULL, victim, TO_CHAR);
act
("#0One of the boils covering #n$n#0's body bursts and #n$N#0 leaps out, instantly growing.",
ch, NULL, victim, TO_ROOM);
check_social (victim, "cackle", "");
sprintf (buf, "Time for you to Die %s!", ch->name);
do_say (victim, buf);
multi_hit (victim, ch, TYPE_UNDEFINED);
multi_hit (victim, ch, TYPE_UNDEFINED);
return;
}
void
do_nephxaphan (CHAR_DATA * ch, OBJ_DATA * obj)
{
if (obj == NULL)
return;
if (str_cmp (obj->questowner, ch->name))
{
stc ("#0That isn't yours!#n\n\r", ch);
return;
}
if (obj->item_type != ITEM_ARMOR)
{
stc ("#0This can only be used on armor!#n\n\r", ch);
return;
}
if (IS_SET (obj->weapflags, WEAPON_NEPHED))
{
act
("$p#0 has already been forged in the #rF#yi#Rr#ye#rs#0 of #rH#Re#rl#Rl#0.#n",
ch, obj, NULL, TO_CHAR);
return;
}
SET_BIT (obj->weapflags, WEAPON_NEPHED);
act ("#0You forge#n $p#0 in the #rF#yi#Rr#ye#rs#0 of #rH#Re#rl#Rl#0.#n", ch,
obj, NULL, TO_CHAR);
return;
}