-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
Improve Pf2e creature support #447
Merged
Merged
Conversation
This file contains 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
- Move JsonTextReplacement.replaceText to JsonTextConverter. The implementation is the same between Pf2e and Dnd, so keep this as a default implementation to avoid repetition, and so that callers can use JsonTextConverter as the base type without casting to Pf2eTextConverter - Add a streamPropsExcluding helper method which provides a stream of properties from a JsonObject, excluding the given keys
- 🎨 Add a new Pf2eStat helper class with a value and note(s) to help standardize some things - 🐛 Shield alternate ACs are now read in correctly (previously the regular AC value was read in twice, so the tower shield etc would have incorrect entries) - 🐛 Make some default rendering closer to the canonical PF2e book style for shields, armor, hazards, and creature AC 💥 Breaking changes - ac.value now has the bare AC value - ac.alternateValues has a map of descriptions to alternate AC values - For armor, resource.dexCap now provides the max dex cap for armor, rather than it being represented as a generic named text entry within the AC - ac.armorClass and ac.note have been removed
- ✨ Correctly read in and display the HP and defenses values for creatures - Make QuteDataDefenses differentiate between the primary HP stats and the additional extra HP stats - Make the default displays for defenses and HpHardnessBt closer to the Pf2e book equivalents 💥 Breaking changes - Rename QuteDataHpHardness and friends to QuteDataHpHardnessBt - Access primary HP/hardness/bt with `resources.defenses.hpHardnessBt.hp.value`, `resources.defenses.hpHardnessBt.hardness.value`, and `resources.defenses.hpHardnessBt.brokenThreshold` - Access additional HP/hardness/bt values as a map of names to QuteDataHpHardnessBt
Avoids a small amount of repetition and keeps the interface consistent
Mostly cosmetic, just rearranges things and adds a new helper method for JsonNodeReader.getTextFrom which behaves like JsonNodeReader.getIntFrom
…e authors Currently, it has Integer.asBonus to format a number value as a bonus with a +/-, and String.capitalized.
Makes the method call more similar to other method calls
- 🧱 Move Pf2eTypeReader.Speed into a richer top-level class with more granular parsing options - ✨ Add more granular access to speed-related properties so template authors can customize the output - ✨ Add a more compact default representation for deity.avatar for template authors to use - 🎨 Move the existing multiline deity avatar representation into the deity2md template instead - 🐛 Fix a bug where shield value was incorrectly given regardless of whether the deity's avatar had a shield provided - 🐛 Fix a bug where deity avatar actions would have broken display for traits and have empty parens or "(, " because of traits which were empty strings - 🎨 Make default deity and speed representations closer to the book entries
miscoined
changed the title
Improve HP and AC support for creatures
Improve Pf2e creature support
May 11, 2024
ebullient
reviewed
May 11, 2024
Also update the .editorconfig to correctly turn the automatic removal of trailing whitespace off for these files
ebullient
approved these changes
May 11, 2024
Open
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.
This adds support for the following info for Pf2e creatures:
It also:
This has a fair number of breaking changes around AC/HP as I've restructured the way the data is handled - it's fairly opinionated, so please let me know if there's anything you don't agree with :)
Am also happy to split this into multiple PRs. I originally had the breaking changes in a separate PR, but apparently having another PR which is rebased off this one results in the other PR duplicating these commits, which doesn't seem desirable.
This covers the majority of the low-hanging fruit for field support. The remaining fields are: