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

Query: dnd1.2.0 Rolling a spell makes working out what level the spell was cast at tricky. #881

Closed
aaclayton opened this issue Dec 13, 2020 · 4 comments

Comments

@aaclayton
Copy link
Contributor

Originally in GitLab by @tposney

Prior to 1.2.0 and via actor.useSpell(), one could inspect the item that did the item.roll() to determine the spell level that was used to cast the spell.

It seems with the new scheme the only way to determine the spell level at which the spell was cast is to inspect the result.content of the item.roll() return.

It would be convenient for cast spells if the spell level was explicitly called out in the return value of the item.roll() call, since I want to use the dnd5e standard use/cast/consume code, rather than reinventing it.

@aaclayton
Copy link
Contributor Author

I understand the use case, but I don't have a good idea in mind at the moment for how to satisfy it. As a user of the API do you have a proposal that you would like to volunteer here?

@aaclayton
Copy link
Contributor Author

Originally in GitLab by @tposney

Since the item.roll() creates an item for the roll, which includes the new spell level (and potentially other info like the scaled saving throw if appropriate), perhaps always including the item/item.data as part of the returned ChatMessage/chatData would make sense.

@aaclayton
Copy link
Contributor Author

Originally in GitLab by @akrigline

mentioned in issue tposney/midi-qol#171

@aaclayton
Copy link
Contributor Author

Originally in GitLab by @akrigline

A band-aid fix for this issue which I implemented in Minimal Rolling Enhancments is to include spellLevel as a flag on the chat message returned from Item5e.roll.

This allows consumers of the chatMessageCreate hook to at least get the level of the spell without having to parse the DOM of the message.

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

No branches or pull requests

2 participants