Conversation
Embellishments were driven by three hardcoded lists that had drifted apart from each other and from EmbellishmentDB, so items were silently dropped rather than scored: - getItemEffectOptions offered seven embellishments and excluded Finger/Neck outright, so jewellery embellishments could never be attached. Now derived from EmbellishmentDB via new applicable / slots metadata. - The SimC importer matched incoming spell names against an allowlist of eight names and discarded everything else, so an imported item lost its embellishment and scored as a plain stat stick with no error. Now resolves against the same DB. The two entry points also disagreed with each other: Sunfire Silk Lining imported but could not be added manually, and Adorned Fang was the reverse. - Crafted items that carry an embellishment inherently (Axe-Flingin' Bands, the World Tender's set) have no effect block in ItemDB and simmed as plain gear. Item now attaches those from EmbellishmentDB.setItems so a gap in ItemDB can't silently drop them again. - Multi-piece embellishment sets are granted once, only when enough pieces are worn, and consume embellishment slots correctly. - Embellishments with no formula are flagged unmodelled and withheld from the dropdown rather than silently scoring zero. A test fails if a formula lands and the flag isn't removed. - The crafted stat picker is hidden on items with no assignable budget, where choosing stats did nothing. Weapons: buildNewWepCombos only emitted a one hander when it could pair it with an offhand. With no offhand the weapon was invisible to Top Gear, and if it was the player's only weapon there were zero combos, zero sets and an empty report. Unpaired one handers are now offered alone, with report advice noting the offhand is scored as empty. Embellishment cap: exceeding two embellishments makes every set fail verifySet. That's correct but was silent, so the item was dropped from all results or the whole report came back empty. The selection screen now warns when the cap makes a set impossible, the report explains when a selected embellished item couldn't be used, and the engine reports the error rather than returning a bare null. Also fixes a latent crash where getSetting returns 0 for a missing setting and the result was used as a string (darkmoonHuntStat, and flaskChoice which would take out an entire Top Gear run on stale settings), and moves createTopGearWorker into its own module so TopGearEngineShared can be imported from tests without tripping over import.meta. 44 suites / 233 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.
First of three, split out of #1787 following review. Independent of the other two.
Embellishments
Embellishments were driven by three hardcoded lists that had drifted apart from each other and from
EmbellishmentDB, so items were silently dropped rather than scored:getItemEffectOptionsoffered seven embellishments and excludedFinger/Neckoutright, so jewellery embellishments could never be attached. Now derived fromEmbellishmentDBvia newapplicable/slotsmetadata.Sunfire Silk Liningimported but couldn't be added manually, andAdorned Fangwas the reverse.effectblock inItemDBand simmed as plain gear.Itemnow attaches those fromEmbellishmentDB.setItems, so a gap in ItemDB can't silently drop them again.Devouring Banding,Murder Row Materials) are flaggedunmodelledand withheld from the dropdown rather than silently scoring zero. A test fails if a formula lands and the flag isn't removed.Weapons
buildNewWepCombosonly emitted a one-hander when it could pair it with an offhand. With no offhand the weapon was invisible to Top Gear — and if it was the player's only weapon there were zero combos, zero sets, and an empty report. Unpaired one-handers are now offered alone, with report advice noting the offhand slot is scored as empty.Embellishment cap
Exceeding two embellishments makes every set fail
verifySet. That's correct, but it was silent: the offending item was dropped from every result, or the whole report came back empty with no explanation. The selection screen now warns when the cap makes a set impossible, the report explains when a selected embellished item couldn't be used, and the engine reports the error instead of returning a barenull.Also
Two latent crashes where
getSettingreturns0for a missing setting and the result was used as a string —darkmoonHuntStatin the Darkmoon Sigil formula, andflaskChoice, which would take out an entire Top Gear run on stale settings.createTopGearWorkermoved into its own module soTopGearEngineSharedcan be imported from tests without tripping overimport.meta.Testing
44 suites / 233 tests passing, production build clean. Adds four suites covering the embellishment DB contract, the SimC import path, weapon combinations, and the embellishment cap.