# Game Modes

Var-PaintBall features 4 different game modes, each with its own rules and win conditions.

***

### TEAM — Team Deathmatch

The classic mode. Two teams (Red and Blue) compete to reach the target score.

| Property      | Value                                                           |
| ------------- | --------------------------------------------------------------- |
| Teams         | Red vs Blue                                                     |
| Respawn       | Yes (unlimited)                                                 |
| Win condition | First to reach target score OR highest score when time runs out |
| Friendly fire | Disabled by default (configurable)                              |

**How it works :**

1. Players are automatically distributed into teams in a balanced way
2. Each kill earns 1 point for the team
3. The match ends when a team reaches the target score or time runs out
4. The team with the most points wins

***

### ELIM — Elimination

Team-based survival mode. No infinite respawns — once eliminated, you become a spectator.

| Property      | Value                              |
| ------------- | ---------------------------------- |
| Teams         | Red vs Blue                        |
| Respawn       | No (eliminated = spectator)        |
| Win condition | Last team standing                 |
| Friendly fire | Disabled by default (configurable) |

**How it works :**

1. Players are distributed into teams
2. When a player is eliminated, they enter spectator mode and follow a teammate
3. The match ends when all players on one team are eliminated
4. The last team with surviving players wins

***

### FFA — Free-for-All

Every man for himself. No teams — all players are opponents.

| Property      | Value                                                           |
| ------------- | --------------------------------------------------------------- |
| Teams         | None (every man for himself)                                    |
| Respawn       | Yes (unlimited)                                                 |
| Win condition | First to reach target score OR highest score when time runs out |
| Friendly fire | Always enabled (all enemies)                                    |

**How it works :**

1. Each player competes individually
2. Each kill earns 1 point for the player
3. The first player to reach the target score wins
4. If time runs out, the player with the most points wins

***

### GUNGAME — Gun Game

Progressive weapon mode. Each kill advances you to the next weapon tier. The first player to complete all tiers wins.

| Property      | Value                                |
| ------------- | ------------------------------------ |
| Teams         | None (every man for himself)         |
| Respawn       | Yes (unlimited)                      |
| Win condition | First to complete all 9 weapon tiers |
| Friendly fire | Always enabled (all enemies)         |

**Weapon progression:**

| Tier | Weapon        |
| ---- | ------------- |
| 1    | Knife         |
| 2    | Pistol        |
| 3    | Combat Pistol |
| 4    | SMG           |
| 5    | Assault Rifle |
| 6    | Carbine Rifle |
| 7    | Sniper Rifle  |
| 8    | Pump Shotgun  |
| 9    | Final Knife   |

**How it works:**

1. All players start at tier 1 (knife)
2. Each kill advances the player to the next tier with a new weapon
3. The player receives a notification indicating their new tier
4. The first player to get a kill with the final knife (tier 9) wins the match

***

### Common Match End Conditions

Regardless of the mode, a match can end for any of the following reasons:

| Condition                | Description                                       |
| ------------------------ | ------------------------------------------------- |
| **Target score reached** | A team or player reaches the defined score target |
| **Time expired**         | The `timeLimit` is reached (highest score wins)   |
| **Full elimination**     | All players on a team are eliminated (ELIM)       |
| **Gun Game completed**   | A player completes all tiers (GUNGAME)            |
| **Insufficient players** | Fewer than 2 players remaining in the match       |
| **Admin stopped**        | An administrator force-stops the match            |

***

### Lobby Options

When creating a lobby, the following options are available:

| Option      | Description                       | Applicable modes |
| ----------- | --------------------------------- | ---------------- |
| `arena`     | Game arena                        | All              |
| `mode`      | Game mode                         | —                |
| `weapon`    | Weapon used                       | TEAM, ELIM, FFA  |
| `teamSize`  | Max players per team              | TEAM, ELIM       |
| `target`    | Target score                      | TEAM, FFA        |
| `timeLimit` | Max duration (seconds)            | All              |
| `nightMode` | Night mode (darkness)             | All              |
| `hardcore`  | Hardcore mode                     | All              |
| `friendly`  | Friendly fire enabled             | TEAM, ELIM       |
| `autoStart` | Auto-start when everyone is ready | All              |
| `password`  | Password to join                  | All              |
| `wager`     | Wager amount                      | All              |
