Enigmatic Legacy

Enigmatic Legacy

10M Downloads

Issues with Pearl of the Void

Hiranus opened this issue ยท 4 comments

commented

Versions (Be specific, do not write "latest"):

  • Enigmatic Legacy:2.11.4
  • Curios API:4.5.0.2
  • Patchouli:1.16.4-53.1
  • Forge: 36.1.32

Description of a Bug:

There are 2 issues with Pearl of the Void, one is an exploit when used together with Mana and Artifice and other one is general issue.

  1. Exploit - it lets you bypass Chrono Exhaustion debuff that is intended as a limiter how often player can use Chrono Anchor spell which makes player unkillable (when you die you get teleported back).
  2. Do not cancel statuses that get constantly reapplied either by gear or beacon or other similar means - it makes things super weird, and it can even cause seizures if player will have high speed charm on himself. If you will need some help figuring this thing out just tell me, I might have good idea on how to approach this one.

How to Reproduce:

  1. Cast Chrono Anchor on yourself
  2. wait till it wears off
  3. Equip Pearl of the Void for split second
  4. Chrono Exhaustion is gone

Logs:

Not really important.

commented

@Aizistral I think I have figured out how to work with second issue.
Slow down pearl to cancel effects every 4 or 5 ticks instead of every tick as it is now, and record what effects have been canceled each operation. In configs add 2 settings:
CanceledEffectsHistoryLength - How long should buff canceling history be. default ~8
EffectPercentageToBlacklist - after what percentage of cancellations in history effect will be added to temporary blacklist. default ~0.5 (or 50%)

If speed is applied to player by some gear then it will be applied very often. If it was canceled 4 times already with each cycle of pearl, then current cancellation cycle will be over 50%, which will instead add it to temporary blacklist. Buffs from this list are not canceled unless player doesn't have this effect, at which point effect is removed from this temporary blacklist.
This should work with most scenarios, and since its configurable players will be able to change configs to fit their needs. What do you think?

commented

While it is possible, the workaround you suggest is quite hacky. Besides, I would like the pearl to stay "makes you immune to all effects" thing, not "makes you immune to all effects, unless someone really insists they should be applied". As such, I'll probably just go ahead and make another mixin to prevent effects from being applied whatsoever instead of only trying to clear them out every tick.

Sometime soon I'll be doing some final bugfixes for 1.16 version of the mod, before porting to 1.17. I'll address both issues then.

commented

Well, its clear how to address the first case - I'll just need to make exclusion for Chrono Exhaustion specifically. However, more general second issue is also the one I don't see a good way to get around, since there are too many mods with items that constantly re-apply effects, and just from the data effect itself has - its not clear whether it is from an item that constantly reapplies it or not.

commented

It depends how complex can you go with algorithm. Do you have some cache that you can read/write from effect canceling code and can you detect when player puts on Pearl of the Void?