Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opcode 39 overhaul #62

Closed
wants to merge 6 commits into from
Closed

Conversation

4Luke4
Copy link
Contributor

@4Luke4 4Luke4 commented Mar 6, 2023

See here for further details.

Basically:

  • Trolls are no longer immune to Sleep
    • I suspect they are immune to Sleep because they used to rely on scripts for their special revive mechanics.
      • However, since this is no longer the case, I do not see why they should be immune to it...
  • Spells such as Chaotic Commands no longer protect against Earthquake and Nausea. In particular:
    • magically levitating creatures, flying creatures, oozes, incorporeal creatures are now immune to Earthquake-like attacks
    • the various creatures that are immune to op39 are immune to both Sleep and Nausea attacks
      • This also implies that creatures such as Dragons get Nausea immunity, which in theory would be incorrect
        • However, as stated in the thread above, a more fine-grained solution would probably be too much for a fixpack...
  • Spells that remove op2 (Cure Sleep) now remove only true Sleep attacks
    • So for instance, Exaltation (ohtyr1.spl) cannot remove neither Earthquake nor Stinking Cloud. It can only remove Sleep, Emotion: Hopelessness, Color Spray and the like...
  • As far as Knockback is concerned (see f.i. spin695.spl - Wing Buffet), creatures whose animation is hardcoded to be immune to op235 are now immune to the short-duration op39 effect that accompanies op235
    • All other creatures are vulnerable to it (this is hopefully not a problem since this short-duration op39 is only meant to temporary disable the targeted creatures during the buffet...)

This PR also provides the following fixes:

  • Earthquake
    • Make sure all effects bypass Magic Resistance (since the spell is supposed to alter the environment instead of directly affecting the targeted creatures)
      • As of now, the damage opcode (op12) bypasses MR, whereas the Sleep opcode (op39) does not. I opted for resist_dispel=0 for the aforementioned reason...
    • [iwdee] Creatures with 10 or more Hit Dice should be immune to this spell (as per spell description)
  • [bgee] Stinking Cloud
    • op324's resource field should not be empty
  • [bgee] bdsleep.spl
    • Make sure all effects bypass Magic Resistance / are dispellable (so as to match op39, which bypasses MR and it's dispellable)

4Luke4 added a commit to 4Luke4/EE_Fixpack that referenced this pull request Sep 23, 2023
Updated function library for "Gibberlings3#62".
- Manually list all files to be patched instead of `COPY_EXISTING_REGEXP`.
- EEex only.
@4Luke4
Copy link
Contributor Author

4Luke4 commented Sep 24, 2023

@CamDawg
I am going to restrict this to EEex only for better compatibility with existing mods.

I'll let you handle the case if it is not installed...

@Argent77
Copy link
Collaborator

Shouldn't the fixpack be an EEex-free zone?

@szaumoor
Copy link

I thought this project was made with the hope that it was at some point integrated in an official patch (if that ever comes). I remember reading that at the beginning of the project. An external dependency such as EEex is probably out of the scope, I would think...

Maybe a separate "addon" file would be more appropriate, or as a part of any sort of tweak mod.

@4Luke4
Copy link
Contributor Author

4Luke4 commented Oct 1, 2023

Shouldn't the fixpack be an EEex-free zone?

Yes, you are right...
However, as far as this specific fix is concerned, if you do not use EEex, then you are forced to break mods (unless I'm missing something of course...).

That is to say, without EEex you should remove all op101 targeting op39 from spells/items and rely upon op206/op318 in order to selectively grant immunity to a particular Sleep form... So if a mod still uses op101 (p2=op39), then Earthquake, Stinking Cloud and the like will continue to be blocked... EEex basically allows for a much cleaner implementation...

Anyway, I think nothing prevents us from making two different implementations, one if EEex is installed, and another if it isn't...

@4Luke4 4Luke4 marked this pull request as draft October 13, 2023 12:21
Alternate implementation.
@4Luke4
Copy link
Contributor Author

4Luke4 commented Oct 16, 2023

@Argent77 , @CamDawg

Ok, I coded up an alternate solution that does not require EEex.
However, I am now abusing op182 so as to make the least minimal changes (that is to say, so as not to break existing mods...)

@4Luke4
Copy link
Contributor Author

4Luke4 commented Jul 1, 2024

Closed in favor of #59.

@4Luke4 4Luke4 closed this Jul 1, 2024
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.

3 participants