Spartan Weaponry

Spartan Weaponry

34M Downloads

The Sweep I, II & III traits aren't working properly in 1.19.2

alexvirgo13 opened this issue ยท 2 comments

commented

First of all, this may have been fixed with the armor pierce bug, so it should be tested on the last build, just to be sure it still happens. Even if that was the case, there are a couple issues I think will still be present (to be precise, the trait descriptions as I point out later).

Sweep 1 says it does 0.01% of damage and ends up rounding to 1.
Sweep 2 says it does 0.5% of the damage and ends up also being 1.
Sweep 3 says it does 100.0 flat damage, but does around 0.1% so 1 as well.

Here's an experiment I did to see if it truly was flat damage and it turns out it does a ridiculously low percentage of the total damage, but it's not a flat value.
image

I think somewhere in the code, it divides by 1000 the value from the config file, which is already a decimal between 1 and 0

Also, I checked the sweep damage on the vanilla sword and it seems to be the same as Sweep III
image

As a final note, I checked 1.18 to see if it works and it does, but the trait description is the same as in 1.19 so it displays 0.01%, 0.5% and 100.0 respectively.

commented

The damage disparity is caused by the same issue as your other issue (#22). But now I've just realized all of the tooltips for the Sweep traits are incorrect.
Sweep I is working properly as it's meant to inflict 1 damage (unless it's boosted by damage-enhancing traits).
Also, in further testing, I've noticed that the way I've calculated the sweep damage ratio is incorrect. This is only slightly noticeable when using the Glaive with the Sweep II trait. It gives a sweep damage boost that is slightly higher than half damage.
e.g. A Netherite Glaive does 10 damage and inflicts 5.5 sweep damage. In the next update, it inflicts 5 sweep damage as it should
This also affects the 1.18.2 version since I made no changes in that code since updating for that version.
I've fixed all of that in the next update. Thanks for pointing this out too.

commented

I've updated the mod to fix this.
Closing issue.