Battledale_PRC8/_removed/x2_s0_acidshth.nss
Jaysyn904 7b9e44ebbb 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.
2024-03-11 23:44:08 -04:00

72 lines
2.1 KiB
Plaintext

///::///////////////////////////////////////////////
//:: Mestil's Acid Sheath
//:: X2_S0_AcidShth
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
This spell creates an acid shield around your
person. Any creature striking you with its body
does normal damage, but at the same time the
attacker takes 1d6 points +2 points per caster
level of acid damage. Weapons with exceptional
reach do not endanger thier uses in this way.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: Jan 7, 2002
//:: 2003-07-07: Stacking Spell Pass, Georg Zoeller
//:://////////////////////////////////////////////
#include "x2_inc_spellhook"
#include "x0_i0_spells"
void main()
{
/*
Spellcast Hook Code
Added 2003-07-07 by Georg Zoeller
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
effect eVis = EffectVisualEffect(448);
int nDuration = GetCasterLevel(OBJECT_SELF);
int nDamage = nDuration * 2;
int nMetaMagic = GetMetaMagicFeat();
object oTarget = OBJECT_SELF;
effect eShield = EffectDamageShield(nDamage, DAMAGE_BONUS_1d6, DAMAGE_TYPE_ACID);
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
//Link effects
effect eLink = EffectLinkEffects(eShield, eDur);
eLink = EffectLinkEffects(eLink, eVis);
//Fire cast spell at event for the specified target
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId(), FALSE));
//Enter Metamagic conditions
if (nMetaMagic == METAMAGIC_EXTEND)
{
nDuration = nDuration *2; //Duration is +100%
}
// 2003-07-07: Stacking Spell Pass, Georg
RemoveEffectsFromSpell(oTarget, GetSpellId());
//Apply the VFX impact and effects
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration));
}