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

About D6 characteristic #11

Closed
morteeke opened this issue Jul 27, 2023 · 5 comments · Fixed by #13
Closed

About D6 characteristic #11

morteeke opened this issue Jul 27, 2023 · 5 comments · Fixed by #13
Assignees
Labels
enhancement New feature or request

Comments

@morteeke
Copy link

Here to poke you again @brittonhayes 😄.

I just noticed but there are also for example D6 attacks. Do the weapon arrays only accept integers or can I give it a string "D6"?

In case it doesn't accept a string, would it be possible to implement this? I was wondering if you could do this for every characteristic (range, attacks, to hit, to wound, rend, damage). Not sure how you did the damage table yet, but if necessary, maybe do this for the damage table too?

have a good evening/morning/day!

@brittonhayes
Copy link
Owner

Loving your feedback and contributions 😊 thanks so much for the continued interest.

Ooh I hadn't considered this. Right now it is just integers.

The logic there was to enable people to do calculations for integers without needing to do a string -> int conversion.

However, in hind sight that does eliminate the ability to support dice as a value.

I'll see if there's a pleasant way to add this flexibility. Go's type system makes this kind of thing a bit more of a decision process, but I'm sure it's do-able.

I've got work and then D&D today but will take a crack at it if I find a free slot this evening or tomorrow 👷‍♂️

@morteeke
Copy link
Author

Thanks for the quick responses!

No pressure. Have a great D&D game!

@brittonhayes brittonhayes added the enhancement New feature or request label Jul 28, 2023
@brittonhayes brittonhayes self-assigned this Jul 28, 2023
@brittonhayes
Copy link
Owner

I should be able to get this implemented this evening!

Regarding all types that can return -n,n+,and Dn (with n being an integer):

Would you prefer they all be changed to string type? E.g. attack: "1", attack: "D6"

If so, which fields in the schema will this change be applicable to so I don't miss any?

@morteeke

@morteeke
Copy link
Author

I think it would be nice if you could change all the characteristics on a weapon/attack to string types. I am not sure about the range characteristic being able to have Dn.

About the wounds, save, move and bravery characteristic of the unit itself, so far I only found that the move can be for example D6+10". Coming to think of it, these characteristics can also have a damage table linked to them. So for that it might also be a good idea to make those string types.

Then there is the damage tables, I can not say for sure they can have some kind of Dn value. But it seems a possibility to me because why not right. 😄

So to round that up I think it might be a good idea to do this for all characteristics (weapons and units) and maybe the damage tables depending on if you would like to implement it to be sure or if it doesn't matter waiting untill we come across a unit that needs it.

@brittonhayes brittonhayes linked a pull request Jul 29, 2023 that will close this issue
@brittonhayes
Copy link
Owner

Awesome! That totally makes sense. I think on first pass, I'll just migrate the weapon stats to strings and then, like you said, if we run into the situation where Damage Tables turns out to need the same we can totally switch that over too.

I've linked the PR so once that's merged, that should close this issue automatically. Don't hesitate to keep on opening issues!

Once I close an issue I know it kinda unfortunately cuts the conversation off, but you're more than welcome to use the discussions area to keep ideas going or chat through ideas in-between feature requests! Whatever works best! 😄

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

Successfully merging a pull request may close this issue.

2 participants