From e749d705c6a8f0b73da91df161ee72bb61a95c27 Mon Sep 17 00:00:00 2001 From: "Z. Cliffe Schreuders" Date: Fri, 13 Feb 2026 16:53:27 +0000 Subject: [PATCH] feat: Simplify NPC hostility conversion by removing manual behavior updates --- public/break_escape/js/systems/player-combat.js | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/public/break_escape/js/systems/player-combat.js b/public/break_escape/js/systems/player-combat.js index ff20772..7ec1a27 100644 --- a/public/break_escape/js/systems/player-combat.js +++ b/public/break_escape/js/systems/player-combat.js @@ -239,20 +239,7 @@ export class PlayerCombat { if (!isHostile) { console.log(`💢 Player attacked non-hostile NPC ${npcId} - converting to hostile!`); window.npcHostileSystem.setNPCHostile(npcId, true); - - // Update NPC behavior to hostile if behavior manager exists - if (window.npcBehaviorManager) { - const npc = window.npcManager?.getNPC(npcId); - if (npc) { - // Register hostile behavior for this NPC - window.npcBehaviorManager.registerNPCBehavior(npcId, 'hostile', { - targetPlayerId: 'player', - chaseSpeed: COMBAT_CONFIG.npc.chaseSpeed, - chaseRange: COMBAT_CONFIG.npc.chaseRange, - attackRange: COMBAT_CONFIG.npc.attackStopDistance - }); - } - } + // NPC behavior system automatically detects hostile state changes } // Damage the NPC (now hostile or was already hostile)