Skip to content

New Engine Feature: Tweak Op261#8

Open
4Luke4 wants to merge 1 commit into
Bubb13:develfrom
4Luke4:op261
Open

New Engine Feature: Tweak Op261#8
4Luke4 wants to merge 1 commit into
Bubb13:develfrom
4Luke4:op261

Conversation

@4Luke4
Copy link
Copy Markdown

@4Luke4 4Luke4 commented May 21, 2026

Opcode 261 enhancements:

  • Added Opcode_Hook_Op261_SelectRandomSpell and Opcode_Hook_Op261_ShouldStopAfterCurrentLevel to the EEex namespace in EEex.h, enabling external control over spell selection and loop termination for opcode 261.
  • Implemented the logic for these hooks in EEex.cpp, including a helper function that randomly selects an eligible spell from a memorized spell list, closely following the vanilla engine's logic and random number usage. Also added logic to determine if the spell level loop should stop after the current level.

See also: Bubb13/EEex#126.

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