5e8ee68a8f
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2595 127b21dd-08f5-0310-b4b7-95ae10353056
205 lines
9.8 KiB
Plaintext
205 lines
9.8 KiB
Plaintext
{
|
|
GLOBAL = {ENTER = (setCoordinatesFromPosition, "setStateTo: TRAVEL_TO_START_POSITION"); };
|
|
"TRAVEL_TO_START_POSITION" = {
|
|
ENTER = (
|
|
setDestinationToCurrentLocation,
|
|
"setDesiredRangeTo: 1500.0",
|
|
performFlyToRangeFromDestination
|
|
);
|
|
ATTACKED = (setTargetToPrimaryAggressor, "setStateTo: ATTACK_SHIP");
|
|
"ATTACKED_BY_CLOAKED" = ("setStateTo: FLEE_FOR_CLOAKED");
|
|
"DESIRED_RANGE_ACHIEVED" = ("setStateTo: LURK");
|
|
"GROUP_ATTACK_TARGET" = (setTargetToFoundTarget, "setStateTo: ATTACK_SHIP");
|
|
"INCOMING_MISSILE" = (fightOrFleeMissile, "setStateTo: FLEE");
|
|
"LAUNCHED OKAY" = ("setStateTo: CLEAR_STATION");
|
|
"ENTER WORMHOLE" = ("setStateTo: ENTER_WORMHOLE");
|
|
"EXITED WITCHSPACE" = ("switchAITo: enteringPirateAI.plist");
|
|
"FRUSTRATED" = ("setStateTo: LURK");
|
|
};
|
|
"ATTACK_SHIP" = {
|
|
ENTER = (performAttack);
|
|
ATTACKED = (setTargetToPrimaryAggressor, "setStateTo: ATTACK_SHIP");
|
|
"ESCORT_ATTACKED" = (setTargetToPrimaryAggressor, groupAttackTarget);
|
|
"ATTACKED_BY_CLOAKED" = ("setStateTo: FLEE_FOR_CLOAKED");
|
|
"ENERGY_LOW" = ("setStateTo: FLEE");
|
|
"INCOMING_MISSILE" = (fightOrFleeMissile, "setStateTo: FLEE");
|
|
"TARGET_DESTROYED" = ("setStateTo: COLLECT_LOOT");
|
|
"TARGET_LOST" = ("setStateTo: COLLECT_LOOT");
|
|
"CARGO_DUMPED" = (checkForFullHold);
|
|
"HOLD_NOT_FULL" = ("rollD: 4");
|
|
"ROLL_1" = ("setStateTo: COLLECT_LOOT");
|
|
"ENTER WORMHOLE" = ("setStateTo: ENTER_WORMHOLE");
|
|
"PLAYER WITCHSPACE" = (enterTargetWormhole);
|
|
};
|
|
FLEE = {
|
|
ENTER = ("setDesiredRangeTo: 25600", performFlee);
|
|
"ENERGY_FULL" = ("setStateTo: COLLECT_LOOT");
|
|
"TARGET_LOST" = ("setStateTo: RECOVER");
|
|
"DESIRED_RANGE_ACHIEVED" = ("setStateTo: RECOVER");
|
|
"INCOMING_MISSILE" = (fightOrFleeMissile, "setStateTo: FLEE");
|
|
"REACHED_SAFETY" = ("setStateTo: RECOVER");
|
|
ATTACKED = (setTargetToPrimaryAggressor, "setStateTo: FLEE");
|
|
};
|
|
"FLEE_FOR_CLOAKED" = {
|
|
ENTER = ("setDesiredRangeTo: 7500", performFlee);
|
|
"ENERGY_FULL" = ("setStateTo: LURK");
|
|
"ENERGY_LOW" = ("setStateTo: FLEE");
|
|
"TARGET_LOST" = ("setStateTo: RECOVER");
|
|
"DESIRED_RANGE_ACHIEVED" = ("setStateTo: RECOVER");
|
|
"INCOMING_MISSILE" = (fightOrFleeMissile, "setStateTo: FLEE");
|
|
"REACHED_SAFETY" = ("setStateTo: RECOVER");
|
|
ATTACKED = (setTargetToPrimaryAggressor, "setStateTo: ATTACK_SHIP");
|
|
};
|
|
RECOVER = {
|
|
ENTER = ("setSpeedTo: 0.0", performIdle, "pauseAI: 5.0");
|
|
"ENERGY_FULL" = ("setStateTo: COLLECT_LOOT");
|
|
"ENERGY_HIGH" = ("setStateTo: COLLECT_LOOT");
|
|
ATTACKED = (setTargetToPrimaryAggressor, "setStateTo: ATTACK_SHIP");
|
|
"INCOMING_MISSILE" = (fightOrFleeMissile, "setStateTo: FLEE");
|
|
"ENTER WORMHOLE" = ("setStateTo: ENTER_WORMHOLE");
|
|
UPDATE = (checkEnergy, "pauseAI: 10.0");
|
|
};
|
|
"COLLECT_LOOT" = {
|
|
ENTER = ("setSpeedTo: 0.0", performIdle);
|
|
ATTACKED = (setTargetToPrimaryAggressor, "setStateTo: ATTACK_SHIP");
|
|
"ATTACKED_BY_CLOAKED" = ("setStateTo: FLEE_FOR_CLOAKED");
|
|
"HOLD_FULL" = ("setStateTo: CONSIDER_DOCKING");
|
|
"GROUP_ATTACK_TARGET" = (setTargetToFoundTarget, "setStateTo: ATTACK_SHIP");
|
|
"INCOMING_MISSILE" = (fightOrFleeMissile, "setStateTo: FLEE");
|
|
"TARGET_FOUND" = (setTargetToFoundTarget, "setStateTo: LOOT");
|
|
"NOTHING_FOUND" = ("setStateTo: CONSIDER_DOCKING");
|
|
"ENTER WORMHOLE" = ("setStateTo: ENTER_WORMHOLE");
|
|
UPDATE = (scanForLoot, "pauseAI: 5.0");
|
|
};
|
|
LOOT = {
|
|
ENTER = (performCollect);
|
|
ATTACKED = (setTargetToPrimaryAggressor, "setStateTo: ATTACK_SHIP");
|
|
"ATTACKED_BY_CLOAKED" = ("setStateTo: FLEE_FOR_CLOAKED");
|
|
"CARGO_SCOOPED" = ("setStateTo: CHECK_CARGO");
|
|
FRUSTRATED = ("setStateTo: COLLECT_LOOT");
|
|
"GROUP_ATTACK_TARGET" = (setTargetToFoundTarget, "setStateTo: ATTACK_SHIP");
|
|
"INCOMING_MISSILE" = (fightOrFleeMissile, "setStateTo: FLEE");
|
|
"TARGET_FOUND" = (setTargetToFoundTarget, "setStateTo: LOOT");
|
|
"NOTHING_FOUND" = ("setStateTo: CONSIDER_DOCKING");
|
|
"TARGET_LOST" = ("setStateTo: CHECK_CARGO");
|
|
"ENTER WORMHOLE" = ("setStateTo: ENTER_WORMHOLE");
|
|
};
|
|
"CHECK_CARGO" = {
|
|
ENTER = ("setSpeedTo: 0.0", performIdle, checkForFullHold);
|
|
ATTACKED = (setTargetToPrimaryAggressor, "setStateTo: ATTACK_SHIP");
|
|
"ATTACKED_BY_CLOAKED" = ("setStateTo: FLEE_FOR_CLOAKED");
|
|
"HOLD_FULL" = ("setStateTo: CONSIDER_LEAVING");
|
|
"HOLD_NOT_FULL" = ("setStateTo: COLLECT_LOOT");
|
|
"NO_CARGO_BAY" = ("setStateTo: CONSIDER_DOCKING");
|
|
"GROUP_ATTACK_TARGET" = (setTargetToFoundTarget, "setStateTo: ATTACK_SHIP");
|
|
"INCOMING_MISSILE" = (fightOrFleeMissile, "setStateTo: FLEE");
|
|
"ENTER WORMHOLE" = ("setStateTo: ENTER_WORMHOLE");
|
|
};
|
|
"CONSIDER_LEAVING" = {
|
|
ATTACKED = (setTargetToPrimaryAggressor, "setStateTo: ATTACK_SHIP");
|
|
"ATTACKED_BY_CLOAKED" = ("setStateTo: FLEE_FOR_CLOAKED");
|
|
"NOTHING_FOUND" = ("setStateTo: EXIT_SYSTEM", "pauseAI: 5.0");
|
|
"STATION_FOUND" = ("setAITo: dockingAI.plist");
|
|
"INCOMING_MISSILE" = (fightOrFleeMissile, "setStateTo: FLEE");
|
|
"ENTER WORMHOLE" = ("setStateTo: ENTER_WORMHOLE");
|
|
UPDATE = (checkForMotherStation);
|
|
};
|
|
"EXIT_SYSTEM" = {
|
|
"WITCHSPACE OKAY" = (wormholeEscorts, wormholeGroup);
|
|
"WITCHSPACE BLOCKED" = (setTargetToFoundTarget,
|
|
setDestinationWithinTarget,
|
|
"setDesiredRangeTo: 10000.0",
|
|
performFlyToRangeFromDestination
|
|
);
|
|
"WITCHSPACE UNAVAILABLE" = ("setStateTo: DOCK_WITH_STATION");
|
|
UPDATE = (performHyperSpaceExit, "pauseAI: 5.0");
|
|
};
|
|
"CONSIDER_DOCKING" = {
|
|
ATTACKED = (setTargetToPrimaryAggressor, "setStateTo: ATTACK_SHIP");
|
|
"ATTACKED_BY_CLOAKED" = ("setStateTo: FLEE_FOR_CLOAKED");
|
|
"NOTHING_FOUND" = ("setStateTo: TRAVEL_TO_LURK_AREA");
|
|
"STATION_FOUND" = (dockEscorts, "setAITo: dockingAI.plist");
|
|
"CARGO_SCOOPED" = ("setStateTo: CHECK_CARGO");
|
|
"INCOMING_MISSILE" = (fightOrFleeMissile, "setStateTo: FLEE");
|
|
"ENTER WORMHOLE" = ("setStateTo: ENTER_WORMHOLE");
|
|
UPDATE = (checkForMotherStation);
|
|
};
|
|
"DOCK_WITH_STATION" = {
|
|
ENTER = (checkForMotherStation);
|
|
ATTACKED = (setTargetToPrimaryAggressor, "setStateTo: ATTACK_SHIP");
|
|
"ATTACKED_BY_CLOAKED" = ("setStateTo: FLEE_FOR_CLOAKED");
|
|
"NOTHING_FOUND" = ("setAITo: route1traderAI.plist");
|
|
"STATION_FOUND" = (dockEscorts, "setAITo: dockingAI.plist");
|
|
"INCOMING_MISSILE" = (fightOrFleeMissile, "setStateTo: FLEE");
|
|
"ENTER WORMHOLE" = ("setStateTo: ENTER_WORMHOLE");
|
|
};
|
|
"ENTER_WORMHOLE" = {
|
|
ENTER = (setDestinationToTarget,
|
|
"setDesiredRangeTo: 1.0",
|
|
"setSpeedFactorTo: 1.0",
|
|
performFlyToRangeFromDestination
|
|
);
|
|
"TARGET_LOST" = ("setStateTo: LURK");
|
|
"DESIRED_RANGE_ACHIEVED" = ("setStateTo: LURK");
|
|
"PLAYER WITCHSPACE" = (enterTargetWormhole);
|
|
};
|
|
"TRAVEL_TO_LURK_AREA" = {
|
|
ENTER = (
|
|
setDestinationFromCoordinates,
|
|
"setDesiredRangeTo: 3500.0",
|
|
checkCourseToDestination
|
|
);
|
|
"COURSE_OK" = ("setSpeedFactorTo: 1.0", performFlyToRangeFromDestination);
|
|
"WAYPOINT_SET" = ("setAITo: gotoWaypointAI.plist");
|
|
ATTACKED = (setTargetToPrimaryAggressor, groupAttackTarget);
|
|
"ATTACKED_BY_CLOAKED" = ("setStateTo: FLEE_FOR_CLOAKED");
|
|
"DESIRED_RANGE_ACHIEVED" = ("setStateTo: LURK");
|
|
"GROUP_ATTACK_TARGET" = (setTargetToFoundTarget, "setStateTo: ATTACK_SHIP");
|
|
"INCOMING_MISSILE" = (fightOrFleeMissile, "setStateTo: FLEE");
|
|
"ENTER WORMHOLE" = ("setStateTo: ENTER_WORMHOLE");
|
|
"FRUSTRATED" = ("setStateTo: LURK");
|
|
"TARGET_FOUND" = (setTargetToFoundTarget, checkGroupOddsVersusTarget);
|
|
"ODDS_GOOD" = (groupAttackTarget);
|
|
"CARGO_SCOOPED" = ("setStateTo: CHECK_CARGO");
|
|
RESTARTED = ("setStateTo: LURK");
|
|
UPDATE = (scanForRandomMerchantmen, "pauseAI: 10.0");
|
|
};
|
|
LURK = {
|
|
ENTER = ("setSpeedTo: 0.0", performIdle);
|
|
ATTACKED = (setTargetToPrimaryAggressor, groupAttackTarget);
|
|
"ATTACKED_BY_CLOAKED" = ("setStateTo: FLEE_FOR_CLOAKED");
|
|
"TARGET_LOST" = ("setStateTo: TRAVEL_TO_LURK_AREA", "pauseAI: 0.5");
|
|
"INCOMING_MISSILE" = (fightOrFleeMissile, "setStateTo: FLEE");
|
|
"NOTHING_FOUND" = ("setStateTo: SCAN_FOR_LOOT");
|
|
"TARGET_FOUND" = (setTargetToFoundTarget, checkGroupOddsVersusTarget);
|
|
"CARGO_SCOOPED" = ("setStateTo: CHECK_CARGO");
|
|
"ODDS_GOOD" = (groupAttackTarget);
|
|
"ODDS_LEVEL" = (groupAttackTarget);
|
|
"GROUP_ATTACK_TARGET" = (setTargetToFoundTarget, "setStateTo: ATTACK_SHIP");
|
|
"ENTER WORMHOLE" = ("setStateTo: ENTER_WORMHOLE");
|
|
UPDATE = (scanForRandomMerchantmen, "pauseAI: 5.0");
|
|
};
|
|
"SCAN_FOR_LOOT" = {
|
|
ENTER = ("setSpeedTo: 0.0", performIdle);
|
|
ATTACKED = (setTargetToPrimaryAggressor, groupAttackTarget);
|
|
"ATTACKED_BY_CLOAKED" = ("setStateTo: FLEE_FOR_CLOAKED");
|
|
"GROUP_ATTACK_TARGET" = (setTargetToFoundTarget, "setStateTo: ATTACK_SHIP");
|
|
"INCOMING_MISSILE" = (fightOrFleeMissile, "setStateTo: FLEE");
|
|
"TARGET_FOUND" = (setTargetToFoundTarget, "setStateTo: LOOT");
|
|
"NOTHING_FOUND" = ("setStateTo: LURK");
|
|
"ENTER WORMHOLE" = ("setStateTo: ENTER_WORMHOLE");
|
|
UPDATE = (scanForLoot, "pauseAI: 7.0");
|
|
};
|
|
"CLEAR_STATION" = {
|
|
ENTER = (
|
|
setDestinationToCurrentLocation,
|
|
"setDesiredRangeTo: 2000.0",
|
|
"setSpeedFactorTo: 0.75",
|
|
performFlyToRangeFromDestination
|
|
);
|
|
"DESIRED_RANGE_ACHIEVED" = (scanForRandomMerchantmen);
|
|
"NOTHING_FOUND" = ("setStateTo: TRAVEL_TO_LURK_AREA");
|
|
"TARGET_FOUND" = (groupAttackTarget);
|
|
"GROUP_ATTACK_TARGET" = (setTargetToFoundTarget, "setStateTo: ATTACK_SHIP");
|
|
};
|
|
} |