Files
PRC8/nwn/nwnprc/trunk/spells/nw_s0_grease.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

49 lines
1.7 KiB
Plaintext

//::///////////////////////////////////////////////
//:: Grease
//:: NW_S0_Grease.nss
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Creatures entering the zone of grease must make
a reflex save or fall down. Those that make
their save have their movement reduced by 1/2.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: Aug 1, 2001
//:://////////////////////////////////////////////
//:: modified by mr_bumpkin Dec 4, 2003 for PRC stuff
#include "prc_inc_spells"
#include "prc_add_spell_dc"
void main()
{
if(!X2PreSpellCastCode()) return;
PRCSetSchool(SPELL_SCHOOL_CONJURATION);
//Declare major variables including Area of Effect Object
effect eAOE = EffectAreaOfEffect(AOE_PER_GREASE);
location lTarget = PRCGetSpellTargetLocation();
int CasterLvl = PRCGetCasterLevel();
int nDuration = 2 + CasterLvl / 3;
effect eImpact = EffectVisualEffect(VFX_FNF_GAS_EXPLOSION_GREASE);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eImpact, lTarget);
int nMetaMagic = PRCGetMetaMagicFeat();
//Check Extend metamagic feat.
if (nMetaMagic & METAMAGIC_EXTEND)
{
nDuration = nDuration *2; //Duration is +100%
}
//Create an instance of the AOE Object using the Apply Effect function
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eAOE, lTarget, RoundsToSeconds(nDuration));
object oAoE = GetAreaOfEffectObject(lTarget, "VFX_PER_GREASE");
SetAllAoEInts(SPELL_GREASE, oAoE, PRCGetSpellSaveDC(SPELL_GREASE, SPELL_SCHOOL_CONJURATION), 0, CasterLvl);
SetLocalObject(oAoE, "ExtraordinarySpellAim_Caster", OBJECT_SELF);
PRCSetSchool();
}