Initial upload
Initial upload. PRC8 has been added. Module compiles, PRC's default AI & treasure scripts have been integrated. Started work on top hak for SLA / Ability / Scripting modifications.
This commit is contained in:
59
_removed/nw_s0_deaward.nss
Normal file
59
_removed/nw_s0_deaward.nss
Normal file
@@ -0,0 +1,59 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Death Ward
|
||||
//:: NW_S0_DeaWard.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
The target creature is protected from the instant
|
||||
death effects for the duration of the spell
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: July 27, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Update Pass By: Preston W, On: July 27, 2001
|
||||
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-23 by GeorgZ
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
|
||||
|
||||
//Declare major variables
|
||||
object oTarget = GetSpellTargetObject();
|
||||
effect eDeath = EffectImmunity(IMMUNITY_TYPE_DEATH);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_DEATH_WARD);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
|
||||
effect eLink = EffectLinkEffects(eDeath, eDur);
|
||||
|
||||
|
||||
int nDuration = GetCasterLevel(OBJECT_SELF);
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_DEATH_WARD, FALSE));
|
||||
//Enter Metamagic conditions
|
||||
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
//Apply VFX impact and death immunity effect
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, HoursToSeconds(nDuration));
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user