PRC8/nwn/nwnprc/trunk/scripts/prc_dirge_bolstr.nss
Jaysyn904 6ec137a24e Updated AMS marker feats
Updated AMS marker feats.  Removed arcane & divine marker feats.  Updated Dread Necromancer for epic progression. Updated weapon baseitem models.  Updated new weapons for crafting & npc equip.
 Updated prefix.  Updated release archive.
2024-02-11 14:01:05 -05:00

53 lines
1.8 KiB
Plaintext

/*
Dirgesinger's Song of Bolstering
*/
#include "prc_inc_spells"
void main()
{
if (!GetHasFeat(FEAT_BARD_SONGS, OBJECT_SELF))
{
FloatingTextStrRefOnCreature(85587,OBJECT_SELF); // no more bardsong uses left
return;
}
DecrementRemainingFeatUses(OBJECT_SELF, FEAT_BARD_SONGS);
if (PRCGetHasEffect(EFFECT_TYPE_SILENCE,OBJECT_SELF))
{
FloatingTextStrRefOnCreature(85764,OBJECT_SELF); // not useable when silenced
return;
}
//Declare major variables
object oPC = OBJECT_SELF;
int nDuration = 15;
int nBoost = GetLevelByClass(CLASS_TYPE_BARD) + GetLevelByClass(CLASS_TYPE_DIRGESINGER);
effect eTurn = EffectTurnResistanceIncrease(nBoost);
eTurn = ExtraordinaryEffect(eTurn);
effect eVis = EffectVisualEffect(VFX_DUR_BARD_SONG);
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
effect eLink = EffectLinkEffects(eTurn, eDur);
effect eImpact = EffectVisualEffect(VFX_IMP_HEAD_SONIC);
effect eFNF = EffectVisualEffect(VFX_FNF_LOS_EVIL_30);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eFNF, GetLocation(OBJECT_SELF));
object oTarget = MyFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF));
while(GetIsObjectValid(oTarget))
{
// * GZ Oct 2003: If we are silenced, we can not benefit from bard song
if (!PRCGetHasEffect(EFFECT_TYPE_SILENCE,oTarget) && !PRCGetHasEffect(EFFECT_TYPE_DEAF,oTarget))
{
if (GetIsFriend(oTarget) && MyPRCGetRacialType(oTarget) == RACIAL_TYPE_UNDEAD)
{
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration));
}
}
oTarget = MyNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF));
}
}