ae84915d19
1) Make pirates with full holds (and other offenders using route1traderAI) less likely to go to main station, especially not fugitives. (Expansion of changes from r4770) 2) Experimentally ensure always at least one rock hermit in all non-nova systems. If normal generation does not place a hermit, one is added well away from all spacelanes. 3) New "ATTACKER_MISSED" AI event for when a ship tried to shoot a laser at its target but narrowly missed. Many stock AIs modified to treat this as a hostile action. 4) Tidy function/property names in docking code 5) Add checks for cloaking in some AI routines 6) Use weak refs rather than universal ID for targeting, and clean up git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5144 127b21dd-08f5-0310-b4b7-95ae10353056
106 lines
6.2 KiB
Plaintext
106 lines
6.2 KiB
Plaintext
{
|
|
GLOBAL =
|
|
{
|
|
ENTER = (switchLightsOff, "setStateTo: HEAD_FOR_SUN");
|
|
};
|
|
"HEAD_FOR_PLANET" =
|
|
{
|
|
ENTER = (setCourseToPlanet, "setDesiredRangeTo: 50000.0", checkCourseToDestination);
|
|
RESTARTED = ("setStateTo: INBOUND_LOOT");
|
|
"COURSE_OK" = (setSpeedToCruiseSpeed, performFlyToRangeFromDestination);
|
|
"WAYPOINT_SET" = ("setStateTo: GO_TO_WAYPOINT_PLANET");
|
|
"DESIRED_RANGE_ACHIEVED" = ("setStateTo: HEAD_FOR_SUN");
|
|
"AEGIS_CLOSE_TO_MAIN_PLANET" = ("setStateTo: HEAD_FOR_SUN");
|
|
ATTACKED = (setTargetToPrimaryAggressor, groupAttackTarget);
|
|
"ATTACKER_MISSED" = (setTargetToPrimaryAggressor, groupAttackTarget);
|
|
"ATTACKED_BY_CLOAKED" = ("setAITo: interceptAI.plist", "setStateTo: FLEE_FOR_CLOAKED");
|
|
"INCOMING_MISSILE" = (fightOrFleeMissile, setTargetToPrimaryAggressor, deployEscorts, groupAttackTarget);
|
|
"CASCADE_WEAPON_DETECTED" = ("setAITo: fleeQMineAI.plist");
|
|
"TARGET_FOUND" = (setTargetToFoundTarget, deployEscorts, groupAttackTarget);
|
|
"GROUP_ATTACK_TARGET" = (setTargetToFoundTarget, "setAITo: interceptAI.plist");
|
|
"ACCEPT_DISTRESS_CALL" = (setTargetToFoundTarget, deployEscorts, groupAttackTarget);
|
|
"OFFENCE_COMMITTED" = (setTargetToFoundTarget, "markTargetForOffence: 7", deployEscorts, groupAttackTarget);
|
|
UPDATE = (scanForOffenders, checkCourseToDestination, "pauseAI: 10.0");
|
|
};
|
|
"GO_TO_WAYPOINT_PLANET" =
|
|
{
|
|
ENTER = (setDesiredRangeForWaypoint, checkCourseToDestination);
|
|
RESTARTED = ("setStateTo: INBOUND_LOOT");
|
|
"COURSE_OK" = (setSpeedToCruiseSpeed, performFlyToRangeFromDestination);
|
|
"WAYPOINT_SET" = (setDesiredRangeForWaypoint, checkCourseToDestination);
|
|
"DESIRED_RANGE_ACHIEVED" = ("setStateTo: HEAD_FOR_PLANET");
|
|
"AEGIS_CLOSE_TO_MAIN_PLANET" = ("setStateTo: HEAD_FOR_SUN");
|
|
ATTACKED = (setTargetToPrimaryAggressor, groupAttackTarget);
|
|
"ATTACKER_MISSED" = (setTargetToPrimaryAggressor, groupAttackTarget);
|
|
"INCOMING_MISSILE" = (fightOrFleeMissile, setTargetToPrimaryAggressor, deployEscorts, groupAttackTarget);
|
|
"CASCADE_WEAPON_DETECTED" = ("setAITo: fleeQMineAI.plist");
|
|
"GROUP_ATTACK_TARGET" = (setTargetToFoundTarget, "setAITo: interceptAI.plist");
|
|
"ACCEPT_DISTRESS_CALL" = (setTargetToFoundTarget, deployEscorts, groupAttackTarget);
|
|
"OFFENCE_COMMITTED" = (setTargetToFoundTarget, "markTargetForOffence: 7", deployEscorts, groupAttackTarget);
|
|
};
|
|
"HEAD_FOR_SUN" =
|
|
{
|
|
ENTER = (setSunSkimStartCoordinates);
|
|
RESTARTED = ("setStateTo: OUTBOUND_LOOT");
|
|
"WAIT_FOR_SUN" = ("pauseAI: 10.0", setSunSkimStartCoordinates);
|
|
"APPROACH_COORDINATES" = (setDestinationFromCoordinates, "setDesiredRangeTo: 25000", checkCourseToDestination);
|
|
"COURSE_OK" = (setSpeedToCruiseSpeed, performFlyToRangeFromDestination);
|
|
"WAYPOINT_SET" = ("setStateTo: GO_TO_WAYPOINT_SUN");
|
|
"DESIRED_RANGE_ACHIEVED" = ("setStateTo: HEAD_FOR_PLANET");
|
|
"CLOSE_TO_SUN" = ("setStateTo: HEAD_FOR_PLANET");
|
|
ATTACKED = (setTargetToPrimaryAggressor, groupAttackTarget);
|
|
"ATTACKER_MISSED" = (setTargetToPrimaryAggressor, groupAttackTarget);
|
|
"ATTACKED_BY_CLOAKED" = ("setAITo: interceptAI.plist", "setStateTo: FLEE_FOR_CLOAKED");
|
|
"INCOMING_MISSILE" = (fightOrFleeMissile, setTargetToPrimaryAggressor, deployEscorts, groupAttackTarget);
|
|
"CASCADE_WEAPON_DETECTED" = ("setAITo: fleeQMineAI.plist");
|
|
"TARGET_FOUND" = (setTargetToFoundTarget, deployEscorts, groupAttackTarget);
|
|
"GROUP_ATTACK_TARGET" = (setTargetToFoundTarget, "setAITo: interceptAI.plist");
|
|
"ACCEPT_DISTRESS_CALL" = (setTargetToFoundTarget, deployEscorts, groupAttackTarget);
|
|
"OFFENCE_COMMITTED" = (setTargetToFoundTarget, "markTargetForOffence: 7", deployEscorts, groupAttackTarget);
|
|
UPDATE = (scanForOffenders, checkCourseToDestination, "pauseAI: 10.0");
|
|
};
|
|
"GO_TO_WAYPOINT_SUN" =
|
|
{
|
|
ENTER = (setDesiredRangeForWaypoint, checkCourseToDestination);
|
|
RESTARTED = ("setStateTo: OUTBOUND_LOOT");
|
|
"COURSE_OK" = (setSpeedToCruiseSpeed, performFlyToRangeFromDestination);
|
|
"WAYPOINT_SET" = (setDesiredRangeForWaypoint, checkCourseToDestination);
|
|
"DESIRED_RANGE_ACHIEVED" = ("setStateTo: HEAD_FOR_SUN");
|
|
"CLOSE_TO_SUN" = ("setStateTo: HEAD_FOR_PLANET");
|
|
"ACCEPT_DISTRESS_CALL" = (setTargetToFoundTarget, deployEscorts, groupAttackTarget);
|
|
"GROUP_ATTACK_TARGET" = (setTargetToFoundTarget, "setAITo: interceptAI.plist");
|
|
"OFFENCE_COMMITTED" = (setTargetToFoundTarget, "markTargetForOffence: 7", deployEscorts, groupAttackTarget);
|
|
ATTACKED = (setTargetToPrimaryAggressor, groupAttackTarget);
|
|
"ATTACKER_MISSED" = (setTargetToPrimaryAggressor, groupAttackTarget);
|
|
"INCOMING_MISSILE" = (fightOrFleeMissile, setTargetToPrimaryAggressor, deployEscorts, groupAttackTarget);
|
|
"CASCADE_WEAPON_DETECTED" = ("setAITo: fleeQMineAI.plist");
|
|
};
|
|
"OUTBOUND_LOOT" =
|
|
{
|
|
ENTER = ("setSpeedTo: 0.0", performIdle);
|
|
"GROUP_ATTACK_TARGET" = (setTargetToFoundTarget, "setAITo: interceptAI.plist");
|
|
ATTACKED = (setTargetToPrimaryAggressor, groupAttackTarget);
|
|
"ATTACKER_MISSED" = (setTargetToPrimaryAggressor, groupAttackTarget);
|
|
"ACCEPT_DISTRESS_CALL" = (setTargetToFoundTarget, deployEscorts, groupAttackTarget);
|
|
"OFFENCE_COMMITTED" = (setTargetToFoundTarget, "markTargetForOffence: 7", deployEscorts, groupAttackTarget);
|
|
"INCOMING_MISSILE" = (fightOrFleeMissile, setTargetToPrimaryAggressor, deployEscorts, groupAttackTarget);
|
|
"CASCADE_WEAPON_DETECTED" = ("setAITo: fleeQMineAI.plist");
|
|
"TARGET_FOUND" = (setTargetToFoundTarget, "setAITo: collectLootAI.plist");
|
|
"NOTHING_FOUND" = (checkAegis, "setStateTo: HEAD_FOR_SUN");
|
|
UPDATE = (scanForLoot, "pauseAI: 10.0");
|
|
};
|
|
"INBOUND_LOOT" =
|
|
{
|
|
ENTER = ("setSpeedTo: 0.0", performIdle);
|
|
"GROUP_ATTACK_TARGET" = (setTargetToFoundTarget, "setAITo: interceptAI.plist");
|
|
ATTACKED = (setTargetToPrimaryAggressor, groupAttackTarget);
|
|
"ATTACKER_MISSED" = (setTargetToPrimaryAggressor, groupAttackTarget);
|
|
"ACCEPT_DISTRESS_CALL" = (setTargetToFoundTarget, deployEscorts, groupAttackTarget);
|
|
"OFFENCE_COMMITTED" = (setTargetToFoundTarget, "markTargetForOffence: 7", deployEscorts, groupAttackTarget);
|
|
"INCOMING_MISSILE" = (fightOrFleeMissile, setTargetToPrimaryAggressor, deployEscorts, groupAttackTarget);
|
|
"CASCADE_WEAPON_DETECTED" = ("setAITo: fleeQMineAI.plist");
|
|
"TARGET_FOUND" = (setTargetToFoundTarget, "setAITo: collectLootAI.plist");
|
|
"NOTHING_FOUND" = (checkAegis, "setStateTo: HEAD_FOR_PLANET");
|
|
UPDATE = (scanForLoot, "pauseAI: 10.0");
|
|
};
|
|
} |