2025/12/04 Update
Added Intrinsic Armor builder's feat to prevent any Disarming. Added Intrinsic Weapon builder's feat to prevent Ruin Armor. GetEpicSorcerer() should allow racial hit dice casters. Enlarge / Reduce Person now stores object's original scale. Added prc_inc_size for the above changes. Updated PRC8 version. Reverted Vow of Poverty to use PRC event system. Reverted Forsaker to use PRC event system. Updated Spell Cancel NUI to not show "system" spells @Rakiov) Added notes on instanced Maze system. Organized notes.
This commit is contained in:
@@ -303,11 +303,18 @@ int GetIsEpicShaman(object oPC)
|
||||
&& GetAbilityScore(oPC, ABILITY_WISDOM) > 18;
|
||||
}
|
||||
|
||||
int GetIsEpicSorcerer(object oPC)
|
||||
int GetIsEpicSorcerer(object oPC)
|
||||
{
|
||||
return GetHitDice(oPC) >= 21
|
||||
&& GetCasterLvl(CLASS_TYPE_SORCERER, oPC) > 17
|
||||
&& GetAbilityScore(oPC, ABILITY_CHARISMA) > 18;
|
||||
}
|
||||
|
||||
/* int GetIsEpicSorcerer(object oPC)
|
||||
{
|
||||
return GetPrCAdjustedCasterLevel(CLASS_TYPE_SORCERER, oPC, FALSE) > 17
|
||||
&& GetAbilityScore(oPC, ABILITY_CHARISMA) > 18;
|
||||
}
|
||||
} */
|
||||
|
||||
int GetIsEpicSublimeChord(object oPC)
|
||||
{
|
||||
|
||||
@@ -112,7 +112,7 @@ void ProcessPreparedSpellLevel(object oPC, int nClass, int nSpellLevel, int nLev
|
||||
//Must load in this order.
|
||||
//#include "prc_inc_castlvl" //access via prc_inc_core
|
||||
//#include "prc_inc_descrptr" //access via prc_inc_core
|
||||
|
||||
#include "inc_item_props"
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
/* Function definitions */
|
||||
|
||||
@@ -75,6 +75,7 @@ void DeathlessFrenzyCheck(object oTarget);
|
||||
// * PRC Version of a Bioware function to disable include loops
|
||||
void PRCRemoveSpellEffects(int nSpell_ID, object oCaster, object oTarget);
|
||||
|
||||
|
||||
/**
|
||||
* Target is immune to gaze attacks
|
||||
*
|
||||
@@ -89,6 +90,9 @@ effect EffectGazeImmune();
|
||||
*/
|
||||
effect EffectDazzle();
|
||||
|
||||
//ebonfowl: adding this function to check if a target is already shaken
|
||||
int GetIsShaken(object oTarget);
|
||||
|
||||
/**
|
||||
* Shaken effect: -2 to attack, all skills and saving throws
|
||||
*
|
||||
@@ -177,13 +181,9 @@ effect EffectAbilityBasedSkillIncrease(int iAbility, int iIncrease = 1);
|
||||
*/
|
||||
effect EffectAbilityBasedSkillDecrease(int iAbility, int iDecrease = 1);
|
||||
|
||||
//ebonfowl: adding this function to check if a target is already shaken
|
||||
int GetIsShaken(object oTarget);
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
/* Include section */
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
#include "prc_inc_castlvl" // get prc_racial_const, prc_inc_nwscript, prc_inc_newip
|
||||
#include "inc_epicspelldef"
|
||||
|
||||
@@ -804,5 +804,11 @@ int GetIsShaken(object oTarget)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// Forward declarations for size change effects
|
||||
// Implementations are in prc_inc_size
|
||||
effect EffectSizeChange(object oTarget, int nObjectType, int bEnlarge, int nChanges);
|
||||
void DelayedSetVisualTransform(int nExpectedGeneration, object oTarget, int nTransform, float fValue);
|
||||
void DelaySetVisualTransform(float fDelay, object oTarget, string sGenerationName, int nTransform, float fValue);
|
||||
|
||||
//:: Test void
|
||||
//:: void main() {}
|
||||
//::void main() {}
|
||||
@@ -4,6 +4,11 @@
|
||||
//:: PRC Options Conversation
|
||||
const int FEAT_OPTIONS_CONVERSATION = 2285;
|
||||
|
||||
//;; Builder Feats
|
||||
const int FEAT_ARCHETYPAL_FORM = 2918;
|
||||
const int FEAT_INTRINSIC_ARMOR = 25990;
|
||||
const int FEAT_INTRINSIC_WEAPON = 25991;
|
||||
|
||||
//:: Missing Bioware Feats
|
||||
const int FEAT_EPIC_PLANAR_TURNING = 854;
|
||||
|
||||
|
||||
@@ -273,6 +273,7 @@ void TigerBlooded(object oInitiator, object oTarget);
|
||||
|
||||
#include "prc_inc_combat"
|
||||
#include "prc_inc_sp_tch"
|
||||
#include "prc_feat_const"
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
/* Internal functions */
|
||||
@@ -1941,10 +1942,21 @@ void TigerBlooded(object oInitiator, object oTarget)
|
||||
int DoDisarm(object oPC, object oTarget, int nExtraBonus = 0, int nGenerateAoO = TRUE, int nCounter = TRUE)
|
||||
{
|
||||
object oTargetWep = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oTarget);
|
||||
|
||||
int bNoDisarm = GetHasFeat(FEAT_INTRINSIC_WEAPON, oTarget);
|
||||
|
||||
string sName = GetName(oTarget);
|
||||
|
||||
if(bNoDisarm)
|
||||
{
|
||||
FloatingTextStringOnCreature(sName+" is wielding an intrinsic weapon", oPC, FALSE);
|
||||
AssignCommand(oPC, ActionAttack(oTarget));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!GetIsObjectValid(oTargetWep) || GetPlotFlag(oTargetWep) || (!GetIsCreatureDisarmable(oTarget) && !GetPRCSwitch(PRC_PNP_DISARM)) || GetLocalInt(oTarget, "TigerFangDisarm"))
|
||||
{
|
||||
FloatingTextStringOnCreature("Target is not a legal target", oPC, FALSE);
|
||||
FloatingTextStringOnCreature(sName+" is not a legal target", oPC, FALSE);
|
||||
AssignCommand(oPC, ActionAttack(oTarget));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
154
nwn/nwnprc/trunk/include/prc_inc_size.nss
Normal file
154
nwn/nwnprc/trunk/include/prc_inc_size.nss
Normal file
@@ -0,0 +1,154 @@
|
||||
#include "prc_inc_util"
|
||||
#include "prc_inc_spells"
|
||||
#include "prc_inc_function"
|
||||
|
||||
// Wrapper function for delayed visual transform with generation tracking
|
||||
void DelayedSetVisualTransform(int nExpectedGeneration, object oTarget, int nTransform, float fValue)
|
||||
{
|
||||
// Read current generation at execution time, not when scheduled
|
||||
if (nExpectedGeneration != GetLocalInt(oTarget, "PRC_SIZE_GENERATION"))
|
||||
{
|
||||
// Generation has changed, don't apply the transform
|
||||
return;
|
||||
}
|
||||
SetObjectVisualTransform(oTarget, nTransform, fValue);
|
||||
}
|
||||
|
||||
// Main wrapper function that handles generation tracking
|
||||
void DelaySetVisualTransform(float fDelay, object oTarget, string sGenerationName, int nTransform, float fValue)
|
||||
{
|
||||
int nExpectedGeneration = GetLocalInt(oTarget, sGenerationName);
|
||||
DelayCommand(fDelay, DelayedSetVisualTransform(nExpectedGeneration, oTarget, nTransform, fValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a size change effect that can enlarge or reduce a creature
|
||||
*
|
||||
* @param oTarget Object to affect
|
||||
* @param nObjectType Object type filter (OBJECT_TYPE_CREATURE, etc.)
|
||||
* @param bEnlarge TRUE to enlarge, FALSE to reduce
|
||||
* @param nChanges Number of size categories to change (0 = reset to original)
|
||||
* @return The size change effect
|
||||
*/
|
||||
|
||||
effect EffectSizeChange(object oTarget, int nObjectType, int bEnlarge, int nChanges)
|
||||
{
|
||||
effect eBlank;
|
||||
|
||||
// Increment generation for any size change
|
||||
int nGeneration = PRC_NextGeneration(GetLocalInt(oTarget, "PRC_SIZE_GENERATION"));
|
||||
SetLocalInt(oTarget, "PRC_SIZE_GENERATION", nGeneration);
|
||||
|
||||
// Store original size if not already stored - READ ACTUAL CURRENT SCALE
|
||||
if(GetLocalFloat(oTarget, "PRC_ORIGINAL_SIZE") == 0.0f)
|
||||
{
|
||||
float fCurrentScale = GetObjectVisualTransform(oTarget, OBJECT_VISUAL_TRANSFORM_SCALE);
|
||||
SetLocalFloat(oTarget, "PRC_ORIGINAL_SIZE", fCurrentScale);
|
||||
}
|
||||
|
||||
// Reset to original size
|
||||
if(nChanges == 0)
|
||||
{
|
||||
float fOriginalSize = GetLocalFloat(oTarget, "PRC_ORIGINAL_SIZE");
|
||||
DelaySetVisualTransform(0.0f, oTarget, "PRC_SIZE_GENERATION", OBJECT_VISUAL_TRANSFORM_SCALE, fOriginalSize);
|
||||
// DON'T delete PRC_ORIGINAL_SIZE here - keep it for future casts
|
||||
return eBlank;
|
||||
}
|
||||
|
||||
// Get the original scale
|
||||
float fOriginalScale = GetLocalFloat(oTarget, "PRC_ORIGINAL_SIZE");
|
||||
|
||||
// Calculate scale factor relative to original size
|
||||
float fScale = fOriginalScale;
|
||||
if(bEnlarge)
|
||||
fScale = fOriginalScale * pow(1.5f, IntToFloat(nChanges));
|
||||
else
|
||||
fScale = fOriginalScale * pow(0.5f, IntToFloat(nChanges));
|
||||
|
||||
// Create the effect link with sanctuary VFX
|
||||
effect eReturn = EffectLinkEffects(EffectVisualEffect(VFX_DUR_SANCTUARY),
|
||||
EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE));
|
||||
|
||||
if(bEnlarge)
|
||||
{
|
||||
eReturn = EffectLinkEffects(eReturn, EffectAttackDecrease(nChanges));
|
||||
eReturn = EffectLinkEffects(eReturn, EffectAbilityDecrease(ABILITY_DEXTERITY, 2 * nChanges));
|
||||
eReturn = EffectLinkEffects(eReturn, EffectAbilityIncrease(ABILITY_STRENGTH, 2 * nChanges));
|
||||
eReturn = EffectLinkEffects(eReturn, EffectACDecrease(nChanges));
|
||||
eReturn = TagEffect(eReturn, "PRC_SIZE_INCREASE");
|
||||
}
|
||||
else
|
||||
{
|
||||
eReturn = EffectLinkEffects(eReturn, EffectAttackIncrease(nChanges));
|
||||
eReturn = EffectLinkEffects(eReturn, EffectAbilityIncrease(ABILITY_DEXTERITY, 2 * nChanges));
|
||||
eReturn = EffectLinkEffects(eReturn, EffectAbilityDecrease(ABILITY_STRENGTH, 2 * nChanges));
|
||||
eReturn = EffectLinkEffects(eReturn, EffectACIncrease(nChanges));
|
||||
eReturn = TagEffect(eReturn, "PRC_SIZE_DECREASE");
|
||||
}
|
||||
|
||||
// Apply visual transform using wrapper
|
||||
DelaySetVisualTransform(0.0f, oTarget, "PRC_SIZE_GENERATION", OBJECT_VISUAL_TRANSFORM_SCALE, fScale);
|
||||
|
||||
return eReturn;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* effect EffectSizeChange(object oTarget, int nObjectType, int bEnlarge, int nChanges)
|
||||
{
|
||||
effect eBlank;
|
||||
|
||||
// Increment generation for any size change
|
||||
int nGeneration = PRC_NextGeneration(GetLocalInt(oTarget, "PRC_SIZE_GENERATION"));
|
||||
SetLocalInt(oTarget, "PRC_SIZE_GENERATION", nGeneration);
|
||||
|
||||
// Store original size if not already stored (fixed check)
|
||||
if(GetLocalFloat(oTarget, "PRC_ORIGINAL_SIZE") == 0.0f)
|
||||
{
|
||||
SetLocalFloat(oTarget, "PRC_ORIGINAL_SIZE", 1.0f);
|
||||
}
|
||||
|
||||
// Reset to original size
|
||||
if(nChanges == 0)
|
||||
{
|
||||
float fOriginalSize = GetLocalFloat(oTarget, "PRC_ORIGINAL_SIZE");
|
||||
DelaySetVisualTransform(0.0f, oTarget, "PRC_SIZE_GENERATION", OBJECT_VISUAL_TRANSFORM_SCALE, fOriginalSize);
|
||||
DeleteLocalFloat(oTarget, "PRC_ORIGINAL_SIZE");
|
||||
return eBlank;
|
||||
}
|
||||
|
||||
// Calculate scale factor using pow() for multi-step changes
|
||||
float fScale = 1.0f;
|
||||
if(bEnlarge)
|
||||
fScale = pow(1.5f, IntToFloat(nChanges)); // 1.5, 2.25, 3.375...
|
||||
else
|
||||
fScale = pow(0.5f, IntToFloat(nChanges)); // 0.5, 0.25, 0.125...
|
||||
|
||||
// Create the effect link based on enlarge/reduce
|
||||
effect eReturn;
|
||||
if(bEnlarge)
|
||||
{
|
||||
eReturn = EffectLinkEffects(EffectAttackDecrease(nChanges),
|
||||
EffectAbilityDecrease(ABILITY_DEXTERITY, 2 * nChanges));
|
||||
eReturn = EffectLinkEffects(eReturn, EffectAbilityIncrease(ABILITY_STRENGTH, 2 * nChanges));
|
||||
eReturn = EffectLinkEffects(eReturn, EffectACDecrease(nChanges));
|
||||
eReturn = TagEffect(eReturn, "PRC_SIZE_INCREASE");
|
||||
}
|
||||
else
|
||||
{
|
||||
eReturn = EffectLinkEffects(EffectAttackIncrease(nChanges),
|
||||
EffectAbilityIncrease(ABILITY_DEXTERITY, 2 * nChanges));
|
||||
eReturn = EffectLinkEffects(eReturn, EffectAbilityDecrease(ABILITY_STRENGTH, 2 * nChanges));
|
||||
eReturn = EffectLinkEffects(eReturn, EffectACIncrease(nChanges));
|
||||
eReturn = TagEffect(eReturn, "PRC_SIZE_DECREASE");
|
||||
}
|
||||
|
||||
// Apply visual transform using wrapper
|
||||
DelaySetVisualTransform(0.0f, oTarget, "PRC_SIZE_GENERATION", OBJECT_VISUAL_TRANSFORM_SCALE, fScale);
|
||||
|
||||
return eReturn;
|
||||
}
|
||||
*/
|
||||
|
||||
//:: void main(){}
|
||||
@@ -76,7 +76,7 @@
|
||||
|
||||
/* This variable MUST be updated with every new version of the PRC!!! */
|
||||
|
||||
const string PRC_VERSION = "PRC8 4.72";
|
||||
const string PRC_VERSION = "PRC8 4.73";
|
||||
|
||||
/* This variable MUST be updated every time 'assemble_spellbooks.bat' is run!!! */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user