Added a "messageMother: ESCORT_ATTACKED" to the escort AI for escorts busy escorting. Added a response to this message for mothers in ATTACK mode to selectively release escorts.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2595 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
Eric Walch 2009-09-25 14:50:28 +00:00
parent bf3ab98bd4
commit 5e8ee68a8f
5 changed files with 5 additions and 2 deletions

View File

@ -1,7 +1,7 @@
{
GLOBAL =
{
ENTER = ("setStateTo: DECIDE_ROUTE");
ENTER = (performIdle, "setStateTo: DECIDE_ROUTE");
};
"DECIDE_ROUTE" =
{

View File

@ -10,7 +10,7 @@
"GROUP_ATTACK_TARGET" = (setTargetToFoundTarget, "setAITo: interceptAI.plist");
ESCORTING = ("setDesiredRangeTo: 0.0", performEscort);
"INCOMING_MISSILE" = ("messageMother: INCOMING_MISSILE");
"ATTACKED" = ("messageMother: ATTACKED");
"ATTACKED" = ("messageMother: ATTACKED", "messageMother: ESCORT_ATTACKED");
"NOT_ESCORTING" = ("setStateTo: LOOK_FOR_BUSINESS");
"TARGET_LOST" = ("setStateTo: LOOK_FOR_BUSINESS");
"TARGET_DESTROYED" = ("setStateTo: LOOK_FOR_BUSINESS");

View File

@ -7,6 +7,7 @@
{
ENTER = (performAttack);
"ENERGY_LOW" = ("setStateTo: FLEE");
"ESCORT_ATTACKED" = (setTargetToPrimaryAggressor, groupAttackTarget);
"INCOMING_MISSILE" = (fightOrFleeMissile, "setStateTo: FLEE");
"TARGET_DESTROYED" = (performIdle, switchLightsOff, exitAI);
"TARGET_LOST" = (performIdle, switchLightsOff, exitAI);

View File

@ -19,6 +19,7 @@
"ATTACK_SHIP" = {
ENTER = (performAttack);
ATTACKED = (setTargetToPrimaryAggressor, "setStateTo: ATTACK_SHIP");
"ESCORT_ATTACKED" = (setTargetToPrimaryAggressor, groupAttackTarget);
"ATTACKED_BY_CLOAKED" = ("setStateTo: FLEE_FOR_CLOAKED");
"ENERGY_LOW" = ("setStateTo: FLEE");
"INCOMING_MISSILE" = (fightOrFleeMissile, "setStateTo: FLEE");

View File

@ -12,6 +12,7 @@
"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);