Battledale_PRC8/_module/nss/jw_assoc_phys.nss
Jaysyn904 7b9e44ebbb 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.
2024-03-11 23:44:08 -04:00

50 lines
1.4 KiB
Plaintext

//::///////////////////////////////////////////////
//:: Associate On Attacked
//:: NW_CH_AC5
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
If already fighting then ignore, else determine
combat round
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: Oct 16, 2001
//:://////////////////////////////////////////////
#include "NW_I0_GENERIC"
void main()
{
SpeakString("NW_I_WAS_ATTACKED", TALKVOLUME_SILENT_TALK);
if(!GetAssociateState(NW_ASC_IS_BUSY))
{
SetCommandable(TRUE);
if(!GetAssociateState(NW_ASC_MODE_STAND_GROUND))
{
if(!GetIsObjectValid(GetAttackTarget()) && !GetIsObjectValid(GetAttemptedSpellTarget()))
{
if(GetIsObjectValid(GetLastAttacker()))
{
if(GetAssociateState(NW_ASC_MODE_DEFEND_MASTER))
{
if(!GetIsObjectValid(GetLastAttacker(GetMaster())))
{
DetermineCombatRound();
}
}
else
{
DetermineCombatRound();
}
}
}
if(GetSpawnInCondition(NW_FLAG_ATTACK_EVENT))
{
SignalEvent(OBJECT_SELF, EventUserDefined(1005));
}
}
}
}