Files
PRC8/nwn/nwnprc/trunk/scripts/rm_spellrage.nss
Jaysyn904 4026b6af2c 2026/02/08 Update
Archived Spellman's Project content.
Added missing Diamond Dragon stat feats.
Hospitaler's should be able to take Extra Turning.
Dodge proxies should allow entry into Champion of Corellon.
Mounted Combat is a prereq for Champion of Corellon.
Only Clerics have Domain reqs to enter Morninglord.
Verdant Lord was missing BAB 4 entry requirement.
Diamond Dragons don't get spellcraft.
Re-added Korobokuru race.
Added .ltr tables for Korobokuru.
Capped Blood in the Water at +20.
Capped Pearl of Black Doubt at +20.
Added json_GetFirstKnownSpell() and json_GetNextKnownSpell().
Updated all old NWNx functions to work with NWNxEE.
Added new switch to enable optional PRCX / NWNxEE shims.
Commented out ConvoCC switches on inc_switch_setup.nss
Diamond Dragon's stat increases are intrinsic when using NWNxEE.
Forsaker's stat increases are intrinsic when using NWNxEE.
Vow of Poverty's stat increases are intrinsic when using NWNxEE.
Cloud Dragon summon should be Neutral Good.
Fixed Verdant Lord's regen.
Fixed Forest Master's regen.
Morninglord's Creative Fire should affect Alchemy.
Added yes/no dialog when choosing Vow of Poverty bonus Exalted Feats.
Racial natural AC should be intrinsic when NWNxEE is enabled.
Transcendent Vitality's CON bonus is intrinsic when NWNxEE is enabled.
2026-02-08 00:44:28 -05:00

77 lines
2.4 KiB
Plaintext

#include "prc_inc_spells"
void ApplyFatigue(object oPC)
{
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
effect eLink = EffectLinkEffects(EffectFatigue(), eDur);
eLink = ExtraordinaryEffect(eLink);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oPC, RoundsToSeconds(5));
}
void main()
{
object oPC = OBJECT_SELF;
int iAC = 2;
if(GetHasSpellEffect(SPELL_SPELL_RAGE, oPC))
{
PRCRemoveSpellEffects(SPELL_SPELL_RAGE, oPC, oPC);
IncrementRemainingFeatUses(oPC, FEAT_SPELL_RAGE);
return;
}
if(GetHasSpellEffect(SPELLABILITY_BARBARIAN_RAGE, oPC))
{
IncrementRemainingFeatUses(oPC, FEAT_SPELL_RAGE);
FloatingTextStringOnCreature("You can't use Barbarian Rage and Spell Rage at the same time.", oPC, FALSE);
return;
}
// Removes effects of being winded
effect eWind = GetFirstEffect(oPC);
while (GetIsEffectValid(eWind))
{
if (GetEffectType(eWind) == EFFECT_TYPE_ABILITY_DECREASE || GetEffectType(eWind) == EFFECT_TYPE_MOVEMENT_SPEED_DECREASE)
if (GetEffectSpellId(eWind) == PRCGetSpellId())
RemoveEffect(oPC, eWind);
eWind = GetNextEffect(oPC);
}
// play a random voice chat instead of just VOICE_CHAT_BATTLECRY1
int iVoiceConst = 0;
int iVoice = d3(1);
switch(iVoice)
{
case 1: iVoice = VOICE_CHAT_BATTLECRY1;
break;
case 2: iVoice = VOICE_CHAT_BATTLECRY2;
break;
case 3: iVoice = VOICE_CHAT_BATTLECRY3;
break;
}
PlayVoiceChat(iVoice);
int nCon = 3 + GetAbilityModifier(ABILITY_CONSTITUTION);
if(GetHasFeat(FEAT_EXTENDED_RAGE, oPC))
nCon += 5;
effect eAC = EffectACDecrease(iAC, AC_DODGE_BONUS);
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
effect eLink = EffectLinkEffects(eAC, eDur);
SignalEvent(oPC, EventSpellCastAt(oPC, SPELL_SPELL_RAGE, FALSE));
eLink = ExtraordinaryEffect(eLink);
effect eVis = EffectVisualEffect(VFX_IMP_SUPER_HEROISM);
if (nCon > 0)
{
PRCRemoveEffectsFromSpell(oPC, SPELL_SPELL_RAGE);
IncrementRemainingFeatUses(oPC, FEAT_SPELL_FURY);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oPC, RoundsToSeconds(nCon));
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oPC);
if(!GetHasFeat(FEAT_TIRELESS_RAGE, oPC))
DelayCommand(RoundsToSeconds(nCon), ApplyFatigue(oPC));
}
}