This commit is contained in:
WBHarry 2025-11-23 15:20:04 +01:00 committed by GitHub
parent 81e7f24d22
commit e6a242ba43
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
208 changed files with 421 additions and 206 deletions

View file

@ -22,6 +22,7 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
_id: new fields.DocumentIdField({ initial: () => foundry.utils.randomID() }),
systemPath: new fields.StringField({ required: true, initial: 'actions' }),
type: new fields.StringField({ initial: undefined, readonly: true, required: true }),
baseAction: new fields.BooleanField({ initial: false }),
name: new fields.StringField({ initial: undefined }),
description: new fields.HTMLField(),
img: new fields.FilePathField({ initial: undefined, categories: ['IMAGE'], base64: false }),

View file

@ -258,7 +258,11 @@ export function ActionMixin(Base) {
const systemData = {
title: game.i18n.localize('DAGGERHEART.CONFIG.ActionType.action'),
origin: origin,
action: { name: this.name, img: this.img, tags: this.tags ? this.tags : ['Spell', 'Arcana', 'Lv 10'] },
action: {
name: this.name,
img: this.baseAction ? this.parent.parent.img : this.img,
tags: this.tags ? this.tags : ['Spell', 'Arcana', 'Lv 10']
},
itemOrigin: this.item,
description: this.description || (this.item instanceof Item ? this.item.system.description : '')
};

View file

@ -51,6 +51,8 @@ export default class DHWeapon extends AttachableItem {
name: 'Attack',
img: 'icons/skills/melee/blood-slash-foam-red.webp',
_id: foundry.utils.randomID(),
baseAction: true,
chatDisplay: false,
systemPath: 'attack',
type: 'attack',
range: 'melee',