Floating Point Bug in Spirit Charge System

Create issue
Issue #16 resolved
Rune Devros repo owner created an issue

A combination of accumulated floating point arithemetic errors will result in an SC of say 5.00 showing up as insufficient to activate a spell action of minimum SC requirement 5.00.

Solution will be in 0.4.1 which is to convert all SC to integers which can be represented exactly since all our operations on SC are add/subtracts. Spirit Charge values will be increased by 100x but should not have any problems with the user.

That is:

Rather than represent an SC as 3.00, we represent it as 300.

Comments (3)

  1. Log in to comment