Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.battlecode.cam/llms.txt

Use this file to discover all available pages before exploring further.

Access constants via GameConstants:
from cambc import GameConstants

max_turns = GameConstants.MAX_TURNS  # 2000

General

ConstantValueDescription
MAX_TURNS2000Maximum number of turns per game
MAX_TEAM_UNITS50Maximum living units per team, including the core
STACK_SIZE10Resources are moved in stacks of 10
STARTING_TITANIUM500Each team’s initial titanium
STARTING_AXIONITE0Each team’s initial axionite
PASSIVE_TITANIUM_AMOUNT10Titanium granted passively each interval
PASSIVE_TITANIUM_INTERVAL4Rounds between passive titanium grants
AXIONITE_CONVERSION_TITANIUM_RATE4Titanium gained per refined axionite converted

Radii (squared)

ConstantValueDescription
ACTION_RADIUS_SQ2Default action radius for units
CORE_ACTION_RADIUS_SQ8Core action radius (from centre)
CORE_SPAWNING_RADIUS_SQ2Core spawning radius
CORE_VISION_RADIUS_SQ36Core vision
BUILDER_BOT_VISION_RADIUS_SQ20Builder bot vision
GUNNER_VISION_RADIUS_SQ13Gunner vision
SENTINEL_VISION_RADIUS_SQ32Sentinel vision
BREACH_VISION_RADIUS_SQ2Breach vision
BREACH_ATTACK_RADIUS_SQ24Breach attack cone
LAUNCHER_VISION_RADIUS_SQ26Launcher vision + throw range
BRIDGE_TARGET_RADIUS_SQ9Max bridge output distance²

Base costs (titanium, axionite)

ConstantValue
BUILDER_BOT_BASE_COST(30, 0)
CONVEYOR_BASE_COST(3, 0)
SPLITTER_BASE_COST(6, 0)
BRIDGE_BASE_COST(20, 0)
ARMOURED_CONVEYOR_BASE_COST(5, 5)
HARVESTER_BASE_COST(20, 0)
ROAD_BASE_COST(1, 0)
BARRIER_BASE_COST(3, 0)
FOUNDRY_BASE_COST(40, 0)
GUNNER_BASE_COST(10, 0)
SENTINEL_BASE_COST(30, 0)
BREACH_BASE_COST(15, 10)
LAUNCHER_BASE_COST(20, 0)

Max HP

ConstantValue
CORE_MAX_HP500
BUILDER_BOT_MAX_HP40
CONVEYOR_MAX_HP20
SPLITTER_MAX_HP20
BRIDGE_MAX_HP20
ARMOURED_CONVEYOR_MAX_HP50
HARVESTER_MAX_HP30
ROAD_MAX_HP4
BARRIER_MAX_HP30
FOUNDRY_MAX_HP50
MARKER_MAX_HP1
GUNNER_MAX_HP40
SENTINEL_MAX_HP30
BREACH_MAX_HP60
LAUNCHER_MAX_HP30

Combat

ConstantValueDescription
BUILDER_BOT_ATTACK_DAMAGE2Builder bot own-tile attack damage
BUILDER_BOT_ATTACK_COST(2, 0)Cost per builder bot attack
BUILDER_BOT_HEAL_COST(1, 0)Cost per builder bot heal
BUILDER_BOT_SELF_DESTRUCT_DAMAGE0Damage on self-destruct
HEAL_AMOUNT4HP restored per heal action
GUNNER_DAMAGE10Gunner base damage per shot
GUNNER_AXIONITE_DAMAGE25Gunner damage when loaded with refined axionite
GUNNER_FIRE_COOLDOWN1Turns between gunner shots
GUNNER_AMMO_COST2Resources consumed per shot
GUNNER_ROTATE_COST(10, 0)Cost to rotate a gunner
GUNNER_ROTATE_COOLDOWN1Action cooldown applied after rotating
SENTINEL_DAMAGE18Sentinel damage per shot
SENTINEL_FIRE_COOLDOWN3Turns between sentinel shots
SENTINEL_AMMO_COST10Resources consumed per shot
SENTINEL_STUN_DURATION5Cooldown added by refined axionite stun
BREACH_DAMAGE40Breach direct hit damage
BREACH_SPLASH_DAMAGE20Breach splash damage
BREACH_FIRE_COOLDOWN1Turns between breach shots
BREACH_AMMO_COST5Refined axionite per shot
LAUNCHER_FIRE_COOLDOWN1Turns between launcher throws