“The Wrath of Khan” opens with Starfleet cadet Saavik (Kirstie Alley) taking a battle simulation test called the Kobayashi Maru. In said test, the cadet role-plays as a starship captain who has to rescue the eponymous ship trapped in Klingon territory. If you don’t rescue the ship, the Kobayashi Maru crew dies. If you try to rescue it, Klingons appear and your crew dies. As explained later, the test is unwinnable and designed to teach cadets about no-win scenarios. Kirk, though, cheated when he took the test, for he doesn’t believe in no-win scenarios. The film is designed to test that belief.

During the first battle with Khan, the Enterprise is disabled. Kirk pulls a last-minute ploy, transmitting a code to disable Reliant’s shields. If it fails, the Enterprise is doomed. Thankfully, as with so many of Kirk’s gambles, the plan works. It’s not completely a winning hand, though. Due to the attack, one of the engineering cadets, Scotty’s (James Doohan) nephew Peter, is dead, foreshadowing the soon-to-come sacrifice that will break Kirk’s heart.

When Khan sets the disabled Reliant to detonate, Spock exposes himself to lethal radiation to reactivate the Enterprise’s warp drive. The parallels between this and the Kobayashi Maru test are spelled out when the dying Spock admits to Kirk that he never took the test before: “What do you think of my solution?”

This focus on the no-win scenario is another way that “The Wrath of Khan” is focused on consequences. Not every outcome can be a flawlessly executed Corbomite Maneuver, and sometimes people die because of that.