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
5.9 KiB
Plaintext
106 lines
5.9 KiB
Plaintext
{
|
|
GLOBAL =
|
|
{
|
|
ENTER = (switchLightsOff, "setStateTo: HEAD_FOR_WITCHPOINT");
|
|
};
|
|
"HEAD_FOR_PLANET" =
|
|
{
|
|
ENTER = (setCourseToPlanet, "setDesiredRangeTo: 50000.0", checkCourseToDestination);
|
|
"COURSE_OK" = (setSpeedToCruiseSpeed, performFlyToRangeFromDestination);
|
|
"WAYPOINT_SET" = ("setAITo: gotoWaypointAI.plist");
|
|
"DOCKING_REQUESTED" = ("setAITo: receiveDockingAI.plist");
|
|
"AEGIS_CLOSE_TO_MAIN_PLANET" = ("setStateTo: HEAD_FOR_WITCHPOINT");
|
|
"DESIRED_RANGE_ACHIEVED" = ("setStateTo: HEAD_FOR_WITCHPOINT");
|
|
"ACCEPT_DISTRESS_CALL" = (setTargetToFoundTarget, deployEscorts, groupAttackTarget);
|
|
"OFFENCE_COMMITTED" = (setTargetToFoundTarget, "markTargetForOffence: 7", deployEscorts, groupAttackTarget);
|
|
"TARGET_FOUND" = (setTargetToFoundTarget, deployEscorts, groupAttackTarget);
|
|
"INCOMING_MISSILE" = (fightOrFleeMissile, setTargetToPrimaryAggressor, deployEscorts, groupAttackTarget);
|
|
"CASCADE_WEAPON_DETECTED" = ("setAITo: fleeQMineAI.plist");
|
|
ATTACKED = (setTargetToPrimaryAggressor, groupAttackTarget);
|
|
"ATTACKER_MISSED" = (setTargetToPrimaryAggressor, groupAttackTarget);
|
|
"ATTACKED_BY_CLOAKED" = ("setAITo: interceptAI.plist", "setStateTo: FLEE_FOR_CLOAKED");
|
|
"GROUP_ATTACK_TARGET" = (setTargetToFoundTarget, "setStateTo: INBOUND_LOOT", "setAITo: interceptAI.plist");
|
|
RESTARTED = (checkAegis);
|
|
UPDATE = (setCourseToPlanet, "setDesiredRangeTo: 50000.0", checkCourseToDestination, scanForOffenders, "pauseAI: 10.0");
|
|
};
|
|
"HEAD_FOR_WITCHPOINT" =
|
|
{
|
|
ENTER = (setCourseToWitchpoint, checkCourseToDestination);
|
|
"COURSE_OK" = (setSpeedToCruiseSpeed, performFlyToRangeFromDestination);
|
|
"WAYPOINT_SET" = ("setAITo: gotoWaypointAI.plist");
|
|
"LAUNCHED OKAY" = ("dropMessages: WAYPOINT_SET", "pauseAI: 1.0");
|
|
"DOCKING_REQUESTED" = ("setAITo: receiveDockingAI.plist");
|
|
"DESIRED_RANGE_ACHIEVED" = ("setStateTo: HEAD_FOR_PLANET");
|
|
"ACCEPT_DISTRESS_CALL" = (setTargetToFoundTarget, deployEscorts, groupAttackTarget);
|
|
"OFFENCE_COMMITTED" = (setTargetToFoundTarget, "markTargetForOffence: 7", deployEscorts, groupAttackTarget);
|
|
"TARGET_FOUND" = (setTargetToFoundTarget, deployEscorts, groupAttackTarget);
|
|
"INCOMING_MISSILE" = (fightOrFleeMissile, setTargetToPrimaryAggressor, deployEscorts, groupAttackTarget);
|
|
"CASCADE_WEAPON_DETECTED" = ("setAITo: fleeQMineAI.plist");
|
|
"ATTACKER_MISSED" = (setTargetToPrimaryAggressor, groupAttackTarget);
|
|
ATTACKED = (setTargetToPrimaryAggressor, groupAttackTarget);
|
|
"ATTACKED_BY_CLOAKED" = ("setAITo: interceptAI.plist", "setStateTo: FLEE_FOR_CLOAKED");
|
|
"GROUP_ATTACK_TARGET" = (setTargetToFoundTarget, "setStateTo: OUTBOUND_LOOT", "setAITo: interceptAI.plist");
|
|
UPDATE = (setCourseToWitchpoint, checkCourseToDestination, scanForOffenders, "pauseAI: 10.0");
|
|
};
|
|
"INBOUND_LOOT" =
|
|
{
|
|
ENTER = ("setSpeedTo: 0.0", performIdle);
|
|
"GROUP_ATTACK_TARGET" = (setTargetToFoundTarget, "setAITo: interceptAI.plist");
|
|
"DOCKING_REQUESTED" = ("setSpeedFactorTo: 0.0", "setAITo: receivingDockingAI.plist");
|
|
"ACCEPT_DISTRESS_CALL" = (setTargetToFoundTarget, deployEscorts, groupAttackTarget);
|
|
"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");
|
|
"TARGET_FOUND" = (setTargetToFoundTarget, "setAITo: collectLootAI.plist");
|
|
"NOTHING_FOUND" = ("setStateTo: INBOUND_CHECK");
|
|
"HOLD_FULL" = ("setStateTo: INBOUND_CHECK");
|
|
UPDATE = (scanForLoot, "pauseAI: 10.0");
|
|
};
|
|
"OUTBOUND_LOOT" =
|
|
{
|
|
ENTER = ("setSpeedTo: 0.0", performIdle);
|
|
"GROUP_ATTACK_TARGET" = (setTargetToFoundTarget, "setAITo: interceptAI.plist");
|
|
"DOCKING_REQUESTED" = ("setSpeedFactorTo: 0.0", "setAITo: receivingDockingAI.plist");
|
|
"ACCEPT_DISTRESS_CALL" = (setTargetToFoundTarget, deployEscorts, groupAttackTarget);
|
|
"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");
|
|
"TARGET_FOUND" = (setTargetToFoundTarget, "setAITo: collectLootAI.plist");
|
|
"NOTHING_FOUND" = ("setStateTo: OUTBOUND_CHECK");
|
|
"HOLD_FULL" = ("setStateTo: OUTBOUND_CHECK");
|
|
UPDATE = (scanForLoot, "pauseAI: 10.0");
|
|
};
|
|
"INBOUND_CHECK" =
|
|
{
|
|
ENTER = (scanForFormationLeader);
|
|
RESTARTED = ("setStateTo: INBOUND_LOOT");
|
|
"OFFENCE_COMMITTED" = (setTargetToFoundTarget, "markTargetForOffence: 7", deployEscorts, groupAttackTarget);
|
|
"ACCEPT_DISTRESS_CALL" = (setTargetToFoundTarget, deployEscorts, groupAttackTarget);
|
|
"TARGET_FOUND" = ("switchAITo: escortAI.plist");
|
|
"NOTHING_FOUND" = (checkForNormalSpace);
|
|
"GROUP_ATTACK_TARGET" = (setTargetToFoundTarget, "setAITo: interceptAI.plist");
|
|
"NORMAL_SPACE" = (checkAegis, "setStateTo: HEAD_FOR_PLANET");
|
|
"INTERSTELLAR_SPACE" = ("setSpeedFactorTo: 1.0", "pauseAI: 15.0", "setStateTo: HYPER_OUT");
|
|
};
|
|
"OUTBOUND_CHECK" =
|
|
{
|
|
ENTER = (scanForFormationLeader);
|
|
RESTARTED = ("setStateTo: OUTBOUND_LOOT");
|
|
"OFFENCE_COMMITTED" = (setTargetToFoundTarget, "markTargetForOffence: 7", deployEscorts, groupAttackTarget);
|
|
"ACCEPT_DISTRESS_CALL" = (setTargetToFoundTarget, deployEscorts, groupAttackTarget);
|
|
"TARGET_FOUND" = ("switchAITo: escortAI.plist");
|
|
"NOTHING_FOUND" = (checkForNormalSpace);
|
|
"GROUP_ATTACK_TARGET" = (setTargetToFoundTarget, "setAITo: interceptAI.plist");
|
|
"NORMAL_SPACE" = ("setStateTo: HEAD_FOR_WITCHPOINT");
|
|
"INTERSTELLAR_SPACE" = ("setSpeedFactorTo: 1.0", "pauseAI: 15.0", "setStateTo: HYPER_OUT");
|
|
};
|
|
"HYPER_OUT" =
|
|
{
|
|
UPDATE = (performHyperSpaceExit);
|
|
};
|
|
}
|