oolite/Resources/AIs/traderInterceptAI.plist
Eric Walch f502f30e66 - planets now rotate around their poles, even script added ones
- changing orientation by JS script now correctly changes the rotation axis
- relocated the "stationLaunchedShip" handler
- escorts looking for a new master won't find masters that are busy targeting the escort.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2923 127b21dd-08f5-0310-b4b7-95ae10353056
2010-01-01 11:19:14 +00:00

65 lines
2.9 KiB
Plaintext

{
GLOBAL =
{
// always do a fightOrFleeHostiles before starting this AI-state
FIGHTING = (setTargetToPrimaryAggressor, "setStateTo: ATTACK_SHIP");
FLEEING = (setTargetToPrimaryAggressor, "setStateTo: FLEE");
DEPLOYING_ESCORTS = (setTargetToPrimaryAggressor, "setStateTo: FLEE_WITH_ESCORTS");
"INCOMING_MISSILE" = ("setStateTo: INCOMING_MISSILE", "randomPauseAI: 0.25 0.75");
"TARGET_DESTROYED" = (exitAI);
"TARGET_LOST" = (exitAI);
};
"ATTACK_SHIP" =
{
ENTER = (deployEscorts, broadcastDistressMessage, performAttack);
"ESCORT_ATTACKED" = (setTargetToPrimaryAggressor, groupAttackTarget);
"ENERGY_LOW" = (setTargetToPrimaryAggressor, broadcastDistressMessage, deployEscorts, "setStateTo: FLEE");
"INCOMING_MISSILE" = ("setStateTo: INCOMING_MISSILE", "randomPauseAI: 0.25 0.75");
"TARGET_DESTROYED" = (exitAI);
"TARGET_LOST" = (exitAI);
};
FLEE =
{
ENTER = ("setDesiredRangeTo: 25600", performFlee);
ATTACKED = (fightOrFleeHostiles);
FIGHTING = (setTargetToPrimaryAggressor, "setStateTo: ATTACK_SHIP");
FLEEING = (setTargetToPrimaryAggressor, "setStateTo: FLEE");
DEPLOYING_ESCORTS = (setTargetToPrimaryAggressor, "setStateTo: FLEE_WITH_ESCORTS");
"TARGET_LOST" = (performIdle, exitAI);
"TARGET_DESTROYED" = (performIdle, exitAI);
"INCOMING_MISSILE" = ("setStateTo: INCOMING_MISSILE", "randomPauseAI: 0.25 0.75");
"REACHED_SAFETY" = (performIdle, exitAI);
};
"FLEE_WITH_ESCORTS" =
{
ENTER = ("setDesiredRangeTo: 25600", performFlee);
ATTACKED = (scanForHostiles);
"TARGET_FOUND" = (setTargetToPrimaryAggressor, deployEscorts, "rollD: 3");
"ROLL_1" = ("setStateTo: ATTACK_SHIP");
"ROLL_2" = ("setDesiredRangeTo: 25600", performFlee);
"ROLL_3" = ("setDesiredRangeTo: 25600", performFlee);
"ESCORT_ATTACKED" = (setTargetToPrimaryAggressor, groupAttackTarget); // only player attacks escorts
"TARGET_LOST" = (performIdle, exitAI);
"TARGET_DESTROYED" = (performIdle, exitAI);
"ENERGY_LOW" = (setTargetToPrimaryAggressor, deployEscorts);
"INCOMING_MISSILE" = ("setStateTo: INCOMING_MISSILE", "randomPauseAI: 0.25 0.75");
"REACHED_SAFETY" = (performIdle, exitAI);
};
"FLEE_FOR_MISSILE" =
{
ENTER = ("setDesiredRangeTo: 25600", broadcastDistressMessage, performFlee, "pauseAI: 5");
ATTACKED = ("setStateTo: GLOBAL", fightOrFleeHostiles);
"TARGET_LOST" = (scanForHostiles);
"TARGET_FOUND" = (setTargetToFoundTarget, "setStateTo: GLOBAL", fightOrFleeHostiles);
"NOTHING_FOUND" = (exitAI);
"TARGET_DESTROYED" = (performIdle, exitAI);
"INCOMING_MISSILE" = ("setStateTo: INCOMING_MISSILE", "randomPauseAI: 0.25 0.75");
"REACHED_SAFETY" = (performIdle, exitAI);
"UPDATE" = (fightOrFleeMissile, "pauseAI: 10");
};
"INCOMING_MISSILE" =
{
ATTACKED = ("setStateTo: GLOBAL", fightOrFleeMissile, fightOrFleeHostiles);
"UPDATE" = (setTargetToPrimaryAggressor, fightOrFleeMissile, "setStateTo: FLEE_FOR_MISSILE");
};
}