dougbot/bridge
roberts aa0a937171 CORE REFLEX: Auto-combat and auto-equip baked into bridge
Architecture change — 3 layers:
  CORE (bridge): Combat + equipment evaluation — ALWAYS runs, interrupts everything
  PRIMARY (brain): Player-given or self-directed goals
  SUBTASK (brain): Steps within primary tasks

Core reflexes in bridge (run independently of Python brain):
- Auto-combat: scans for hostiles every 2s, engages nearest
  - Equips best weapon before fighting
  - Chases target, attacks every 450ms
  - Detects death via entityGone event
  - 15s safety timeout per engagement
  - Sends combat_started/combat_ended events to Python

- Auto-equip: evaluates gear when items are picked up
  - Equips best weapon (netherite > diamond > iron > ...)
  - Equips best armor in each slot
  - Waits until combat ends before evaluating
  - Sends equipment_changed event to Python

Brain changes:
- Brain PAUSES all task execution during combat (waits for combat_ended)
- Brain no longer manages combat — only flee for cowardly Dougs (bravery < 30)
- Combat events logged: COMBAT: Fighting zombie, COMBAT: Ended (target_dead)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 20:12:56 -05:00
..
lib FIX COMBAT: swing_source='attack' required for damage registration 2026-03-30 17:05:57 -05:00
patches Phase 1 complete: Doug connects, chats with personality 2026-03-30 02:03:25 -05:00
src CORE REFLEX: Auto-combat and auto-equip baked into bridge 2026-03-30 20:12:56 -05:00
.gitignore Fix chat, brain stability, MariaDB reconnect, suppress warnings 2026-03-30 12:33:17 -05:00
package-lock.json Rebuild bridge on mineflayer-bedrock — real movement! 2026-03-30 11:56:56 -05:00
package.json Rebuild bridge on mineflayer-bedrock — real movement! 2026-03-30 11:56:56 -05:00
tsconfig.json Phase 1 complete: Doug connects, chats with personality 2026-03-30 02:03:25 -05:00