Repository navigation
feat(helpers): sync game data constants with client schema 0.41.2115745 - #273
Merged
Merged
Conversation
Client 0.41.2115745 adds the Overcharge game data bit (2**52) and folds it
into segment 4, so DataItems gains OVERCHARGE (aliases
OVERCHARGE_DEFINITION, OVERCHARGE_STAT_GROUP,
OVERCHARGE_POINT_MISSION_LOOKUP), Constants.get("Overcharge") resolves it,
and SEGMENT4 / Constants.Segment4 move to the game's new 7881024469991424.
The stat and enum tables gain UnitStat 62 (Critical Defense,
UNIT_STAT_CRITICAL_DAMAGE_NEGATE), ItemType 36 OVERCHARGE_POINT and
CurrencyType 51 ARENA_CURRENCY ("Arena Tokens").
Requires Comlink 4.6.0 or later, which accepts items up to 2**53 - 1.
Earlier releases reject OVERCHARGE and the new SEGMENT4 with HTTP 400.
Closes #216
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
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.
Closes #216
What changed
Game client 0.41.2115745 added the
Overchargegame data bit (252) and folded it into segment 4. Comlink 4.6.0 (spec 0.41.1) is the first public release that accepts it, so the helpers can now follow the client.DataItems.OVERCHARGE(252) requestsoverchargeDefinition,overchargeStatGroupandoverchargePointMissionLookup. Each also has its own alias:OVERCHARGE_DEFINITION,OVERCHARGE_STAT_GROUP,OVERCHARGE_POINT_MISSION_LOOKUP.Constants.get("Overcharge")resolves it.DataItems.SEGMENT4/Constants.Segment4change from3377424842620928to7881024469991424, the game's new segment 4 mask.STATSgains UnitStat 62 (Critical Defense,UNIT_STAT_CRITICAL_DAMAGE_NEGATE),ITEM_TYPESgains 36OVERCHARGE_POINT, andCURRENCY_TYPESgains 51ARENA_CURRENCY("Arena Tokens").DataItemsdocstring anddocs/api/helpers.mdnow give the accepteditemsrange as 1 to 253 − 1. A newdocs/migration.mdv2.9 bullet says thatOVERCHARGEand the newSEGMENT4need Comlink 4.6.0 or later.Breaking changes
DataItems.SEGMENT4now includes the Overcharge bit. Comlink releases older than 4.6.0 reject anyitemsvalue of 252 or above with an HTTP 400, soSEGMENT4andOVERCHARGEfail against them. Upgrade Comlink to 4.6.0, or request the older collections by their own bits. Code that hard-coded3377424842620928keeps working against either release, but leaves out the Overcharge collections.Type of change
Checklist
developbranchCHANGELOG.mdnot edited by handdocs/api/helpers.md,docs/migration.md)Verification
uv run ruff check src/ tests/: passeduv run ruff format --check src/ tests/: passeduv run ty check src/swgoh_comlink/: passeduv run pytest tests/ -q: 2105 passed, 31 skippeditemsup to 253 − 1 is accepted, and 253 returns HTTP 400.SwgohComlink.get_game_data,DataItems.OVERCHARGEreturns the threeovercharge*collections, andOVERCHARGE_STAT_GROUPreturns the same set.items=DataItems.SEGMENT4returns exactly the same 24 collections asrequest_segment=4, Overcharge included./enumsmatches the library'sITEM_TYPESandCURRENCY_TYPEStables exactly, and itsUnitStatmaximum is 62 (UNIT_STAT_CRITICAL_DAMAGE_NEGATE), matchingSTATS.🤖 Generated with Claude Code