Updated for NWNEE 37-13

Updated for NWNEE 37-13.  Updated NWNxEE scripts.  CODI Core AI tweaks.  Added Diamond Golem AI.  Full compile.  Updated release archive.
This commit is contained in:
Jaysyn904
2025-01-10 19:01:12 -05:00
parent 37c79b6d57
commit ce72b8d120
685 changed files with 6642 additions and 7699 deletions

View File

@@ -1,4 +1,5 @@
#include "no_inc_ptypes"
#include "prc_inc_racial"
//functions
int GetBestMagicDefenseSelf( object oEnt=OBJECT_SELF )
@@ -1077,7 +1078,7 @@ int GetAreaSpell( vector vS, int iDisc=FALSE, int iMinLvl=0, float fR=40.0, obje
//SPELLABILITIES
//if ( GetHasSpell( SPELLABILITY_DRAGON_WING_BUFFET, oCaster ) && fR < fM )
/* Doesn't work? May need a custom script for this
if ( GetRacialType( oCaster ) == RACIAL_TYPE_DRAGON && fR < fM )
if ( MyPRCGetRacialType( oCaster ) == RACIAL_TYPE_DRAGON && fR < fM )
{
SpeakString( "Wingbuff" );
SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_DRAGON_WING_BUFFET );
@@ -1683,7 +1684,7 @@ int GetDirectSpell( object oT, int iDisc=FALSE, int iMinLvl=0, object oCaster=OB
//6TH LEVEL CLR
//6TH LEVEL DRD
if ( GetHasSpell( SPELL_CRUMBLE, oCaster ) &&
( GetRacialType( oT ) == RACIAL_TYPE_CONSTRUCT || GetLevelByClass( CLASS_TYPE_CONSTRUCT, oT ) > 0 ) )
( MyPRCGetRacialType( oT ) == RACIAL_TYPE_CONSTRUCT || GetLevelByClass( CLASS_TYPE_CONSTRUCT, oT ) > 0 ) )
//this spell is only useful against constructs so no ability check should be made here
{
SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_CRUMBLE );
@@ -1838,7 +1839,7 @@ int GetDirectSpell( object oT, int iDisc=FALSE, int iMinLvl=0, object oCaster=OB
{
SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_HEALING_STING );
}
if ( GetHasSpell( SPELL_INFESTATION_OF_MAGGOTS, oCaster ) && GetRacialType( oT ) != RACIAL_TYPE_UNDEAD &&
if ( GetHasSpell( SPELL_INFESTATION_OF_MAGGOTS, oCaster ) && MyPRCGetRacialType( oT ) != RACIAL_TYPE_UNDEAD &&
( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) == FALSE || GetIsImmune( oT, IMMUNITY_TYPE_ABILITY_DECREASE ) ) )
{
SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_INFESTATION_OF_MAGGOTS );
@@ -2222,7 +2223,7 @@ int GetTouchSpell( object oT, int iMinLvl=0, object oCaster=OBJECT_SELF )
if ( !iCnt || iMinLvl <= 6 )
{
//6TH LEVEL CLR
if ( GetHasSpell( SPELL_HARM, oCaster ) && GetRacialType( oT ) != RACIAL_TYPE_UNDEAD &&
if ( GetHasSpell( SPELL_HARM, oCaster ) && MyPRCGetRacialType( oT ) != RACIAL_TYPE_UNDEAD &&
!( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetCurrentHitPoints( oT ) > 60 ) )
{
SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_HARM );
@@ -2234,14 +2235,14 @@ int GetTouchSpell( object oT, int iMinLvl=0, object oCaster=OBJECT_SELF )
{
//4TH LEVEL BLK
/* these spellabilities do not register
if ( GetHasSpell( SPELLABILITY_BG_INFLICT_CRITICAL_WOUNDS, oCaster ) && GetRacialType( oT ) != RACIAL_TYPE_UNDEAD &&
if ( GetHasSpell( SPELLABILITY_BG_INFLICT_CRITICAL_WOUNDS, oCaster ) && MyPRCGetRacialType( oT ) != RACIAL_TYPE_UNDEAD &&
!( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetCurrentHitPoints( oT ) > 40 ) )
{
SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_BG_INFLICT_CRITICAL_WOUNDS );
}
*/
//4TH LEVEL CLR
if ( GetHasSpell( SPELL_INFLICT_CRITICAL_WOUNDS, oCaster ) && GetRacialType( oT ) != RACIAL_TYPE_UNDEAD &&
if ( GetHasSpell( SPELL_INFLICT_CRITICAL_WOUNDS, oCaster ) && MyPRCGetRacialType( oT ) != RACIAL_TYPE_UNDEAD &&
!( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetCurrentHitPoints( oT ) > 40 ) )
{
SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_INFLICT_CRITICAL_WOUNDS );
@@ -2264,14 +2265,14 @@ int GetTouchSpell( object oT, int iMinLvl=0, object oCaster=OBJECT_SELF )
{
//3RD LEVEL BLK
/* these spellabilities do not register
if ( GetHasSpell( SPELLABILITY_BG_INFLICT_SERIOUS_WOUNDS, oCaster ) && GetRacialType( oT ) != RACIAL_TYPE_UNDEAD &&
if ( GetHasSpell( SPELLABILITY_BG_INFLICT_SERIOUS_WOUNDS, oCaster ) && MyPRCGetRacialType( oT ) != RACIAL_TYPE_UNDEAD &&
!( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetCurrentHitPoints( oT ) > 30 ) )
{
SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_BG_INFLICT_SERIOUS_WOUNDS );
}
*/
//3RD LEVEL CLR
if ( GetHasSpell( SPELL_INFLICT_SERIOUS_WOUNDS, oCaster ) && GetRacialType( oT ) != RACIAL_TYPE_UNDEAD &&
if ( GetHasSpell( SPELL_INFLICT_SERIOUS_WOUNDS, oCaster ) && MyPRCGetRacialType( oT ) != RACIAL_TYPE_UNDEAD &&
!( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetCurrentHitPoints( oT ) > 30 ) )
{
SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_INFLICT_SERIOUS_WOUNDS );
@@ -2309,7 +2310,7 @@ int GetTouchSpell( object oT, int iMinLvl=0, object oCaster=OBJECT_SELF )
{
SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_GHOUL_TOUCH );
}
if ( GetHasSpell( SPELL_INFLICT_MODERATE_WOUNDS, oCaster ) && GetRacialType( oT ) != RACIAL_TYPE_UNDEAD &&
if ( GetHasSpell( SPELL_INFLICT_MODERATE_WOUNDS, oCaster ) && MyPRCGetRacialType( oT ) != RACIAL_TYPE_UNDEAD &&
!( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetCurrentHitPoints( oT ) > 20 ) )
{
SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_INFLICT_MODERATE_WOUNDS );
@@ -2320,7 +2321,7 @@ int GetTouchSpell( object oT, int iMinLvl=0, object oCaster=OBJECT_SELF )
if ( !iCnt || iMinLvl <=1 )
{
//1ST LEVEL CLR
if ( GetHasSpell( SPELL_INFLICT_LIGHT_WOUNDS, oCaster ) && GetRacialType( oT ) != RACIAL_TYPE_UNDEAD &&
if ( GetHasSpell( SPELL_INFLICT_LIGHT_WOUNDS, oCaster ) && MyPRCGetRacialType( oT ) != RACIAL_TYPE_UNDEAD &&
!( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetCurrentHitPoints( oT ) > 10 ) )
{
SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_INFLICT_LIGHT_WOUNDS );
@@ -2331,7 +2332,7 @@ int GetTouchSpell( object oT, int iMinLvl=0, object oCaster=OBJECT_SELF )
if ( !iCnt || iMinLvl <=0 )
{
//0TH LEVEL CLR
if ( GetHasSpell( SPELL_INFLICT_MINOR_WOUNDS, oCaster ) && GetRacialType( oT ) != RACIAL_TYPE_UNDEAD )
if ( GetHasSpell( SPELL_INFLICT_MINOR_WOUNDS, oCaster ) && MyPRCGetRacialType( oT ) != RACIAL_TYPE_UNDEAD )
{
SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_INFLICT_MINOR_WOUNDS );
}
@@ -2837,7 +2838,7 @@ int GetEnhanceSpellSelf( int iMinLvl=1, object oCaster=OBJECT_SELF )
{
SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_FOXS_CUNNING );
}
if ( GetHasSpell( SPELL_STONE_BONES, oCaster ) && GetRacialType( oCaster ) == RACIAL_TYPE_UNDEAD && !GetHasSpellEffect( SPELL_STONE_BONES, oCaster ) )
if ( GetHasSpell( SPELL_STONE_BONES, oCaster ) && MyPRCGetRacialType( oCaster ) == RACIAL_TYPE_UNDEAD && !GetHasSpellEffect( SPELL_STONE_BONES, oCaster ) )
{
SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_STONE_BONES );
}
@@ -3002,7 +3003,7 @@ int GetEnhanceSpellSingle( int iMinLvl=1, object oEnt=OBJECT_SELF, object oCaste
{
SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_CATS_GRACE );
}
if ( GetHasSpell( SPELL_STONE_BONES, oCaster ) && GetRacialType( oEnt ) == RACIAL_TYPE_UNDEAD && !GetHasSpellEffect( SPELL_STONE_BONES, oEnt ) )
if ( GetHasSpell( SPELL_STONE_BONES, oCaster ) && MyPRCGetRacialType( oEnt ) == RACIAL_TYPE_UNDEAD && !GetHasSpellEffect( SPELL_STONE_BONES, oEnt ) )
{
SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_STONE_BONES );
}