diff --git a/module/applications/ui/countdowns.mjs b/module/applications/ui/countdowns.mjs index bcc70c7a..d7d3d25f 100644 --- a/module/applications/ui/countdowns.mjs +++ b/module/applications/ui/countdowns.mjs @@ -82,13 +82,6 @@ export default class DhCountdowns extends HandlebarsApplicationMixin(Application return frame; } - /**@inheritdoc */ - async _onFirstRender(context, options) { - await super._onFirstRender(context, options); - - this.toggleCollapsedPosition(undefined, !ui.sidebar.expanded); - } - /** Returns countdown data filtered by ownership */ #getCountdowns() { const setting = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Countdowns); @@ -153,14 +146,6 @@ export default class DhCountdowns extends HandlebarsApplicationMixin(Application : playerOwnership; } - toggleCollapsedPosition = async (_, collapsed) => { - if (!this.element) return; - - this.sidebarCollapsed = collapsed; - if (!collapsed) this.element.classList.add('expanded'); - else this.element.classList.remove('expanded'); - }; - cooldownRefresh = ({ refreshType }) => { if (refreshType === RefreshType.Countdown) this.render(); }; @@ -238,7 +223,6 @@ export default class DhCountdowns extends HandlebarsApplicationMixin(Application } setupHooks() { - Hooks.on('collapseSidebar', this.toggleCollapsedPosition.bind()); Hooks.on(socketEvent.Refresh, this.cooldownRefresh.bind()); } @@ -246,7 +230,6 @@ export default class DhCountdowns extends HandlebarsApplicationMixin(Application /* Opt out of Foundry's standard behavior of closing all application windows marked as UI when Escape is pressed */ if (options.closeKey) return; - Hooks.off('collapseSidebar', this.toggleCollapsedPosition); Hooks.off(socketEvent.Refresh, this.cooldownRefresh); return super.close(options); } @@ -290,5 +273,8 @@ export default class DhCountdowns extends HandlebarsApplicationMixin(Application async _onRender(context, options) { await super._onRender(context, options); this.element.hidden = !game.user.isGM && this.#getCountdowns().length === 0; + if (options?.force) { + document.getElementById('ui-right-column-1')?.appendChild(this.element); + } } } diff --git a/module/applications/ui/itemBrowser.mjs b/module/applications/ui/itemBrowser.mjs index 07d5cd74..794c3fb6 100644 --- a/module/applications/ui/itemBrowser.mjs +++ b/module/applications/ui/itemBrowser.mjs @@ -22,7 +22,7 @@ export class ItemBrowser extends HandlebarsApplicationMixin(ApplicationV2) { /** @inheritDoc */ static DEFAULT_OPTIONS = { id: 'itemBrowser', - classes: ['daggerheart', 'dh-style', 'dialog', 'compendium-browser', 'loader'], + classes: ['daggerheart', 'dh-style', 'dialog', 'compendium-browser', 'daggerheart-loader'], tag: 'div', window: { frame: true, @@ -277,7 +277,7 @@ export class ItemBrowser extends HandlebarsApplicationMixin(ApplicationV2) { toggleLoader(state) { const container = this.element.querySelector('.item-list'); return setTimeout(() => { - container.classList.toggle('loader', state); + container.classList.toggle('daggerheart-loader', state); }, 100); } diff --git a/module/data/fields/actionField.mjs b/module/data/fields/actionField.mjs index 04425d55..6c37f153 100644 --- a/module/data/fields/actionField.mjs +++ b/module/data/fields/actionField.mjs @@ -260,7 +260,7 @@ export function ActionMixin(Base) { origin: origin, action: { name: this.name, img: this.img, tags: this.tags ? this.tags : ['Spell', 'Arcana', 'Lv 10'] }, itemOrigin: this.item, - description: this.description + description: this.description || (this.item instanceof Item ? this.item.system.description : '') }; const msg = { type: 'abilityUse', diff --git a/module/dice/dhRoll.mjs b/module/dice/dhRoll.mjs index 053445a7..e6856dab 100644 --- a/module/dice/dhRoll.mjs +++ b/module/dice/dhRoll.mjs @@ -115,7 +115,7 @@ export default class DHRoll extends Roll { game.system.api.applications.dialogs.TagTeamDialog.assignRoll(message.speakerActor, message); } - if (game.modules.get('dice-so-nice')?.active) { + if (roll.formula !== '' && game.modules.get('dice-so-nice')?.active) { await game.dice3d.waitFor3DAnimationByMessageID(message.id); } diff --git a/module/enrichers/_module.mjs b/module/enrichers/_module.mjs index 794756f4..0dcd870e 100644 --- a/module/enrichers/_module.mjs +++ b/module/enrichers/_module.mjs @@ -8,23 +8,23 @@ export { DhDamageEnricher, DhDualityRollEnricher, DhEffectEnricher, DhTemplateEn export const enricherConfig = [ { - pattern: /@Damage\[(.*)\]({.*})?/g, + pattern: /@Damage\[([^\[\]]*)\]({[^}]*})?/g, enricher: DhDamageEnricher }, { - pattern: /\[\[\/dr\s?(.*?)\]\]({.*})?/g, + pattern: /\[\[\/dr\s?(.*?)\]\]({[^}]*})?/g, enricher: DhDualityRollEnricher }, { - pattern: /@Effect\[(.*)\]({.*})?/g, + pattern: /@Effect\[([^\[\]]*)\]({[^}]*})?/g, enricher: DhEffectEnricher }, { - pattern: /@Template\[(.*)\]({.*})?/g, + pattern: /@Template\[([^\[\]]*)\]({[^}]*})?/g, enricher: DhTemplateEnricher }, { - pattern: /@Lookup\[(.*)\]({.*})?/g, + pattern: /@Lookup\[([^\[\]]*)\]({[^}]*})?/g, enricher: DhLookupEnricher } ]; diff --git a/src/packs/beastforms/feature_Takedown_0ey4kM9ssj2otHvb.json b/src/packs/beastforms/feature_Takedown_0ey4kM9ssj2otHvb.json index 5392665b..2c09b7ed 100644 --- a/src/packs/beastforms/feature_Takedown_0ey4kM9ssj2otHvb.json +++ b/src/packs/beastforms/feature_Takedown_0ey4kM9ssj2otHvb.json @@ -33,7 +33,7 @@ "value": { "custom": { "enabled": true, - "formula": "(@prof+2)@basicAttackDamageDice" + "formula": "(@prof+2)@basicAttackDamageDice + 6" }, "multiplier": "prof", "flatMultiplier": 1, @@ -49,7 +49,8 @@ "dice": "d6", "bonus": null, "custom": { - "enabled": false + "enabled": false, + "formula": "" } } } @@ -57,8 +58,8 @@ "includeBase": false }, "target": { - "type": "self", - "amount": null + "type": "hostile", + "amount": 1 }, "effects": [], "roll": { @@ -83,7 +84,7 @@ }, "name": "Attack", "img": "icons/creatures/abilities/paw-print-orange.webp", - "range": "self" + "range": "melee" } }, "originItemType": null, @@ -150,12 +151,12 @@ "compendiumSource": null, "duplicateSource": null, "exportSource": null, - "coreVersion": "13.347", + "coreVersion": "13.351", "systemId": "daggerheart", - "systemVersion": "1.1.0", + "systemVersion": "1.2.3", "createdTime": 1753621786000, - "modifiedTime": 1756041242273, - "lastModifiedBy": "vUIbuan0U50nfKBE" + "modifiedTime": 1763549111169, + "lastModifiedBy": "Q4RzhhaPfvLUzzbw" }, "_id": "0ey4kM9ssj2otHvb", "sort": 600000, diff --git a/src/packs/classes/feature_Evolution_6rlxhrRwFaVgq9fe.json b/src/packs/classes/feature_Evolution_6rlxhrRwFaVgq9fe.json index cd011361..98fdaa99 100644 --- a/src/packs/classes/feature_Evolution_6rlxhrRwFaVgq9fe.json +++ b/src/packs/classes/feature_Evolution_6rlxhrRwFaVgq9fe.json @@ -5,7 +5,7 @@ "_id": "6rlxhrRwFaVgq9fe", "img": "icons/magic/nature/wolf-paw-glow-large-orange.webp", "system": { - "description": "

