feat(ModularBot): melee targeting — multi-enemy tracker, per-enemy gun fitness, radar auto-switch
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -19,8 +19,9 @@ proc shouldFire*(currentGunDir, targetAngle, gunHeat: float): bool =
|
||||
elif delta < -180.0: delta += 360.0
|
||||
abs(delta) <= AimThresholdDeg and gunHeat <= 0.0
|
||||
|
||||
proc selectShot*(t: VirtualTracker): (GunId, int, float) =
|
||||
proc selectShot*(t: VirtualTracker, targetId: int = -1): (GunId, int, float) =
|
||||
## Returns (gunId, powerBinIdx, power) — the shot to take this tick.
|
||||
let gunId = t.bestGun()
|
||||
let (binIdx, power) = t.bestPower(gunId)
|
||||
## Pass targetId to pick the best gun for that specific enemy.
|
||||
let gunId = t.bestGun(targetId)
|
||||
let (binIdx, power) = t.bestPower(gunId, targetId)
|
||||
result = (gunId, binIdx, power)
|
||||
|
||||
Reference in New Issue
Block a user