You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's too much variability to when it returns an Array or a nested Array or an integer in the results field.
There should be some more consistency.
Maybe always stick to an Array for the results and have a computedResults that does any addition of modifiers?
4d6 is different from 4d6+4 which is different from sum(4d6).
It might be nice to rely on explicitly requiring a sum() call if you want to automatically the rolls together in case users want to verify the actual die rolls instead of just seeing the sum, but we also store the relevant roll data in the rolls array, so maybe reducing to a single number is best?
Or maybe it should be clearly defined when to expect an Array and when to expect a number?
The text was updated successfully, but these errors were encountered:
There's too much variability to when it returns an Array or a nested Array or an integer in the
results
field.There should be some more consistency.
Maybe always stick to an Array for the
results
and have acomputedResults
that does any addition of modifiers?4d6
is different from4d6+4
which is different fromsum(4d6)
.It might be nice to rely on explicitly requiring a
sum()
call if you want to automatically the rolls together in case users want to verify the actual die rolls instead of just seeing the sum, but we also store the relevant roll data in therolls
array, so maybe reducing to a single number is best?Or maybe it should be clearly defined when to expect an Array and when to expect a number?
The text was updated successfully, but these errors were encountered: