4ca8806312
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1724 127b21dd-08f5-0310-b4b7-95ae10353056
72 lines
3.3 KiB
Plaintext
72 lines
3.3 KiB
Plaintext
{
|
|
GLOBAL =
|
|
{
|
|
ENTER = ("setStateTo: HEAD_FOR_SUN");
|
|
};
|
|
FLEE =
|
|
{
|
|
ENTER = ("setDesiredRangeTo: 25600", performFlee);
|
|
ATTACKED = (fightOrFleeHostiles);
|
|
FIGHTING = (setTargetToPrimaryAggressor, "setStateTo: ATTACK_SHIP");
|
|
FLEEING = (setTargetToPrimaryAggressor, "setStateTo: FLEE");
|
|
"TARGET_LOST" = (performIdle, "setStateTo: GLOBAL");
|
|
"TARGET_DESTROYED" = (performIdle, "setStateTo: GLOBAL");
|
|
"INCOMING_MISSILE" = (setTargetToPrimaryAggressor, broadcastDistressMessage, fightOrFleeMissile, fightOrFleeHostiles);
|
|
"REACHED_SAFETY" = (performIdle, "setStateTo: GLOBAL");
|
|
};
|
|
"ATTACK_SHIP" =
|
|
{
|
|
ENTER = (broadcastDistressMessage, performAttack);
|
|
"ENERGY_LOW" = (setTargetToPrimaryAggressor, broadcastDistressMessage, "setStateTo: FLEE");
|
|
"INCOMING_MISSILE" = (setTargetToPrimaryAggressor, broadcastDistressMessage, fightOrFleeMissile, "setStateTo: FLEE");
|
|
"TARGET_DESTROYED" = ("setStateTo: GLOBAL");
|
|
"TARGET_LOST" = ("setStateTo: GLOBAL");
|
|
};
|
|
"GO_TO_WAYPOINT_SUN" =
|
|
{
|
|
ENTER = ("setDesiredRangeTo: 50.0", checkCourseToDestination);
|
|
"COURSE_OK" = ("setSpeedFactorTo: 0.5", performFlyToRangeFromDestination);
|
|
"WAYPOINT_SET" = ("setDesiredRangeTo: 50.0", checkCourseToDestination);
|
|
"DESIRED_RANGE_ACHIEVED" = ("setStateTo: HEAD_FOR_SUN");
|
|
ATTACKED = (fightOrFleeHostiles);
|
|
"INCOMING_MISSILE" = (setTargetToPrimaryAggressor, broadcastDistressMessage, fightOrFleeMissile, fightOrFleeHostiles, "setStateTo: FLEE");
|
|
FIGHTING = (setTargetToPrimaryAggressor, "setStateTo: ATTACK_SHIP");
|
|
FLEEING = (setTargetToPrimaryAggressor, "setStateTo: FLEE");
|
|
};
|
|
"HEAD_FOR_SUN" =
|
|
{
|
|
ENTER = (setSunSkimStartCoordinates);
|
|
"WAIT_FOR_SUN" = ("pauseAI: 10.0", setSunSkimStartCoordinates);
|
|
"APPROACH_COORDINATES" = (setDestinationFromCoordinates, "setDesiredRangeTo: 50000", checkCourseToDestination);
|
|
"COURSE_OK" = ("setSpeedFactorTo: 0.80", performFlyToRangeFromDestination);
|
|
"WAYPOINT_SET" = ("setStateTo: GO_TO_WAYPOINT_SUN");
|
|
"DESIRED_RANGE_ACHIEVED" = (dockEscorts, "setStateTo: GO_TO_SKIM");
|
|
ATTACKED = (fightOrFleeHostiles);
|
|
"INCOMING_MISSILE" = (setTargetToPrimaryAggressor, broadcastDistressMessage, fightOrFleeMissile, fightOrFleeHostiles, "setStateTo: FLEE");
|
|
FIGHTING = (setTargetToPrimaryAggressor, "setStateTo: ATTACK_SHIP");
|
|
FLEEING = (setTargetToPrimaryAggressor, "setStateTo: FLEE");
|
|
};
|
|
"GO_TO_SKIM" =
|
|
{
|
|
ENTER = (setSunSkimStartCoordinates, setDestinationFromCoordinates, "setDesiredRangeTo: 100", "setSpeedFactorTo: 1.0", performFlyToRangeFromDestination);
|
|
"DESIRED_RANGE_ACHIEVED" = ("setStateTo: SKIM_SUN");
|
|
};
|
|
"SKIM_SUN" =
|
|
{
|
|
ENTER = (setSunSkimEndCoordinates, setDestinationFromCoordinates, "setDesiredRangeTo: 50", "setSpeedFactorTo: 1.0", performFlyToRangeFromDestination);
|
|
"DESIRED_RANGE_ACHIEVED" = ("setStateTo: LEAVE_SUN");
|
|
};
|
|
"LEAVE_SUN" =
|
|
{
|
|
ENTER = (setSunSkimExitCoordinates, setDestinationFromCoordinates, "setDesiredRangeTo: 250", "setSpeedFactorTo: 1.0", performFlyToRangeFromDestination);
|
|
"DESIRED_RANGE_ACHIEVED" = ("addFuel: 70", "setStateTo: EXIT_SYSTEM");
|
|
};
|
|
"EXIT_SYSTEM" =
|
|
{
|
|
UPDATE = (performHyperSpaceExit);
|
|
"WITCHSPACE OKAY" = (wormholeEscorts);
|
|
"WITCHSPACE BLOCKED" = (setTargetToFoundTarget, setDestinationWithinTarget, "setDesiredRangeTo: 10000.0", performFlyToRangeFromDestination);
|
|
"WITCHSPACE UNAVAILABLE" = ("setAITo: route1traderAI.plist");
|
|
};
|
|
}
|