Code Silver

Television writers have considerable experience at creating dramatic stories out of the lives of lawyers, surgeons, school teachers, and many other professions whose real-life work is somewhat less dramatic. But occasionally they tire of making lawsuits and surgeries exciting. That's when an armed man bursts into the law office or hospital and takes hostages from the cast. This is similar to Perp and Weapon, but none of the characters are police officers and the violence is completely unexpected in the setting.

Hostage situations like this occur in real life; the trope name Code Silver comes from the real code used for "combative person with weapon" in many hospitals on America's west coast. Where the trope diverges from reality is in the motivation of the hostage taker and the way the situation is resolved.

The hostage taker usually has a personal grudge against one of the characters and has carefully planned his assault. His aim may be simple revenge, or pursuit of a bizarre goal that ties into the show's setting.

Despite their inexperience, the characters usually manage to negotiate with the hostage taker and resolve the situation with minimal loss of life; it's very rare for anyone other than the gunman to die in these situations, and even he usually survives.

If "Code Silver" or its equivalent is used, it's a genuine Code Emergency. If it's a comic book or an adaptation thereof, expect Bruce Wayne Held Hostage. Chandler's Law is similar.

Literature

 * Most of the Star Wars Expanded Universe has its share of action, but there are books with little, such as the Medstar Duology, which is sort of a medical drama that focuses on the medics working on clone troopers, the reporter set to cover it all, and the Jedi Padawan earning her Knighthood on an unpleasant world called Drongar. The conflicts in the duology are largely internal and personal, things like a surgeon overcoming his automatic assumption that clones and the rare truly intelligent droid aren't really people, or the Padawan fighting her addiction to a mind-expanding drug. But action does pop up; notably a few battle droids stray too close and the Padawan slaughters them. And... well, that's about it, really, at least with the medics, the reporter, and the Jedi. The duology carefully places direct conflict only in storylines where the spy is the main character.
 * It's also inverted on a couple of occasions, where the Simple Plan du jour involves creating some havoc by means of a little public gunplay. One good example occurs during The Hand Of Thrawn; needing to evade a group of local cops, Han and Lando enter a crowded casino and start shooting up the scenery, yelling about various made-up wrongs one of the customers has done to them and the nasty revenge they intend to take. The place clears out in a matter of seconds.
 * There's a novel by John Grisham called The Street Lawyer where this is used to kick off the plot. A homeless man breaks into the posh law firm where the protagonist works, and takes him and a few of his coworkers hostage for about six hours.

Live-Action TV

 * Boston Legal: Four times, including a employee who demanded a partnership at knife-point. At this rate, the violence shouldn't be quite so unexpected.
 * At least one of these hostage situations was solved by Denny Crane shooting the dude doing the hostage taking... by grabbing one of his numerous guns he keeps in his office and telling a lesser associate to open the door when he says pull.
 * Chicago Hope: A patient's brother demands a donor heart at gunpoint.
 * ER: Several times, but partially justified by the hospital's dangerous inner-city location.
 * Occasionally veers into the hopelessly ridiculous, though. The tank attack springs to mind.
 * Even more ridiculous is that that was Ripped from the Headlines. That's right, some lunatic stole a tank and rampaged through suburbia (no hospitals were harmed).
 * House subverts this, as the gunman shoots the title character and leaves, with the other characters completely ineffectual.
 * To explain,
 * Of course, considering how rare it is for House to follow up on patients after they leave his care, it's unlikely he actually knew that; more likely was that all of this was.
 * A later episode plays it straight, with a man taking House, Thirteen, and several patients hostage in order to force House to diagnose his unknown illness.
 * Law & Order: The police half of this show expect armed confrontations, but the lawyers often have to deal with them too, sometimes inside the courtroom. An example is needed because these get complex: SVU has a young White Supremacist take out the defendant and judge in open court before being shot by his long-time co-whatever, actually an undercover federal agent. (I think she got an Emmy Award for that one.)
 * Executed quite well in an episode of Shark.
 * Quentin Tarantino's guest appearance in Alias.
 * M*A*S*H has done this at least three times: The first when a distraught soldier holds Frank Burns hostage to prevent being sent back to the front, the second when a soldier holds the doctors hostage demanding that his buddy is treated ahead of everybody else (and this is in an episode where Hawkeye is threatened by a crazed Turkish soldier who wants to return to the front); and the last saw Winchester held hostage by a soldier demanding a helicopter so that he could return to Toledo (and, because this was his ultimate destination, Klinger bravely volunteered to switch places with Winchester...). It almost makes you wonder where the hell the unit's MPs are, since none ever come by to defuse the situation...
 * Well, MP's did appear once in the early first-season episode "Dear Dad" (Klinger's first appearance), but even then Father Mulcahy politely asked the MP's to wait there as he went off and handled the issue (Klinger threatened to frag Burns with a grenade), there was one later episode that showed that the head MP over the area was extremely corrupt and took bribes from Rosie to ignore her bar (and the rest of the post).
 * Done on Chuck, where it turned out that
 * Done in Smallville where someone bursts into the hospital with a kryptonite-powered bomb strapped to his chest, demanding that his brother receives a liver transplant.
 * In Grey's Anatomy, a man has a rocket from a homemade bazooka in him that the characters had to remove. It also subverts the spirit of the trope as a bomb disposal expert is on hand the whole time..
 * In the season 2 and 6 finales, a gunman invades the hospital and shoots a bunch of people. And after the season six finale, people are actually traumatized and the incident isn't immediately completely forgotten.
 * The Burn Notice episode "Bad Breaks" has an interesting variant: A spy and an NSA agent are having a covert meeting at a bank, when bank robbers show up. Those poor bank robbers...
 * Cra$h & Burn had a gunman take the staff of the insurance agency hostage after his wife becomes a paraplegic in an accident and the insurance company stalls paying out the claim. It ends up
 * Done constantly on Night Court.
 * Done constantly on Night Court.