Skip to content

Snapshot list reveals a disguised Ditto's shiny state before the reveal #419

Closed

Description

@Borisserz

Problem

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions