{
    ATTACK_SHIP = {
        ATTACKED = ( setTargetToPrimaryAggressor, "messageMother: ATTACKED", "setStateTo: ATTACK_SHIP" );
        ENERGY_LOW = ( "setStateTo: FLEE" );
        ENTER = ( performAttack );
        INCOMING_MISSILE = ( "messageMother: INCOMING_MISSILE", fightOrFleeMissile, "setStateTo: FLEE" );
        MOTHER_LOST = ( switchLightsOff, "setAITo: pirateAI.plist" );
        NOTHING_FOUND = ( "setStateTo: DOCK_WITH_STATION" );
        TARGET_DESTROYED = ( requestNewTarget );
        TARGET_FOUND = ( setTargetToFoundTarget, "setStateTo: ATTACK_SHIP" );
        TARGET_LOST = ( requestNewTarget );
    };
    DOCK_WITH_STATION = {
        ATTACKED = ( setTargetToPrimaryAggressor, "messageMother: ATTACKED", "setStateTo: ATTACK_SHIP" );
        DESIRED_RANGE_ACHIEVED = ( "setAITo: anarchiesDefenderDockingAI.plist" );
        ENTER = ( checkForMotherStation );
        GROUP_ATTACK_TARGET = ( setTargetToFoundTarget, "setStateTo: ATTACK_SHIP" );
        INCOMING_MISSILE = ( "messageMother: ATTACKED", fightOrFleeMissile, "setStateTo: FLEE" );
        NOTHING_FOUND = ( switchLightsOff, "setAITo: pirateAI.plist" );
        RESTARTED = ( setTargetToFoundTarget, "setStateTo: ATTACK_SHIP" );
        STATION_FOUND = ( setTargetToStation, "setDesiredRangeTo: 5000.0", performIntercept );
    };
    FLEE = {
        ATTACKED = ( setTargetToPrimaryAggressor, "messageMother: ATTACKED", fightOrFleeHostiles, "setStateTo: FLEE" );
        DESIRED_RANGE_ACHIEVED = ( performIdle, "setStateTo: DOCK_WITH_STATION" );
        ENERGY_FULL = ( performIdle, "setStateTo: ATTACK_SHIP" );
        ENTER = ( "setDesiredRangeTo: 25600", performFlee );
        INCOMING_MISSILE = ( "messageMother: ATTACKED", fightOrFleeMissile, "setStateTo: FLEE" );
        REACHED_SAFETY = ( "setSpeedTo: 0.0", performIdle, "pauseAI: 10.0" );
        TARGET_LOST = ( performIdle, "setStateTo: DOCK_WITH_STATION" );
    };
    GLOBAL = {
        RESTARTED = ( setTargetToFoundTarget );
        UPDATE = ( "setStateTo: ATTACK_SHIP" );
    };
}