oolite/Resources/AIs/exitingTraderAI.plist
Eric Walch e8ae0f1f23 AI tweaks
- Added a few extra tests for OFFENCE_COMMITTED so attack on clean ships around the station are better registered.
- Raised the jump range for an exitingTrader to outside the mass lock range of a heavy torus station. (Won't affect other traders as ships should never reach this range.)

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3003 127b21dd-08f5-0310-b4b7-95ae10353056
2010-02-02 21:06:21 +00:00

51 lines
1.9 KiB
Plaintext

{
GLOBAL =
{
ENTER = ("setStateTo: HEAD_AWAY_FROM_PLANET");
};
"ATTACK_SHIP" =
{
ENTER = (performAttack);
"ENERGY_LOW" = ("setSpeedFactorTo: 1.0", "pauseAI: 15.0", "setStateTo: EXIT_SYSTEM");
"INCOMING_MISSILE" = (fightOrFleeMissile, "setSpeedFactorTo: 1.0", "pauseAI: 15.0", "setStateTo: EXIT_SYSTEM");
"TARGET_DESTROYED" = ("setStateTo: HEAD_AWAY_FROM_PLANET");
"TARGET_LOST" = ("setStateTo: HEAD_AWAY_FROM_PLANET");
};
"EXIT_SYSTEM" =
{
"WITCHSPACE OKAY" = (wormholeEscorts);
"WITCHSPACE BLOCKED" = (setTargetToFoundTarget, setDestinationWithinTarget, "setDesiredRangeTo: 30000.0", performFlyToRangeFromDestination);
"WITCHSPACE UNAVAILABLE" = ("setAITo: route1traderAI.plist");
UPDATE = (performHyperSpaceExit, "pauseAI: 5.0");
};
FLEE =
{
ENTER = ("setDesiredRangeTo: 25600", performFlee);
ATTACKED = (fightOrFleeHostiles);
FIGHTING = (setTargetToPrimaryAggressor, "setStateTo: ATTACK_SHIP");
FLEEING = (setTargetToPrimaryAggressor, "setStateTo: FLEE");
"TARGET_LOST" = (performIdle, "setStateTo: GLOBAL");
"TARGET_DESTROYED" = (performIdle, "setStateTo: GLOBAL");
"INCOMING_MISSILE" = (setTargetToPrimaryAggressor, broadcastDistressMessage, fightOrFleeMissile);
"REACHED_SAFETY" = (performIdle, "setStateTo: GLOBAL");
};
"HEAD_AWAY_FROM_PLANET" =
{
ENTER =
(
getWitchspaceEntryCoordinates,
setDestinationFromCoordinates,
"setDesiredRangeTo: 100.0",
"setSpeedFactorTo: 0.75",
performFlyToRangeFromDestination
);
"DESIRED_RANGE_ACHIEVED" = ("setSpeedFactorTo: 1.0", "pauseAI: 15.0", "setStateTo: EXIT_SYSTEM");
ATTACKED = (fightOrFleeHostiles);
FIGHTING = (setTargetToPrimaryAggressor, "setStateTo: ATTACK_SHIP");
FLEEING = (setTargetToPrimaryAggressor, "setStateTo: FLEE");
"INCOMING_MISSILE" = (fightOrFleeMissile, "setStateTo: FLEE");
"EXITED WITCHSPACE" = ("switchAITo: enteringTraderAI.plist");
"LAUNCHED OKAY" = ("setStateTo: HEAD_AWAY_FROM_PLANET");
};
}