> For the complete documentation index, see [llms.txt](https://code-after-sex.gitbook.io/script-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://code-after-sex.gitbook.io/script-documentation/cas-duel-arena-system/duel-modes.md).

# Duel Modes and Rules

The eight RedM duel modes, from Classic and Quick Draw to Headshot Only and Melee. Rules, round flow, false starts and the server referee.

## The eight modes

| Mode              | What wins a round                                | Format                               |
| ----------------- | ------------------------------------------------ | ------------------------------------ |
| **Classic Duel**  | The first clean hit                              | Single round, Best of 3 or Best of 5 |
| **Quick Draw**    | The fastest draw. Nobody takes damage.           | Single round, Best of 3 or Best of 5 |
| **Best of 3**     | The first clean hit                              | Always Best of 3                     |
| **Best of 5**     | The first clean hit                              | Always Best of 5                     |
| **First to X**    | The first clean hit                              | First to 3, 5, 7 or 10               |
| **Headshot Only** | A hit to the head. Body shots count for nothing. | Single round, Best of 3 or Best of 5 |
| **One Shot**      | The first clean hit, with one bullet in the gun  | Single round, Best of 3 or Best of 5 |
| **Melee**         | The first strike, with fists or a hunting knife  | Single round, Best of 3 or Best of 5 |

A **Best of N** match is won by whoever takes more than half of N rounds. A **First to N** match is won by whoever reaches N round wins first.

You can remove modes or change their format options in `config.lua`. See [Configuration](/script-documentation/cas-duel-arena-system/configuration.md#modes).

## Weapons

| Sidearms                                                                                                              | Melee                        |
| --------------------------------------------------------------------------------------------------------------------- | ---------------------------- |
| Cattleman Revolver, Schofield Revolver, Double-Action Revolver, Volcanic Pistol, Mauser Pistol, Semi-Automatic Pistol | Hunting Knife, Bare Knuckles |

Gun modes use a sidearm. Melee mode uses a melee weapon.

The duel weapon is **lent** to the player for the match. If they already own it, their own weapon is used and its ammo is put back afterwards. If they do not own it, it is taken away again when the duel ends.

## Rules

The challenger sets these when issuing a challenge. Matchmaking queues and tournaments use the defaults from `config.lua`.

| Rule                    | Options                      | Default | Effect                                                                                                                               |
| ----------------------- | ---------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| **Healing**             | On or off                    | On      | Health and stamina cores are refilled between rounds.                                                                                |
| **Tonics**              | On or off                    | Off     | Allows the satchel and quick item keys during the duel.                                                                              |
| **Melee**               | On or off                    | Off     | Allows close-quarters strikes in a gun duel. Always on in Melee mode.                                                                |
| **Ammo limit**          | 1, 2, 3, 6, 12, unlimited    | 6       | Total rounds for the duel. The cylinder is filled up to the weapon's capacity and the rest is held in reserve. One Shot is always 1. |
| **Paces**               | 5, 10, 15, 20                | 10      | How far each side walks out.                                                                                                         |
| **Round timer**         | 15, 30, 45, 60 seconds       | 30      | How long a round lasts after the signal.                                                                                             |
| **False start penalty** | Warning, lose round, forfeit | Warning | What happens when somebody draws early.                                                                                              |

At the default pace length of 0.75 metres, 10 paces puts the duelists 15 metres apart.

## How a round plays out

1. **Walk out.** In the first round both duelists start back to back in the middle of the street and walk their paces, then turn to face each other. Later rounds start straight from the marks. Melee duels skip the walk and start within arm's reach.
2. **Countdown.** 3, 2, 1. Both players are held still.
3. **Steady.** A pause of 0.9 to 2.5 seconds, different every round, so the signal cannot be timed.
4. **Draw.** On the signal both players are free. Aim to draw, then shoot.
5. **Result.** The round result card shows who won, why, and both players' draw, first shot and hit times.

The match ends as soon as one side has enough round wins. Afterwards both players are faded out and put back where they were, with their own weapon, ammo and health.

## How a round is decided

| Result                        | Meaning                                                                                             |
| ----------------------------- | --------------------------------------------------------------------------------------------------- |
| **Headshot** or **Clean hit** | The first hit wins. Hits that land within a quarter of a second of each other are compared by time. |
| **Struck first**              | Melee: the first strike wins.                                                                       |
| **Faster on the draw**        | Quick Draw: the faster draw wins.                                                                   |
| **Opponent never drew**       | The timer ran out and only one side drew. That side wins.                                           |
| **False start**               | See below.                                                                                          |
| **Neither side drew**         | Nobody drew before the timer ran out. The round is replayed.                                        |
| **Time ran out**              | Both drew but nobody was hit. The round is replayed.                                                |
| **Both shooters missed**      | Both guns ran dry without a hit. The round is replayed.                                             |
| **Dead heat**                 | Both hits, or both draws, at exactly the same moment. The round is replayed.                        |

A replayed round does not count towards the score.

## False starts

Aiming or firing during the countdown or the steady pause is a false start. So is a "draw" faster than 110 milliseconds after the signal, which no human can react to.

| Penalty        | What happens                                                                               |
| -------------- | ------------------------------------------------------------------------------------------ |
| **Warning**    | The first false start is a warning and the round starts again. The second loses the round. |
| **Lose round** | The round goes to the other side.                                                          |
| **Forfeit**    | The whole match goes to the other side.                                                    |

NPC outlaws can false start too. Weaker outlaws do it more often.

## Fair play

* **The server referees.** Clients report what they see; the server decides the result, the score, the money and the rating.
* **Reaction times are checked against the server clock.** A reported draw time can never be faster than what the server measured, minus an allowance for the player's ping and a small tolerance (`Config.Referee.slack`).
* **The signal is random.** The steady pause changes every round.
* **No aim assist.** Lock-on is off during duels by default.
* **No one-shot kills.** Duelists get temporary health (600 by default) and critical headshot kills are turned off, so a round ends by the referee, not by a death screen.
* **Private streets.** Every match runs in its own routing bucket. Other players cannot walk into the line of fire.

## Leaving and disconnecting

* Leaving before the duel starts cancels it. Wagers are not taken until both sides are ready, so nobody loses anything. In a tournament, leaving counts as a forfeit.
* Disconnecting, or switching character, during a duel is a forfeit. The opponent wins and is paid.

## Rematch

The result screen has a **Rematch** button for 5 minutes after the duel. Against an NPC it starts straight away. Against a player it sends them a new challenge with the same settings, even if they have ridden further than the challenge range. Tournament matches cannot be rematched.