Spend 3 Hope to transform into a Beastform without marking a Stress. When you do, choose one trait to raise by +1 until you drop out of that Beastform.

Note: Manually increase your trait on character sheet if this is in effect.

", + "description": "

Spend 3 Hope to transform into a Beastform without marking a Stress. When you do, choose one trait to raise by +1 until you drop out of that Beastform.

Note: Toggle one of the Evolution Traits in the effects tab to raise a trait by 1, e.g. Evolution: Agility

", "resource": null, "actions": { "bj4m9E8ObFT0xDQ4": { @@ -46,7 +46,314 @@ "artist": "" } }, - "effects": [], + "effects": [ + { + "name": "Evolution: Agility", + "type": "base", + "system": { + "rangeDependence": { + "enabled": false, + "type": "withinRange", + "target": "hostile", + "range": "melee" + } + }, + "_id": "vQOqLZAxOltAzsVv", + "img": "icons/magic/nature/wolf-paw-glow-large-orange.webp", + "changes": [ + { + "key": "system.traits.agility.value", + "mode": 2, + "value": "1", + "priority": null + } + ], + "disabled": true, + "duration": { + "startTime": null, + "combat": null, + "seconds": null, + "rounds": null, + "turns": null, + "startRound": null, + "startTurn": null + }, + "description": "

