You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Snapshot list reveals a disguised Ditto's shiny state before the reveal #419
A Ditto that hatches disguised as another species keeps its shiny state hidden until the reveal. CompanionStore.currentIsShiny returns false while dittoDisguise != nil && !dittoRevealed, and the home screen, release flow and Pokédex all respect that.
The save snapshots don't. SaveSnapshotManager fills SaveSnapshot.currentIsShiny from the raw state.active?.isShiny in all three places that build a snapshot:
createSnapshot (manual and automatic snapshots)
listSnapshots, envelope files
listSnapshots, legacy raw-state files
Settings → Snapshots renders each row with SpriteView(speciesID: snapshot.currentSpeciesID, shiny: snapshot.currentIsShiny). So a shiny Ditto in disguise shows up as a shiny sprite of the disguise species in the snapshot list. That spoils the reveal, and the disguise species was never shiny.
Why it slipped through
The hiding rule was written by hand in currentIsShiny and again in CompanionState.ownsShinySpecies. Snapshot code takes a CompanionState directly rather than going through CompanionStore, so it read the raw field. The existing hiding tests only cover the store paths.
Fix
Move the rule into one property, MonState.displaysShiny, and use it from the store, the Pokédex ownership check and all three snapshot paths.
Activity