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

feat(data): add injuries support to character data model #21

Merged
merged 6 commits into from
Aug 20, 2024

Conversation

NoahJGersh
Copy link
Contributor

@NoahJGersh NoahJGersh commented Aug 18, 2024

Partially addresses #5

Adding injury support to the character data model. While injuries themselves (among other conditions) should be Items or some other kind of EmbeddedDocument that lives in a character, we also want easy access to the number of injuries one has among their other conditions. We'll want a derived field for quick access to the number of injuries for Injury Rolls, as well as particular support for Injury Items.

Done:

  • Create derived injuries field in the common actor data model
  • Implement Injury item type
    • create additional fields to model an injury (such as duration)
  • Update Actor to derive injuries data from owned Injury items

@NoahJGersh NoahJGersh marked this pull request as ready for review August 20, 2024 06:21
@NoahJGersh
Copy link
Contributor Author

Work is completed on this PR. There's space for future improvements, like adding active effects support, but that's outside of the scope of this PR and the linked issue

Copy link
Collaborator

@stanavdb stanavdb left a comment

Choose a reason for hiding this comment

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

Looks good! Just one small change for localization.

Comment on lines 107 to 126
injuries: {
[InjuryDuration.FleshWound]: {
label: 'Flesh Wound',
durationFormula: '1',
},
[InjuryDuration.ShallowInjury]: {
label: 'Shallow Injury',
durationFormula: '1d6',
},
[InjuryDuration.ViciousInjury]: {
label: 'Vicious Injury',
durationFormula: '6d6',
},
[InjuryDuration.PermanentInjury]: {
label: 'Permanent Injury',
},
[InjuryDuration.Death]: {
label: 'Death',
},
},
Copy link
Collaborator

Choose a reason for hiding this comment

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

These labels need to be localized

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Whoops! Didn't notice that localization is in because I'm forked from main. I'll get those changes in shortly

@NoahJGersh
Copy link
Contributor Author

Alright, we're all localized now after a bit of repo rejiggering to be completely up-to-date with the release branch

@NoahJGersh NoahJGersh requested a review from stanavdb August 20, 2024 08:12
@stanavdb stanavdb merged commit 303093f into the-metalworks:release-0.1.0 Aug 20, 2024
1 check passed
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.

2 participants