Skip to content
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

fix(monsters.json): updating to make the count property datatype consistent. #524

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jfmcdonald
Copy link

What does this do?

take 2 on the right repo this time.
This change updates the Monsters.json source file to set the multiattack count properties to a consistent datatype. In 99% of cases the count is an integer. There are however 2(?) instances where the count is a string. This is a pain when parsing with statically typed languages and brakes unmarshaling of the data. I couldn't think of a good way to convert the hydra for instance to a consistent integer so I went and retyped the property throughout. I'm open to better ideas.

How was it tested?

lots of grep statements.

Is there a Github issue this is resolving?

No, I probably should have created an issue, Sorry.

Did you update the docs in the API? Please link an associated PR if applicable.

No, I don't think the datatypes are documented anywhere?

Here's a fun image for your troubles

random photo - update me

@jfmcdonald jfmcdonald changed the title fix(monsters.json) updating to make the count property datatype consistent. fix(monsters.json): updating to make the count property datatype consistent. Jan 18, 2023
Copy link
Collaborator

@bagelbits bagelbits left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. Violet fungus and Hydra kind of mess everything up.

I think we'll also need to update the types in the API as well.

@bagelbits
Copy link
Collaborator

The data types are documented in a few different places in https://github.com/5e-bits/5e-srd-api

@bagelbits
Copy link
Collaborator

I can own updating the API side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants