Special tactics for cowardly creatures.

int SpecialTacticsCowardly(
    object oTarget



The "enemy" object we wish to perform special tactics against.


Special tactics for cowardly creatures.

Cowards act as follows:
- If you and your friends outnumber the enemy by 6:1 or by more than 10, fall through to normal combat.
- If you are currently being attacked by a melee attacker, fight defensively (see SpecialTacticsDefensive).
- If there is a "NW_SAFE" waypoint in your area that is out of sight of the target, run to it.
- Otherwise, run away randomly from the target.

Returns TRUE on success, FALSE on failure.


#include "x0_i0_combat"




// Lets' check to see if our "cowardly tactics" passes or fails.
#include "x0_i0_combat"

void main()
   // We assume we have previously flagged the caller with the X0_COMBAT_FLAG_COWARDLY setting using SetCombatCondition.
   // Establish our target.
   object oEnemy = GetLastHostileActor();
   // Run the tactic function on oEnemy, we know the flag is set so if this returns FALSE,
   // it is because the tactics check failed. 
   int nTactic = SpecialTacticsCowardly(oEnemy);
   //The tactic succeeded.
   if(nTactic == TRUE)
      // Do stuff.
   //The tactic failed.
      // Do stuff.

See Also

functions:  SpecialTactics | SpecialTacticsAmbusher | SpecialTacticsDefensive | SpecialTacticsRanged
categories:  Combat Functions | Combat Actions Functions

author: Baragg, editor: Mistress