Skip to content

feat(target-lock): add Lock and Attack to Click Casting - #213

Open
DEVLlN wants to merge 6 commits into
ThericGames:developfrom
DEVLlN:feat/action-button-1-target-lock
Open

DEVLlN wants to merge 6 commits into
ThericGames:developfrom
DEVLlN:feat/action-button-1-target-lock

Conversation

@DEVLlN

@DEVLlN DEVLlN commented Nov 14, 2026 •

Copy link
Copy Markdown

Summary

Add Lock and Attack beside Start Attack in the Action Combat Mode section of Click Casting. Choose it for Left Click, a modifier slot, or either of the optional Mouse Button 4 and 5 slots on the Base tab. The side-button slots are off by default. Aim at a living enemy and press the binding to replace the enemy lock and start or continue Auto Attack in the same press.

With no living enemy under the crosshair, the action falls back to the living enemy lock, then to the current living enemy target. Repeated presses keep attacking, and aiming at an ally keeps the living enemy lock. The dedicated Target Lock and Cycle Lock keybinds keep their existing behavior.

Auto Target Lock gives an existing living enemy lock priority on normal bar actions. Lock and Attack gives the aimed-at enemy priority and only runs when explicitly bound and pressed. In Support Mode it runs Start Attack so it preserves the ally focus. Regular spells still use their existing targeting and Prelines Editor settings.

Validation

  • Ran pwsh ./scripts/lint-changed.ps1 twice. All checks passed.
  • LuaJIT load/spec suite passed across eight client configurations. The spec checks left-click, a modifier slot, both side buttons, reticle priority, guarded Auto Attack, and the Support Mode fallback.
  • Updated the Click Casting domain notes, all 11 locales, and the generated changelog.
  • In-game on Retail, Forever, and Classic. Check in-combat switching, repeated presses, an ally or empty crosshair, modifier slots, side buttons, Support Mode, and Cycle Lock before merge.

@sampconrad sampconrad left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this, @DEVLlN. The tests are thorough and the locales are clean. I'd like to change the approach before this goes further.

Blocking

  1. Please make this a Click Casting action instead of a slot-1 option. Add a Lock and Attack entry to the Action Combat Mode section of the action dropdown, next to Start Attack and Toggle Focus Enemy. That removes the setup chain (Left Click on Action Button 1, Auto Attack in slot 1, a separate toggle). It also works on any click-cast button or key, and needs no new per-character option. In code that is roughly:

    • An entry in OVERRIDE_ORDER and OVERRIDE_LABELS in TabClickCasting.lua, and in CM.Constants.OverrideActions.
    • A CM.Constants.Macros text, like CM_StartAttack, that locks the enemy under the crosshair and then runs /startattack [harm,nodead].
    • A matching line in ACTION_MACRO_TEXTS in BindingOverrides.lua.

    With that, the ACTIONBUTTON1 exception for the click-cast-only option, the targetLockActionButton1 key and the BuildClickCastMacroText special-casing aren't needed. It also stops bypassing the Prelines Editor overrides.

  2. How this differs from Auto Target Lock. The existing Auto Target Lock option already locks on attack with a very similar preline. Please say in the PR what the new action does that it doesn't (it doesn't toggle the lock off, and an ally can't replace it). Spells would still go through the existing option.

Before merge

  • Please do the in-game checks: one click locks and starts Auto Attack, repeated clicks keep attacking, aiming at a second enemy switches the lock, in combat, and on a modifier slot and a side button.
  • Please test on Retail, Forever and Classic and check there are no Lua errors.
  • Update the domain-click-casting.md note, the TabClickCasting.lua and Gameplay.lua headers, and all 11 locales for the new action name. Keep UI/Editors/TargetingMacroPrelinesEditor.lua in the Related: header of TargetingMacroBuilder.lua if that file is touched.
  • Run pwsh ./scripts/lint-changed.ps1 twice.

@DEVLlN DEVLlN changed the title feat(target-lock): lock and start auto attack with one left-click feat(target-lock): add Lock and Attack to Click Casting Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants