-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
The calculations for the attribute "+X Poison Damage Over Y Seconds" are incorrect (lines 233-235 attribute_enhancer).
The correct math should be with Math.round instead of Math.floor.
const min = Math.round((property.values[0] * property.values[2]) / 256);
const max = Math.round((property.values[1] * property.values[2]) / 256);
const seconds = Math.round(property.values[2] / 25);
Examples:
-
Unique Item "Serpent Lord Long Staff":
prop.values[0] = 40
prop.values[1] = 40
prop.values[2] = 75
40 * 75 = 3,000 / 256 = 11.71875. It is rounded down to 11 Poison Damage, whereas the game item has 12. -
Unique Item "Blackbog's Sharp Cinquedeas" (helps to show why Math.ceil would also be wrong, in case one had the idea):
prop.values[0] = 500
prop.values[1] = 500
prop.values[2] = 250
500 * 250 = 125,000 / 256 = 488.28125. It would be rounded up to 489 Poison Damage, while the correct is 488.
Metadata
Metadata
Assignees
Labels
No labels