NekroDarkmoon / ammo-tracker-fvtt

MIT License
4 stars 5 forks source link

Ammo is being rounded up instead of being rounded down #10

Closed szefo09 closed 2 years ago

szefo09 commented 2 years ago

As per D&D5e RAW, half of the ammunition spent should be rounded down, instead of being rounded up. This line: https://github.com/NekroDarkmoon/ammo-tracker-fvtt/blob/04dae4e24581ec1c6316f89acb57d67b3e650450/scripts/tracker.js#L158 Should be:

const recoverable = Math.floor(consumed * (PERCENT * 0.01));

Or better yet allow this feature to be selected in settings.

NekroDarkmoon commented 2 years ago

Heh, thanks for the report ~ I'll fix it soon. I was hoping to add a setting for that as well as what percentage of ammo can be recovered.

NekroDarkmoon commented 2 years ago

Fixed this in 0.2.1