Conversation
…ate box + queuedEgg)
…ox on graduation)
…; distinguish final-form from graduated
…ne in the Pokédex
# Conflicts: # Sources/PokeTokenBar/Core/CompanionStore.swift # Sources/PokeTokenBar/Core/SaveTransfer.swift
10 tasks
This branch has not been deployed
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.
What
The app raises one active companion at a time, and finishing or rerolling a Pokémon discarded the previous one. This adds a box to store individual Pokémon, switch which one is active, and keep the ones you finish raising. Each stored Pokémon keeps its exact growth state (
stageIndex/usedAtStage), so parking and resuming is lossless. Buying an egg now parks the current companion in the box instead of releasing it. The active companion still grows on its own — the box is opt-in.Changes
CompanionState.box: [MonState], a stableMonState.id, andMonState.isComplete(set at graduation). Additive and lenient-decoded, so old saves load unchanged — no save-schema bump.CompanionStore.setActiveFromBox(id:)swaps a boxed Pokémon with the active one (growth preserved); graduated trophies can't be activated.graduate()keeps the finished Pokémon in the box (isComplete) alongside the existing dex record;applyUsageno longer re-grows a completed mon.dexSpecies/ownsSpecies/ownsShinySpeciesnow count boxed individuals, so switching the active companion never drops species from the Pokédex.buyEggparks the active companion in the box (previously released it into the dex viareleasedDexEntry, now removed) and starts the new egg immediately;canBuyEggis unchanged (needs an active companion and funds). Price and rarity-guarantee mechanics are untouched.SaveTransfer:boxis classified as progress, andsanitized()clamps box entries at the import trust boundary just like the active companion.UI
Pokédex | Box(grouped on the left) withCatch logset apart on the right (CollectionSection).BoxGridView: paged 4×6 grid; inline confirm to set active (no sheets, matching the popover rule); names resolved through the cached line provider; a 🏆 badge marks graduated trophies, which show a short reason instead of the switch button.Verification
Note
The one change to the established loop is the egg purchase (release → park). Happy to split that into its own PR or gate it behind a setting — the box stands on its own without it.
Edit (2026-09-10): Updated onto the latest
mainand resolved the conflicts.profile, graduation and box swaps preserve it, andsanitized()clamps box entries' profiles too (sharedclampMonhelper).buyEggnow uses the newprice(of:)API while keeping the park-in-box behavior; the now-unusedreleasedDexEntrywas removed.