Skip to content

feat(character): gear-set tabs, compare set picker, stat deltas + set bonuses#168

Merged
VortexUK merged 2 commits into
mainfrom
feature/gear-sets
Jul 14, 2026
Merged

feat(character): gear-set tabs, compare set picker, stat deltas + set bonuses#168
VortexUK merged 2 commits into
mainfrom
feature/gear-sets

Conversation

@VortexUK

Copy link
Copy Markdown
Owner

Summary

Surfaces the in-game saved equipment sets (Census adventure_sets collection) across the site, plus a worn Set Bonuses panel:

Character sheet

  • Pill row next to the Equipment label: Current + one pill per saved set. Selecting a set swaps the paperdoll + gear rating to that set (deep-linkable via ?set=).
  • Stats shift to an approximation of the selected set: current + (set − worn) per stat, with signed green/red delta chips. Health/Power (banner-only pools) surface in their own group when moved. Percent-derived values (armor/avoidance/mitigation) and the stamina→health cascade are deliberately excluded.
  • New Set Bonuses section between Equipment and Consumables: every worn item set with piece count, active tiers marked green, out-of-reach tiers dimmed. Reads the existing tooltip prefetch cache (zero new fetches) and follows the selected gear-set pill. Masonry column layout.

Compare — per-side "Current gear / " dropdown on the Gear tab feeding the diff and headline ilvl.

Backend

  • CensusClient.get_gear_sets (reuses _parse_equipment), character_gear_sets table in census_store, and GET /api/character/{name}/gear-sets — store-first SWR mirroring the AA read path (hot cache → store + bg refresh → one live fetch; 503 when Census is down, 404 unknown char).
  • stat_deltas.py: additive stat sums from items.db item_stats (items + adorns) plus active item-set bonus tiers grouped by setbonus_name with requireditems thresholds.
  • New items.db accessors: stats_for_ids, set_bonus_rows_for_ids.

Testing

  • 21 new backend tests (SWR cold/warm/stale/503/404/empty, old-schema migration safety, client parsing, stat-delta mapping/set-bonus thresholds/duplicate weighting) — full suite 1578 passed, pyright clean.
  • 9 new frontend tests incl. the mandated setSearchParams-throws resilience cases — full suite 203 passed, tsc clean.
  • Live-verified against Badbang (Wuoshi): three sets resolve with correct ilvls; deltas match expectations including a zero-delta for the currently-worn set.

🤖 Generated with Claude Code

VortexUK and others added 2 commits July 14, 2026 13:13
… bonuses

Character sheet:
- Gear-set pills (Current + one per saved in-game set) swap the paperdoll
  and gear rating to that set; ?set= deep link via the safeSetParams mirror.
- Stats approximate the selected set: current + (set - worn) per stat with
  signed delta chips; banner-only pools surface in a "Health & Power" group.
- New "Set Bonuses" section between Equipment and Consumables: worn sets
  with piece counts, active tiers marked, inactive tiers dimmed. Pure
  read of the existing tooltip prefetch cache; masonry column layout.

Compare: per-side "Current gear / <set>" dropdown on the Gear tab feeding
the diff + headline ilvl.

Backend:
- CensusClient.get_gear_sets reads the adventure_sets collection and reuses
  _parse_equipment per set.
- census_store character_gear_sets table (keep-last-known, name+world).
- GET /api/character/{name}/gear-sets - store-first SWR mirroring aa.py,
  with per-set ilvl and stat_deltas.
- stat_deltas.py: additive item-stat sums from items.db item_stats (items +
  adorns) plus active item-set bonus tiers; percent-derived sheet values and
  the stamina->health cascade deliberately excluded.
- items.db accessors: stats_for_ids, set_bonus_rows_for_ids.

Live-verified on Badbang (Wuoshi): DPS/Gear score/Tank sets resolve, ilvls
computed, deltas correct including the zero-delta currently-worn set.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Clears the 5 Pillow advisories flagged by the dep CVE scan.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@VortexUK
VortexUK merged commit 88c8035 into main Jul 14, 2026
6 checks passed
@VortexUK
VortexUK deleted the feature/gear-sets branch July 14, 2026 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant