diff --git a/lang/en.json b/lang/en.json index 3f21f5eb..a4a5edf0 100755 --- a/lang/en.json +++ b/lang/en.json @@ -2010,8 +2010,7 @@ "Attachments": { "attachHint": "Drop items here to attach them", "transferHint": "If checked, this effect will be applied to any actor that owns this Effect's parent Item. The effect is always applied if this Item is attached to another one." - }, - "OriginTag": "Origin: {name}" + } }, "GENERAL": { "Ability": { diff --git a/module/applications/sheets/api/application-mixin.mjs b/module/applications/sheets/api/application-mixin.mjs index 0168f46d..d89237df 100644 --- a/module/applications/sheets/api/application-mixin.mjs +++ b/module/applications/sheets/api/application-mixin.mjs @@ -518,7 +518,7 @@ export default function DHApplicationMixin(Base) { const doc = await getDocFromElement(target), action = doc?.system?.attack ?? doc; const config = action.prepareConfig(event); - config.effects = await game.system.api.data.actions.actionsTypes.base.getActionRelevantEffects( + config.effects = await game.system.api.data.actions.actionsTypes.base.getEffects( this.document, doc ); @@ -603,7 +603,7 @@ export default function DHApplicationMixin(Base) { const doc = await fromUuid(itemUuid); //get inventory-item description element - const descriptionElement = el.querySelector('.inventory-description'); + const descriptionElement = el.querySelector('.invetory-description'); if (!doc || !descriptionElement) continue; // localize the description (idk if it's still necessary) diff --git a/module/applications/sheets/api/base-actor.mjs b/module/applications/sheets/api/base-actor.mjs index 007b641b..e65745c0 100644 --- a/module/applications/sheets/api/base-actor.mjs +++ b/module/applications/sheets/api/base-actor.mjs @@ -212,7 +212,7 @@ export default class DHBaseActorSheet extends DHApplicationMixin(ActorSheetV2) { const doc = await getDocFromElement(target), action = doc?.system?.attack ?? doc; const config = action.prepareConfig(event); - config.effects = await game.system.api.data.actions.actionsTypes.base.getActionRelevantEffects( + config.effects = await game.system.api.data.actions.actionsTypes.base.getEffects( this.document, doc ); diff --git a/module/applications/ui/countdowns.mjs b/module/applications/ui/countdowns.mjs index 5cf79100..d559582f 100644 --- a/module/applications/ui/countdowns.mjs +++ b/module/applications/ui/countdowns.mjs @@ -342,31 +342,29 @@ export default class DhCountdowns extends HandlebarsApplicationMixin(Application * Sends updates of the countdowns to the GM player. Since this is asynchronous, be sure to * update all the countdowns at the same time. * - * @param {...(string | { type: string; undo?: boolean })} progressTypes Countdowns to be updated + * @param {...any} progressTypes Countdowns to be updated */ static async updateCountdowns(...progressTypes) { - progressTypes = progressTypes.map(p => typeof p === 'string' ? { type: p } : p); const { countdownAutomation } = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Automation); if (!countdownAutomation) return; const countdownSetting = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Countdowns); const updatedCountdowns = Object.keys(countdownSetting.countdowns).reduce((acc, key) => { const countdown = countdownSetting.countdowns[key]; - const progressData = progressTypes.find(x => x.type === countdown.progress.type); - if (progressData && countdown.progress.current > 0) { - acc[key] = { value: progressData.undo ? 1 : -1 }; + if (progressTypes.indexOf(countdown.progress.type) !== -1 && countdown.progress.current > 0) { + acc.push(key); } return acc; - }, {}); + }, []); const countdownData = countdownSetting.toObject(); const settings = { ...countdownData, countdowns: Object.keys(countdownData.countdowns).reduce((acc, key) => { const countdown = foundry.utils.deepClone(countdownData.countdowns[key]); - if (updatedCountdowns[key]) { - countdown.progress.current += updatedCountdowns[key].value; + if (updatedCountdowns.includes(key)) { + countdown.progress.current -= 1; } acc[key] = countdown; diff --git a/module/data/action/baseAction.mjs b/module/data/action/baseAction.mjs index f3008704..ea4361b9 100644 --- a/module/data/action/baseAction.mjs +++ b/module/data/action/baseAction.mjs @@ -54,10 +54,6 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel return {}; } - get hasDescription() { - return Boolean(this.description); - } - /** * Create a Map containing each Action step based on fields define in schema. Ordered by Fields order property. * @@ -232,8 +228,7 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel let config = this.prepareConfig(event, configOptions); if (!config) return; - config.effects = - await game.system.api.data.actions.actionsTypes.base.getActionRelevantEffects(this.actor, this.item); + config.effects = await game.system.api.data.actions.actionsTypes.base.getEffects(this.actor, this.item); if (Hooks.call(`${CONFIG.DH.id}.preUseAction`, this, config) === false) return; @@ -338,45 +333,27 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel } /** - * Get the all potentially applicable effects on the actor for the action's RollDialog + * Get the all potentially applicable effects on the actor * @param {DHActor} actor The actor performing the action * @param {DHItem|DhActor} effectParent The parent of the effect * @returns {DhActiveEffect[]} */ - static async getActionRelevantEffects(actor, effectParent) { + static async getEffects(actor, effectParent) { if (!actor) return []; - // Changes on weapon effects are not typically only applicable to show in the roll dialog for the weapon itself - // The exemptions to this rule are listed below - const weaponTransferredEffectKeys = [ - 'system.bonuses.roll.spellcast.bonus' - ]; - - const results = []; - const applicableEffects = await actor.allApplicableEffects({ noTransferArmor: true, noSelfArmor: true }); - for (const effect of [...applicableEffects].filter(e => !e.isSuppressed)) { - if (effect.parent.type === 'weapon') { - // Effects on weapons only ever apply for the weapon itself (with a few exceptions) - const restricted = - effect.parent.system.secondary - // Secondary applies only to other primary weapons - ? effectParent?.type !== 'weapon' || effectParent?.system.secondary - // Primary only applies to itself - : effectParent?.id !== effect.parent.id; - if (restricted) { - const sourceChanges = effect._source.system.changes; - const changes = sourceChanges.filter(x => weaponTransferredEffectKeys.includes(x.key)); - if (changes.length) { - results.push(effect.clone({ 'system.changes': changes })); - } - continue; + return Array.from(await actor.allApplicableEffects({ noTransferArmor: true, noSelfArmor: true })).filter( + effect => { + /* Effects on weapons only ever apply for the weapon itself */ + if (effect.parent.type === 'weapon') { + /* Unless they're secondary - then they apply only to other primary weapons */ + if (effect.parent.system.secondary) { + if (effectParent?.type !== 'weapon' || effectParent?.system.secondary) return false; + } else if (effectParent?.id !== effect.parent.id) return false; } - } - - results.push(effect); - } - return results; + return !effect.isSuppressed; + } + ); } /** diff --git a/module/data/item/armor.mjs b/module/data/item/armor.mjs index 15bb620d..21c56f9a 100644 --- a/module/data/item/armor.mjs +++ b/module/data/item/armor.mjs @@ -52,10 +52,6 @@ export default class DHArmor extends AttachableItem { ); } - get itemFeatures() { - return this.armorFeatures; - } - /**@inheritdoc */ async getDescriptionData() { const baseDescription = this.description; @@ -173,4 +169,8 @@ export default class DHArmor extends AttachableItem { const labels = [`${game.i18n.localize('DAGGERHEART.ITEMS.Armor.baseScore')}: ${this.armor.max}`]; return labels; } + + get itemFeatures() { + return this.armorFeatures; + } } diff --git a/module/data/item/weapon.mjs b/module/data/item/weapon.mjs index 39c0fc8e..84e4de7f 100644 --- a/module/data/item/weapon.mjs +++ b/module/data/item/weapon.mjs @@ -113,10 +113,6 @@ export default class DHWeapon extends AttachableItem { ); } - get itemFeatures() { - return this.weaponFeatures; - } - /**@inheritdoc */ async getDescriptionData() { const baseDescription = this.description; @@ -273,4 +269,8 @@ export default class DHWeapon extends AttachableItem { return labels; } + + get itemFeatures() { + return this.weaponFeatures; + } } diff --git a/module/dice/helpers.mjs b/module/dice/helpers.mjs index d03970d0..5f8a7bbb 100644 --- a/module/dice/helpers.mjs +++ b/module/dice/helpers.mjs @@ -1,28 +1,19 @@ import { ResourceUpdateMap } from '../data/action/baseAction.mjs'; export function updateResourcesForDualityReroll(oldDuality, newDuality, actor) { + const { hopeFear } = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Automation); + if (game.user.isGM ? !hopeFear.gm : !hopeFear.players) return; + + const updates = []; const hope = (newDuality >= 0 ? 1 : 0) - (oldDuality >= 0 ? 1 : 0); const stress = (newDuality === 0 ? 1 : 0) - (oldDuality === 0 ? 1 : 0); const fear = (newDuality === -1 ? 1 : 0) - (oldDuality === -1 ? 1 : 0); - const { hopeFear, countdownAutomation } = - game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Automation); + if (hope !== 0) updates.push({ key: 'hope', value: hope, enabled: true }); + if (stress !== 0) updates.push({ key: 'stress', value: -1 * stress, enabled: true }); + if (fear !== 0) updates.push({ key: 'fear', value: fear, enabled: true }); - if (game.user.isGM ? hopeFear.gm : hopeFear.players) { - const updates = []; - if (hope !== 0) updates.push({ key: 'hope', value: hope, enabled: true }); - if (stress !== 0) updates.push({ key: 'stress', value: -1 * stress, enabled: true }); - if (fear !== 0) updates.push({ key: 'fear', value: fear, enabled: true }) - - const resourceUpdates = new ResourceUpdateMap(actor); - resourceUpdates.addResources(updates); - resourceUpdates.updateResources(); - } - - if (countdownAutomation && fear !== 0) { - game.system.api.applications.ui.DhCountdowns.updateCountdowns({ - type: CONFIG.DH.GENERAL.countdownProgressionTypes.fear.id, - undo: fear === 1 ? false : true - }); - } + const resourceUpdates = new ResourceUpdateMap(actor); + resourceUpdates.addResources(updates); + resourceUpdates.updateResources(); } diff --git a/module/documents/activeEffect.mjs b/module/documents/activeEffect.mjs index 4a9f3cc4..0e7f5d1e 100644 --- a/module/documents/activeEffect.mjs +++ b/module/documents/activeEffect.mjs @@ -65,10 +65,6 @@ export default class DhActiveEffect extends foundry.documents.ActiveEffect { ); } - get hasDescription() { - return Boolean(this.description); - } - /* -------------------------------------------- */ /* Event Handlers */ /* -------------------------------------------- */ @@ -228,13 +224,12 @@ export default class DhActiveEffect extends foundry.documents.ActiveEffect { * @returns {string[]} An array of localized tag strings. */ _getTags() { - const tags = []; - const originActor = DhActiveEffect.#resolveParentDocument(fromUuidSync(this.origin, { strict: false }), Actor); - if (originActor && originActor !== this.actor) { - tags.push(_loc('DAGGERHEART.EFFECTS.OriginTag', { name: originActor.name })); - } else if (!(this.parent instanceof Actor)) { - tags.push(`${_loc(this.parent.system.metadata.label)}: ${this.parent.name}`); - } + const tags = [ + `${game.i18n.localize(this.parent.system.metadata.label)}: ${this.parent.name}`, + game.i18n.localize( + this.isTemporary ? 'DAGGERHEART.EFFECTS.Duration.temporary' : 'DAGGERHEART.EFFECTS.Duration.passive' + ) + ]; for (const statusId of this.statuses) { const status = CONFIG.statusEffects.find(s => s.id === statusId); diff --git a/module/documents/actor.mjs b/module/documents/actor.mjs index 8ef64f65..1642ed30 100644 --- a/module/documents/actor.mjs +++ b/module/documents/actor.mjs @@ -549,7 +549,7 @@ export default class DhpActor extends Actor { headerTitle: game.i18n.format('DAGGERHEART.UI.Chat.dualityRoll.abilityCheckTitle', { ability: abilityLabel }), - effects: await game.system.api.data.actions.actionsTypes.base.getActionRelevantEffects(this), + effects: await game.system.api.data.actions.actionsTypes.base.getEffects(this), roll: { trait: trait, type: 'trait' diff --git a/module/documents/chatMessage.mjs b/module/documents/chatMessage.mjs index b555dfca..480f8c69 100644 --- a/module/documents/chatMessage.mjs +++ b/module/documents/chatMessage.mjs @@ -167,7 +167,7 @@ export default class DhpChatMessage extends foundry.documents.ChatMessage { if (this.system.action) { const actor = await foundry.utils.fromUuid(config.source.actor); const item = actor?.items.get(config.source.item) ?? null; - config.effects = await game.system.api.data.actions.actionsTypes.base.getActionRelevantEffects(actor, item); + config.effects = await game.system.api.data.actions.actionsTypes.base.getEffects(actor, item); await this.system.action.workflow.get('damage')?.execute(config, this._id, true); } } diff --git a/module/documents/combat.mjs b/module/documents/combat.mjs index e74127e9..20996b77 100644 --- a/module/documents/combat.mjs +++ b/module/documents/combat.mjs @@ -46,9 +46,7 @@ export default class DhpCombat extends Combat { for (let actor of actors) { await actor.createEmbeddedDocuments( 'ActiveEffect', - effects - .filter(x => x.effectTargetTypes.includes(actor.type)) - .map(x => foundry.utils.deepClone(x)) + effects.filter(x => x.effectTargetTypes.includes(actor.type)) ); } } else { diff --git a/module/documents/item.mjs b/module/documents/item.mjs index 14717538..32543ebd 100644 --- a/module/documents/item.mjs +++ b/module/documents/item.mjs @@ -89,10 +89,6 @@ export default class DHItem extends foundry.documents.Item { return !pack?.locked && this.isOwner && isValidType && hasActions; } - get hasDescription() { - return Boolean(this.system.description) || Boolean(this.system.itemFeatures?.length); - } - /** @inheritdoc */ static async createDialog(data = {}, createOptions = {}, options = {}) { const { folders, types, template, context = {}, ...dialogOptions } = options; diff --git a/styles/less/global/inventory-item.less b/styles/less/global/inventory-item.less index fc73ba95..ba73be76 100644 --- a/styles/less/global/inventory-item.less +++ b/styles/less/global/inventory-item.less @@ -43,19 +43,16 @@ } } - .item-main { - border-radius: 5px; - padding: 2px; - margin: -2px; - } - &:hover { .inventory-item-header .item-label .item-name .expanded-icon { margin-left: 10px; display: inline-block; } - .item-main { - background: light-dark(@dark-blue-40, @golden-40); + &:has(.inventory-item-content.extensible) { + .inventory-item-header, + .inventory-item-content { + background: light-dark(@dark-blue-40, @golden-40); + } } &:has(.inventory-item-content.extended) { .inventory-item-header .item-label .item-name .expanded-icon { @@ -63,6 +60,19 @@ } } } + + &:has(.inventory-item-content.extensible) { + .inventory-item-header { + border-radius: 5px 5px 0 0; + } + .inventory-item-content { + border-radius: 0 0 5px 5px; + } + } + + &:not(:has(.inventory-item-content.extensible)) .inventory-item-header { + border-radius: 5px; + } } .inventory-item-header, @@ -161,7 +171,7 @@ grid-template-rows: 1fr; padding-top: 4px; } - .inventory-description { + .invetory-description { overflow: hidden; h1 { @@ -273,6 +283,22 @@ } } + /* + * Styles for the non-compact version so that the hover looks nicer. + * Because of overflow, it is best if the containing element has some top and left padding. + */ + .inventory-item:not(.inventory-item-compact) { + .inventory-item-header { + padding-top: 3px; + margin-top: -3px; + } + > * { + padding-left: 3px; + padding-right: 3px; + margin-left: -3px; + } + } + .card-item { position: relative; height: 120px; diff --git a/styles/less/global/prose-mirror.less b/styles/less/global/prose-mirror.less index fc8e49f9..cac0b8e7 100644 --- a/styles/less/global/prose-mirror.less +++ b/styles/less/global/prose-mirror.less @@ -3,8 +3,8 @@ .application.daggerheart { prose-mirror { - --menu-padding: 4px 0px; - --menu-height: calc(var(--menu-button-height) + 8px); + --menu-padding: 0; + --menu-height: var(--menu-button-height); height: 100% !important; width: 100%; diff --git a/styles/less/sheets/actors/adversary/index.less b/styles/less/sheets/actors/adversary/index.less index a05af854..dbaa901f 100644 --- a/styles/less/sheets/actors/adversary/index.less +++ b/styles/less/sheets/actors/adversary/index.less @@ -1,4 +1,45 @@ -@import './sheet.less'; +@import '../../../utils/colors.less'; +@import '../../../utils/fonts.less'; + +.application.sheet.daggerheart.actor.dh-style.adversary { + --left-indent: 15px; + + .window-content { + display: grid; + grid-template-columns: 275px 1fr; + grid-template-rows: auto 1fr; + height: 100%; + width: 100%; + padding-bottom: 0; + } + + .adversary-sidebar-sheet { + grid-row: 1 / span 2; + grid-column: 1; + overflow: hidden; + display: flex; + flex-direction: column; + } + + .adversary-header-sheet { + grid-row: 1; + grid-column: 2; + } + + .tab { + grid-row: 2; + grid-column: 2; + &.active { + overflow: hidden; + display: flex; + flex-direction: column; + padding: 0; + margin-right: 1px; + margin-bottom: 12px; + } + } +} + @import './header.less'; @import './features.less'; @import './sidebar.less'; diff --git a/styles/less/sheets/actors/adversary/sheet.less b/styles/less/sheets/actors/adversary/sheet.less deleted file mode 100644 index 9a284a26..00000000 --- a/styles/less/sheets/actors/adversary/sheet.less +++ /dev/null @@ -1,41 +0,0 @@ -@import '../../../utils/colors.less'; -@import '../../../utils/fonts.less'; - -.application.sheet.daggerheart.actor.dh-style.adversary { - --left-indent: 15px; - - .window-content { - display: grid; - grid-template-columns: 275px 1fr; - grid-template-rows: auto 1fr; - height: 100%; - width: 100%; - padding-bottom: 0; - } - - .adversary-sidebar-sheet { - grid-row: 1 / span 2; - grid-column: 1; - overflow: hidden; - display: flex; - flex-direction: column; - } - - .adversary-header-sheet { - grid-row: 1; - grid-column: 2; - } - - .tab { - grid-row: 2; - grid-column: 2; - &.active { - overflow: hidden; - display: flex; - flex-direction: column; - padding: 0; - margin-right: 1px; - margin-bottom: 12px; - } - } -} \ No newline at end of file diff --git a/system.json b/system.json index 4660a196..f5e13a62 100644 --- a/system.json +++ b/system.json @@ -2,7 +2,7 @@ "id": "daggerheart", "title": "Daggerheart", "description": "An unofficial implementation of the Daggerheart system", - "version": "2.4.1", + "version": "2.3.4", "compatibility": { "minimum": "14.364", "verified": "14.364", @@ -10,7 +10,7 @@ }, "url": "https://github.com/Foundryborne/daggerheart", "manifest": "https://raw.githubusercontent.com/Foundryborne/daggerheart/v14/system.json", - "download": "https://github.com/Foundryborne/daggerheart/releases/download/2.4.1/system.zip", + "download": "https://github.com/Foundryborne/daggerheart/releases/download/2.3.4/system.zip", "authors": [ { "name": "WBHarry" diff --git a/templates/sheets/global/partials/inventory-item-V2.hbs b/templates/sheets/global/partials/inventory-item-V2.hbs index 775690d4..f7d22a30 100644 --- a/templates/sheets/global/partials/inventory-item-V2.hbs +++ b/templates/sheets/global/partials/inventory-item-V2.hbs @@ -25,146 +25,146 @@ Parameters: data-type="{{type}}" data-item-type="{{item.type}}" data-item-uuid="{{item.uuid}}" data-no-compendium-edit="{{noCompendiumEdit}}" > -
-
- {{!-- Image --}} -
- - {{#if (and item.usable (ne showActions false))}} - {{#if @root.isNPC}} - d20 - {{else}} - 2d12 - {{/if}} - {{/if}} -
- - {{!-- Name & Tags --}} -
- {{!-- Item Name --}} - {{localize item.name}} {{#unless (or noExtensible (not item.hasDescription))}}{{/unless}} - - {{!-- Tags Start --}} - {{#if (not hideTags)}} - {{#> "systems/daggerheart/templates/sheets/global/partials/item-tags.hbs" item}} - {{#if (and (eq ../type 'feature') system.featureForm (ne @root.document.type "character"))}} -
- {{localize (concat "DAGGERHEART.CONFIG.FeatureForm." system.featureForm)}} -
- {{/if}} - {{/ "systems/daggerheart/templates/sheets/global/partials/item-tags.hbs"}} - {{/if}} - - {{!--Tags End --}} -
- - {{!-- Simple Resource --}} - {{#if (and (not hideResources) (not (eq item.system.resource.type 'diceValue')))}} - {{> "systems/daggerheart/templates/sheets/global/partials/item-resource.hbs"}} - {{/if}} - {{#if (or isQuantifiable (or (eq item.system.quantity 0) (gt item.system.quantity 1)))}} -
- -
- {{/if}} - - {{!-- Controls --}} - {{#unless hideControls}} -
- {{!-- Toggle/Equip buttons --}} - {{#if @root.editable}} - {{#if (and (eq actorType 'character') (eq type 'weapon'))}} - - - - {{/if}} - {{#if (and (eq actorType 'character') (eq type 'armor'))}} - - - - {{/if}} - {{#if (and (eq type 'domainCard'))}} - - - - {{/if}} - {{#if (and (and (eq type 'effect') (not (eq item.type 'beastform'))))}} - - - - {{/if}} - {{/if}} - - {{!-- Send to Chat --}} - {{#if (hasProperty item "toChat")}} - - - - {{/if}} - - {{!-- Document management buttons or context menu --}} - {{#if (and (not isActor) (not hideContextMenu))}} - - - - {{else if (and @root.editable (not hideModifyControls))}} - - - - {{#if (not isActor)}} - - - - {{else if (eq type 'adversary')}} - - - - {{/if}} - {{/if}} -
- {{/unless}} -
- {{#unless hideDescription}} -
- {{!-- Description --}} -
-
- {{/unless}} -
- {{!-- Dice Resource --}} - {{#if (and (not hideResources) (eq item.system.resource.type 'diceValue'))}} - {{> "systems/daggerheart/templates/sheets/global/partials/item-resource.hbs"}} - {{/if}} - {{!-- Actions Buttons --}} - {{#if (and showActions item.system.actions.size)}} -
- {{#each item.system.actions as | action |}} -
- {{#if (and (eq action.type 'beastform') @root.beastformActive)}} - +
+ {{!-- Image --}} +
+ + {{#if (and item.usable (ne showActions false))}} + {{#if @root.isNPC}} + d20 {{else}} - + 2d12 {{/if}} - {{#if action.uses.max}} -
- + {{/if}} +
+ + {{!-- Name & Tags --}} +
+ {{!-- Item Name --}} + {{localize item.name}} {{#unless (or noExtensible (not item.system.description))}}{{/unless}} + + {{!-- Tags Start --}} + {{#if (not hideTags)}} + {{#> "systems/daggerheart/templates/sheets/global/partials/item-tags.hbs" item}} + {{#if (eq ../type 'feature')}} + {{#if (and system.featureForm (ne @root.document.type "character"))}} +
+ {{localize (concat "DAGGERHEART.CONFIG.FeatureForm." system.featureForm)}} +
+ {{/if}} + {{/if}} + {{/ "systems/daggerheart/templates/sheets/global/partials/item-tags.hbs"}} + {{/if}} + + {{!--Tags End --}} +
+ + {{!-- Simple Resource --}} + {{#if (and (not hideResources) (not (eq item.system.resource.type 'diceValue')))}} + {{> "systems/daggerheart/templates/sheets/global/partials/item-resource.hbs"}} + {{/if}} + {{#if (or isQuantifiable (or (eq item.system.quantity 0) (gt item.system.quantity 1)))}} +
+ +
+ {{/if}} + + {{!-- Controls --}} + {{#unless hideControls}} +
+ {{!-- Toggle/Equip buttons --}} + {{#if @root.editable}} + {{#if (and (eq actorType 'character') (eq type 'weapon'))}} + + + + {{/if}} + {{#if (and (eq actorType 'character') (eq type 'armor'))}} + + + + {{/if}} + {{#if (and (eq type 'domainCard'))}} + + + + {{/if}} + {{#if (and (and (eq type 'effect') (not (eq item.type 'beastform'))))}} + + + + {{/if}} + {{/if}} + + {{!-- Send to Chat --}} + {{#if (hasProperty item "toChat")}} + + + + {{/if}} + + {{!-- Document management buttons or context menu --}} + {{#if (and (not isActor) (not hideContextMenu))}} + + + + {{else if (and @root.editable (not hideModifyControls))}} + + + + {{#if (not isActor)}} + + + + {{else if (eq type 'adversary')}} + + + + {{/if}} {{/if}}
- {{/each}} + {{/unless}} +
+
+ {{!-- Description --}} + {{#unless hideDescription}} +
+ {{/unless}} +
+ {{!-- Dice Resource --}} + {{#if (and (not hideResources) (eq item.system.resource.type 'diceValue'))}} + {{> "systems/daggerheart/templates/sheets/global/partials/item-resource.hbs"}} + {{/if}} + {{!-- Actions Buttons --}} + {{#if (and showActions item.system.actions.size)}} +
+ {{#each item.system.actions as | action |}} +
+ {{#if (and (eq action.type 'beastform') @root.beastformActive)}} + + {{else}} + + {{/if}} + {{#if action.uses.max}} +
+ + {{/if}}
- {{/if}} - + {{/each}} +
+ {{/if}} + \ No newline at end of file