Skip to content

Let ancestors come home again - #84

Merged
mLampir merged 2 commits into
mainfrom
claude/project-thread-xrtpg9
Oct 19, 2026
Merged

mLampir merged 2 commits into
mainfrom
claude/project-thread-xrtpg9

Conversation

@mLampir

@mLampir mLampir commented Oct 19, 2026 •

Copy link
Copy Markdown
Owner

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.pet holds the state (without event log and replays, about 12 KB at most per pet). Pet.bringBack(bornAt, keep) shifts stage_since and born_at by the time it rested, so growth and age pick up where they stopped, and moves the home over like swap. New route POST /api/pet/bring_back (born_at, keep), home: true on 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 in docs/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

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
@mLampir mLampir self-assigned this Oct 19, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019AE3Z3LgNcdw58soaExcxY
@mLampir
mLampir merged commit 1147d04 into main Oct 19, 2026
1 check passed
@mLampir
mLampir deleted the claude/project-thread-xrtpg9 branch October 19, 2026 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Swappable pets instead of ancestors

2 participants