Initial upload

Initial upload.  PRC8 has been added.  Module compiles, PRC's default AI & treasure scripts have been integrated.  Started work on top hak for SLA / Ability / Scripting modifications.
This commit is contained in:
Jaysyn904
2024-03-11 23:44:08 -04:00
parent c4b5794c59
commit 7b9e44ebbb
11454 changed files with 10436475 additions and 0 deletions

View File

@@ -0,0 +1,61 @@
//::///////////////////////////////////////////////
//:: Associate: On Damaged
//:: NW_CH_AC6
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
If already fighting then ignore, else determine
combat round
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: Nov 19, 2001
//:://////////////////////////////////////////////
#include "NW_I0_GENERIC"
void main()
{
if(!GetAssociateState(NW_ASC_IS_BUSY))
{
if(!GetAssociateState(NW_ASC_MODE_STAND_GROUND) && GetCurrentAction() != ACTION_FOLLOW)
{
if(!GetIsObjectValid(GetAttackTarget()) && !GetIsObjectValid(GetAttemptedSpellTarget()))
{
if(GetIsObjectValid(GetLastHostileActor()))
{
if(GetAssociateState(NW_ASC_MODE_DEFEND_MASTER))
{
if(!GetIsObjectValid(GetLastHostileActor(GetMaster())))
{
DetermineCombatRound();
}
}
else
{
DetermineCombatRound();
}
}
}
else
{
object oTarget = GetAttackTarget();
object oAttacker = GetLastDamager();
if (GetIsObjectValid(oAttacker) && oTarget != oAttacker && GetIsEnemy(oAttacker) &&
( GetTotalDamageDealt() > (GetMaxHitPoints(OBJECT_SELF) / 4) ||
GetHitDice(oAttacker) > GetHitDice(oTarget) ) )
{
//ClearAllActions();
DetermineCombatRound(oAttacker);
}
}
}
}
if(GetSpawnInCondition(NW_FLAG_DAMAGED_EVENT))
{
SignalEvent(OBJECT_SELF, EventUserDefined(1006));
}
}