[#6121, #6646] Add support for multiple AC formulas#6658
Open
[#6121, #6646] Add support for multiple AC formulas#6658
Conversation
Collaborator
Author
|
Currently a draft to show the change to the data models and migrations required. Will need to re-write the AC configuration dialog before this can be merged. |
Modifies how armor class data is stored to use multiple formulas rather than only having a single formula that is evaluated. This change means that all enabled formulas are evaluated fully and the one that provides the highest base AC is used. This also allows armor class formulas to define whether they are usable when the character is wearing armor or wielding a shield. This makes all of the existing unarmoed defense formulas work as expected. In order to ensure that the previous `flat` calculation properly overrides the full AC it has been moved to a separate `override` value. The existing `flat` input is retained to provide a place for players to manually enter a value that can be used in formulas (like the Natural Armor formula). Migrations are in place to move the existing actor data to use the new data structure and shims are added to ensure existing active effects that target AC will continue working. The removed `calc` and `formula` fields are still set by the winning calculation so no shims are required. Closes #6121 Closes #6646
Modifies the AC config dialog to be able to choose the selected formulas and add custom formulas. Also fixes a migration issue with custom formulas and an issue causing excess evaluation warnings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Modifies how armor class data is stored to use multiple formulas rather than only having a single formula that is evaluated. This change means that all enabled formulas are evaluated fully and the one that provides the highest base AC is used.
This also allows armor class formulas to define whether they are usable when the character is wearing armor or wielding a shield. This makes all of the existing unarmoed defense formulas work as expected.
In order to ensure that the previous
flatcalculation properly overrides the full AC it has been moved to a separateoverridevalue. The existingflatinput is retained to provide a place for players to manually enter a value that can be used in formulas (like the Natural Armor formula).Migrations are in place to move the existing actor data to use the new data structure and shims are added to ensure existing active effects that target AC will continue working. The removed
calcandformulafields are still set by the winning calculation so no shims are required.Closes #6121
Closes #6646