oolite/Resources/AIs/policeInterceptAI.plist
Eric Walch 86bc4b2c36 - Added RESTARTED messages to some of the AIs that use the new fleeQMineAI to prevent leaving the ships idle.
- also added the q-mine warning inside becomeEnergyBlast so that custom q-mines also give a warning, albeit later.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4903 127b21dd-08f5-0310-b4b7-95ae10353056
2012-05-03 20:34:19 +00:00

73 lines
2.7 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");
"CASCADE_WEAPON_DETECTED" = ("setAITo: fleeQMineAI.plist");
"TARGET_DESTROYED" = ("setStateTo: DOCK_WITH_STATION");
"TARGET_LOST" = ("setStateTo: CLEAR_STATION");
RESTARTED = ("setStateTo: DOCK_WITH_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");
"CASCADE_WEAPON_DETECTED" = ("setAITo: fleeQMineAI.plist");
UPDATE = ("setStateTo: DOCK_WITH_STATION", "pauseAI: 5.0");
};
"DOCK_WITH_STATION" =
{
ENTER =
(
switchLightsOff,
setTargetToNearestStation,
"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");
"CASCADE_WEAPON_DETECTED" = ("setAITo: fleeQMineAI.plist");
UPDATE =
(
setTargetToNearestStation,
"setDesiredRangeTo: 5000.0",
setDestinationToTarget,
checkCourseToDestination,
"pauseAI: 10.0"
);
};
FLEE =
{
ENTER = ("setDesiredRangeTo: 25600", performFlee);
"ATTACKED" = (addPrimaryAggressorAsDefenseTarget);
"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");
"CASCADE_WEAPON_DETECTED" = ("setAITo: fleeQMineAI.plist");
RESTARTED = ("setStateTo: DOCK_WITH_STATION");
};
}