[#893] Add summoning actor updates & overall workflow #3217
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Moves the summoning data into an
EmbeddedDataField
to allow for the summoning methods to be defined there rather than taking up a bunch of space inActionTemplate
.Introduces
SummonsData#summon
method which takes the ID of a summoning profile and proceeds through the process of summoning the actor:Fetches the actor to summon based on the profile. This will eventually need some extra work to handle summoning from compendiums.
Minimizes the actor sheet (if open) and determine placement on scene. Currently the placement is a placeholder method that just places the summons in a fixed position.
Iterates over all token placements, requesting updates that will be made to the actor and its contained items for each placement.
ac.flat
value if calc isflat
, otherwise it uses an active effect to apply toac.bonus
hp.max
unless summoned creature is a PC without an overriden maximum HP, in which case it uses an effectSynthesizes token data with the updates.
Once all tokens are ready, maximizes the sheet if it was previously minimized and creates token documents on the scene.