diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 71d48111..e4653fb6 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,34 +1,49 @@ --- -name: Bug report -about: Create a bug report to help us identify issues and resolve them -title: "[Bug] " -labels: bug -type: bug +name: 🐛 Bug Report +about: Create a report to help us improve +title: '[BUG] ' +labels: 'bug' assignees: '' --- -**Describe the bug** -A clear and concise description of what the bug is. +## Bug Description + + + +## Steps To Reproduce + + -**To Reproduce** -Steps to reproduce the behavior: 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' 4. See error -**Expected behavior** -A clear and concise description of what you expected to happen. +## Expected Behavior -**Screenshots** -If applicable, add screenshots to help explain your problem. + -**Setup Information:** - - OS: [e.g. iOS, Windows] - - Browser [e.g. chrome, safari] - - Foundry Version [e.g. v13 b342] -- System Version [e.g. v.1.0, v.1.0.1] +## Actual Behavior + -**Additional context** -Add any other context about the problem here. \ No newline at end of file +## Screenshots + + + +## Environment + + + +- Foundry VTT Version: [e.g. 12.331] +- Daggerheart System Version: [e.g. 1.0.0] +- Browser: [e.g. Chrome, Firefox, Edge] +- OS: [e.g. Windows, macOS, Linux] + +## Additional Context + + + +## Possible Solution + + diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..d1453094 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,46 @@ +## Description + + + +## Type of Change + + + +- [ ] 🐛 Bug fix (non-breaking change which fixes an issue) +- [ ] ✨ New feature (non-breaking change which adds functionality) +- [ ] 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected) +- [ ] 📝 Documentation update +- [ ] 🎨 UI/UX improvement +- [ ] 🔧 Code refactoring +- [ ] ⚡ Performance improvement + +## Testing + + + +- [ ] I have tested this locally in Foundry VTT +- [ ] All existing tests pass +- [ ] I have added tests that prove my fix is effective or that my feature works + +## Screenshots (if applicable) + + + +## Checklist + +- [ ] My code follows the project's style guidelines +- [ ] I have performed a self-review of my code +- [ ] I have commented my code, particularly in hard-to-understand areas +- [ ] I have made corresponding changes to the documentation +- [ ] My changes generate no new warnings +- [ ] Any dependent changes have been merged and published + +## Related Issues + + + +Fixes # + +## Additional Notes + + diff --git a/module/data/action/attackAction.mjs b/module/data/action/attackAction.mjs index a2d47309..c242dd0f 100644 --- a/module/data/action/attackAction.mjs +++ b/module/data/action/attackAction.mjs @@ -11,9 +11,13 @@ export default class DHAttackAction extends DHDamageAction { prepareData() { super.prepareData(); if (!!this.item?.system?.attack) { + // In v14, we only allow a single instance of damage + // If includeBase is checked, use the weapon's damage instead of the action's damage if (this.damage.includeBase) { const baseDamage = this.getParentDamage(); - this.damage.parts.unshift(new DHDamageData(baseDamage)); + // Replace the action damage with the weapon's base damage + this.damage.parts = new Map(); + this.damage.parts.set('hitPoints', new DHDamageData(baseDamage)); } if (this.roll.useDefault) { this.roll.trait = this.item.system.attack.roll.trait; diff --git a/module/data/fields/action/damageField.mjs b/module/data/fields/action/damageField.mjs index 30a5ad7c..6b79b56b 100644 --- a/module/data/fields/action/damageField.mjs +++ b/module/data/fields/action/damageField.mjs @@ -16,7 +16,7 @@ export default class DamageField extends fields.SchemaField { parts: new IterableTypedObjectField(DHDamageData), includeBase: new fields.BooleanField({ initial: false, - label: 'DAGGERHEART.ACTIONS.Settings.includeBase.label' + label: 'DAGGERHEART.ACTIONS.Settings.useItemDamage.label' }), direct: new fields.BooleanField({ initial: false, label: 'DAGGERHEART.CONFIG.DamageType.direct.name' }), groupAttack: new fields.StringField({