oolite/Resources/AIs/route1traderAI.plist

119 lines
5.8 KiB
Plaintext
Raw Normal View History

{
GLOBAL =
{
ENTER = ("setStateTo: CHECK_STATUS");
};
"CHECK_STATUS" = {
ENTER = (checkOwnLegalStatus, "setDesiredRangeTo: 1000000.0");
"SELF_CLEAN" = ("setStateTo: HEAD_FOR_PLANET");
"SELF_MINOR_OFFENDER" = ("rollD: 2"); // head for main station 50%
"SELF_OFFENDER" = ("rollD: 4"); // head for main station 25%
"SELF_FUGITIVE" = (setTargetToRandomStation);
"SELF_THARGOID" = ("switchAITo: thargoidAI.plist");
"ROLL_1" = ("setStateTo: HEAD_FOR_PLANET");
"ROLL_2" = (setTargetToRandomStation);
"ROLL_3" = (setTargetToRandomStation);
"ROLL_4" = (setTargetToRandomStation);
"NO_STATION_IN_RANGE" = ("setStateTo: HEAD_FOR_PLANET");
"STATION_FOUND" = ("setStateTo: GO_TO_RANDOM_STATION");
};
"HEAD_FOR_PLANET" =
{
ENTER = (setCourseToPlanet, "setDesiredRangeTo: 30000.0", "setSpeedFactorTo: 0.35", checkCourseToDestination);
"COURSE_OK" = ("setSpeedFactorTo: 0.65", performFlyToRangeFromDestination);
"WAYPOINT_SET" = ("setAITo: gotoWaypointAI.plist");
"AEGIS_CLOSE_TO_MAIN_PLANET" = ("setStateTo: GO_TO_STATION");
"CLOSE_TO_SECONDARY_PLANET" = ("setStateTo: GO_TO_SUB_STATION");
"AEGIS_IN_DOCKING_RANGE" = (dockEscorts, "setStateTo: GO_TO_STATION");
"DESIRED_RANGE_ACHIEVED" = ("setStateTo: GO_TO_STATION");
"TARGET_FOUND" = (setTargetToFoundTarget, "setAITo: traderInterceptAI.plist", fightOrFleeHostiles);
"INCOMING_MISSILE" = ("setAITo: traderInterceptAI.plist", "setStateTo: INCOMING_MISSILE", "randomPauseAI: 0.5 2.0");
"CASCADE_WEAPON_DETECTED" = ("setAITo: fleeQMineAI.plist");
"ATTACKER_MISSED" = ("setAITo: traderInterceptAI.plist", fightOrFleeHostiles);
ATTACKED = ("setAITo: traderInterceptAI.plist", fightOrFleeHostiles);
"ATTACKED_BY_CLOAKED" = ("setAITo: traderInterceptAI.plist", "setStateTo: FLEE_FOR_CLOAKED");
RESTARTED = (checkAegis);
UPDATE =
(
setCourseToPlanet,
"setDesiredRangeTo: 30000.0",
checkCourseToDestination,
scanForHostiles,
"pauseAI: 10.0"
);
};
"GO_TO_STATION" =
{
ENTER = ("dropMessages: WAYPOINT_SET", setTargetToSystemStation, "setDesiredRangeTo: 5000.0", setDestinationToTarget, checkCourseToDestination);
"COURSE_OK" = ("setSpeedFactorTo: 0.5", performFlyToRangeFromDestination);
"WAYPOINT_SET" = ("setAITo: gotoWaypointAI.plist");
"DESIRED_RANGE_ACHIEVED" = (dockEscorts, setTargetToSystemStation, "setAITo: dockingAI.plist");
"AEGIS_IN_DOCKING_RANGE" = (dockEscorts, setTargetToSystemStation, "setAITo: dockingAI.plist");
"DOCKING_REFUSED" = ("switchAITo: route2sunskimAI.plist");
"NO_STATION_FOUND" = ("switchAITo: exitingTraderAI.plist");
"TARGET_FOUND" = (setTargetToFoundTarget, "setAITo: traderInterceptAI.plist", fightOrFleeHostiles);
"INCOMING_MISSILE" = ("setAITo: traderInterceptAI.plist", "setStateTo: INCOMING_MISSILE", "randomPauseAI: 0.25 1.5");
"CASCADE_WEAPON_DETECTED" = ("setAITo: fleeQMineAI.plist");
"ATTACKER_MISSED" = ("setAITo: traderInterceptAI.plist", fightOrFleeHostiles);
ATTACKED = ("setAITo: traderInterceptAI.plist", fightOrFleeHostiles);
"ATTACKED_BY_CLOAKED" = ("setAITo: traderInterceptAI.plist", "setStateTo: FLEE_FOR_CLOAKED");
UPDATE =
(
setTargetToSystemStation,
"setDesiredRangeTo: 5000.0",
setDestinationToTarget,
checkCourseToDestination,
scanForHostiles,
"pauseAI: 10.0"
);
};
"GO_TO_SUB_STATION" =
{
ENTER = ("dropMessages: WAYPOINT_SET", setTargetToNearestFriendlyStation, "setDesiredRangeTo: 5000.0", setDestinationToTarget, checkCourseToDestination);
"COURSE_OK" = ("setSpeedFactorTo: 0.5", performFlyToRangeFromDestination);
"WAYPOINT_SET" = ("setAITo: gotoWaypointAI.plist");
"DESIRED_RANGE_ACHIEVED" = (dockEscorts, setTargetToNearestFriendlyStation, "setAITo: dockingAI.plist");
"AEGIS_IN_DOCKING_RANGE" = (dockEscorts, setTargetToSystemStation, "setAITo: dockingAI.plist");
"DOCKING_REFUSED" = ("switchAITo: route2sunskimAI.plist");
"NO_STATION_FOUND" = ("switchAITo: exitingTraderAI.plist");
"TARGET_FOUND" = (setTargetToFoundTarget, "setAITo: traderInterceptAI.plist", fightOrFleeHostiles);
"INCOMING_MISSILE" = ("setAITo: traderInterceptAI.plist", "setStateTo: INCOMING_MISSILE", "randomPauseAI: 0.25 1.5");
"CASCADE_WEAPON_DETECTED" = ("setAITo: fleeQMineAI.plist");
"ATTACKER_MISSED" = ("setAITo: traderInterceptAI.plist", fightOrFleeHostiles);
ATTACKED = ("setAITo: traderInterceptAI.plist", fightOrFleeHostiles);
"ATTACKED_BY_CLOAKED" = ("setAITo: traderInterceptAI.plist", "setStateTo: FLEE_FOR_CLOAKED");
UPDATE =
(
setTargetToNearestFriendlyStation,
"setDesiredRangeTo: 5000.0",
setDestinationToTarget,
checkCourseToDestination,
scanForHostiles,
"pauseAI: 10.0"
);
};
"GO_TO_RANDOM_STATION" =
{
ENTER = ("dropMessages: WAYPOINT_SET", "setDesiredRangeTo: 15000.0", setDestinationToTarget, checkCourseToDestination);
"COURSE_OK" = ("setSpeedFactorTo: 0.5", performFlyToRangeFromDestination);
"WAYPOINT_SET" = ("setAITo: gotoWaypointAI.plist");
"DESIRED_RANGE_ACHIEVED" = (dockEscorts, setTargetToNearestStation, "setAITo: dockingAI.plist");
"DOCKING_REFUSED" = ("switchAITo: route2sunskimAI.plist");
"NO_STATION_FOUND" = ("switchAITo: exitingTraderAI.plist");
"TARGET_FOUND" = (setTargetToFoundTarget, "setAITo: traderInterceptAI.plist", fightOrFleeHostiles);
"INCOMING_MISSILE" = ("setAITo: traderInterceptAI.plist", "setStateTo: INCOMING_MISSILE", "randomPauseAI: 0.25 1.5");
"CASCADE_WEAPON_DETECTED" = ("setAITo: fleeQMineAI.plist");
"ATTACKER_MISSED" = ("setAITo: traderInterceptAI.plist", fightOrFleeHostiles);
ATTACKED = ("setAITo: traderInterceptAI.plist", fightOrFleeHostiles);
"ATTACKED_BY_CLOAKED" = ("setAITo: traderInterceptAI.plist", "setStateTo: FLEE_FOR_CLOAKED");
UPDATE =
(
setTargetToLastStation,
"setDesiredRangeTo: 15000.0",
setDestinationToTarget,
checkCourseToDestination,
scanForHostiles,
"pauseAI: 10.0"
);
};
}