Updated for NWNEE 37-13
Updated for NWNEE 37-13. Updated NWNxEE. Full compile. Updated release archive.
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
/// @brief Define racial and subrace characteristics.
|
||||
/// @{
|
||||
/// @file nwnx_race.nss
|
||||
#include "nwnx"
|
||||
|
||||
const string NWNX_Race = "NWNX_Race"; ///< @private
|
||||
|
||||
@@ -46,27 +45,58 @@ void NWNX_Race_SetRacialModifier(int iRace, int iMod, int iParam1, int iParam2 =
|
||||
/// @return The parent race if applicable, if not it just returns the race passed in.
|
||||
int NWNX_Race_GetParentRace(int iRace);
|
||||
|
||||
/// @brief Associates the race with its favored enemy feat.
|
||||
/// @param iRace The race
|
||||
/// @param iFeat The feat
|
||||
/// @note If a creature has a race that has a parent race then favored enemy bonuses will work for either race against that creature.
|
||||
/// For example a creature is a Wild Elf which has a parent race of Elf, an attacker would benefit if they had either Favored Enemy: Elf
|
||||
/// or Favored Enemy: Wild Elf
|
||||
void NWNX_Race_SetFavoredEnemyFeat(int iRace, int iFeat);
|
||||
|
||||
/// @brief Removes any nwnx_race 'Effects' on the targeted creature. Suppression lasts until levelup, next login, or Reactivated by function.
|
||||
/// @param oCreature The creature to suppress
|
||||
/// @note Not all nwnx_race modifiers are achieved via effect. Those that are not directly consider the creatures current race.
|
||||
void NWNX_Race_SuppressCreatureRaceEffects(object oCreature);
|
||||
|
||||
/// @brief Reactivates the nwnx_race 'Effects' on the targeted creature after they were Suppressed.
|
||||
/// @param oCreature The creature to reactive
|
||||
/// @note Safe to use on non-suppressed creatures - Triggers a refresh of effects but won't stack.
|
||||
void NWNX_Race_ReactivateCreatureRaceEffects(object oCreature);
|
||||
|
||||
/// @}
|
||||
|
||||
void NWNX_Race_SetRacialModifier(int iRace, int iMod, int iParam1, int iParam2 = 0xDEADBEEF, int iParam3 = 0xDEADBEEF)
|
||||
{
|
||||
string sFunc = "SetRacialModifier";
|
||||
|
||||
NWNX_PushArgumentInt(NWNX_Race, sFunc, iParam3);
|
||||
NWNX_PushArgumentInt(NWNX_Race, sFunc, iParam2);
|
||||
NWNX_PushArgumentInt(NWNX_Race, sFunc, iParam1);
|
||||
NWNX_PushArgumentInt(NWNX_Race, sFunc, iMod);
|
||||
NWNX_PushArgumentInt(NWNX_Race, sFunc, iRace);
|
||||
|
||||
NWNX_CallFunction(NWNX_Race, sFunc);
|
||||
NWNXPushInt(iParam3);
|
||||
NWNXPushInt(iParam2);
|
||||
NWNXPushInt(iParam1);
|
||||
NWNXPushInt(iMod);
|
||||
NWNXPushInt(iRace);
|
||||
NWNXCall(NWNX_Race, "SetRacialModifier");
|
||||
}
|
||||
|
||||
int NWNX_Race_GetParentRace(int iRace)
|
||||
{
|
||||
string sFunc = "GetParentRace";
|
||||
|
||||
NWNX_PushArgumentInt(NWNX_Race, sFunc, iRace);
|
||||
|
||||
NWNX_CallFunction(NWNX_Race, sFunc);
|
||||
return NWNX_GetReturnValueInt(NWNX_Race, sFunc);
|
||||
NWNXPushInt(iRace);
|
||||
NWNXCall(NWNX_Race, "GetParentRace");
|
||||
return NWNXPopInt();
|
||||
}
|
||||
|
||||
void NWNX_Race_SetFavoredEnemyFeat(int iRace, int iFeat)
|
||||
{
|
||||
NWNXPushInt(iFeat);
|
||||
NWNXPushInt(iRace);
|
||||
NWNXCall(NWNX_Race, "SetFavoredEnemyFeat");
|
||||
}
|
||||
|
||||
void NWNX_Race_SuppressCreatureRaceEffects(object creature)
|
||||
{
|
||||
NWNXPushObject(creature);
|
||||
NWNXCall(NWNX_Race, "SuppressCreatureRaceEffects");
|
||||
}
|
||||
|
||||
void NWNX_Race_ReactivateCreatureRaceEffects(object oCreature)
|
||||
{
|
||||
NWNXPushObject(oCreature);
|
||||
NWNXCall(NWNX_Race, "ReactivateCreatureRaceEffects");
|
||||
}
|
||||
|
Reference in New Issue
Block a user