PRC8/nwn/trunk/spells/sp_halt.nss
Jaysyn904 5914ed2ab5 Updated Release Archive
Updated Release Archive.  Fixed Mage-killer prereqs.  Removed old LETO & ConvoCC related files.  Added organized spell scroll store.  Fixed Gloura spellbook. Various TLK fixes.  Reorganized Repo.  Removed invalid user folders. Added DocGen back in.
2023-08-22 10:00:21 -04:00

75 lines
1.7 KiB
Plaintext

//::///////////////////////////////////////////////
//:: Name Halt
//:: FileName sp_halt.nss
//:://////////////////////////////////////////////
/**@file Halt
Transmutation
Level: Bard 3, beguilder 3, duskblade 3, sorcerer/wizard 3
Components: V
Casting Time: 1 immediate action
Range: Close
Target: One creature
Duration: 1 round
Saving Throw: Will negates
Spell Resistance: Yes
The subject creature's feet (or whatever pass for
its feet) become momentarily stuck to the floor.
The creature must stop moving, and cannot move
farter in its current turn. This spell has no
effect on creatures that are not touching the
ground (such as flying creatures), and the subject
can still use a standard action to move by means of
teleporation magic.
**/
#include "prc_inc_spells"
#include "prc_add_spell_dc"
void main()
{
if(!X2PreSpellCastCode()) return;
PRCSetSchool(SPELL_SCHOOL_TRANSMUTATION);
object oPC = OBJECT_SELF;
object oTarget = PRCGetSpellTargetObject();
int nMetaMagic = PRCGetMetaMagicFeat();
int nCasterLvl = PRCGetCasterLevel(oPC);
int nDC = PRCGetSaveDC(oTarget, oPC);
float fDur = RoundsToSeconds(1);
PRCSignalSpellEvent(oTarget,TRUE, SPELL_HALT, oPC);
if(nMetaMagic & METAMAGIC_EXTEND)
{
fDur += fDur;
}
if (!PRCDoResistSpell(oPC, oTarget, nCasterLvl + SPGetPenetr()))
{
if(!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_SPELL))
{
effect eHalt = EffectCutsceneImmobilize();
//if(!flying)
{
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eHalt, oTarget, fDur);
}
}
}
PRCSetSchool();
}