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

Use Item RollData for resource recovery instead of Actor RollData #4197

Closed
roth-michael opened this issue Sep 11, 2024 · 4 comments · Fixed by #4198
Closed

Use Item RollData for resource recovery instead of Actor RollData #4197

roth-michael opened this issue Sep 11, 2024 · 4 comments · Fixed by #4198
Assignees
Labels
Milestone

Comments

@roth-michael
Copy link
Contributor

If I understand correctly, the only difference between an Item's rollData and an Actor's is that the item also has access to its own relevant info. It would be nice to be able to put in @item.uses.max / 2 as a recovery formula - right now it's limited to only Actor rollData.

@arbron
Copy link
Collaborator

arbron commented Sep 11, 2024

Looks like that is already the case in 3.3, and will continue to be the case in 4.0.

// 3.3
const roll = new Roll(uses.recovery, item.getRollData());

// 4.0
const rollData = this.activity.getRollData();

@roth-michael
Copy link
Contributor Author

Hmm, not seeing it there - where's that 4.0 line? Looking at line 2716 of actor.mjs

@roth-michael
Copy link
Contributor Author

(Added a PR to demonstrate what I mean, since it's just a one-liner)

@arbron
Copy link
Collaborator

arbron commented Sep 11, 2024

Oop, I was looking at consumption not recovery for the 4.0 code :P

@arbron arbron added this to the D&D5E 4.0.0 milestone Sep 12, 2024
@arbron arbron added the api label Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants