Jaysyn904 e641b42f84 Exalted update
Updated Vow of Poverty. Added Sanctify Ki Strike, Holy Strike, Fist of Heavens, Vow of Abstinence, Vow of Chastity & Gift of Faith.  (@fenac).  Turned off the Taunt & Parry skills.  Re-disabled AC & save bonuses from Tumble & Spellcraft.   Updated min() & max() to PRCmin() & PRCmax() to not conflict with similarly named NUI adjacent functions.  Set Point Blank Shot to 30' per PnP.  Added icon for Chosen of Evil.  Started work on Hidden Talent.  Created Psionics function cheatsheet.  Updated release archive.
2025-01-29 22:46:38 -05:00

51 lines
1.8 KiB
Plaintext

/*
07/03/21 by Barmlot
bnd_kss_prot.nss
Knight of the Sacred Vestige's Protection & Aura
Vestige's Protection (CHA to AC for 1 round, 5 round cooldown)
Vestige's Protection Aura (as above, but affects all adjacent friends)
*/
#include "bnd_inc_bndfunc"
#include "prc_inc_combat"
void main()
{
object oBinder = OBJECT_SELF;
int nKSSLvl = GetLevelByClass(CLASS_TYPE_KNIGHT_SACRED_SEAL, oBinder);
int nCHAmod = PRCMax(1, GetAbilityModifier(ABILITY_CHARISMA, oBinder));
int nSpellID = PRCGetSpellId();
if(GetIsPatronVestigeBound(oBinder))
{
if(!BindAbilCooldown(oBinder, GetSpellId(), -1)) return;
if(!TakeSwiftAction(oBinder)) return;
if (nKSSLvl >= 3)//Vestige Protection Aura
{
location lTarget = GetLocation(oBinder);
object oAreaTarget = MyFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_SMALL, lTarget, TRUE, OBJECT_TYPE_CREATURE);
while(GetIsObjectValid(oAreaTarget))
{
if(oAreaTarget != oBinder && // Not you
GetIsInMeleeRange(oBinder, oAreaTarget) && // They must be in melee range
GetIsFriend(oAreaTarget, oBinder)) // Only allies
{
//Apply bonuses to oAreaTarget
effect eLink = EffectACIncrease(nCHAmod, AC_DODGE_BONUS);
eLink = EffectLinkEffects(EffectSavingThrowIncrease(SAVING_THROW_REFLEX, nCHAmod), eLink);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, SupernaturalEffect(eLink), oAreaTarget, RoundsToSeconds(1));
}
//Select the next target within the spell shape.
oAreaTarget = MyNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_SMALL, lTarget, TRUE, OBJECT_TYPE_CREATURE);
}
}
effect eLink = EffectACIncrease(nCHAmod, AC_DODGE_BONUS);
eLink = EffectLinkEffects(EffectSavingThrowIncrease(SAVING_THROW_REFLEX, nCHAmod), eLink);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, SupernaturalEffect(eLink), oBinder, RoundsToSeconds(1));
}
}