MEMORY
memory/localmode-1060dea9-0dc3-42b4-958d-2a6f7a6c0c58/melee-scope-rule.md
sha256 8b3638becddf4c23 · 1516 bytes ·
original held in the private archive
---
name: melee-scope-rule
description: Melee-only guards/behaviors apply in melee-only mode OR with a melee weapon in any mode — never gated on mode alone
metadata:
node_type: memory
originSessionId: 0b7c5f41-bb34-4ab4-93be-fdb363f5eb40
---
The site was ORIGINALLY a melee-only-build tool, so some logic assumes melee. RULE (owner 2026-06-29): any "melee-only" guard, behavior, or change must take effect when EITHER (a) the playstyle is melee-only mode, OR (b) a MELEE WEAPON is in use in ANY mode. Never gate melee logic on `playstyle === 'melee'` alone — also include the "active/relevant weapon is melee" case.
**Correct gate shape:** `if (playstyle === 'melee' || weaponIsMelee) { …melee logic… }` (not `if (playstyle === 'melee')`).
**Why:** in "any weapon" mode the player can still wield melee weapons, and melee-specific behavior must apply to those. Conversely, melee-only behavior must NOT leak onto ranged weapons just because the user is in a particular mode.
**Where it matters:**
- **VATS:** the melee/unarmed AP-strike optimizer mode is melee-specific — show and apply it for melee weapons in any mode as well as in melee-only mode; the ranged hit-% mode is for ranged weapons.
- Any existing melee-assuming logic in the codebase (legacy from the melee-only origin) — scope it per this rule, and check for these assumptions whenever touching combat code.
*Corrected 2026-07-20: removed work-unit and audit identifiers and a version-tagged to-do. The rule itself is unchanged.*
STAMP · generated for RELEASE v2.8.5 commit 06e5180 (06e51801b38a) · archive input-tree hash c07fbfbdd2e1ddeb · 754 files · no wall-clock timestamp (regenerates identically when nothing changed).