mission "Music: Kestrel Testing"
    invisible
    landing
    source "Umbral"
    to offer
        or
            "combat rating" > 6000
            and
                "combat rating" > 2000
                has "global: unlocked kestrel"
    to accept
        has "Kestrel Testing: active"
    to complete
        never
    on accept
        clear "Music: Before Human Campaign - Umbral: offered"
        clear "Music: Finished Human Campaign - Umbral: offered"
        event "kestrel testing music"
    on enter "Umbral"
        dialog `The music you are hearing seems familiar, like it was in some kind of dream of yours. Perhaps it was in another escape velocity? Nah, that was not another escape velocity.`
        fail

mission "Music: Kestrel Testing Patch"
    invisible
    landing
    to offer
        has "Kestrel Testing: active"
        not "Music: Kestrel Testing: offered"
    on offer
        set "Music: Kestrel Testing: offered"
        clear "Music: Before Human Campaign - Umbral: offered"
        clear "Music: Finished Human Campaign - Umbral: offered"
        event "kestrel testing music"
    to complete
        never
    on enter "Umbral"
        dialog `The music you are hearing seems familiar, like it was in some kind of dream of yours. Perhaps it was in another escape velocity? Nah, that was not another escape velocity.`
        fail

mission "Music: Before Human Campaign - Umbral"
    invisible
    landing
    to offer
        has "event: war begins"
        not "Kestrel Testing: active"
        not "chosen sides"
    to accept
        has "event: war begins: declined"
    on accept
        event "umbral before human campaign"
        fail

mission "Music: Started Human Campaign - Umbral"
    invisible
    landing
    source "Longjump"
    to offer
        has "Rescue Katya 2: done"
        not "Kestrel Testing: active"
        not "main plot completed"
    to accept
        has "event: joined the free worlds"
    on accept
        event "umbral during human campaign"
        fail

mission "Music: Started Human Campaign - Umbral Reset"
    invisible
    landing
    to offer
        has "Rescue Katya 2: done"
        not "main plot completed"
        has "Kestrel Testing: offered"
    to accept
        or
            has "Kestrel Testing: done"
            has "Kestrel Testing: failed"
    on accept
        event "umbral during human campaign"
        fail


mission "Music: Finished Human Campaign - Umbral"
    invisible
    landing
    # Main Plot Plus extends checkmate, but this won’t accept until the campaign fully finishes anyways, so it will just block some missions from offering until the campaign is finished, which is what should happen anyways
    to offer
        or
            has "FW Syndicate Extremists 1B: done"
            has "FWC Pug 6: done"
    to accept
        has "main plot completed"
        not "Kestrel Testing: active"
    on accept
        event "umbral finished human campaign"
        fail

mission "Music: Finished Human Campaign - Umbral Patch"
    invisible
    landing
    to offer
        has "main plot completed"
        not "Kestrel Testing: offered"
        not "Music: Finished Human Campaign - Umbral: offered"
    on offer
        set "Music: Finished Human Campaign - Umbral: offered"
        event "umbral finished human campaign"
        fail

event "kestrel testing music"
    system "Umbral"
        music "kestrel"

event "umbral before human campaign"
    system "Umbral"
        music "human"

event "umbral started human campaign"
    system "Umbral"
        music "main"

event "umbral finished human campaign"
    system "Umbral"
        music "human2"
