0167b32938
- Updated several AIs with reaction to cloaked attacks. git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4954 127b21dd-08f5-0310-b4b7-95ae10353056
60 lines
2.7 KiB
Plaintext
60 lines
2.7 KiB
Plaintext
{
|
|
GLOBAL =
|
|
{
|
|
ENTER = (switchLightsOn, "setStateTo: ATTACK_SHIP");
|
|
};
|
|
"ATTACK_SHIP" =
|
|
{
|
|
ENTER = (performAttack);
|
|
"ENERGY_LOW" = ("setStateTo: FLEE");
|
|
ATTACKED = (setTargetToPrimaryAggressor, "setStateTo: ATTACK_SHIP");
|
|
"ESCORT_ATTACKED" = (setTargetToPrimaryAggressor, groupAttackTarget);
|
|
"INCOMING_MISSILE" = (fightOrFleeMissile, "setStateTo: FLEE");
|
|
"CASCADE_WEAPON_DETECTED" = ("exitAIWithMessage: CASCADE_WEAPON_DETECTED");
|
|
"TARGET_DESTROYED" = (performIdle, switchLightsOff, exitAI);
|
|
"TARGET_LOST" = (performIdle, switchLightsOff, exitAI);
|
|
"ATTACKED_BY_CLOAKED" = ("setStateTo: FLEE_FOR_CLOAKED");
|
|
"TARGET_CLOAKED" = ("setStateTo: FLEE_FOR_CLOAKED");
|
|
"PLAYER WITCHSPACE" = ("setStateTo: PLAYER_WITCHSPACE");
|
|
"ENTER WORMHOLE" = (performIdle, switchLightsOff, "exitAIWithMessage: ENTER WORMHOLE");
|
|
"DEFENSE_TARGET_LOST" = (findNewDefenseTarget);
|
|
"DEFENSE_TARGET_DESTROYED" = (findNewDefenseTarget);
|
|
};
|
|
FLEE =
|
|
{
|
|
ENTER = (deployEscorts, "setDesiredRangeTo: 25600", performFlee);
|
|
"ENERGY_FULL" = ("setStateTo: ATTACK_SHIP");
|
|
"TARGET_LOST" = (performIdle, switchLightsOff, exitAI);
|
|
"TARGET_DESTROYED" = (performIdle, switchLightsOff, exitAI);
|
|
"REACHED_SAFETY" = (performIdle, switchLightsOff, exitAI);
|
|
"INCOMING_MISSILE" = (fightOrFleeMissile, "setStateTo: FLEE");
|
|
"CASCADE_WEAPON_DETECTED" = ("exitAIWithMessage: CASCADE_WEAPON_DETECTED");
|
|
"ATTACKED_BY_CLOAKED" = ("setStateTo: FLEE_FOR_CLOAKED");
|
|
"TARGET_CLOAKED" = ("setStateTo: FLEE_FOR_CLOAKED");
|
|
"PLAYER WITCHSPACE" = ("setStateTo: PLAYER_WITCHSPACE");
|
|
"ENTER WORMHOLE" = (performIdle, switchLightsOff, "exitAIWithMessage: ENTER WORMHOLE");
|
|
"ATTACKED" = (addPrimaryAggressorAsDefenseTarget);
|
|
"DEFENSE_TARGET_LOST" = (findNewDefenseTarget);
|
|
"DEFENSE_TARGET_DESTROYED" = (findNewDefenseTarget);
|
|
"TARGET_LOST" = (performIdle, switchLightsOff, exitAI);
|
|
};
|
|
"FLEE_FOR_CLOAKED" = {
|
|
ENTER = (storeTarget,
|
|
setDestinationToCurrentLocation,
|
|
"setDesiredRangeTo: 25600",
|
|
performFlyToRangeFromDestination
|
|
);
|
|
"DESIRED_RANGE_ACHIEVED" = (performIdle, switchLightsOff, exitAI);
|
|
"INCOMING_MISSILE" = (fightOrFleeMissile, "setStateTo: FLEE");
|
|
"CASCADE_WEAPON_DETECTED" = ("setAITo: fleeQMineAI.plist");
|
|
ATTACKED = (setTargetToPrimaryAggressor, "setStateTo: ATTACK_SHIP");
|
|
"ATTACKED_BY_CLOAKED" = (setDestinationToJinkPosition);
|
|
"TARGET_FOUND" = (setTargetToFoundTarget, "setStateTo: ATTACK_SHIP");
|
|
RESTARTED = (performIdle, switchLightsOff, exitAI);
|
|
UPDATE = (recallStoredTarget, "pauseAI: 2.0");
|
|
};
|
|
"PLAYER_WITCHSPACE" =
|
|
{
|
|
"ENTER WORMHOLE" = (performIdle, switchLightsOff, exitAI, enterTargetWormhole);
|
|
};
|
|
} |