BATTLEBOX: Robot Combat Arena
README.md
bots.fightsim
Headless robot fights for balancing and testing. Two bots.botcore sim bodies are built on scratch entities, each driven by a bots.ai brain, and stepped at a fixed rate inside a single call. A full three-minute fight takes a few seconds.
It never touches the live match, the damage shells or the HUD, so it can run beside a real match.
local FightSim = require("bots.fightsim")
local r = FightSim.run(Design.preset("HAVOC"), Design.preset("RIPTIDE"), { seconds = 180, seed = 1 })
-- r.winner ("A" | "B"), r.reason ("destroyed" | "immobile" | "decision"), r.time,
-- r.a / r.b = { name, health, damageDealt, hits, partsLost, weaponsLost, events, frameMs }
- Hazards: emulated from
Rules.HAZARDS, with damage, knock-ups and per-hazard cooldowns. The screw pit traps whatever drives into it. - KOs: as in a match. A bot loses at 0 health or after
Rules.KO_COUNT_SECONDSimmobile; otherwise the judges decide on damage dealt at the bell. - Options:
seconds,dt(default 1/30 s),seed,log(keep every hit and part event),onStep(t, a, b),aggressionA/aggressionB.