PRC8/nwn/trunk/smp/phs_s_healmount.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

67 lines
2.0 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*:://////////////////////////////////////////////
//:: Spell Name Heal Mount
//:: Spell FileName PHS_S_HealMount
//:://////////////////////////////////////////////
//:: In Game Spell desctiption
//:://////////////////////////////////////////////
Conjuration (Healing)
Level: Pal 3
Components: V, S
Casting Time: 1 standard action
Range: Touch
Target: Your mount touched
Duration: Instantaneous
Saving Throw: Will negates (harmless)
Spell Resistance: Yes (harmless)
This spell functions like heal, but it affects only the paladins special
mount (typically a warhorse).
//:://////////////////////////////////////////////
//:: Spell Effects Applied / Notes
//:://////////////////////////////////////////////
Acts as heal, only if the mount if selected.
A special integer makes this possible. Must also be in the party.
//:://////////////////////////////////////////////
//:: Created By: Jasperre
//::////////////////////////////////////////////*/
#include "PHS_INC_SPELLS"
void main()
{
// Spell Hook Check.
if(!PHS_SpellHookCheck(PHS_SPELL_HEAL_MOUNT)) return;
// Declare Major Variables
object oCaster = OBJECT_SELF;
object oTarget = GetSpellTargetObject();
int nSpellSaveDC = PHS_GetSpellSaveDC();
int nCasterLevel = PHS_GetCasterLevel();
int nTargetHP = GetCurrentHitPoints(oTarget);
// Max to heal is 150
int nMaxHealHarm = PHS_LimitInteger(nCasterLevel * 10, 150);
int nTouch;
// Declare effects
effect eHeal = EffectHeal(nMaxHealHarm);
effect eHealVis = EffectVisualEffect(VFX_IMP_HEALING_X);
// Must be the paladin's mount
if(GetMaster(oTarget) == oCaster &&
GetLocalInt(oTarget, "PHS_HORSE") == TRUE)
{
// Signal spell cast at
PHS_SignalSpellCastAt(oTarget, PHS_SPELL_HEAL_MOUNT);
// We remove all the things in a effect loop.
PHS_HealSpellRemoval(oTarget);
// Remove fatige
PHS_RemoveFatigue(oTarget);
// We heal damage after
PHS_ApplyInstantAndVFX(oTarget, eHealVis, eHeal);
}
}