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 roll formula not being displayed in roll tags #499

Merged
merged 11 commits into from
Mar 29, 2024

Conversation

apewall
Copy link
Contributor

@apewall apewall commented Jan 22, 2024

This updates the roll tags on abilities and spells so roll formulas can be displayed in the footer cards properly if they include @attributes.

Regarding #488. Duration and Range could likely be calculated similarly but they would probably need to return totals instead and involve adding additional data for turns/rounds/ft etc.

Before when using a 2nd level character:
image

After:
image

@apewall apewall requested a review from wyrmisis February 13, 2024 01:04
Copy link
Collaborator

@wyrmisis wyrmisis left a comment

Choose a reason for hiding this comment

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

Left a question/request, but I'm good with this if what I'm asking for can't be done.

src/module/item/data-model-ability.js Outdated Show resolved Hide resolved
@apewall apewall requested a review from wyrmisis February 15, 2024 19:14
Copy link
Member

@anthonyronda anthonyronda left a comment

Choose a reason for hiding this comment

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

LGTM

I noted that there might be a merge conflict while trying to merge after #497, which I can take care of

src/templates/chat/item-card.html Outdated Show resolved Hide resolved
@@ -188,9 +188,8 @@ export default class OseItem extends Item {

_getRollTag(data) {
if (data.roll) {
const roll = `${data.roll}${
data.rollTarget ? CONFIG.OSE.roll_type[data.rollType] : ""
}${data.rollTarget ? data.rollTarget : ""}`;
Copy link
Member

Choose a reason for hiding this comment

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

Same as in #497 (not a problem)

src/module/item/entity.js Outdated Show resolved Hide resolved
@apewall
Copy link
Contributor Author

apewall commented Mar 29, 2024

LGTM

I noted that there might be a merge conflict while trying to merge after #497, which I can take care of

Sounds good, these ended up related and I forgot to update the formatting on this. 👍

@anthonyronda anthonyronda merged commit d7e3313 into vttred:main Mar 29, 2024
@anthonyronda anthonyronda mentioned this pull request Apr 1, 2024
1 task
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.

3 participants