oolite/Resources/AIs/policeInterceptAI.plist
Eric Walch 4f38b58b2d - Fixed a compiler warning in the last commit
- Added changes to interceptAI and policeInterceptAI

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3785 127b21dd-08f5-0310-b4b7-95ae10353056
2010-10-29 09:57:58 +00:00

66 lines
2.3 KiB
Plaintext

{
GLOBAL =
{
ENTER = (switchLightsOn, "setStateTo: ATTACK_SHIP");
};
"ATTACK_SHIP" =
{
ENTER = (performAttack);
ATTACKED = (setTargetToPrimaryAggressor, "setStateTo: ATTACK_SHIP");
"ENERGY_LOW" = ("setStateTo: FLEE");
"INCOMING_MISSILE" = (fightOrFleeMissile, "setStateTo: FLEE");
"TARGET_DESTROYED" = ("setStateTo: DOCK_WITH_STATION");
"TARGET_LOST" = ("setStateTo: CLEAR_STATION");
};
"CLEAR_STATION" =
{
ENTER =
(
getWitchspaceEntryCoordinates, setDestinationFromCoordinates,
"setDesiredRangeTo: 100.0", "setSpeedFactorTo: 0.75",
performFlyToRangeFromDestination, "pauseAI: 5"
);
ATTACKED = (switchLightsOn, setTargetToFoundTarget, "setStateTo: ATTACK_SHIP");
"GROUP_ATTACK_TARGET" = (switchLightsOn, setTargetToFoundTarget, "setStateTo: ATTACK_SHIP");
"INCOMING_MISSILE" = (fightOrFleeMissile, "setStateTo: FLEE");
UPDATE = ("setStateTo: DOCK_WITH_STATION", "pauseAI: 5.0");
};
"DOCK_WITH_STATION" =
{
ENTER =
(
switchLightsOff,
setTargetToStation,
"setDesiredRangeTo: 5000.0",
setDestinationToTarget,
checkCourseToDestination
);
"COURSE_OK" = ("setSpeedFactorTo: 0.35", performFlyToRangeFromDestination);
"WAYPOINT_SET" = ("setAITo: gotoWaypointAI.plist");
"ACCEPT_DISTRESS_CALL" = (setTargetToFoundTarget, "setAITo: interceptAI.plist");
"OFFENCE_COMMITTED" = (setTargetToFoundTarget, "sendTargetCommsMessage: [police-attack-warning]",
"markTargetForOffence: 7", "setAITo: interceptAI.plist");
ATTACKED = (switchLightsOn, setTargetToFoundTarget, "setStateTo: ATTACK_SHIP");
"GROUP_ATTACK_TARGET" = (switchLightsOn, setTargetToFoundTarget, "setStateTo: ATTACK_SHIP");
"DESIRED_RANGE_ACHIEVED" = ("setAITo: dockingAI.plist");
"INCOMING_MISSILE" = (fightOrFleeMissile, "setStateTo: FLEE");
UPDATE =
(
setTargetToStation,
"setDesiredRangeTo: 5000.0",
setDestinationToTarget,
checkCourseToDestination,
"pauseAI: 10.0"
);
};
FLEE =
{
ENTER = ("setDesiredRangeTo: 25600", performFlee);
"ENERGY_FULL" = ("setStateTo: ATTACK_SHIP");
"TARGET_LOST" = ("setStateTo: DOCK_WITH_STATION");
"TARGET_DESTROYED" = ("setStateTo: DOCK_WITH_STATION");
"REACHED_SAFETY" = ("pauseAI: 10.0", "setStateTo: DOCK_WITH_STATION");
"INCOMING_MISSILE" = (fightOrFleeMissile, "setStateTo: FLEE");
};
}