Skip to content

feat(framework): 96 own-move slots and a charge helper that answers switch_query - #119

Merged
sp00ktober merged 5 commits into
mainfrom
framework/charge
Oct 22, 2026
Merged

sp00ktober merged 5 commits into
mainfrom
framework/charge

Conversation

@sp00ktober

Copy link
Copy Markdown
Contributor

Stacked on #118. The framework side of Zinogre's charge, and room for its own moves.

  • 96 own-move slots (was 48): the moves block grows from 8.8 to 12.8 KB of partition memory; Python's slot count follows addresses.toml.
  • The query slot: em_vhook wraps MONSTER_VTABLE.QUERY (+0xDC, what switch_query calls; on the Tigrex a stub returning 0) with a frame-free, branchless leaf that answers the port's monster from a table and passes any other entity to the original.
  • The charge helper: a gauge raised when a configured charge-up own move starts (by HP band), the transform own move played at a full gauge (charged, durability 100), hits wearing the gauge while charging and the durability while charged, discharge at 0 into a 900-frame cooldown, knockout and trap pairs discharging at once; it answers query 0 (charged) and 6 (cooldown). mhfu.em_charge / mhfu.em_charge_status (Lua API 10); mhfu_port.lua arms a moves module's charge table.

Tests: unicorn tests of the query leaf, host tests of the charge logic, the Lua arming. Not live yet.

🤖 Generated with Claude Code

sp00ktober and others added 5 commits October 22, 2026 00:21
The registry, the fatigue helper's own costs and the stub's clamp follow
EM_MOVES.MOVES: the move block is 12796 bytes (was 8764), the em_vhook block
grows by the 96 cost bytes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
em_vhook wraps MONSTER_VTABLE.QUERY (+0xDC, the AI script's switch_query)
with a frame-free branchless leaf that answers the board's monster from a
table and leaves every other entity to the species. The helper keeps the
gauge, charged state, durability and cooldown in C on the AI step: charge-up
own moves raise the gauge by HP band, hits chip the gauge or the durability,
a full gauge plays the transform own move, a discharge pair or no durability
discharges. CHARGE_QUERY_CHARGED/COOLDOWN are the shared constants.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
mhfu.em_charge arms the helper from a table (ups by slot, transform,
chips, cooldowns, discharge pairs), em_charge_status reads it; mhfu_port.lua
arms a moves module's charge table with the port, names through the one
slot map, and drops it with the port. Lua API version 10.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@sp00ktober
sp00ktober changed the base branch from port/zinogre-splice to main October 22, 2026 21:58
@sp00ktober
sp00ktober merged commit f1f2fa9 into main Oct 22, 2026
5 checks passed
@sp00ktober
sp00ktober deleted the framework/charge branch October 22, 2026 21:58
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