RATDOG/_module/nss/book_levelup.nss

45 lines
1.9 KiB
Plaintext
Raw Permalink Normal View History

//:://////////////////////////////////////////////////////////////////
/*
Book of Vile Darkness: This is a work of ineffable evil<69>meat
and drink to divine spellcasters of that alignment (LE, NE, CE).
To fully consume the contents requires one week of study. Once
this has been accomplished, an evil spellcaster gains a +1
inherent bonus to Wisdom and one experience level<65>receiving enough
XP to put the character<65>s XP total midway between the minimum
needed for his new (higher) level and the minimum needed for
the level beyond that.
All lawful neutral, neutral, or chaotic neutral characters who
touch the book take 5d4 points of damage, and reading its pages
causes them to become evil (Will DC 13 negates). Such converts
immediately seek out an evil cleric to confirm their new alignment
(with an atonement spell).
Divine spellcasters neither good nor evil (LN, N, CN) who read
the book either lose 2d6<64>1,000 XP (01<30>50 on d%) or become evil
without benefit from the book (51<35>100). Good divine spellcasters
(LG, NG, CG) perusing the pages of the book of vile darkness have
to make a DC 16 Fortitude save or die. If they do not die, they
must succeed on a DC 15 Will save or suffer from a continuous
confusion effect (per the insanity spell). In the latter event,
even if the save is successful, the character loses 20,000 XP,
minus 1,000 for each point of Wisdom he has. (This calculation
cannot result in an XP gain.)
Other characters of good alignment take 5d6 points of damage from
just handling the tome. If such a character looks inside, there is
an 80% chance that an evil outsider attacks the character that
night.
*/
void main()
{
object oPC = GetItemActivator();
int nHD = GetHitDice(oPC) + 1;
int nNewXP = ((( nHD * ( nHD - 1) ) / 2 ) * 1000) + 1;
SetXP(oPC, nNewXP);
object oItem;
oItem = GetItemPossessedBy(oPC, "book_levelup");
if (GetIsObjectValid(oItem))
DestroyObject(oItem);
}