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:
77
_working/nw_s0_endele.nss
Normal file
77
_working/nw_s0_endele.nss
Normal file
@@ -0,0 +1,77 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Endure Elements
|
||||
//:: NW_S0_EndEle
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Offers 10 points of elemental resistance. If 20
|
||||
points of a single elemental type is done to the
|
||||
protected creature the spell fades
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Oct 23, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
#include "nw_i0_spells"
|
||||
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-20 by Georg
|
||||
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();
|
||||
int nDuration = GetCasterLevel(OBJECT_SELF);
|
||||
int nAmount = 20;
|
||||
int nResistance = 10;
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
effect eCold = EffectDamageResistance(DAMAGE_TYPE_COLD, nResistance, nAmount);
|
||||
effect eFire = EffectDamageResistance(DAMAGE_TYPE_FIRE, nResistance, nAmount);
|
||||
effect eAcid = EffectDamageResistance(DAMAGE_TYPE_ACID, nResistance, nAmount);
|
||||
effect eSonic = EffectDamageResistance(DAMAGE_TYPE_SONIC, nResistance, nAmount);
|
||||
effect eElec = EffectDamageResistance(DAMAGE_TYPE_ELECTRICAL, nResistance, nAmount);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_PROTECTION_ELEMENTS);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_ELEMENTAL_PROTECTION);
|
||||
effect eDur2 = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
|
||||
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_ENDURE_ELEMENTS, FALSE));
|
||||
|
||||
//Link Effects
|
||||
effect eLink = EffectLinkEffects(eCold, eFire);
|
||||
eLink = EffectLinkEffects(eLink, eAcid);
|
||||
eLink = EffectLinkEffects(eLink, eSonic);
|
||||
eLink = EffectLinkEffects(eLink, eElec);
|
||||
eLink = EffectLinkEffects(eLink, eDur);
|
||||
eLink = EffectLinkEffects(eLink, eDur2);
|
||||
|
||||
|
||||
//Enter Metamagic conditions
|
||||
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
|
||||
RemoveEffectsFromSpell(oTarget, GetSpellId());
|
||||
|
||||
//Apply the VFX impact and effects
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, HoursToSeconds(24));
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
Reference in New Issue
Block a user