2009-07-08 16:20:10 +00:00
|
|
|
{
|
|
|
|
GLOBAL =
|
|
|
|
{
|
2009-07-09 19:56:15 +00:00
|
|
|
// always do a fightOrFleeHostiles before starting this AI-state
|
2009-07-08 16:20:10 +00:00
|
|
|
FIGHTING = (setTargetToPrimaryAggressor, "setStateTo: ATTACK_SHIP");
|
|
|
|
FLEEING = (setTargetToPrimaryAggressor, "setStateTo: FLEE");
|
|
|
|
DEPLOYING_ESCORTS = (setTargetToPrimaryAggressor, "setStateTo: FLEE_WITH_ESCORTS");
|
2009-07-09 19:56:15 +00:00
|
|
|
"INCOMING_MISSILE" = ("setStateTo: INCOMING_MISSILE", "randomPauseAI: 0.25 0.75");
|
2009-07-08 16:20:10 +00:00
|
|
|
"TARGET_DESTROYED" = (exitAI);
|
|
|
|
"TARGET_LOST" = (exitAI);
|
|
|
|
};
|
|
|
|
"ATTACK_SHIP" =
|
|
|
|
{
|
|
|
|
ENTER = (deployEscorts, broadcastDistressMessage, performAttack);
|
2009-09-25 14:50:28 +00:00
|
|
|
"ESCORT_ATTACKED" = (setTargetToPrimaryAggressor, groupAttackTarget);
|
2009-07-08 16:20:10 +00:00
|
|
|
"ENERGY_LOW" = (setTargetToPrimaryAggressor, broadcastDistressMessage, deployEscorts, "setStateTo: FLEE");
|
2009-07-09 19:56:15 +00:00
|
|
|
"INCOMING_MISSILE" = ("setStateTo: INCOMING_MISSILE", "randomPauseAI: 0.25 0.75");
|
2009-07-08 16:20:10 +00:00
|
|
|
"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);
|
2009-07-09 19:56:15 +00:00
|
|
|
"INCOMING_MISSILE" = ("setStateTo: INCOMING_MISSILE", "randomPauseAI: 0.25 0.75");
|
2009-07-08 16:20:10 +00:00
|
|
|
"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);
|
2010-01-01 11:19:14 +00:00
|
|
|
"ESCORT_ATTACKED" = (setTargetToPrimaryAggressor, groupAttackTarget); // only player attacks escorts
|
2009-07-08 16:20:10 +00:00
|
|
|
"TARGET_LOST" = (performIdle, exitAI);
|
|
|
|
"TARGET_DESTROYED" = (performIdle, exitAI);
|
|
|
|
"ENERGY_LOW" = (setTargetToPrimaryAggressor, deployEscorts);
|
2009-07-09 19:56:15 +00:00
|
|
|
"INCOMING_MISSILE" = ("setStateTo: INCOMING_MISSILE", "randomPauseAI: 0.25 0.75");
|
2009-07-08 16:20:10 +00:00
|
|
|
"REACHED_SAFETY" = (performIdle, exitAI);
|
|
|
|
};
|
2009-09-19 10:12:54 +00:00
|
|
|
"FLEE_FOR_MISSILE" =
|
2009-07-08 16:20:10 +00:00
|
|
|
{
|
|
|
|
ENTER = ("setDesiredRangeTo: 25600", broadcastDistressMessage, performFlee, "pauseAI: 5");
|
2009-07-09 19:56:15 +00:00
|
|
|
ATTACKED = ("setStateTo: GLOBAL", fightOrFleeHostiles);
|
2009-07-08 16:20:10 +00:00
|
|
|
"TARGET_LOST" = (scanForHostiles);
|
2009-07-09 19:56:15 +00:00
|
|
|
"TARGET_FOUND" = (setTargetToFoundTarget, "setStateTo: GLOBAL", fightOrFleeHostiles);
|
2009-07-08 16:20:10 +00:00
|
|
|
"NOTHING_FOUND" = (exitAI);
|
|
|
|
"TARGET_DESTROYED" = (performIdle, exitAI);
|
2009-07-09 19:56:15 +00:00
|
|
|
"INCOMING_MISSILE" = ("setStateTo: INCOMING_MISSILE", "randomPauseAI: 0.25 0.75");
|
2009-07-08 16:20:10 +00:00
|
|
|
"REACHED_SAFETY" = (performIdle, exitAI);
|
|
|
|
"UPDATE" = (fightOrFleeMissile, "pauseAI: 10");
|
|
|
|
};
|
2009-09-19 10:12:54 +00:00
|
|
|
"INCOMING_MISSILE" =
|
2009-07-09 19:56:15 +00:00
|
|
|
{
|
2009-09-19 10:12:54 +00:00
|
|
|
ATTACKED = ("setStateTo: GLOBAL", fightOrFleeMissile, fightOrFleeHostiles);
|
2009-07-09 19:56:15 +00:00
|
|
|
"UPDATE" = (setTargetToPrimaryAggressor, fightOrFleeMissile, "setStateTo: FLEE_FOR_MISSILE");
|
|
|
|
};
|
2009-07-08 16:20:10 +00:00
|
|
|
}
|