Toggle this for +1 to Agility when using Evolution. Turn it off when you leave Beastform.

", + "origin": null, + "tint": "#ffffff", + "transfer": true, + "statuses": [], + "sort": 0, + "flags": {}, + "_stats": { + "compendiumSource": null, + "duplicateSource": null, + "exportSource": null, + "coreVersion": "13.351", + "systemId": "daggerheart", + "systemVersion": "1.2.3", + "createdTime": 1763444412215, + "modifiedTime": 1763444454384, + "lastModifiedBy": "9HOfUKAXuCu7hUPY" + }, + "_key": "!items.effects!6rlxhrRwFaVgq9fe.vQOqLZAxOltAzsVv" + }, + { + "name": "Evolution: Strength", + "type": "base", + "system": { + "rangeDependence": { + "enabled": false, + "type": "withinRange", + "target": "hostile", + "range": "melee" + } + }, + "_id": "cwEsO1NZpkQHuoTT", + "img": "icons/magic/nature/wolf-paw-glow-large-orange.webp", + "changes": [ + { + "key": "system.traits.strength.value", + "mode": 2, + "value": "1", + "priority": null + } + ], + "disabled": true, + "duration": { + "startTime": null, + "combat": null, + "seconds": null, + "rounds": null, + "turns": null, + "startRound": null, + "startTurn": null + }, + "description": "

Toggle this for +1 to Strength when using Evolution. Turn it off when you leave Beastform.

", + "origin": null, + "tint": "#ffffff", + "transfer": true, + "statuses": [], + "sort": 0, + "flags": {}, + "_stats": { + "compendiumSource": null, + "duplicateSource": null, + "exportSource": null, + "coreVersion": "13.351", + "systemId": "daggerheart", + "systemVersion": "1.2.3", + "createdTime": 1763444570591, + "modifiedTime": 1763444616465, + "lastModifiedBy": "9HOfUKAXuCu7hUPY" + }, + "_key": "!items.effects!6rlxhrRwFaVgq9fe.cwEsO1NZpkQHuoTT" + }, + { + "name": "Evolution: Finesse", + "type": "base", + "system": { + "rangeDependence": { + "enabled": false, + "type": "withinRange", + "target": "hostile", + "range": "melee" + } + }, + "_id": "8P0nwRHNsVnHVPjq", + "img": "icons/magic/nature/wolf-paw-glow-large-orange.webp", + "changes": [ + { + "key": "system.traits.finesse.value", + "mode": 2, + "value": "1", + "priority": null + } + ], + "disabled": true, + "duration": { + "startTime": null, + "combat": null, + "seconds": null, + "rounds": null, + "turns": null, + "startRound": null, + "startTurn": null + }, + "description": "

