-
Notifications
You must be signed in to change notification settings - Fork 25
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
Unarmed Stike Fails to Roll #157
Comments
@zithith this issue seems to happen explicitly when a damage item has no dice. Since the graze formula (unless overriden) calls @damage.dice automatically, it breaks with this error when parsing the roll: |
Damn. Should have checked that case. I was testing using unarmed for so long at the beginning I forgot to go back and check after I changed the default formula. ... I don't think there's a clever/neat way to do this. My guess for now would be to extend the turnery statement that sets the graze formula/replace it with a proper branching block that so that it checks if the dice only roll has any dice, then selects that, and if it doesn't it checks to see if there is a numeric term as the first term of the base pool, then we'd need to extract that?... and if not that, then return? |
Couldn't we just fill the |
Possibly, but then your graze damage value for unarmed would be 0, which isn't right
|
Could we take the first numeric term if there's no dice terms, and if there's no numeric terms fall back to 0? |
I guess so. Might be the best compromise solution. I think basically if there's anything going awry after this we can fairly comfortably just claim the item instance was configured poorly
|
Actually, having given it some more thought, the best solution is to have |
@zithith Are you picking this one up? (If so could you self assign) |
Yeah, I could do this tonight, will grab it |
Yeah I think this works. Will need to honour the scaling damage on the unarmed attack though |
That should just happen automatically though right? If |
It'll rely on the output of #91 but I think the point stands about the fact that we just manually override the unarmed item by default. |
@zithith i would make it @ unarmed or @unarmed.dice (which could also be derived to a flat number ofc). all the formula attributes i've ever seen are single words or dot-connected, it looks weird for it to be 2 words and i'm not confident non programmer types would remember the camel casing. Plus it's just easier to remember |
Btw another simply way to resolve this would be to just make the basic unarmed damage 1d1, which would still be a 1 but count as a die term 😅 |
I... I don't hate this 😂 Or whatever the term is. I appreciate unarmedDamage is unlikely to make the cut, it was just for demonstration purposes. This can be decided in #91 |
Describe the bug
UnarmStrike Fails to roll or output to chat.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Unarmed attack should roll (even if it just uses flat damage and not the scaling damage)
Screenshots
Foundry VTT Version
12.331
Cosmere RPG System Version
0.2.0
Browser
Chrome
Additional context
Tried with a new PC and a already created on from the last update. Same issue
Checklist:
The text was updated successfully, but these errors were encountered: