Skip to content

Feat/engine fix - #78

Open
sudo-owen wants to merge 36 commits into
mainfrom
feat/engine-fix
Open

Feat/engine fix#78
sudo-owen wants to merge 36 commits into
mainfrom
feat/engine-fix

Conversation

@sudo-owen

Copy link
Copy Markdown
Collaborator

Inlines more of the engine logic to lead to lower gas during most happy paths

Adds a few more real-world battle replay gas measurements.

sudo-owen and others added 30 commits July 14, 2026 19:32
# Conflicts:
#	drool/imgs/attacks/attack_spritesheet.json
#	drool/imgs/attacks/attack_spritesheet.png
#	drool/imgs/attacks/throw_pebble.gif
#	drool/imgs/attacks/throw_pebble.png
#	drool/imgs/attacks/wither_away.gif
#	drool/imgs/attacks/wither_away.png
#	processing/generateMonsTypeScript.py
Its only importer is its own Foundry test, so transpiling it ships dead
code into munch's production sim mirror. Same rationale as the other
skipFiles entries.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…leton

Library `internal constant`s emit as `static readonly`, but a qualified
cross-file reference (Lib.CONST) went through the module singleton like
library functions do — instance access to a static member, which TS
rejects (TS2576). Track per-contract constants in the registry and emit
class-qualified access, pulling the class into the import alongside the
singleton.

Surfaced by the new resolver/command libs (MoveCommandLib.OP_ATTACK,
EffectCommandLib.OP_CLEAR_STATUS) and StatBoostLib.ACC_DISABLED_BIT.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Yul `x.slot` emitted `this._getStorageKey(x)`, a helper that was never
defined in the runtime. Engine happens to define its own unrelated
`_getStorageKey(bytes32)`, so the call silently bound to that and passed
a struct where a battleKey was expected — JSON.stringify then crashed on
the struct's BigInt fields.

Latent until now: the only prior `.slot` sites assigned to an unused
variable. The branch's packed EffectInstance header reads and writes
through it for real.

Implement `_yulSlotKeyOf` in the runtime, keyed by an identity symbol so
a struct keys the same whether or not a capture observer has proxied it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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