Skip to content

New Engine Feature: Add op418 'Constrict' effect and runtime support#14

Open
4Luke4 wants to merge 2 commits into
Bubb13:develfrom
4Luke4:constrict
Open

New Engine Feature: Add op418 'Constrict' effect and runtime support#14
4Luke4 wants to merge 2 commits into
Bubb13:develfrom
4Luke4:constrict

Conversation

@4Luke4

@4Luke4 4Luke4 commented Jun 23, 2026

Copy link
Copy Markdown

New opcode 418:

For the entire duration of the effect, the targeted creature is constricted and rendered completely helpless (as per op175).

On top of that, anyone who attempts to free a captive by hacking at the source of the constriction has a chance of striking the victim instead (this chance is specified by the param2 field).

However, the opcode can end prematurely:

  • The victim is allowed a 1d100 roll to break free (once per round, skipping the very first round):
    • The success percentage is equal to the combined BEND_BARS_LIFT_GATES values from STRMOD.2DA and STRMODEX.2DA (when applicable).
    • If the above check fails, the victim suffers (param3 * param4) + param1 crushing damage.
  • The victim is automatically freed if the attacker is no longer in weapon range of the victim (as per the InWeaponRange() script trigger)
  • The victim is automatically freed if the attacker is rendered helpless or gets slained/imprisoned (as per op211/213)
  • The victim is automatically freed if the attacker initiates an hostile action (such as attacking, casting a spell, etc.)
  • The victim is automatically freed if affected by op162 (so op162 can dispel this new op418 in addition to op109 and op175)

Each time the effect ends prematurely, the spl file specified by the resource field is cast upon the victim.

Needed for: Bubb13/EEex#134.

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