Skip to content

feat(port): [brain] charge writes the donor's charge table into the moves module - #122

Merged
sp00ktober merged 3 commits into
mainfrom
port/charge
Oct 22, 2026
Merged

sp00ktober merged 3 commits into
mainfrom
port/charge

Conversation

@sp00ktober

Copy link
Copy Markdown
Contributor

Stacked on #120. With [brain] charge, the build reads the donor's charge state from its MHP3rd overlay and arms the framework's charge helper (#119) with it.

  • Donor (p3charge): each charge-up pair (its handler reaches the gauge add) runs from an empty gauge at one HP ratio per band, and its gain is the gauge left. Walk now carries tracked entity cells between AI frames and answers HP-ratio float tests. The transform pair, the per-hit chips (lowest rank) and both cooldowns come from the species' code and data.
  • Table (brain.charge): charge-up and transform pairs map through [brain.pairs] to own moves (P3_CHARGE_UNMAPPED, an error for the transform); em75's knockout reactions are the discharge pairs (brain.fatigue's classifier). The moves module carries it as charge, mhfu-port splice prints it, and a pair it names is not P3_PAIR_UNUSED.
  • em040: charge-ups (1,6) 10/15/15/20, (1,15) 25/35/40/55, (1,16) 40/55/65/100, (1,17) 55/75/100/100, (1,3) and (1,20) 50 (by HP band ≥95/75/40 %/below); transform (1,4); chips 5 gauge, 5 durability; cooldowns 420 and 900; discharge (4,16), (4,29), (4,30), (4,31).

Tests: unit (gains, mapping, findings); with game data, em040's numbers.

🤖 Generated with Claude Code

sp00ktober and others added 3 commits October 22, 2026 00:53
…float tests

Walk(track=, facts=) keeps the cells a handler stores between AI frames (a counter,
a gauge) and starts runs from known values; Walk.settle(pair, hp) runs a handler to
its end and returns them, answering a float compare of the HP ratio against a
constant from the species' data. Walk.of raises ValueError for a monster without
an overlay.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
p3charge.read runs each charge-up pair from an empty gauge at an HP ratio in each of
the helper's bands and takes the gauge left as its gain; the transform pair, the
per-hit chips of the lowest rank and the two cooldowns come from the species' code
and data.

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

brain.charge maps p3charge's donor onto the port's own moves: each charge-up pair's gain
by HP band on the move [brain.pairs] plays for it, the transform on its move, em75's
knockout reactions as the discharge pairs. mhfu-port build and inject write it as the
module's charge table; splice prints it, and no longer reports a pair the table names
as unused.

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