Make every setting reachable, add consumable toggles, expose Evoker mastery effectiveness - #1789
Open
DIzosimov wants to merge 1 commit into
Open
Make every setting reachable, add consumable toggles, expose Evoker mastery effectiveness#1789DIzosimov wants to merge 1 commit into
DIzosimov wants to merge 1 commit into
Conversation
…er mastery effectiveness Settings are grouped by a category field, but the panel rendered a hardcoded list of categories. A setting whose category was missing from that list was stored in Redux, fully wired to the engine, and never drawn, with no error anywhere. The list now lives in one exported place and SettingsCategories.test.js fails if any category with settings is missing from it, if a listed category is empty, or if a Retail setting has no title and tooltip. That last check caught a pre-existing empty tooltip on enchantItems, which is now filled. Categories with nothing in them for the current game type no longer draw a bare heading, and one with no settings at all can't crash the panel. Food, weapon oil and Vantus Rune were applied unconditionally with no way to turn them off. They're toggles now. Only options with real modelled values are offered - there is no food data beyond a single hardcoded entry, so that dropdown is deliberately limited rather than invented. Mastery effectiveness for Preservation Evoker was hardcoded at 0.9 inside scoreEvokerSet, overwriting whatever was passed in. Preservation mastery scales with how injured the target is so its real effectiveness varies a lot by content, and Resto Shaman already exposed this as a setting. Absent settings keep 0.9 so existing results are unchanged. The value is read with Number() rather than a typeof check because the settings panel writes number inputs back as strings - a strict typeof === "number" check worked on the reducer's initial value and then silently fell back to the default the moment the player edited the box, which looked exactly like the setting doing nothing. 42 suites / 200 tests passing. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E5STi454aLVN1cAsYyba3J
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Second of three, split out of #1787 following review. Independent of the other two.
Settings that exist but are never drawn
Settings are grouped by a
categoryfield, but the panel rendered a hardcoded list of categories. A setting whose category wasn't in that list was stored in Redux, fully wired to the engine, and never appeared in the UI — with no error anywhere.The list now lives in one exported place, and
SettingsCategories.test.jsfails if:That last check caught a pre-existing empty tooltip on
enchantItems, which is now filled. Categories with nothing in them for the current game type no longer render, and a category with no settings at all can no longer crash the panel.Consumable toggles
Food, weapon oil and Vantus Rune were applied unconditionally with no way to turn them off. They're toggles now.
Only options with real modelled values are offered — there is no food data in the app beyond a single hardcoded entry, so that dropdown is deliberately limited rather than invented.
Preservation Evoker mastery effectiveness
masteryEffectivenesswas hardcoded at0.9insidescoreEvokerSet, overwriting whatever was passed in. Preservation mastery scales with how injured the target is, so real effectiveness varies a lot by content — Resto Shaman already exposes this as a setting, and Evoker now does too. Absent settings keep0.9, so existing results are unchanged.The value is read with
Number()rather than atypeofcheck, because the settings panel writes number inputs back as strings (e.target.value). A stricttypeof === "number"check worked on the reducer's initial value and then silently fell back to the default the moment the player edited the box — which looked exactly like the setting doing nothing. The Resto Shaman equivalent avoids this only because it divides by 100 and gets coerced. There's a test for the string case specifically, since that's the shape the UI actually produces.Testing
42 suites / 200 tests passing, production build clean.