# XWUIGameCombatDebug

An in-engine combat debug panel that breaks down the `lastHit` as a damage formula (Base Damage + named `modifiers` = Final Damage), with a color-coded `hitType` badge (normal/critical/blocked/miss/backstab) and an attacker → target row. Use it to verify damage math at runtime; the `showHitbox` and `showRange` sections list active `hitboxes` and `ranges` (with in-range flags), and `updateData({ lastHit, hitboxes, ranges })` refreshes the panel each frame. The `showFormula` flag toggles the breakdown.

## Basic Usage

Mounts the panel with no combat data, so it renders the `Combat Debug` title and a `No combat data` placeholder until a hit is supplied.

```example
file: examples/BasicUsage.ts
html: examples/BasicUsage.html
title: Basic Usage
description: An empty combat debug panel showing the title and the No combat data placeholder.
```

## Blocked Hit Formula

A formula-only view with `showHitbox` and `showRange` off, isolating the damage math of a blocked hit reduced to a chip of final damage.

```example
file: examples/BlockedHitFormula.ts
html: examples/BlockedHitFormula.html
title: Blocked Hit Formula
description: A blocked hit with the hitbox and range sections disabled, showing a large negative block modifier gutting the base damage.
```

## Live Swing Feed

A Next Swing button that calls `updateData()` to cycle the panel through normal, critical, blocked, and backstab hits with recoloring badges.

```example
file: examples/LiveSwingFeed.ts
html: examples/LiveSwingFeed.html
title: Live Swing Feed
description: A button that cycles lastHit through four hit types via updateData(), recoloring the badge and rewriting the formula each press.
```

```api
```
