Finished PRC8 integration
Finished PRC8 integration. Moved creature abilities to top hak. Setup tooling. Created release archive
This commit is contained in:
@@ -1,6 +1,18 @@
|
||||
//:: jw_privates_inc.nss
|
||||
|
||||
const int X2_SPELL_AOEBEHAVIOR_FLEE = 0;
|
||||
const int X2_SPELL_AOEBEHAVIOR_IGNORE = 1;
|
||||
const int X2_SPELL_AOEBEHAVIOR_GUST = 2;
|
||||
const int X2_SPELL_AOEBEHAVIOR_DISPEL_L = SPELL_LESSER_DISPEL;
|
||||
const int X2_SPELL_AOEBEHAVIOR_DISPEL_N = SPELL_DISPEL_MAGIC;
|
||||
const int X2_SPELL_AOEBEHAVIOR_DISPEL_G = SPELL_GREATER_DISPELLING;
|
||||
const int X2_SPELL_AOEBEHAVIOR_DISPEL_M = SPELL_MORDENKAINENS_DISJUNCTION;
|
||||
const int X2_SPELL_AOEBEHAVIOR_DISPEL_C = 727;
|
||||
|
||||
|
||||
#include "x0_inc_generic"
|
||||
#include "prc_inc_spells"
|
||||
#include "prc_inc_skills"
|
||||
|
||||
//::///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//:: Associate Include Functions
|
||||
@@ -31,6 +43,14 @@ void CheckIsUnlocked(object oLastObject);
|
||||
//PRIVATE FUNCTION DECLARATIONS
|
||||
|
||||
|
||||
|
||||
// --------------------------------------------------------------------------------
|
||||
// GZ: Sept 2003
|
||||
// Determines the optimal behavior against AoESpell nSpellId for a NPC
|
||||
// use in OnSpellCastAt
|
||||
// --------------------------------------------------------------------------------
|
||||
int GetBestAOEBehavior(int nSpellID);
|
||||
|
||||
// Gets the number of wingblast attacks this mob has
|
||||
int GetWingblast(object oMob=OBJECT_SELF);
|
||||
// Sets the number of wingblast attacks this mob has (default is zero)
|
||||
@@ -676,7 +696,7 @@ object GetTargetFighting()
|
||||
|
||||
/* void RemoveAmbientSleep()
|
||||
{
|
||||
if(GetHasEffect(EFFECT_TYPE_SLEEP))
|
||||
if(PRCGetHasEffect(EFFECT_TYPE_SLEEP))
|
||||
{
|
||||
effect eSleep = GetFirstEffect(OBJECT_SELF);
|
||||
while(GetIsEffectValid(eSleep))
|
||||
@@ -778,6 +798,46 @@ int GetAssociateCRMax()
|
||||
return 20;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------------
|
||||
// GZ: Sept 2003
|
||||
// Determines the optimal behavior against AoESpell nSpellId for a NPC
|
||||
// use in OnSpellCastAt
|
||||
// --------------------------------------------------------------------------------
|
||||
int GetBestAOEBehavior(int nSpellID)
|
||||
{
|
||||
if (nSpellID == SPELL_GREASE)
|
||||
{
|
||||
if (PRCIsFlying(OBJECT_SELF))
|
||||
return X2_SPELL_AOEBEHAVIOR_IGNORE;
|
||||
}
|
||||
|
||||
// if (GetHasSpell(SPELL_GUST_OF_WIND) == TRUE)
|
||||
if (GetHasSpell(SPELL_GUST_OF_WIND))
|
||||
return X2_SPELL_AOEBEHAVIOR_GUST;
|
||||
|
||||
if (GetModuleSwitchValue(MODULE_SWITCH_DISABLE_AI_DISPEL_AOE) == 0 )
|
||||
{
|
||||
if (d100() > GetLocalInt(GetModule(),MODULE_VAR_AI_NO_DISPEL_AOE_CHANCE))
|
||||
{
|
||||
// if (GetHasSpell(SPELL_LESSER_DISPEL) == TRUE)
|
||||
if (GetHasSpell(SPELL_LESSER_DISPEL))
|
||||
return X2_SPELL_AOEBEHAVIOR_DISPEL_L;
|
||||
// if (GetHasSpell(SPELL_DISPEL_MAGIC) == TRUE)
|
||||
if (GetHasSpell(SPELL_DISPEL_MAGIC))
|
||||
return X2_SPELL_AOEBEHAVIOR_DISPEL_N;
|
||||
// if (GetHasSpell(SPELL_GREATER_DISPELLING) == TRUE)
|
||||
if (GetHasSpell(SPELL_GREATER_DISPELLING))
|
||||
return X2_SPELL_AOEBEHAVIOR_DISPEL_G;
|
||||
// if (GetHasSpell(SPELL_MORDENKAINENS_DISJUNCTION) == TRUE)
|
||||
if (GetHasSpell(SPELL_MORDENKAINENS_DISJUNCTION))
|
||||
return X2_SPELL_AOEBEHAVIOR_DISPEL_M;
|
||||
}
|
||||
}
|
||||
|
||||
return X2_SPELL_AOEBEHAVIOR_FLEE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Check if an item is locked
|
||||
|
||||
Reference in New Issue
Block a user