Toggle this for +1 to Finesse when using Evolution. Turn it off when you leave Beastform.

", + "origin": null, + "tint": "#ffffff", + "transfer": true, + "statuses": [], + "sort": 0, + "flags": {}, + "_stats": { + "compendiumSource": null, + "duplicateSource": null, + "exportSource": null, + "coreVersion": "13.351", + "systemId": "daggerheart", + "systemVersion": "1.2.3", + "createdTime": 1763444626581, + "modifiedTime": 1763444677228, + "lastModifiedBy": "9HOfUKAXuCu7hUPY" + }, + "_key": "!items.effects!6rlxhrRwFaVgq9fe.8P0nwRHNsVnHVPjq" + }, + { + "name": "Evolution: Instinct", + "type": "base", + "system": { + "rangeDependence": { + "enabled": false, + "type": "withinRange", + "target": "hostile", + "range": "melee" + } + }, + "_id": "i2GhNGo5TnGtLuA0", + "img": "icons/magic/nature/wolf-paw-glow-large-orange.webp", + "changes": [ + { + "key": "system.traits.instinct.value", + "mode": 2, + "value": "1", + "priority": null + } + ], + "disabled": true, + "duration": { + "startTime": null, + "combat": null, + "seconds": null, + "rounds": null, + "turns": null, + "startRound": null, + "startTurn": null + }, + "description": "

Toggle this for +1 to Instinct when using Evolution. Turn it off when you leave Beastform.

", + "origin": null, + "tint": "#ffffff", + "transfer": true, + "statuses": [], + "sort": 0, + "flags": {}, + "_stats": { + "compendiumSource": null, + "duplicateSource": null, + "exportSource": null, + "coreVersion": "13.351", + "systemId": "daggerheart", + "systemVersion": "1.2.3", + "createdTime": 1763444688167, + "modifiedTime": 1763444730192, + "lastModifiedBy": "9HOfUKAXuCu7hUPY" + }, + "_key": "!items.effects!6rlxhrRwFaVgq9fe.i2GhNGo5TnGtLuA0" + }, + { + "name": "Evolution: Presence", + "type": "base", + "system": { + "rangeDependence": { + "enabled": false, + "type": "withinRange", + "target": "hostile", + "range": "melee" + } + }, + "_id": "APQF1in1LXjBZh9n", + "img": "icons/magic/nature/wolf-paw-glow-large-orange.webp", + "changes": [ + { + "key": "system.traits.presence.value", + "mode": 2, + "value": "1", + "priority": null + } + ], + "disabled": true, + "duration": { + "startTime": null, + "combat": null, + "seconds": null, + "rounds": null, + "turns": null, + "startRound": null, + "startTurn": null + }, + "description": "

Toggle this for +1 to Presence when using Evolution. Turn it off when you leave Beastform.

", + "origin": null, + "tint": "#ffffff", + "transfer": true, + "statuses": [], + "sort": 0, + "flags": {}, + "_stats": { + "compendiumSource": null, + "duplicateSource": null, + "exportSource": null, + "coreVersion": "13.351", + "systemId": "daggerheart", + "systemVersion": "1.2.3", + "createdTime": 1763444736373, + "modifiedTime": 1763444776081, + "lastModifiedBy": "9HOfUKAXuCu7hUPY" + }, + "_key": "!items.effects!6rlxhrRwFaVgq9fe.APQF1in1LXjBZh9n" + }, + { + "name": "Evolution: Knowledge", + "type": "base", + "system": { + "rangeDependence": { + "enabled": false, + "type": "withinRange", + "target": "hostile", + "range": "melee" + } + }, + "_id": "WwOvGJYJb4d37cOy", + "img": "icons/magic/nature/wolf-paw-glow-large-orange.webp", + "changes": [ + { + "key": "system.traits.knowledge.value", + "mode": 2, + "value": "1", + "priority": null + } + ], + "disabled": true, + "duration": { + "startTime": null, + "combat": null, + "seconds": null, + "rounds": null, + "turns": null, + "startRound": null, + "startTurn": null + }, + "description": "

