2005-04-19 19:53:18 +00:00
|
|
|
{
|
|
|
|
FLEE = {
|
2005-06-08 10:22:59 +00:00
|
|
|
ATTACKED = (fightOrFleeHostiles);
|
|
|
|
FIGHTING = (setTargetToPrimaryAggressor, "setStateTo: ATTACK_SHIP");
|
|
|
|
FLEEING = (setTargetToPrimaryAggressor, "setStateTo: FLEE");
|
|
|
|
"TARGET_LOST" = (performIdle, "setStateTo: GLOBAL");
|
|
|
|
"TARGET_DESTROYED" = (performIdle, "setStateTo: GLOBAL");
|
|
|
|
ENTER = ("setDesiredRangeTo: 25600", performFlee);
|
|
|
|
EXIT = ();
|
|
|
|
"INCOMING_MISSILE" = (setTargetToPrimaryAggressor, broadcastDistressMessage, fightOrFleeMissile, fightOrFleeHostiles);
|
|
|
|
"REACHED_SAFETY" = (performIdle, "setStateTo: GLOBAL");
|
|
|
|
UPDATE = ();
|
|
|
|
};
|
|
|
|
"ATTACK_SHIP" = {
|
|
|
|
"ENERGY_LOW" = (setTargetToPrimaryAggressor, broadcastDistressMessage, "setStateTo: FLEE");
|
|
|
|
ENTER = (broadcastDistressMessage, performAttack);
|
|
|
|
EXIT = ();
|
|
|
|
"INCOMING_MISSILE" = (setTargetToPrimaryAggressor, broadcastDistressMessage, fightOrFleeMissile, "setStateTo: FLEE");
|
|
|
|
"TARGET_DESTROYED" = ("setStateTo: HEAD_FOR_PLANET");
|
|
|
|
"TARGET_LOST" = ("setStateTo: HEAD_FOR_PLANET");
|
|
|
|
UPDATE = ();
|
|
|
|
};
|
|
|
|
"GO_TO_STATION" = {
|
2006-06-23 10:19:27 +00:00
|
|
|
ENTER = (setTargetToSystemStation, "setDesiredRangeTo: 5000.0", setDestinationToTarget, checkCourseToDestination);
|
2005-06-08 10:22:59 +00:00
|
|
|
"COURSE_OK" = ("setSpeedFactorTo: 0.5", performFlyToRangeFromDestination);
|
2006-06-23 16:10:55 +00:00
|
|
|
"WAYPOINT_SET" = ("setAITo: gotoWaypointAI.plist");
|
2006-06-23 10:19:27 +00:00
|
|
|
"DESIRED_RANGE_ACHIEVED" = (dockEscorts, setTargetToSystemStation, "setAITo: dockingAI.plist");
|
|
|
|
"AEGIS_IN_DOCKING_RANGE" = (dockEscorts, setTargetToSystemStation, "setAITo: dockingAI.plist");
|
2005-06-08 10:22:59 +00:00
|
|
|
"TARGET_FOUND" = (fightOrFleeHostiles);
|
2006-06-23 16:10:55 +00:00
|
|
|
"INCOMING_MISSILE" = (setTargetToPrimaryAggressor, broadcastDistressMessage, fightOrFleeMissile, fightOrFleeHostiles, "setStateTo: FLEE");
|
|
|
|
ATTACKED = (fightOrFleeHostiles);
|
2005-06-08 10:22:59 +00:00
|
|
|
FIGHTING = (setTargetToPrimaryAggressor, "setStateTo: ATTACK_SHIP");
|
|
|
|
FLEEING = (setTargetToPrimaryAggressor, "setStateTo: FLEE");
|
2006-06-23 16:10:55 +00:00
|
|
|
UPDATE = (
|
|
|
|
setTargetToSystemStation,
|
|
|
|
"setDesiredRangeTo: 5000.0",
|
|
|
|
setDestinationToTarget,
|
|
|
|
checkCourseToDestination,
|
|
|
|
scanForHostiles,
|
|
|
|
"pauseAI: 10.0"
|
|
|
|
);
|
|
|
|
EXIT = ();
|
2005-06-08 10:22:59 +00:00
|
|
|
};
|
|
|
|
"HEAD_FOR_PLANET" = {
|
2006-06-23 16:10:55 +00:00
|
|
|
ENTER = (setCourseToPlanet, "setDesiredRangeTo: 30000.0", "setSpeedFactorTo: 0.35", checkCourseToDestination);
|
|
|
|
"COURSE_OK" = ("setSpeedFactorTo: 0.65", performFlyToRangeFromDestination);
|
|
|
|
"WAYPOINT_SET" = ("setAITo: gotoWaypointAI.plist");
|
2005-06-08 10:22:59 +00:00
|
|
|
"AEGIS_CLOSE_TO_PLANET" = ("setStateTo: GO_TO_STATION");
|
|
|
|
"AEGIS_IN_DOCKING_RANGE" = (dockEscorts, "setStateTo: GO_TO_STATION");
|
|
|
|
"DESIRED_RANGE_ACHIEVED" = ("setStateTo: GO_TO_STATION");
|
|
|
|
"TARGET_FOUND" = (fightOrFleeHostiles);
|
2006-06-23 16:10:55 +00:00
|
|
|
"INCOMING_MISSILE" = (setTargetToPrimaryAggressor, broadcastDistressMessage, fightOrFleeMissile, fightOrFleeHostiles, "setStateTo: FLEE");
|
|
|
|
ATTACKED = (fightOrFleeHostiles);
|
2005-06-08 10:22:59 +00:00
|
|
|
FIGHTING = (setTargetToPrimaryAggressor, "setStateTo: ATTACK_SHIP");
|
|
|
|
FLEEING = (setTargetToPrimaryAggressor, "setStateTo: FLEE");
|
2006-06-23 16:10:55 +00:00
|
|
|
UPDATE = (
|
|
|
|
setCourseToPlanet,
|
|
|
|
"setDesiredRangeTo: 30000.0",
|
|
|
|
checkCourseToDestination,
|
|
|
|
scanForHostiles,
|
|
|
|
"pauseAI: 10.0"
|
|
|
|
);
|
|
|
|
EXIT = ();
|
2005-06-08 10:22:59 +00:00
|
|
|
};
|
|
|
|
GLOBAL = {ENTER = ("setStateTo: HEAD_FOR_PLANET"); EXIT = (); UPDATE = (); };
|
2005-04-19 19:53:18 +00:00
|
|
|
}
|