Files
PRC8/nwn/nwnprc/trunk/spells/nw_s0_crpdooma.nss
Jaysyn904 1ea0b03976 2026/05/07 Update
Hospitaler had incorrect epic bonus feat progression
Hospitaler had incorrect bonus feat list.
Hospitaler was missing Ride from its skill list.
Runecaster had incorrect epic bonus feat progression
Runecaster had incorrect bonus feat list.
Warmage Edge should work with magic staves.
Added PRC_RETH_DEKALA_AURA_HOSTILE_ONLY switch and modified Vilefire aura to use it.
Spells that use DoCone() should now respect Mastery of Shaping.
Removed Hospitaler from list of classes that use the Fighter Bonus Feat list.
ExtraordinarySpellAim() now handles persistent AoEs
Acid Fog, Blade Barrier, Creeping Doom, Grease, Incindiary Cloud, Wall of Fire, Wall of Frost, Prismatic Wall, Prismatic Sphere, Sleet Storm and Spike Growth now respect Extraordinary Spell Aim.
2026-05-07 13:42:22 -04:00

73 lines
2.7 KiB
Plaintext

//::///////////////////////////////////////////////
//:: Creeping Doom: On Enter
//:: NW_S0_AcidFogA.nss
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Creature caught in the swarm take an initial
damage of 1d20, but there after they take
1d4 per swarm counter on the AOE.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: May 17, 2001
//:://////////////////////////////////////////////
//:: modified by mr_bumpkin Dec 4, 2003
#include "prc_inc_spells"
void main()
{
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_CONJURATION);
//Declare major variables
int nDamage;
effect eDam;
effect eVis = EffectVisualEffect(VFX_COM_BLOOD_REG_RED);
object oTarget = GetEnteringObject();
effect eSpeed = EffectMovementSpeedDecrease(50);
effect eVis2 = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
effect eLink = EffectLinkEffects(eSpeed, eVis2);
float fDelay;
object aoeCreator = GetAreaOfEffectCreator();
int CasterLvl = GetLocalInt(OBJECT_SELF, "X2_AoE_Caster_Level");
int nPenetr = SPGetPenetrAOE(aoeCreator,CasterLvl);
// Check Extraordinary Spell Aim
if(GetHasFeat(FEAT_EXTRAORDINARY_SPELL_AIM, aoeCreator)
&& GetIsFriend(oTarget, aoeCreator))
{
string sTargetID = ObjectToString(oTarget);
if(!GetLocalInt(OBJECT_SELF, "ExtraordinarySpellAim_" + sTargetID))
{
if(GetIsSkillSuccessful(aoeCreator, SKILL_SPELLCRAFT, 25 + PRCGetSpellLevel(aoeCreator, SPELL_CREEPING_DOOM)))
{
SetLocalInt(OBJECT_SELF, "ExtraordinarySpellAim_" + sTargetID, TRUE);
return; // Target excluded
}
}
}
if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, aoeCreator))
{
//Fire cast spell at event for the target
SignalEvent(oTarget, EventSpellCastAt(aoeCreator, SPELL_CREEPING_DOOM));
fDelay = PRCGetRandomDelay(1.0, 1.8);
//Roll Damage
nDamage = d20();
nDamage += SpellDamagePerDice(aoeCreator, 1);
eDam = PRCEffectDamage(oTarget, nDamage, DAMAGE_TYPE_PIERCING);
//Apply damage and visuals
SPApplyEffectToObject(DURATION_TYPE_PERMANENT, eSpeed, oTarget,0.0f,FALSE);
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget));
}
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
// Getting rid of the local integer storing the spellschool name
}