Files
PRC8/nwn/nwnprc/trunk/newspellbook/tob_dw_onhit.nss
Jaysyn904 875f00c88f 2026/01/30 Update
Updated version number.
Fixed Touch of Golden Ice.
Removed Leadership related feats from Thrallherds feat list.
Necrocarnum Circlet should only fire the Detect Undead cone VFX once.
Desert Wind maneuvers should to the right amount of damage.
Blade Guide now takes less damage during combat.
FEAT_HOSPITALER_SPELLCASTING_PALADIN was missing from HospitalerMarkerFeats()
Frenzied Berzerker should now work with Vow of Poverty and Forsaker.
prc_wallbreathc now uses PRCEffectDamage().
Changed Mantle of Egregious Might back to Dodge AC.
Tweaked Mirror Image.
2026-01-30 18:11:38 -05:00

65 lines
1.6 KiB
Plaintext

/*
----------------
Desert Wind On Hit
tob_dw_onhit.nss
----------------
28/03/07 by Stratovarius
*/ /** @file
OnHit for Burning Blade and other DW booster spells.
*/
#include "tob_inc_tobfunc"
#include "tob_movehook"
void main()
{
// fill the variables
object oPC = OBJECT_SELF;
object oItem = GetSpellCastItem();
object oTarget = GetSpellTargetObject(); // Might still be SELF in some cases
if (oTarget == OBJECT_INVALID || oTarget == oPC)
{
if (GetIsObjectValid(GetAttackTarget(oPC)))
{
oTarget = GetAttackTarget(oPC);
}
}
if (DEBUG && oTarget == oPC)
{
DoDebug("Warning: DW OnHit is attempting to apply damage to self. Skipped.");
}
//int nLevel = GetInitiatorLevel(oPC, CLASS_TYPE_SWORDSAGE);
int nClass = GetPrimaryBladeMagicClass(oPC);
int nLevel = GetInitiatorLevel(oPC, nClass);
int nSpellId = GetLocalInt(oPC, "DesertWindBoost");
if(DEBUG) DoDebug("tob_dw_onhit: nSpellId " + IntToString(nSpellId));
effect eDam;
switch(nSpellId)
{
case MOVE_DW_BURNING_BLADE:
{
eDam = EffectDamage(d6() + nLevel, DAMAGE_TYPE_FIRE);
if(DEBUG) DoDebug("tob_dw_onhit: MOVE_DW_BURNING_BLADE");
break;
}
case MOVE_DW_SEARING_BLADE:
{
eDam = EffectDamage(d6(2) + nLevel, DAMAGE_TYPE_FIRE);
if(DEBUG) DoDebug("tob_dw_onhit: MOVE_DW_SEARING_BLADE");
break;
}
case MOVE_DW_INFERNO_BLADE:
{
eDam = EffectDamage(d6(3) + nLevel, DAMAGE_TYPE_FIRE);
if(DEBUG) DoDebug("tob_dw_onhit: MOVE_DW_INFERNO_BLADE");
break;
}
}
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
}