mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-04-23 16:03:39 +02:00
1794 - Include Item Damage (#1827)
* Went ahead and made IncludeItemDamage work again, smashing the formulas together * . * Lint fix
This commit is contained in:
parent
e6d5a2f7d3
commit
fae05c24a8
5 changed files with 52 additions and 55 deletions
|
|
@ -72,8 +72,8 @@ export default class ActionSelectionDialog extends HandlebarsApplicationMixin(Ap
|
|||
|
||||
static async #onChooseAction(event, button) {
|
||||
const { actionId } = button.dataset;
|
||||
this.action = this.item.system.actionsList.find(a => a._id === actionId);
|
||||
Object.defineProperty(this.event, 'shiftKey', {
|
||||
this.#action = this.item.system.actionsList.find(a => a._id === actionId);
|
||||
Object.defineProperty(this.#event, 'shiftKey', {
|
||||
get() {
|
||||
return event.shiftKey;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ export default class DHActionBaseConfig extends DaggerheartSheet(ApplicationV2)
|
|||
context.openSection = this.openSection;
|
||||
context.tabs = this._getTabs(this.constructor.TABS);
|
||||
context.config = CONFIG.DH;
|
||||
if (this.action.hasDamage) {
|
||||
if (this.action.damage) {
|
||||
context.allDamageTypesUsed = !getUnusedDamageTypes(this.action.damage.parts).length;
|
||||
|
||||
if (this.action.damage.hasOwnProperty('includeBase') && this.action.type === 'attack')
|
||||
|
|
@ -302,7 +302,7 @@ export default class DHActionBaseConfig extends DaggerheartSheet(ApplicationV2)
|
|||
static addDamage(_event) {
|
||||
if (!this.action.damage.parts) return;
|
||||
|
||||
const choices = getUnusedDamageTypes(this.action.damage.parts);
|
||||
const choices = getUnusedDamageTypes(this.action._source.damage.parts);
|
||||
const content = new foundry.data.fields.StringField({
|
||||
label: game.i18n.localize('Damage Type'),
|
||||
choices,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue