{
    ABORT = {
        ATTACKED = ( setTargetToPrimaryAggressor, "messageMother: ATTACKED", exitAI ); 
        DESIRED_RANGE_ACHIEVED = (performIdle, "setStateTo: GLOBAL"); 
        ENTER = ( abortDocking,  "setSpeedTo: 0.0",  setDestinationToDockingAbort,  "setDesiredRangeTo: 500.0",  performFaceDestination ); 
        FACING_DESTINATION = ( "setSpeedFactorTo: 1.0",  "setDesiredRangeTo: 500.0",  performFlyToRangeFromDestination ); 
        GROUP_ATTACK_TARGET = ( exitAI ); 
        INCOMING_MISSILE = ( "messageMother: INCOMING_MISSILE", fightOrFleeMissile, exitAI ); 
        REACHED_SAFETY = ( performIdle, "setStateTo: GLOBAL" ); 
        RESTART_DOCKING = ( "setStateTo: GLOBAL" ); 
    }; 
    APPROACH = {
        ATTACKED = ( setTargetToPrimaryAggressor, "messageMother: ATTACKED", exitAI ); 
        COLLISION = ( "setStateTo: ABORT") ; 
        DESIRED_RANGE_ACHIEVED = ( requestDockingCoordinates, "setStateTo: AWAIT_COORDS" ); 
        DOCKING_ABORTED = ( "setStateTo: ABORT" ); 
        ENTER = ( recallDockingInstructions,  "setSpeedFactorTo: 1.0",  performFlyToRangeFromDestination ); 
        GROUP_ATTACK_TARGET = ( exitAI ); 
        INCOMING_MISSILE = ( "messageMother: INCOMING_MISSILE", fightOrFleeMissile, exitAI ); 
        RESTART_DOCKING = ( "setStateTo: GLOBAL" ); 
    }; 
    AWAIT_COORDS = {
        APPROACH = ( "setStateTo: APPROACH" ); 
        APPROACH_COORDINATES = ( "setStateTo: GO_TO_COORDS" ); 
        ATTACKED = (setTargetToPrimaryAggressor, "messageMother: ATTACKED", exitAI); 
        BACK_OFF = ("setStateTo: RETREAT"); 
        COLLISION = ("setStateTo: ABORT"); 
        DOCKED = ("setStateTo: EXIT_SYSTEM"); 
        DOCKING_ABORTED = ("setStateTo: ABORT"); 
        GROUP_ATTACK_TARGET = (exitAI); 
        HOLD_POSITION = ("setStateTo: STATIONKEEPING"); 
        INCOMING_MISSILE = ("messageMother: INCOMING_MISSILE", fightOrFleeMissile, exitAI); 
        RESTART_DOCKING = ("setStateTo: GLOBAL"); 
        TRY_AGAIN_LATER = ("pauseAI: 30.0", "setStateTo: ABORT"); 
        UPDATE = ("pauseAI: 2"); 
    }; 
    EXIT_SYSTEM = {ENTER = (performDocking, exitAI); }; 
    GLOBAL = {
        ATTACKED = (setTargetToPrimaryAggressor, "messageMother: ATTACKED", exitAI); 
        ENTER = ("setSpeedTo: 0.0", requestDockingCoordinates, "setStateTo: AWAIT_COORDS"); 
        GROUP_ATTACK_TARGET = (exitAI); 
        INCOMING_MISSILE = ("messageMother: INCOMING_MISSILE", fightOrFleeMissile, exitAI); 
        UPDATE = ("pauseAI: 2"); 
    }; 
    GO_TO_COORDS = {
        ATTACKED = (setTargetToPrimaryAggressor, "messageMother: ATTACKED", exitAI); 
        COLLISION = ("setStateTo: ABORT"); 
        DESIRED_RANGE_ACHIEVED = (requestDockingCoordinates, "setStateTo: AWAIT_COORDS"); 
        DOCKED = ("setStateTo: EXIT_SYSTEM"); 
        DOCKING_ABORTED = ("setStateTo: ABORT"); 
        ENTER = (performFaceDestination); 
        FACING_DESTINATION = (recallDockingInstructions, performFlyToRangeFromDestination); 
        FRUSTRATED = ("setSpeedTo: 0.0", performFaceDestination); 
        GROUP_ATTACK_TARGET = (exitAI); 
        INCOMING_MISSILE = ("messageMother: INCOMING_MISSILE", fightOrFleeMissile, exitAI); 
        RESTART_DOCKING = ("setStateTo: GLOBAL"); 
    }; 
    RETREAT = {
        ATTACKED = (setTargetToPrimaryAggressor, "messageMother: ATTACKED", exitAI); 
        COLLISION = ("setStateTo: ABORT"); 
        DESIRED_RANGE_ACHIEVED = ("setSpeedTo: 0.0", requestDockingCoordinates, "setStateTo: AWAIT_COORDS"); 
        DOCKING_ABORTED = ("setStateTo: ABORT"); 
        ENTER = ( recallDockingInstructions,  "setSpeedTo: 0.0",  setDestinationToDockingAbort,  performFaceDestination ); 
        FACING_DESTINATION = ( "setSpeedFactorTo: 1.0",  "setDesiredRangeTo: 500.0",  performFlyToRangeFromDestination ); 
        GROUP_ATTACK_TARGET = (exitAI); 
        INCOMING_MISSILE = ("messageMother: INCOMING_MISSILE", fightOrFleeMissile, exitAI); 
        RESTART_DOCKING = ("setStateTo: GLOBAL"); 
    }; 
    STATIONKEEPING = {
        ATTACKED = (setTargetToPrimaryAggressor, "messageMother: ATTACKED", exitAI); 
        ENTER = (performIdle, "setSpeedTo: 0.0", "pauseAI: 10.0"); 
        GROUP_ATTACK_TARGET = (exitAI); 
        INCOMING_MISSILE = ("messageMother: INCOMING_MISSILE", fightOrFleeMissile, exitAI); 
        UPDATE = (requestDockingCoordinates, "setStateTo: AWAIT_COORDS"); 
    }; 
}