PRC8/nwn/nwnprc/trunk/scripts/prc_sch_arcanep.nss
Jaysyn904 d46ce7c19c "Fixed" Song of Arcane Power
"Fixed" Song of Arcane Power.  2DA was missing the impact script.  Also made Song of Arcane Power respect the Deaf effect.
2025-05-02 18:53:25 -04:00

69 lines
2.0 KiB
Plaintext

//::///////////////////////////////////////////////
//:: Song of Arcane Power
//:: prc_sch_cosmfire.nss
//:://////////////////////////////////////////////
/*
// Bonus to caster level.
// Depends on Perform skill check.
*/
//:://////////////////////////////////////////////
//:: Created By: xwarren
//:: Created On: Dec 8, 2009
//:://////////////////////////////////////////////
#include "prc_alterations"
void main()
{
object oCaster = OBJECT_SELF;
if (PRCGetHasEffect(EFFECT_TYPE_SILENCE, oCaster))
{
FloatingTextStrRefOnCreature(85764, oCaster); // not useable when silenced
return;
}
else if (PRCGetHasEffect(EFFECT_TYPE_DEAF, oCaster))
{
// 20% chance to return if deaf
if (d100() <= 20)
{
FloatingTextStringOnCreature("You can't hear well enough to use this ability", oCaster);
return;
}
}
else if(GetSkillRank(SKILL_PERFORM, oCaster) < 12)
{
FloatingTextStringOnCreature("You need 12 or more ranks in perform skill.", oCaster, FALSE);
return;
}
else if (!GetHasFeat(FEAT_BARD_SONGS, oCaster))
{
//SpeakStringByStrRef(40550);
FloatingTextStringOnCreature("No Bard Song uses!", oCaster, FALSE);
return;
}
else
{
DecrementRemainingFeatUses(oCaster, FEAT_BARD_SONGS);
//Declare major variables
int nPerform = d20(1) + GetSkillRank(SKILL_PERFORM, oCaster);
int nBonus;
effect eVis = EffectVisualEffect(VFX_DUR_BARD_SONG);
eVis = EffectLinkEffects(eVis, EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE));
if(nPerform >= 30)
nBonus = 4;
else if(nPerform < 30 && nPerform >= 20)
nBonus = 2;
else if(nPerform < 20 && nPerform >= 10)
nBonus = 1;
else
nBonus = 0;
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eVis, oCaster, TurnsToSeconds(1));
SetLocalInt(oCaster, "SongOfArcanePower", nBonus);
DelayCommand(TurnsToSeconds(1), DeleteLocalInt(oCaster, "SongOfArcanePower"));
}
}