{
    ATTACK_SHIP = {
        ATTACKED = ( setTargetToPrimaryAggressor, "setStateTo: ATTACK_SHIP" );
        ATTACKED_BY_CLOAKED = ( "setStateTo: FLEE_FOR_CLOAKED" );
        ENERGY_LOW = ( "setStateTo: FLEE" );
        ENTER = ( performAttack );
        ESCORT_ATTACKED = ( setTargetToPrimaryAggressor, groupAttackTarget );
        INCOMING_MISSILE = ( fightOrFleeMissile, "setStateTo: FLEE" );
        TARGET_CLOAKED = ( "setStateTo: FLEE_FOR_CLOAKED" );
        TARGET_DESTROYED = ( "setStateTo: HEAD_FOR_BEHEMOTH" );
        TARGET_LOST = ( "setStateTo: HEAD_FOR_BEHEMOTH" );
    };
    FLEE = {
        ATTACKED = ( setTargetToPrimaryAggressor, "setStateTo: FLEE" );
        DESIRED_RANGE_ACHIEVED = ( "setStateTo: RECOVER" );
        ENERGY_FULL = ( "setStateTo: HEAD_FOR_BEHEMOTH" );
        ENTER = ( "setDesiredRangeTo: 25600", performFlee );
        INCOMING_MISSILE = ( fightOrFleeMissile, "setStateTo: FLEE" );
        REACHED_SAFETY = ( "setStateTo: RECOVER" );
        TARGET_CLOAKED = ( "setStateTo: FLEE_FOR_CLOAKED" );
        TARGET_LOST = ( "setStateTo: RECOVER" );
    };
    FLEE_FOR_CLOAKED = {
        ATTACKED = ( setTargetToPrimaryAggressor, "setStateTo: ATTACK_SHIP" );
        DESIRED_RANGE_ACHIEVED = ( "setStateTo: RECOVER" );
        ENERGY_FULL = ( "setStateTo: HEAD_FOR_BEHEMOTH" );
        ENERGY_LOW = ( "setStateTo: FLEE" );
        ENTER = ( setDestinationToCurrentLocation, "setDesiredRangeTo: 7500", performFlyToRangeFromDestination );
        INCOMING_MISSILE = ( fightOrFleeMissile, "setStateTo: FLEE" );
    };
    GLOBAL = {
        ENTER = ( "setStateTo: HEAD_FOR_BEHEMOTH" );
    };
    HEAD_FOR_BEHEMOTH = {
        ATTACKED = ( setTargetToPrimaryAggressor, groupAttackTarget );
        ATTACKED_BY_CLOAKED = ( "setStateTo: FLEE_FOR_CLOAKED" );
        COURSE_OK = ( "setSpeedFactorTo: 0.9", performFlyToRangeFromDestination );
        DESIRED_RANGE_ACHIEVED = ( "setAITo: dockingAI.plist" );
        ENTER = ( setDestinationFromCoordinates, "setDesiredRangeTo: 15000.0", "setSpeedFactorTo: 0.35", checkCourseToDestination );
        GROUP_ATTACK_TARGET = ( setTargetToFoundTarget, "setStateTo: ATTACK_SHIP" );
        INCOMING_MISSILE = ( fightOrFleeMissile, "setStateTo: FLEE" );
        UPDATE = ( setDestinationFromCoordinates, "setDesiredRangeTo: 15000.0", checkCourseToDestination, "pauseAI: 10.0" );
        WAYPOINT_SET = ( "setAITo: gotoWaypointAI.plist" );
    };
    RECOVER = {
        ATTACKED = ( setTargetToPrimaryAggressor, "setStateTo: ATTACK_SHIP" );
        ENERGY_FULL = ( "setStateTo: HEAD_FOR_BEHEMOTH" );
        ENERGY_HIGH = ( "setStateTo: HEAD_FOR_BEHEMOTH" );
        ENTER = ( "setSpeedTo: 0.0", performIdle, "pauseAI: 5.0" );
        INCOMING_MISSILE = ( fightOrFleeMissile, "setStateTo: FLEE" );
        UPDATE = ( checkEnergy, "pauseAI: 10.0" );
    };
}