# irpgbot.v3.1.2+teambattle.patch

**Category:** Standalone_Bot
**Original Author:** Unknown

## Description
This patch modifies an IRC bot to implement a team battle feature where three players are randomly selected and pitted against another set of three players based on their proximity to a random point on the map.

## Key Features
- Implements a `team_battle` function that selects six players from those online.
- Uses polar coordinates to determine the distance between each player and a random point.
- Sorts players by their distance and angle relative to the chosen point.
- Randomly splits the selected players into two teams of three for the battle.
- Calculates the total items held by each team and simulates a dice roll to determine the winner.
- Updates the clock values based on the outcome of the battle.

## File Analysis
- **irpgbot.v3.1.2+teambattle.patch** — A patch file that modifies the `bot.v3.1.2.pl` script to add team battle functionality.