{
    GLOBAL = {
        ENTER = ( checkForNormalSpace );
        INTERSTELLAR_SPACE = ( "setStateTo: SCAN_FOR_THARGOIDS" );
        NORMAL_SPACE = ( "setStateTo: PREPARE_HYPERSPACE" );
    };
    GO_TO_SKIM = {
        DESIRED_RANGE_ACHIEVED = ( "setStateTo: SKIM_SUN" );
        ENTER = ( setSunSkimStartCoordinates, setDestinationFromCoordinates, "setDesiredRangeTo: 100", "setSpeedFactorTo: 1.0", performFlyToRangeFromDestination );
    };
    HEAD_FOR_SUN = {
        ATTACKED = ( setTargetToPrimaryAggressor, groupAttackTarget );
        COURSE_OK = ( setSpeedToCruiseSpeed, performFlyToRangeFromDestination );
        DESIRED_RANGE_ACHIEVED = ( "setStateTo: GO_TO_SKIM" );
        ENTER = ( "setDesiredRangeTo: 50000", "pauseAI: 0" );
        GROUP_ATTACK_TARGET = ( setTargetToFoundTarget, "setAITo: interceptAI.plist" );
        INCOMING_MISSILE = ( fightOrFleeMissile, setTargetToPrimaryAggressor, deployEscorts, groupAttackTarget );
        "PLAYER WITCHSPACE" = ( enterPlayerWormhole );
        RESTARTED = ( "setStateTo: LOOK_FOR_SUN" );
        UPDATE = ( setDestinationFromCoordinates, checkCourseToDestination, "pauseAI: 15" );
        WAYPOINT_SET = ( "setAITo: gotoWaypointAI.plist" );
    };
    HYPER_OUT = { 
        "PLAYER WITCHSPACE" = ( enterPlayerWormhole );
        UPDATE = ( "sendScriptMessage: $jumpToTargetSystem", "pauseAI: 5.0" );
        "WITCHSPACE BLOCKED" = ( setTargetToFoundTarget, setDestinationWithinTarget, "setDesiredRangeTo: 30000.0", performFlyToRangeFromDestination );
        "WITCHSPACE OKAY" = ( wormholeEscorts );
        "WITCHSPACE UNAVAILABLE" = ( "setStateTo: LOOK_FOR_SUN" );
    };
    LEAVE_SUN = {
        DESIRED_RANGE_ACHIEVED = ( "addFuel: 70", "setStateTo: PREPARE_HYPERSPACE" );
        ENTER = ( setSunSkimExitCoordinates, setDestinationFromCoordinates, "setDesiredRangeTo: 250", "setSpeedFactorTo: 2.0", performFlyToRangeFromDestination );
    };
    LOOK_FOR_SUN = {
        APPROACH_COORDINATES = ( "setStateTo: HEAD_FOR_SUN" );
        ENTER = ( setSunSkimStartCoordinates );
        "PLAYER WITCHSPACE" = ( enterPlayerWormhole );
        UPDATE = ( "pauseAI: 10" );
        WAIT_FOR_SUN = ( setSunSkimStartCoordinates );
    };
    PREPARE_HYPERSPACE = {
        ATTACKED = ( setTargetToPrimaryAggressor, groupAttackTarget );
        DESIRED_RANGE_ACHIEVED = ( "setSpeedFactorTo: 1.0", "pauseAI: 1.0", "setStateTo: HYPER_OUT" );
        ENTER = ( getWitchspaceEntryCoordinates, setDestinationFromCoordinates, "setDesiredRangeTo: 100.0", "setSpeedFactorTo: 0.75", performFlyToRangeFromDestination );
        "EXITED WITCHSPACE" = ( "setStateTo: GLOBAL" );
        GROUP_ATTACK_TARGET = ( setTargetToFoundTarget, "setAITo: interceptAI.plist" );
        INCOMING_MISSILE = ( fightOrFleeMissile, setTargetToPrimaryAggressor, deployEscorts, groupAttackTarget );
        "LAUNCHED OKAY" = ( "setStateTo: PREPARE_HYPERSPACE" );
        "PLAYER WITCHSPACE" = ( enterPlayerWormhole );
    };
    SCAN_FOR_LOOT = {
        ATTACKED = ( setTargetToPrimaryAggressor, groupAttackTarget );
        ENTER = ( "setSpeedTo: 0.0", performIdle );
        GROUP_ATTACK_TARGET = ( setTargetToFoundTarget, "setAITo: interceptAI.plist" );
        HOLD_FULL = ( "addFuel: 70", "switchAITo: anarchiesReturningReservistAI.plist" );
        INCOMING_MISSILE = ( fightOrFleeMissile, setTargetToPrimaryAggressor, deployEscorts, groupAttackTarget );
        NOTHING_FOUND = ( "addFuel: 70", "switchAITo: anarchiesReturningReservistAI.plist" );
        TARGET_FOUND = ( setTargetToFoundTarget, "setAITo: collectLootAI.plist" );
        UPDATE = ( scanForLoot, "pauseAI: 5.0" );
    };
    SCAN_FOR_THARGOIDS = {
        ATTACKED = ( setTargetToPrimaryAggressor, groupAttackTarget );
        ENTER = ( setCoordinatesFromPosition, setDestinationFromCoordinates, "setDesiredRangeTo: 10000", setSpeedToCruiseSpeed, performFlyToRangeFromDestination );
        GROUP_ATTACK_TARGET = ( setTargetToFoundTarget, "setAITo: interceptAI.plist" );
        INCOMING_MISSILE = ( fightOrFleeMissile, setTargetToPrimaryAggressor, deployEscorts, groupAttackTarget );
        NOTHING_FOUND = ( "setStateTo: SCAN_FOR_LOOT" );
        TARGET_FOUND = ( setTargetToFoundTarget, "setAITo: interceptAI.plist" );
        UPDATE = ( "scanForNearestShipWithScanClass: CLASS_THARGOID", "pauseAI: 3" );
    };
    SKIM_SUN = {
        DESIRED_RANGE_ACHIEVED = ( "setStateTo: LEAVE_SUN" );
        ENTER = ( setSunSkimEndCoordinates, setDestinationFromCoordinates, "setDesiredRangeTo: 50", "setSpeedFactorTo: 2.0", performFlyToRangeFromDestination );
    };
}