Game Rules
Core Game Mechanics
Game Structure
- The game consists of multiple rounds (2 rounds,
nbRounds
). - Each team starts with a certain amount of gold (3 gold,
startingGold
). - Teams change order at the end of each round.
- The game ends when all rounds are completed.
- The team with the most gold wins.
- Each team has 300 seconds (
timeout
) to make their move each turn.
Adventurers
- Adventurers have 8 HP (
adventurerHp
). - Adventurers deal 2 damage (
adventurerDamage
). - The cost of a new adventurer is 3n where n is the number of adventurers (
adventurerBaseCost
n).- First adventurer costs 1 gold (30).
- Second adventurer costs 3 gold (31).
- Third adventurer costs 9 gold (32).
- And so on...
- New adventurers are only created in two ways:
- Automatically spawned from spawner tiles at the start of each round.
- Manually created by spending gold during a turn.
- If there is no space for a new adventurer, the action is ignored.
- If the team doesn't have enough gold for a new adventurer, the action is ignored.
Movement and Combat
- Adventurers can move to adjacent tiles each turn.
- When moving to a friendly adventurer, all gold is transferred to the other adventurer.
- When moving to an entity, you hit it for 2 damage (
adventurerDamage
). - If an adventurer hits a wall or spawner, they take 1 damage (
blockDamage
). - If an adventurer hits a health point and has enough gold, they restore all HP.
- If an adventurer hits a heal and doesn't have enough gold, they take 1 damage (
blockDamage
).
Vision
- Entities can't see any entities that are more than 10 tiles away (
visionLength
). - Teams can't see entities behind walls.
Corruption
- Corruption is a game mechanic that gradually makes the map filled with fire.
- It starts at turn 30 (
corruptionStartAt
). - Every 4 turns (
corruptionSpreadSpeed
), corruption spreads to adjacent cells. - Corruption deals 1 damage (
corruptionDamage
) to entities at the end of turn. - When corruption starts:
- All spawners are destroyed and replaced by corruption.
- Corruption spreads to adjacent cells every few turns.
- The corruption continues to spread until the end of the game.
- This forces players to take a portal.
Special Tiles
- Spikes: Deal 1 damage (
spikeDamage
) when an adventurer steps on them. - Portals:
- Have 10 HP (
portalHp
). - Need to be hit until 0 HP to open it.
- Portals are the only way to escape the map.
- When an adventurer escapes through a portal:
- The adventurer is removed from the map.
- All gold carried by the adventurer is added to the team's total gold.
- The portal is removed once an adventurer use it.
Collectibles
- Chests:
- Have 10 HP (
chestHp
). - Drop 12 gold (
chestGold
) when broken.
- Vases:
- Have 4 HP (
vaseHp
). - Drop 3 gold (
vaseGold
) when broken.
- Doors:
- Gold:
- Can be picked up when walked on.
- Dropped when adventurers die.
- Any gold left on the map at the end of a round is lost.
Healing
- Healing costs 2 gold (
healCost
). - Restores adventurer to full HP.
Bot Input/Output
Each turn, your bot receives:
you
: Your team IDrules
: Current game rulesteams
: List of all teamsgameState
: Current game state including:turn
: Current turn numberround
: Current round numberteamsGold
: Gold amount for each teamentities
: List of all entities on the map
state
: Your bot's persistent state from previous turns (optional)
Your bot must return:
moves
: Array of moves to make this turnadventurerId
: ID of the adventurer to movedirection
: Direction to move ("UP", "DOWN", "LEFT", "RIGHT")reason
: Optional reason for the move
spawn
: Whether to spawn a new adventurer (true/false)error
: Optional error message if something went wrong.state
: Optional state to persist for next turn
Vision Rules:
- Your bot can only see entities within 10 tiles (
visionLength
). - Walls block vision.
Game Modes
The game has several predefined rule sets:
- Default: Standard rules
- SemiFinal: 3 rounds
- Final: 4 rounds