Skip to content

fix(framework): a second quest re-reports its monsters, and em_vhook latches only a big one - #121

Merged
sp00ktober merged 4 commits into
mainfrom
framework/em-latch
Oct 22, 2026
Merged

sp00ktober merged 4 commits into
mainfrom
framework/em-latch

Conversation

@sp00ktober

Copy link
Copy Markdown
Contributor

A second quest without a cold boot wrapped the wrong monster: em_vhook took a Popo's vtable and the port's own moves, rules and fatigue went dead (measured on lane 3 with the Brute port).

  • The poll: the registry empties when a quest ends and refills when the next loads, both while the poll sleeps (it runs only in an area), and the engine gives a monster its old address, so the Tigrex never read as new and no spawn event fired for it. QUEST_BEGINNING now makes the poll forget what it reported (registry_watch.h); the registry is empty at that moment, so nothing stale is reported again.
  • The latch: install_for took the first spawn in the vtable band, a Popo's too. It now takes a big monster: one of the framework's species list, or of the quest's target groups.
  • Live (lane 3, on the own-move stack): quest 1 and, after returning to the village, quest 2 both wrap the Tigrex's vtable; in quest 2 the Brute's own moves play and chain, and fatigue charges.

Tests: the poll's memory across a forget, the latch for targets, extra groups, a wild group count, a host under a swapped record, no groups.

🤖 Generated with Claude Code

sp00ktober and others added 3 commits October 22, 2026 00:33
The species band passes a Popo's vtable too, and the first spawn seen took the
latch, so a second quest wrapped the Popo. The entity's species must be one of
the quest's target groups (the species list when it has none).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…rs again

The registry empties at a quest's end and refills at the next load, both while
the poll sleeps (it runs only in an area), and a monster comes back at its old
address: the slot read unchanged and no spawn event fired. QUEST_BEGINNING
makes the poll forget what it reported.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…r a swapped record

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	framework/tests/test_em_brain.py
@sp00ktober
sp00ktober merged commit b9ec18d into main Oct 22, 2026
5 checks passed
@sp00ktober
sp00ktober deleted the framework/em-latch branch October 22, 2026 22:23
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.

1 participant