Spell & Ability Upgrade

Reorganized hak files & removed duplicates.  Added @rafhot's PRC spell & ability level scaling expansion.  Further script integration.  Full compile.
This commit is contained in:
Jaysyn904
2023-08-19 21:08:35 -04:00
parent a911002fe6
commit 7dd83ad168
1466 changed files with 4010 additions and 21168 deletions

View File

@@ -0,0 +1,70 @@
//::///////////////////////////////////////////////
//:: Name Close Wounds
//:: FileName sp_close_wounds.nss
//:://////////////////////////////////////////////
/** @file Close Wounds
Conjuration (Healing)
Level: Clr 3, Hlr 3
Components: V
Casting Time: 1 swift action
Range: Close
Target: One creature
Duration: Instantaneous
Saving Throw: Will half (harmless)
Spell Resistance: Yes (harmless)
This spell cures 2d4 points of damage. You can cast
this spell with an instant utterance.
Used against an undead creature, close wounds deals
damage instea of curing the creature (which takes half
damage if it makes a Will saving throw).
**/
//////////////////////////////////////////////////
// Author: Tenjac
// Date: 5.10.06
///////////////////////////////////////////////////
#include "prc_inc_spells"
#include "prc_add_spell_dc"
void main()
{
if(!X2PreSpellCastCode()) return;
PRCSetSchool(SPELL_SCHOOL_CONJURATION);
object oPC = OBJECT_SELF;
object oTarget = PRCGetSpellTargetObject();
int nMetaMagic = PRCGetMetaMagicFeat();
int nCasterLvl = PRCGetCasterLevel(oPC);
int nHeal = d4(nCasterLvl)+8;
if(nMetaMagic & METAMAGIC_MAXIMIZE)
nHeal = 8+ (nCasterLvl*4);
if(nMetaMagic & METAMAGIC_EMPOWER)
nHeal += (nHeal/2);
//Damage if undead
if(MyPRCGetRacialType(oTarget) == RACIAL_TYPE_UNDEAD
|| (GetHasFeat(FEAT_TOMB_TAINTED_SOUL, oTarget) && GetAlignmentGoodEvil(oTarget) != ALIGNMENT_GOOD))
{
//SR
if(!PRCDoResistSpell(oPC, oTarget, nCasterLvl + SPGetPenetr()))
{
//save for 1/2 dam
if(PRCMySavingThrow(SAVING_THROW_WILL, oTarget, PRCGetSaveDC(oTarget, oPC), SAVING_THROW_TYPE_POSITIVE))
nHeal = nHeal/2;
SPApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_HEALING_S), oTarget);
SPApplyEffectToObject(DURATION_TYPE_INSTANT, PRCEffectDamage(oTarget, nHeal, DAMAGE_TYPE_POSITIVE), oTarget);
}
}
else
{
SPApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_HEALING_S), oTarget);
SPApplyEffectToObject(DURATION_TYPE_INSTANT, PRCEffectHeal(nHeal, oTarget), oTarget);
}
PRCSetSchool();
}