elthran / RPG-Game

0 stars 1 forks source link

Issue with number of decimals in items/proficiencies #344

Closed elthran closed 6 years ago

elthran commented 6 years ago

We have an item called Rusty Dagger. coding

It Should add 7 to your Strength (aka max damage) and 0.6 to your Speed. However, this is what the tooltip shows: coding

The tooltip shows it will add 7 Strength and 1 Speed. It rounds the speed to an integer. coding

And you can see it's not just the tooltip, but it actually adds 1 to your Speed value. (I've tested with other values, it always rounds to an integer. It has nothing to do with the number 1).

Andif I check the Speed proficiency we can see that it shoul dbe rounding to 3 decimal places. So the error is not there: coding

Please help me find the bug here @klondikemarlen

Here is my last commit which tweaked some of the values while searching for the bug: https://github.com/elthran/RPG-Game/commit/903316d576eb7d6b5fea330d0bdfb4db278767bc

elthran commented 6 years ago

On a related note, here is our gnarled staff: coding Should add 15 to Strength and then +100% to your Combat (ie. double it).

But it does this and I have no idea why! coding It adds +1 to your Combat and then adds +100% to it. Then it adds the 15 Strength. In other words, it works bug free and does what I want it to, but I have no idea why it adds +1 to Combat. I never told it to do that anywhere? It must do it by default but I haven't seen where it does that yet.

elthran commented 6 years ago

Note, if I change it to this: coding

I still get this: coding

So if you add a modifier, then the base value always seems to default to 1. But if you don't add a modifier, then you have full control of the base.

klondikemarlen commented 6 years ago

Combat bug fixed in: https://github.com/elthran/RPG-Game/commit/76deaf7313833a6e9ee5e54275095d544a147c5c Speed bug fixed in: https://github.com/elthran/RPG-Game/commit/95a2874977b9e15f43f218572b7dccef4200fe26