Archy-X / AuraSkills

The ultra-versatile RPG skills plugin
https://aurelium.dev/auraskills
GNU General Public License v3.0
240 stars 94 forks source link

Toughness does not decrease damage dealt through the MythicMobs damage mechanic #175

Open MultiverShaun opened 1 year ago

MultiverShaun commented 1 year ago

Server software and version

Paper 1.19.3

Expected behavior

The toughness modifier decreases the damage dealt by the MythicMobs damage mechanic as expected.

Actual behavior

The damage dealt through the damage mechanic is not decreased when the player has a toughness modifier.

How to reproduce

  1. Remove any armor or other external damage reducers that the player may have
  2. Create a MythicMobs skill that uses the damage mechanic
  3. Add a toughness modifier to the player
  4. Execute the MythicMobs skill
  5. Notice how the damage from the executed skill is not reduced

Additional information

No errors in console.

Agreements

ErikSzabo commented 6 months ago

Can confirm, this is still an issue with latest AuraSkills and latest MythicMobs. Also applies for other mechanics as well like modifyDamage or baseDamage. @Archy-X can you just up your event listener to HIGHEST or something?

ErikSzabo commented 6 months ago

If you change dev.aurelium.auraskills.bukkit.listeners.DamageListener onDamage listener priority to HIGHEST, it works as expected.

Archy-X commented 6 months ago

I'm cautious about changing that event priority because there might be unintended effects either within the plugin or in other plugins. I don't remember if it was that event specifically but changing some event priority in the past caused some things to break, so there would have to be lots of testing to make sure everything else works.

ErikSzabo commented 6 months ago

What should I test? I can help. What could break within the plugin itself? I think applying strength to the damage at Highest prio is more dangerous than thougness. For example in mythicmobs if a mob has some armor or damage modifier to decrease the incoming damage, then yes, strength should be applied beforehand. Thats one example. But for thougness, I think it should always activate last. Gather all damage, then reduce it and the end. This is what sounds reasonable to me.

Archy-X commented 6 months ago

Mainly the other instances in the plugin where EntityDamageByEntityEvent is listened to, including item requirements and certain abilities.

ErikSzabo commented 6 months ago

I think these are the files and methods that can be affected by changing the event priority. All of this are only affected if you apply the extra damage at highest priority which you technically don't need to do. Only damage reduction should activate at highest priority (as I said previously). So if you create 2 separate listener you can apply the extra damage at high and apply damage reduction at highest. Right now I don't see any reason why wouldn't this work, but correct me if I'm wrong.

HologramsHook: onEntityDamageByEntity LightningBlade: activationListener AlchemyAbilities: goldenHeart

EDIT: HologramsHook is affected either way but it can be easily a monitor priority by all means. Golden heart sadly also affected since it would activate before the other damage reduction which is not the case right now.