oolite/Resources/AIs/exitingTraderAI.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

57 lines
2.3 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");
"CASCADE_WEAPON_DETECTED" = ("setAITo: fleeQMineAI.plist");
"TARGET_DESTROYED" = ("setStateTo: HEAD_AWAY_FROM_PLANET");
"TARGET_LOST" = ("setStateTo: HEAD_AWAY_FROM_PLANET");
RESTARTED = ("setStateTo: HEAD_AWAY_FROM_PLANET");
};
"EXIT_SYSTEM" =
{
"WITCHSPACE OKAY" = (wormholeEscorts);
"WITCHSPACE BLOCKED" = (setTargetToFoundTarget, setDestinationWithinTarget, "setDesiredRangeTo: 30000.0", performFlyToRangeFromDestination);
"WITCHSPACE UNAVAILABLE" = ("switchAITo: 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: HEAD_AWAY_FROM_PLANET");
"TARGET_DESTROYED" = (performIdle, "setStateTo: HEAD_AWAY_FROM_PLANET");
"INCOMING_MISSILE" = (setTargetToPrimaryAggressor, broadcastDistressMessage, fightOrFleeMissile);
"CASCADE_WEAPON_DETECTED" = ("setAITo: fleeQMineAI.plist");
"REACHED_SAFETY" = (performIdle, "setStateTo: HEAD_AWAY_FROM_PLANET");
RESTARTED = ("setStateTo: HEAD_AWAY_FROM_PLANET");
};
"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");
"CASCADE_WEAPON_DETECTED" = ("setAITo: fleeQMineAI.plist");
"EXITED WITCHSPACE" = ("switchAITo: enteringTraderAI.plist");
"LAUNCHED OKAY" = ("setStateTo: HEAD_AWAY_FROM_PLANET");
RESTARTED = ("setStateTo: HEAD_AWAY_FROM_PLANET");
};
}