Updated to PRC8

Updated to PRC8.  Further function integration.  Fixed NPC onDeath script.   Full compile.  Updated release archive.
This commit is contained in:
Jaysyn904
2024-02-20 22:24:11 -05:00
parent ada3850bad
commit 2bb2c470e0
805 changed files with 37897 additions and 623 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();
}