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.
68 lines
2.0 KiB
Plaintext
68 lines
2.0 KiB
Plaintext
///::///////////////////////////////////////////////
|
|
//:: Ghoul Touch: On Enter
|
|
//:: NW_S0_GhoulTchA.nss
|
|
//:: Copyright (c) 2001 Bioware Corp.
|
|
//:://////////////////////////////////////////////
|
|
/*
|
|
The caster attempts a touch attack on a target
|
|
creature. If successful creature must save
|
|
or be paralyzed. Target exudes a stench that
|
|
causes all enemies to save or be stricken with
|
|
-2 Attack, Damage, Saves and Skill Checks for
|
|
1d6+2 rounds.
|
|
*/
|
|
//:://////////////////////////////////////////////
|
|
//:: Created By: Preston Watamaniuk
|
|
//:: Created On: Nov 7, 2001
|
|
//:://////////////////////////////////////////////
|
|
|
|
#include "NW_I0_SPELLS"
|
|
#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 = GetEnteringObject();
|
|
effect eVis = EffectVisualEffect(VFX_IMP_DOOM);
|
|
effect eAttack = EffectAttackDecrease(2);
|
|
effect eDamage = EffectDamageDecrease(2);
|
|
effect eSave = EffectSavingThrowDecrease(SAVING_THROW_ALL, 2);
|
|
effect eSkill = EffectSkillDecrease(SKILL_ALL_SKILLS, 2);
|
|
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
|
|
|
//Link Effects
|
|
effect eLink = EffectLinkEffects(eDamage, eSave);
|
|
eLink = EffectLinkEffects(eLink, eSave);
|
|
eLink = EffectLinkEffects(eLink, eSkill);
|
|
eLink = EffectLinkEffects(eLink, eDur);
|
|
|
|
if(!GetIsReactionTypeFriendly(oTarget) || GetAreaOfEffectCreator() != oTarget)
|
|
{
|
|
if(!MyResistSpell(GetAreaOfEffectCreator(), oTarget) && !MySavingThrow(SAVING_THROW_FORT, oTarget, GetSpellSaveDC()))
|
|
{
|
|
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(2+d6()));
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
|
}
|
|
}
|
|
}
|
|
|
|
|