} config
*/
async diceRoll(config) {
config.source = { ...(config.source ?? {}), actor: this.uuid };
@@ -563,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.getEffects(this),
+ effects: await game.system.api.data.actions.actionsTypes.base.getActionRelevantEffects(this),
roll: {
trait: trait,
type: 'trait'
diff --git a/module/documents/chatMessage.mjs b/module/documents/chatMessage.mjs
index 480f8c69..b555dfca 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.getEffects(actor, item);
+ config.effects = await game.system.api.data.actions.actionsTypes.base.getActionRelevantEffects(actor, item);
await this.system.action.workflow.get('damage')?.execute(config, this._id, true);
}
}
diff --git a/module/enrichers/FateRollEnricher.mjs b/module/enrichers/FateRollEnricher.mjs
index c82bbcb2..8513ed94 100644
--- a/module/enrichers/FateRollEnricher.mjs
+++ b/module/enrichers/FateRollEnricher.mjs
@@ -49,7 +49,7 @@ export const renderFateButton = async event => {
const fateTypeData = getFateTypeData(button.dataset?.fatetype);
if (!fateTypeData) ui.notifications.error(game.i18n.localize('DAGGERHEART.UI.Notifications.fateTypeParsing'));
- const { value: fateType, label: fateTypeLabel } = fateTypeData;
+ const { value: fateType } = fateTypeData;
await enrichedFateRoll(
{
diff --git a/module/helpers/utils.mjs b/module/helpers/utils.mjs
index 90a5c29d..6467edd7 100644
--- a/module/helpers/utils.mjs
+++ b/module/helpers/utils.mjs
@@ -318,7 +318,7 @@ export function getDocFromElementSync(element) {
const target = element.closest('[data-item-uuid]');
try {
return foundry.utils.fromUuidSync(target.dataset.itemUuid) ?? null;
- } catch (_) {
+ } catch {
return null;
}
}
@@ -377,7 +377,7 @@ export const itemAbleRollParse = (value, actor, item) => {
try {
return Roll.replaceFormulaData(slicedValue, rollData);
- } catch (_) {
+ } catch {
return '';
}
};
@@ -885,3 +885,8 @@ export async function triggerChatRollFx(rolls, options = { whisper: false, blind
foundry.audio.AudioHelper.play({ src: CONFIG.sounds.dice });
}
}
+
+export function shouldUseHopeFearAutomation(options = { gmAsPlayer: true }) {
+ const { hopeFear } = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Automation);
+ return (!game.user.isGM || options.gmAsPlayer) ? hopeFear.players : hopeFear.gm;
+}
\ No newline at end of file
diff --git a/module/systemRegistration/handlebars.mjs b/module/systemRegistration/handlebars.mjs
index 1b08e0ad..bf315358 100644
--- a/module/systemRegistration/handlebars.mjs
+++ b/module/systemRegistration/handlebars.mjs
@@ -50,6 +50,7 @@ export const preloadHandlebarsTemplates = async function () {
'systems/daggerheart/templates/ui/chat/parts/target-part.hbs',
'systems/daggerheart/templates/ui/chat/parts/button-part.hbs',
'systems/daggerheart/templates/ui/itemBrowser/itemContainer.hbs',
+ 'systems/daggerheart/templates/ui/countdowns/parts/countdowns.hbs',
'systems/daggerheart/templates/scene/dh-config.hbs',
'systems/daggerheart/templates/settings/appearance-settings/diceSoNiceTab.hbs',
'systems/daggerheart/templates/sheets/activeEffect/typeChanges/armorChange.hbs'
diff --git a/module/systemRegistration/migrations.mjs b/module/systemRegistration/migrations.mjs
index b718a127..ec546c92 100644
--- a/module/systemRegistration/migrations.mjs
+++ b/module/systemRegistration/migrations.mjs
@@ -178,8 +178,8 @@ export async function runMigrations() {
await countdownSettings.updateSource({
countdowns: {
- ...getCountdowns(countdownSettings.narrative, CONFIG.DH.GENERAL.countdownBaseTypes.narrative.id),
- ...getCountdowns(countdownSettings.encounter, CONFIG.DH.GENERAL.countdownBaseTypes.encounter.id)
+ ...getCountdowns(countdownSettings.narrative, 'narrative'),
+ ...getCountdowns(countdownSettings.encounter, 'encounter')
}
});
await game.settings.set(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Countdowns, countdownSettings);
diff --git a/module/systemRegistration/settings.mjs b/module/systemRegistration/settings.mjs
index a66323c7..1a985274 100644
--- a/module/systemRegistration/settings.mjs
+++ b/module/systemRegistration/settings.mjs
@@ -199,7 +199,10 @@ const registerNonConfigSettings = () => {
game.settings.register(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Countdowns, {
scope: 'world',
config: false,
- type: DhCountdowns
+ type: DhCountdowns,
+ onChange: value => {
+ value.handleChange();
+ }
});
game.settings.register(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.CompendiumBrowserSettings, {
diff --git a/styles/less/dialog/tag-team-dialog/initialization.less b/styles/less/dialog/tag-team-dialog/initialization.less
index d6f7ad29..e79ed65c 100644
--- a/styles/less/dialog/tag-team-dialog/initialization.less
+++ b/styles/less/dialog/tag-team-dialog/initialization.less
@@ -88,9 +88,21 @@
grid-template-columns: 1fr 1fr;
gap: 8px;
- &.inactive {
+ .inactive {
opacity: 0.4;
}
+
+ .initiator-cost-fields {
+ display: flex;
+ flex-direction: column;
+ align-items: flex-start;
+
+ .initiator-cost-inputs {
+ display: grid;
+ grid-template-columns: auto 1fr;
+ align-items: center;
+ }
+ }
}
footer {
diff --git a/styles/less/sheets/actors/actor-sheet-shared.less b/styles/less/sheets/actors/actor-sheet-shared.less
index b3eb0469..89617103 100644
--- a/styles/less/sheets/actors/actor-sheet-shared.less
+++ b/styles/less/sheets/actors/actor-sheet-shared.less
@@ -37,6 +37,10 @@
color: @color-text-subtle;
}
+ .window-header > .attribution-header-label {
+ margin-right: var(--spacer-4);
+ }
+
.tab.inventory {
.gold-section {
display: grid;
diff --git a/styles/less/sheets/actors/adversary/header.less b/styles/less/sheets/actors/adversary/header.less
index 1e5e4fa5..549a219d 100644
--- a/styles/less/sheets/actors/adversary/header.less
+++ b/styles/less/sheets/actors/adversary/header.less
@@ -3,16 +3,21 @@
.application.sheet.daggerheart.actor.dh-style.adversary {
.adversary-header-sheet {
- padding: 0 15px;
padding-top: var(--header-height);
width: 100%;
+ > *:not(line-div, .tab-navigation) {
+ padding-left: 15px;
+ padding-right: 15px;
+ }
+
.name-row {
display: flex;
gap: 5px;
align-items: center;
justify-content: space-between;
- padding: 8px 0;
+ padding-top: var(--spacer-4);
+ padding-bottom: var(--spacer-4);
flex: 1;
h1 {
@@ -34,8 +39,8 @@
.tags {
display: flex;
- gap: 10px;
- padding-bottom: 8px;
+ gap: 8px;
+ padding-bottom: var(--spacer-12);
.tag {
display: flex;
@@ -44,8 +49,7 @@
justify-content: center;
align-items: center;
padding: 3px 5px;
- font-size: var(--font-size-12);
- font: @font-body;
+ font: var(--font-size-12) @font-body;
background: light-dark(@dark-15, @beige-15);
border: 1px solid light-dark(@dark, @beige);
@@ -64,8 +68,16 @@
.adversary-info {
display: flex;
flex-direction: column;
- gap: 12px;
- padding: 16px 0;
+ gap: var(--spacer-8);
+ padding-top: var(--spacer-12);
+ padding-bottom: var(--spacer-12);
+ }
+
+ .tab-navigation {
+ margin-top: 0;
+ button[data-action="openSettings"] {
+ margin-right: 12px;
+ }
}
}
}
diff --git a/styles/less/ui/countdown/countdown.less b/styles/less/ui/countdown/countdown.less
index 63e539ba..96e01ffd 100644
--- a/styles/less/ui/countdown/countdown.less
+++ b/styles/less/ui/countdown/countdown.less
@@ -22,7 +22,6 @@
pointer-events: all;
align-self: flex-end;
transition: 0.3s right ease-in-out;
-
display: flex;
flex-direction: column;
@@ -65,12 +64,31 @@
padding: 0 0.5rem;
overflow: hidden;
font-size: var(--font-size-13);
+
.window-title {
font-family: @font-body;
- flex: 1;
}
- .header-control + .header-control {
- margin-left: 8px;
+
+
+ .header-type-toggles {
+ flex: 1;
+ display: flex;
+ align-items: center;
+ gap: 4px;
+
+ .header-type {
+ flex: 1;
+ border: 1px solid @beige;
+ border-radius: 12px;
+ padding: 2px 4px;
+ text-align: center;
+ background-color: @dark-blue;
+ color: @beige;
+
+ &.inactive {
+ opacity: 0.4;
+ }
+ }
}
}
@@ -82,9 +100,23 @@
overflow: auto;
max-height: 312px;
+ .countdown-category-container {
+ display: flex;
+ flex-direction: column;
+ gap: 8px;
+
+ &.hidden {
+ display: none;
+ }
+ }
+
.countdown-container {
display: flex;
width: 100%;
+ border-radius: 6px;
+ background: linear-gradient(-45deg, transparent 30%, light-dark(@dark-blue-40, @golden-40) 35%, transparent 40%);
+ background-size: 300%;
+ background-position-x: 100%;
&.icon-only {
gap: 8px;
@@ -105,6 +137,7 @@
display: flex;
align-items: center;
gap: 16px;
+ border-radius: 6px;
img {
width: 2.75rem;
diff --git a/styles/less/ui/game-pause/game-pause.less b/styles/less/ui/game-pause/game-pause.less
index 60d08bec..daf9a1e4 100644
--- a/styles/less/ui/game-pause/game-pause.less
+++ b/styles/less/ui/game-pause/game-pause.less
@@ -1,23 +1,34 @@
@import '../../utils/mixin.less';
#pause.dh-style {
+ animation: none;
+
+ img {
+ width: 125px;
+ height: 125px;
+ }
+
figcaption {
+ --base-shadow: drop-shadow(2px 2px 2px black);
position: absolute;
margin-top: 24px;
animation: pause-pulse 3s ease-in-out infinite;
+ font-size: var(--font-size-30);
+ letter-spacing: 0.18em;
+ filter: var(--base-shadow);
}
@keyframes pause-pulse {
0% {
- filter: drop-shadow(0 0 5px @secondary-blue);
+ filter: var(--base-shadow) drop-shadow(0 0 5px @secondary-blue);
}
50% {
- filter: drop-shadow(0 0 5px @golden);
+ filter: var(--base-shadow) drop-shadow(0 0 5px @golden-secondary);
}
100% {
- filter: drop-shadow(0 0 5px @secondary-blue);
+ filter: var(--base-shadow) drop-shadow(0 0 5px @secondary-blue);
}
}
}
\ No newline at end of file
diff --git a/styles/less/utils/fonts.less b/styles/less/utils/fonts.less
index 07da3389..72ee1a85 100755
--- a/styles/less/utils/fonts.less
+++ b/styles/less/utils/fonts.less
@@ -10,6 +10,7 @@
--font-size-8: 0.5rem;
--font-size-9: 0.5625rem;
--font-size-22: 1.375rem;
+ --font-size-30: 1.875rem;
}
@font-title: ~"var(--dh-font-title, 'Cinzel Decorative'), serif";
diff --git a/system.json b/system.json
index f5e13a62..08693074 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.3.4",
+ "version": "2.4.0",
"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.3.4/system.zip",
+ "download": "https://github.com/Foundryborne/daggerheart/releases/download/2.4.0/system.zip",
"authors": [
{
"name": "WBHarry"
diff --git a/templates/dialogs/tagTeamDialog/initialization.hbs b/templates/dialogs/tagTeamDialog/initialization.hbs
index 0b92e68e..40491e1b 100644
--- a/templates/dialogs/tagTeamDialog/initialization.hbs
+++ b/templates/dialogs/tagTeamDialog/initialization.hbs
@@ -26,11 +26,16 @@
-
diff --git a/templates/sheets-settings/adversary-settings/features.hbs b/templates/sheets-settings/adversary-settings/features.hbs
index 2f2f5f47..1cab8cfe 100644
--- a/templates/sheets-settings/adversary-settings/features.hbs
+++ b/templates/sheets-settings/adversary-settings/features.hbs
@@ -3,27 +3,31 @@
data-tab='{{tabs.features.id}}'
data-group='{{tabs.features.group}}'
>
-
- {{localize "DOCUMENT.New" type=(localize "TYPES.Item.feature")}}
-
-
- {{localize tabs.features.label}}
-
- {{#each @root.features as |feature|}}
-
-
-
- {{feature.name}}
-
-
-
- {{/each}}
-
-
- {{localize "DAGGERHEART.GENERAL.dropFeaturesHere"}}
-
-
+ {{#each featureGroups as |group|}}
+
+
+ {{group.label}}
+
+
+
+
+
+ {{#each group.features as |feature|}}
+ {{> 'daggerheart.inventory-item'
+ item=feature
+ type='feature'
+ actorType=@root.document.type
+ hideTags=true
+ hideContextMenu=true
+ hideResources=true
+ showActions=false
+ hideTooltip=true
+ }}
+ {{/each}}
+
+
+ {{/each}}
+
+ {{localize "DAGGERHEART.GENERAL.dropFeaturesHere"}}
+
\ No newline at end of file
diff --git a/templates/sheets-settings/environment-settings/features.hbs b/templates/sheets-settings/environment-settings/features.hbs
index 579fe74e..1cab8cfe 100644
--- a/templates/sheets-settings/environment-settings/features.hbs
+++ b/templates/sheets-settings/environment-settings/features.hbs
@@ -3,24 +3,31 @@
data-tab='{{tabs.features.id}}'
data-group='{{tabs.features.group}}'
>
-
- {{localize "DOCUMENT.New" type=(localize "TYPES.Item.feature")}}
-
-
- {{localize tabs.features.label}}
-
- {{#each @root.features as |feature|}}
-
-
-
- {{feature.name}}
-
-
-
- {{/each}}
-
-
+ {{#each featureGroups as |group|}}
+
+
+ {{group.label}}
+
+
+
+
+
+ {{#each group.features as |feature|}}
+ {{> 'daggerheart.inventory-item'
+ item=feature
+ type='feature'
+ actorType=@root.document.type
+ hideTags=true
+ hideContextMenu=true
+ hideResources=true
+ showActions=false
+ hideTooltip=true
+ }}
+ {{/each}}
+
+
+ {{/each}}
+
+ {{localize "DAGGERHEART.GENERAL.dropFeaturesHere"}}
+
\ No newline at end of file
diff --git a/templates/sheets-settings/npc-settings/features.hbs b/templates/sheets-settings/npc-settings/features.hbs
index 2f2f5f47..1cab8cfe 100644
--- a/templates/sheets-settings/npc-settings/features.hbs
+++ b/templates/sheets-settings/npc-settings/features.hbs
@@ -3,27 +3,31 @@
data-tab='{{tabs.features.id}}'
data-group='{{tabs.features.group}}'
>
-
- {{localize "DOCUMENT.New" type=(localize "TYPES.Item.feature")}}
-
-
- {{localize tabs.features.label}}
-
- {{#each @root.features as |feature|}}
-
-
-
- {{feature.name}}
-
-
-
- {{/each}}
-
-
- {{localize "DAGGERHEART.GENERAL.dropFeaturesHere"}}
-
-
+ {{#each featureGroups as |group|}}
+
+
+ {{group.label}}
+
+
+
+
+
+ {{#each group.features as |feature|}}
+ {{> 'daggerheart.inventory-item'
+ item=feature
+ type='feature'
+ actorType=@root.document.type
+ hideTags=true
+ hideContextMenu=true
+ hideResources=true
+ showActions=false
+ hideTooltip=true
+ }}
+ {{/each}}
+
+
+ {{/each}}
+
+ {{localize "DAGGERHEART.GENERAL.dropFeaturesHere"}}
+
\ No newline at end of file
diff --git a/templates/sheets/global/partials/domain-card-item.hbs b/templates/sheets/global/partials/domain-card-item.hbs
index 54e44e64..ca584e57 100644
--- a/templates/sheets/global/partials/domain-card-item.hbs
+++ b/templates/sheets/global/partials/domain-card-item.hbs
@@ -1,4 +1,4 @@
-
+
{{item.system.recallCost}}
diff --git a/templates/sheets/global/partials/inventory-item-V2.hbs b/templates/sheets/global/partials/inventory-item-V2.hbs
index 523e9304..f7d22a30 100644
--- a/templates/sheets/global/partials/inventory-item-V2.hbs
+++ b/templates/sheets/global/partials/inventory-item-V2.hbs
@@ -27,17 +27,17 @@ Parameters:
>