Changed folder name.
Changed folder name.
This commit is contained in:
73
_module/nss/motherender.nss
Normal file
73
_module/nss/motherender.nss
Normal file
@@ -0,0 +1,73 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Default On Damaged
|
||||
//:: NW_C2_DEFAULT6
|
||||
//:: 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()
|
||||
{
|
||||
object self = (OBJECT_SELF);
|
||||
object target = GetLastHostileActor(self);
|
||||
if (GetIsPC(target) && !GetIsDM(target)) {
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectBeam(VFX_BEAM_ODD, self, BODY_NODE_CHEST), target, 2.0) ;
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectAbilityDecrease(ABILITY_WISDOM, 2), target, 40.0 ) ;
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectInvisibility(INVISIBILITY_TYPE_NORMAL), OBJECT_SELF, 6.0 ) ;
|
||||
}
|
||||
|
||||
if(!GetFleeToExit())
|
||||
{
|
||||
if(!GetSpawnInCondition(NW_FLAG_SET_WARNINGS))
|
||||
{
|
||||
if(!GetIsObjectValid(GetAttemptedAttackTarget()) && !GetIsObjectValid(GetAttemptedSpellTarget()))
|
||||
{
|
||||
if(GetBehaviorState(NW_FLAG_BEHAVIOR_SPECIAL))
|
||||
{
|
||||
DetermineSpecialBehavior(GetLastDamager());
|
||||
}
|
||||
else if(GetIsObjectValid(GetLastDamager()))
|
||||
{
|
||||
DetermineCombatRound();
|
||||
if(!GetIsFighting(OBJECT_SELF))
|
||||
{
|
||||
object oTarget = GetLastDamager();
|
||||
if(!GetObjectSeen(oTarget) && GetArea(OBJECT_SELF) == GetArea(oTarget))
|
||||
{
|
||||
ActionMoveToLocation(GetLocation(oTarget), TRUE);
|
||||
ActionDoCommand(DetermineCombatRound());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (!GetIsObjectValid(GetAttemptedSpellTarget()))
|
||||
{
|
||||
object oTarget = GetAttackTarget();
|
||||
if(!GetIsObjectValid(oTarget))
|
||||
{
|
||||
oTarget = GetAttemptedAttackTarget();
|
||||
}
|
||||
object oAttacker = GetLastHostileActor();
|
||||
if (GetIsObjectValid(oAttacker) && oTarget != oAttacker && GetIsEnemy(oAttacker) &&
|
||||
(GetTotalDamageDealt() > (GetMaxHitPoints(OBJECT_SELF) / 4) ||
|
||||
(GetHitDice(oAttacker) - 2) > GetHitDice(oTarget) ) )
|
||||
{
|
||||
DetermineCombatRound(oAttacker);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(GetSpawnInCondition(NW_FLAG_DAMAGED_EVENT))
|
||||
{
|
||||
SignalEvent(OBJECT_SELF, EventUserDefined(1006));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user