Action comedy - in which conflicts play out in an inherently absurd or amusing world - is a genre which must balance its threat to the characters with its general tone. This is not to say a moment of seriousness within an amusing story cannot work, but that finding a balance of tone and keeping this consistent is crucial to a cohesive and credible story. A series like The Irresponsible Captain Tylor or Dominion Tank Police lays out its slapstick nature plainly from the start; even if the setting is a high-stakes one there is little actual risk to anyone because the tone is defined by physical, farcical humour. Neither shies away from reminding the viewer that weapons hurt but at the same time their characters mess around and in the process avoid fights with consequences - or properly taking responsibility for them. A good example is the first battle Tylor fights in the former series; a series of slapstick mishaps result in a bomb exploding on a warship's bridge, causing a weapon malfunction which destroys a number of other ships in formation. It is a military victory - many enemy personnel are assumed to have died as the ships explode - yet it is portrayed as the punchline to a visual joke telegraphed much earlier in the episode.
This example from Captain Tylor presents one approach to action comedy; the stakes are real and people die but it is presented no differently to the consequence-less fun that precedes it. It suits that series, which parodies plainly the grand strategies and deceptions that are so memorable in the battles of Space Battleship Yamato or Legend of the Galactic Heroes - Tylor is just, through convoluted coincidences, doing exactly the same as a character like Okita in Yamato sets out to do intentionally. That tension is in fact the core joke behind Tylor. It is interesting to compare this approach with that of Majestic Prince, a series that I have written on previously. Majestic Prince had moments of silliness and ineptitude yet - a few key moments when levity suited excepted - its action was tense and shown to be consequential. Indeed, the move away from pervasive silliness as the series progressed let the characters develop beyond one-note archetypes while making the jokes that did remain stand out more. Characters died in Majestic Prince's battles, ship crews and pilots on both sides. The humour came from the pilots trying to get by and live normal lives between missions. Tylor uses enemy crews dying to friendly fire as a punchline.
I am not setting out here to state categorically Captain Tylor is a mean spirited story that cheapens its depiction of war - it is a quite specific parody of a few series that are defined by contrivance and perfect planning. Instead, we will look again at Tank Police. That apparently blends the two approaches; a recurring joke of corrupt police devising inventive executions for criminals does use pretty unpleasant deaths as a punchline (another aspect of that recurring joke is that the victims may even be innocent) yet at the same time it initially repels the protagonist. The ultimate joke of these scenes is in the principled protagonist coming to enjoy this zany brutality and in fact becoming more engaged in it than many of the others. The entire story of the series is a wild goose chase that ends with the status quo barely changed - except that now another idealist has been compromised. Throughout the series nobody important really dies - the police bounce back from defeat as do the villains. The only real deaths are of these incidental nameless characters who punctuate the episodes to illustrate the protagonist's "development." Again this is a kind of parody; in this case of brutal action anime of the 1980s/90s which were indulgently grotesque (perhaps most recognisably Angel Cop or Mad Bull 34).
Examples like those above represent extremes in action comedy; many series sit more comfortably in the middle ground. Consider Overman King Gainer, a completely bloodless mecha comedy which does present a world with the threat of violence yet little or no death. The implications within the setting that worse fates are possible provide a sense of menace and tension, but this is mostly depicted as how the protagonist can escape danger and protect others rather than specifically defeat the enemy. King Gainer is perhaps unique in its preoccupation with demonstrating that war can be fought safely and its rejection of expectations of a mecha adventure, but it represents a strong benchmark for action comedy - humour and conflict combine best when the emphasis is on surviving and protecting rather than winning a war. The 2013 series Galilei Donna picks up on this in its first episode - there is a credible threat of violence from the absurd villains made plain by their guns and actions, yet it is mitigated by a sense of safety the humour brings. The villain threatens the heroines but does not shoot until the climactic fight, and the fight itself has nobody die as the enemy run away. Yet there is still tension in this scene in the same way that Gainer's fights in King Gainer thrill; the villain's failure is inevitable but the manner of it is exciting. Galilei Donna is less, in its opening episode, overtly humorous - and this adds at first a greater sense of danger despite the more lighthearted aesthetic. Yet by the end of the episode a tone has been established - a balance between danger and safe comedy - which should inform subsequent episodes.
Arguably the best action comedy thus knows how it means to address the question of violence having consequences. Not doing this yet keeping the death toll of faceless soldiers high risks appearing sadistic or exploitative, while action without any sense of danger is tedious. This is something yet another subtype of action comedy typified by Project A-Ko et al shows quite clearly; those series and films use the visual language of action anime yet their physical humour bloodlessness makes the fights inconclusive and wearying. Comedic fight scenes need to either commit to consequences and thus find humour in other avenues, or change the expectation of an action sequence - as King Gainer does with its self conscious avoidance of death as a plot point.