Toggle this for +1 to Knowledge when using Evolution. Turn it off when you leave Beastform.

", + "origin": null, + "tint": "#ffffff", + "transfer": true, + "statuses": [], + "sort": 0, + "flags": {}, + "_stats": { + "compendiumSource": null, + "duplicateSource": null, + "exportSource": null, + "coreVersion": "13.351", + "systemId": "daggerheart", + "systemVersion": "1.2.3", + "createdTime": 1763444779829, + "modifiedTime": 1763444825976, + "lastModifiedBy": "9HOfUKAXuCu7hUPY" + }, + "_key": "!items.effects!6rlxhrRwFaVgq9fe.WwOvGJYJb4d37cOy" + } + ], "sort": 100000, "ownership": { "default": 0, @@ -57,12 +364,12 @@ "compendiumSource": null, "duplicateSource": null, "exportSource": null, - "coreVersion": "13.347", + "coreVersion": "13.351", "systemId": "daggerheart", - "systemVersion": "1.0.5", + "systemVersion": "1.2.3", "createdTime": 1754221506611, - "modifiedTime": 1755391214500, - "lastModifiedBy": "VZIeX2YDvX338Zvr" + "modifiedTime": 1763444563650, + "lastModifiedBy": "9HOfUKAXuCu7hUPY" }, "_key": "!items!6rlxhrRwFaVgq9fe" } diff --git a/styles/less/global/global.less b/styles/less/global/global.less index 7e60dffc..6cc63c2a 100644 --- a/styles/less/global/global.less +++ b/styles/less/global/global.less @@ -24,7 +24,7 @@ } } - .loader { + .daggerheart-loader { position: relative; overflow: hidden !important; diff --git a/styles/less/ui/countdown/countdown.less b/styles/less/ui/countdown/countdown.less index 3f47c477..829a59b5 100644 --- a/styles/less/ui/countdown/countdown.less +++ b/styles/less/ui/countdown/countdown.less @@ -12,26 +12,18 @@ } .daggerheart.dh-style.countdowns { - z-index: var(--z-index-ui) !important; + position: initial; border: 0; border-radius: 4px; box-shadow: none; width: 300px; - top: 16px; - right: calc(64px * var(--ui-scale)); - transition: - right ease 250ms, - opacity var(--ui-fade-duration) ease, - opacity var(--ui-fade-duration); + pointer-events: all; + align-self: flex-end; .window-title { font-family: @font-body; } - &.expanded { - right: calc(364px * var(--ui-scale)); - } - &.icon-only { width: 180px; min-width: 180px; diff --git a/templates/sheets/actors/character/inventory.hbs b/templates/sheets/actors/character/inventory.hbs index 17faae46..ff595737 100644 --- a/templates/sheets/actors/character/inventory.hbs +++ b/templates/sheets/actors/character/inventory.hbs @@ -53,6 +53,7 @@ collection=document.itemTypes.loot isGlassy=true canCreate=true + showActions=true }} \ No newline at end of file diff --git a/templates/sheets/global/partials/inventory-item-V2.hbs b/templates/sheets/global/partials/inventory-item-V2.hbs index 2d8eb560..a6cd30f0 100644 --- a/templates/sheets/global/partials/inventory-item-V2.hbs +++ b/templates/sheets/global/partials/inventory-item-V2.hbs @@ -139,7 +139,7 @@ Parameters: {{> "systems/daggerheart/templates/sheets/global/partials/item-resource.hbs"}} {{/if}} {{!-- Actions Buttons --}} - {{#if (and showActions (eq item.type 'feature'))}} + {{#if (and showActions item.system.actions.size)}}
{{#each item.system.actions as | action |}}