kernitus / BukkitOldCombatMechanics

Spigot plugin to configure combat mechanics from 1.9 onwards
https://www.spigotmc.org/resources/19510/
Mozilla Public License 2.0
161 stars 69 forks source link

Overpowered Enchantment Conflicts #614

Closed Jeklund6 closed 1 year ago

Jeklund6 commented 2 years ago

Edit: Very similar problems to issues #499, #560, and #589 hopefully I provided helpful information.

Server Version: Paper 1.12.2

I'm trying to create an OP Factions server with 1.8 style combat and OP enchants. Ex. (protection.0-100) (sharpness.0-50).

While using this plugin once you have x>=protection.5 you take negative damage from anything above +4 Attack Damage.

Now this is when default is set _"old_armorstrength = true"

Screenshots below if they can possibly provide some explanation that I don't understand. Images 1, 1.a, 2, 2.a have _"old_armorstrength = true" See config.yml: https://mcpaste.io/599ab873d279fbe8

IMAGE 1: Attacker using sharpness.50 sword. image IMAGE 1.a: Defender wearing protection.5 image

IMAGE 2: Attacker using wooden sword image IMAGE 2.a: Defender wearing protection.5 image

Below is a somewhat separate issue from above

I dont know if this is caused by the plugin or this is Minecraft but I thought I'd include it Troubleshooting the issues I tried setting it to false. Everything worked perfectly when _"old_armorstrength = false". Damage worked perfectly, but a different problem occurred; the difference in protection. Any x>=protection.5 isn't more effective Ex. if I enchant something as protection.100 it's no different than protection.5 (same with durability) Images 3, 3.a, 4, 4.a have _"old_armorstrength = false" See config.yml: https://mcpaste.io/ae4b7d15c9b2861e

IMAGE 3: Attacker using sharpness.50 sword image IMAGE 3.a: Defender wearing protection.5 (Armor Strength not showing here because I set it to false I'm assuming) image

IMAGE 4: Attacker using sharpness.50 sword image IMAGE 4.a: Defender wearing protection.100 (Armor Strength not showing here because I set it to false I'm assuming) image

As you can see, there was no difference in damage taken between protection.5 and protection.100

kernitus commented 2 years ago

Thank you for actually providing some data, I will now have to do a lot of investigating and testing to figure out where the problem lies.

Jeklund6 commented 2 years ago

I've done some extra research after posting this which might help you or save time.

The problem is Minecraft's EPF cap or (reaching 100% protection) on armor/protection enchantments. EPF cap is reached when wearing protection 5 diamond armor.

When (EPF cap is reached) and (old_armor_strength = true) then, you CAN'T take damage because you're at 100% protection.

When (EPF cap is reached) and (old_armor_strength = false) then, you CAN take damage, but the damage you take doesn't decrease as protection level increases.

To fix: I imagine it has to do with overriding Minecraft's default EPF cap/values, but that sounds like it would bring a host of other coding issues like making an entirely new EPF curve or dataset.

But, that's why I just look for plugins and not create them, hope this helps lol.

kernitus commented 2 years ago

Thanks for providing such detailed information, I will be looking at this shortly. Would you be available to perform some testing if I managed to fix the issue?

Jeklund6 commented 2 years ago

Yeah I could do that.

Jeklund6 commented 1 year ago

Any update on this yet?

kernitus commented 1 year ago

I am currently rewriting most of the damage calculation system. It requires a lot of testing to make sure it is actually accurate.

kernitus commented 1 year ago

@Jeklund6 please try the new test builds, where I have rewritten most of the calculations that deal with damage.

kernitus commented 1 year ago

Closing due to rewrite of all damage calculation code. Please open a new issue with debug logs from the latest version if you think the issue is still present.