> For the complete documentation index, see [llms.txt](https://k0ssek-scripts.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://k0ssek-scripts.gitbook.io/docs/scripts/dart-game/game-modes-and-difficulty.md).

# Game Modes & Difficulty

Rules, play modes, difficulty and controls.

## The lobby

The first player to join a board opens its lobby and becomes the host. Other players join the same lobby at the board, or the host invites players standing within 30 metres from the lobby panel. Only the host can start the match. If the host leaves, the next player in the lobby takes over.

Before starting, the host picks a game mode, a play mode and a difficulty. A player can be in one lobby at a time, and nobody can join a board while a match is running on it.

## Game modes

### Reach Zero

Every player starts with `startScore` points (201 by default). Each dart lowers the score by the points it hits. The first player to reach exactly 0 wins.

A dart that would take the score below 0 is a **bust**: it does not count and the turn ends.

### Max Score

Every player starts at 0 and each dart adds to the score. The first player to reach `targetScore` (100 by default) wins. There is no bust.

```lua
Config.GameMode = {
    ['ReachZero'] = { startScore  = 201 },
    ['MaxScore']  = { targetScore = 100 },
}
```

Set `startScore` to `301` or `501` for longer Reach Zero matches. `Config.DefaultMode` sets the mode a new lobby starts with.

## Play modes

| Mode       | Description                                                                               |
| ---------- | ----------------------------------------------------------------------------------------- |
| **Solo**   | Only the host plays. Other players in the lobby are left out of the match. No Elo change. |
| **Versus** | Everyone in the lobby plays, in the order they joined. Needs at least 2 players.          |

If players leave a running match and only one is left, that player wins.

## Scoring

| Hit                        | Points               |
| -------------------------- | -------------------- |
| Bullseye                   | 50                   |
| Bull                       | 25                   |
| Triple ring                | 3 x the sector       |
| Double ring                | 2 x the sector       |
| Anywhere else on the board | The sector (1 to 20) |
| Outside the board          | 0                    |

The score is worked out on the server from the point the dart hit.

## Difficulty

The difficulty changes how much the aim point sways.

```lua
Config.DifficultySettings = {
    ['Easy']   = { swayMultiplier = 0.5 },
    ['Normal'] = { swayMultiplier = 1.0 },
    ['Hard']   = { swayMultiplier = 2.0 },
}
```

The sway of a player is:

```
Config.AimZone.BaseSway x swayMultiplier x level multiplier
```

The level multiplier goes from 1.0 at level 1 down to `Config.Skill.MinSwayMultiplier` at the highest level, see [Skill & Elo](/docs/scripts/dart-game/skill-and-elo.md).

Change the `swayMultiplier` values to make a difficulty easier or harder. The lobby always offers Easy, Normal and Hard, and the two game modes above; new names added to `Config.Difficulties` or `Config.Modes` do not appear in the lobby.

## Turns and controls

Players take turns. In a turn a player throws `Config.DartsPerTurn` darts (3 by default).

| Input                  | Action                              |
| ---------------------- | ----------------------------------- |
| **Left mouse button**  | Start aiming. Press again to throw. |
| **Mouse**              | Move the aim point over the board.  |
| **Right mouse button** | Throw (while aiming).               |
| **Backspace**          | Stop aiming without throwing.       |

When a player starts to aim, their character is placed in front of the board, `Config.AimZone.StanceDistance` metres away.

A player has `Config.TurnDuration` seconds (30 by default) to throw. When the time runs out while they are aiming, the dart is thrown at the current aim point. Otherwise the turn passes to the next player.
