-
-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability score increases for 5e feats #641
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. ;)
Tests will catch if the parsing fails entirely, but it won't catch everything.
Is there anything specific we should test for?
|
||
static AbilityScoreIncreaseFields abilityScoreIncreaseFieldFromString(String name) { | ||
for (AbilityScoreIncreaseFields field : AbilityScoreIncreaseFields.values()) { | ||
if (field.name().equals(name)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
equalsIgnoreCase ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was to allow me to handle int with a special case since in 5eTools the string is "int" but that's reserved so I can't make that the key name in the enum. I can probably do it another way as well. This was just how I thought it up at the time.
…e improvements for 5e feats
…rsing, cleaned up code
7ee3b32
to
c07984f
Compare
Not too sure about the testing to be honest. I could use some guidance on that. Off the top of my head just testing different variants of the data shape and that an increase for int gets parsed and mapped to
|
Adds the ability score increase to 5e feats.
Issue: #290