RynthAi: exclude a listed shield from buffing (noBuff on the Items bridge) #22
Loading…
Reference in a new issue
No description provided.
Delete branch "AwfulWaffle/RynthSuite:shield-buff-exclusion"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Depends on: nothing to build or run. Pairs with RynthCore PR "Items face: "No buff" toggle on shield rows" (the Items face toggle that writes the
noBufffield this PR reads); with an older engine the field is absent and nothing changes.Companion PR: rynth/RynthCore#11 (rynth/RynthCore#11).
What went wrong in play
A shield that already carries its buffs was still targeted by the buffer: armor spells were aimed at it, and its timers made buffing due. There was no way to say "leave this shield alone".
The fix
ItemRule.KeepBuffedoff now means "Exclude from buffing", read for a listed SHIELD only.BuffManager.Shieldtreats an excluded shield as an unlisted one: nothing is aimed at it and it never makes buffing due. An id with any excluded rule is excluded whatever the rule order. An excluded shield in the off hand means no shield is buffed (not a stale stowed one).ShieldToBuff's kept answer is invalidated when an entry's flag flips in place (ExcludedSignature).ItemRule.NoBuff(noBuff, never saved, omitted when null).WeaponList.ForDisplayfills it;MergeEditedapplies it back for shield entries only, and an absent field leavesKeepBuffedas saved. Weapons and wands are unaffected.ReplaceItemRule) no longer turns buffing back on for a shield marked excluded.How it was tested
Build (from the worktree root):
Result: Build succeeded, 0 Error(s).
Host tests (from
Tools\RynthCore.RynthAiHostTests):The one failure is
map bake: 0x6346 from the real dats ..., which needs the game dats and also fails on pristine upstream/main (baseline 1494/1495). The new cases extendTests/ShieldBuffTests.cs, which upstream already registers.Scope and risk
5 files:
Combat/BuffManager.Shield.cs,Combat/WeaponList.cs,LegacyUi/LegacyUiSettings.cs,MiniRemote/VTankUsdImporter.cs,Tests/ShieldBuffTests.cs. Defaults are unchanged (KeepBuffedtrue for new entries and old profiles), so nothing is excluded until the player toggles it. Risk is limited to shield selection in the buffer and the Items bridge merge.🤖 Generated with Claude Code
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.