Repository navigation
Let ancestors come home again - #84
Merged
Merged
Conversation
A pet that goes to the ancestors' gallery now keeps its whole state there, frozen: it loses nothing and doesn't grow on. "Bring home" in the gallery brings it back to the front; the front pet goes to the back, and with two at home the keep dialog picks who stays, as with a new egg. New route POST /api/pet/bring_back; API stays at 4 (unreleased since v0.2.0). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019AE3Z3LgNcdw58soaExcxY
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019AE3Z3LgNcdw58soaExcxY
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.
Requested by Michael · project thread
Before: a pet that moved to the ancestors' gallery (with two at home and a new egg) was gone for good; the gallery only kept a picture and a few numbers.
After: the gallery keeps the pet itself, frozen. It loses nothing, doesn't grow on and doesn't get older. A Bring home button next to it brings it back to the front as it left. The pet at the front goes to the back, and if there are two already the same "who stays" dialog as for a new egg picks which one stays; the other goes to rest in the gallery and can come back too. Not while the front pet is on a trip or still an egg. Ancestors saved before this change stay pictures only.
How:
Ancestor.petholds the state (without event log and replays, about 12 KB at most per pet).Pet.bringBack(bornAt, keep)shiftsstage_sinceandborn_atby the time it rested, so growth and age pick up where they stopped, and moves the home over likeswap. New routePOST /api/pet/bring_back(born_at,keep),home: trueon the ancestors that can come back. API_VERSION stays 4: it was raised after v0.2.0 already, so the contract was rewritten at 4. Docs indocs/gameplay.md.Not tried in the app on a phone yet; core tests cover bringing back, refusals, saving and the freeze.
Closes #30
🤖 Generated with Claude Code
https://claude.ai/code/session_019AE3Z3LgNcdw58soaExcxY