feat: add resource automatic cost modification on attack or action

Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
This commit is contained in:
Gergely Brautigam 2026-07-04 12:25:16 +02:00
parent eccab6ad64
commit e9e8d2bd59
No known key found for this signature in database
GPG key ID: 3763870D61A6E2CA
7 changed files with 25 additions and 4 deletions

View file

@ -5,6 +5,9 @@ export default class WeaponSheet extends ItemAttachmentSheet(DHBaseItemSheet) {
/**@inheritdoc */
static DEFAULT_OPTIONS = {
classes: ['weapon'],
actions: {
configureAttack: WeaponSheet.#configureAttack
},
tagifyConfigs: [
{
selector: '.features-input',
@ -46,6 +49,13 @@ export default class WeaponSheet extends ItemAttachmentSheet(DHBaseItemSheet) {
return context;
}
/**
* Open the action configuration sheet for the weapon's base attack.
*/
static #configureAttack() {
this.document.system.attack.sheet.render({ force: true });
}
/**
* Callback function used by `tagifyElement`.
* @param {Array<Object>} selectedOptions - The currently selected tag objects.