diff --git a/daggerheart.mjs b/daggerheart.mjs index f75ff1da..b1b2a0ca 100644 --- a/daggerheart.mjs +++ b/daggerheart.mjs @@ -309,7 +309,7 @@ Hooks.on('chatMessage', (_, message) => { ? CONFIG.DH.ACTIONS.advantageState.disadvantage.value : undefined; const difficulty = rollCommand.difficulty; - const grantResources = rollCommand.grantResources; + const grantResources = Boolean(rollCommand.grantResources); const target = getCommandTarget({ allowNull: true }); const title = diff --git a/lang/en.json b/lang/en.json index e358977f..4d6815c3 100755 --- a/lang/en.json +++ b/lang/en.json @@ -2111,6 +2111,7 @@ "tier4": "tier 4", "domains": "Domains", "downtime": "Downtime", + "itemFeatures": "Item Features", "roll": "Roll", "rules": "Rules", "partyMembers": "Party Members", @@ -2119,8 +2120,7 @@ "questions": "Questions", "configuration": "Configuration", "base": "Base", - "triggers": "Triggers", - "deathMoves": "Deathmoves" + "triggers": "Triggers" }, "Tiers": { "singular": "Tier", @@ -2144,7 +2144,6 @@ "armorSlots": "Armor Slots", "artistAttribution": "Artwork By: {artist}", "attack": "Attack", - "automation": "Automation", "basics": "Basics", "bonus": "Bonus", "burden": "Burden", diff --git a/module/applications/dialogs/deathMove.mjs b/module/applications/dialogs/deathMove.mjs index a9141158..3eadede6 100644 --- a/module/applications/dialogs/deathMove.mjs +++ b/module/applications/dialogs/deathMove.mjs @@ -43,7 +43,7 @@ export default class DhDeathMove extends HandlebarsApplicationMixin(ApplicationV return context; } - async handleAvoidDeath(useAutomation) { + async handleAvoidDeath() { const target = this.actor.uuid; const config = await enrichedFateRoll({ target, @@ -53,7 +53,6 @@ export default class DhDeathMove extends HandlebarsApplicationMixin(ApplicationV }); if (!config.roll.fate) return; - if (!useAutomation) return ''; let returnMessage = game.i18n.localize('DAGGERHEART.UI.Chat.deathMove.avoidScar'); if (config.roll.fate.value <= this.actor.system.levelData.level.current) { @@ -76,7 +75,7 @@ export default class DhDeathMove extends HandlebarsApplicationMixin(ApplicationV return returnMessage; } - async handleRiskItAll(useAutomation) { + async handleRiskItAll() { const config = await enrichedDualityRoll({ reaction: true, traitValue: null, @@ -91,7 +90,6 @@ export default class DhDeathMove extends HandlebarsApplicationMixin(ApplicationV }); if (!config.roll.result) return; - if (!useAutomation) return ''; const clearAllStressAndHitpointsUpdates = [ { key: 'hitPoints', clear: true }, @@ -130,9 +128,7 @@ export default class DhDeathMove extends HandlebarsApplicationMixin(ApplicationV return chatMessage; } - async handleBlazeOfGlory(useAutomation) { - if (!useAutomation) return ''; - + async handleBlazeOfGlory() { this.actor.createEmbeddedDocuments('ActiveEffect', [ { name: game.i18n.localize('DAGGERHEART.CONFIG.DeathMoves.blazeOfGlory.name'), @@ -164,23 +160,19 @@ export default class DhDeathMove extends HandlebarsApplicationMixin(ApplicationV let result = ''; - const deathMoveAutomation = game.settings.get( - CONFIG.DH.id, - CONFIG.DH.SETTINGS.gameSettings.Automation - ).deathMoveAutomation; if (CONFIG.DH.GENERAL.deathMoves.blazeOfGlory === this.selectedMove) { - result = await this.handleBlazeOfGlory(deathMoveAutomation.blazeOfGlory); + result = await this.handleBlazeOfGlory(); } if (CONFIG.DH.GENERAL.deathMoves.avoidDeath === this.selectedMove) { - result = await this.handleAvoidDeath(deathMoveAutomation.avoidDeath); + result = await this.handleAvoidDeath(); } if (CONFIG.DH.GENERAL.deathMoves.riskItAll === this.selectedMove) { - result = await this.handleRiskItAll(deathMoveAutomation.riskItAll); + result = await this.handleRiskItAll(); } - if (result === undefined) return; + if (!result) return; const autoExpandDescription = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.appearance) .expandRollMessage?.desc; diff --git a/module/applications/settings/automationSettings.mjs b/module/applications/settings/automationSettings.mjs index e720733e..4407897d 100644 --- a/module/applications/settings/automationSettings.mjs +++ b/module/applications/settings/automationSettings.mjs @@ -34,7 +34,7 @@ export default class DhAutomationSettings extends HandlebarsApplicationMixin(App tabs: { template: 'systems/daggerheart/templates/sheets/global/tabs/tab-navigation.hbs' }, header: { template: 'systems/daggerheart/templates/settings/automation-settings/header.hbs' }, general: { template: 'systems/daggerheart/templates/settings/automation-settings/general.hbs' }, - rules: { template: 'systems/daggerheart/templates/settings/automation-settings/deathMoves.hbs' }, + rules: { template: 'systems/daggerheart/templates/settings/automation-settings/rules.hbs' }, roll: { template: 'systems/daggerheart/templates/settings/automation-settings/roll.hbs' }, footer: { template: 'systems/daggerheart/templates/settings/automation-settings/footer.hbs' } }; @@ -42,7 +42,7 @@ export default class DhAutomationSettings extends HandlebarsApplicationMixin(App /** @inheritdoc */ static TABS = { main: { - tabs: [{ id: 'general' }, { id: 'deathMoves' }, { id: 'roll' }], + tabs: [{ id: 'general' }, { id: 'rules' }, { id: 'roll' }], initial: 'general', labelPrefix: 'DAGGERHEART.GENERAL.Tabs' } diff --git a/module/data/item/domainCard.mjs b/module/data/item/domainCard.mjs index 9a14d45e..327dafce 100644 --- a/module/data/item/domainCard.mjs +++ b/module/data/item/domainCard.mjs @@ -94,10 +94,8 @@ export default class DHDomainCard extends BaseDataItem { return false; } - if (!this.actor.system.loadoutSlot.available && !this.loadoutIgnore) { + if (!this.actor.system.loadoutSlot.available) { data.system.inVault = true; - await this.updateSource({ inVault: true }); - ui.notifications.warn(game.i18n.localize('DAGGERHEART.UI.Notifications.loadoutMaxReached')); } } } diff --git a/module/data/settings/Automation.mjs b/module/data/settings/Automation.mjs index e9952b1c..436f0eb7 100644 --- a/module/data/settings/Automation.mjs +++ b/module/data/settings/Automation.mjs @@ -55,23 +55,6 @@ export default class DhAutomation extends foundry.abstract.DataModel { initial: true, label: 'DAGGERHEART.SETTINGS.Automation.FIELDS.resourceScrollTexts.label' }), - deathMoveAutomation: new fields.SchemaField({ - avoidDeath: new fields.BooleanField({ - required: true, - initial: true, - label: 'DAGGERHEART.CONFIG.DeathMoves.avoidDeath.name' - }), - riskItAll: new fields.BooleanField({ - required: true, - initial: true, - label: 'DAGGERHEART.CONFIG.DeathMoves.riskItAll.name' - }), - blazeOfGlory: new fields.BooleanField({ - required: true, - initial: true, - label: 'DAGGERHEART.CONFIG.DeathMoves.blazeOfGlory.name' - }) - }), defeated: new fields.SchemaField({ enabled: new fields.BooleanField({ required: true, diff --git a/module/enrichers/DualityRollEnricher.mjs b/module/enrichers/DualityRollEnricher.mjs index 5b66179f..f6de8107 100644 --- a/module/enrichers/DualityRollEnricher.mjs +++ b/module/enrichers/DualityRollEnricher.mjs @@ -86,22 +86,19 @@ export const enrichedDualityRoll = async ( { reaction, traitValue, target, difficulty, title, label, advantage, grantResources, customConfig }, event ) => { - const shouldGrantResources = grantResources === undefined ? true : grantResources; - const config = { event: event ?? {}, title: title, headerTitle: label, - actionType: reaction ? 'reaction' : null, roll: { trait: traitValue && target ? traitValue : null, difficulty: difficulty, - advantage - // type: reaction ? 'reaction' : null //not needed really but keeping it for troubleshooting + advantage, + type: reaction ? 'reaction' : null }, skips: { - resources: !shouldGrantResources, - triggers: !shouldGrantResources + resources: !grantResources, + triggers: !grantResources }, type: 'trait', hasRoll: true, diff --git a/module/helpers/utils.mjs b/module/helpers/utils.mjs index c0dd45bd..1cce581a 100644 --- a/module/helpers/utils.mjs +++ b/module/helpers/utils.mjs @@ -12,7 +12,7 @@ export function rollCommandToJSON(text) { const flavor = flavorMatch ? flavorMatch[1] : null; // Match key="quoted string" OR key=unquotedValue - const PAIR_RE = /(\w+)\s*=\s*("(?:[^"\\]|\\.)*"|[^\]\}\s]+)/g; //updated regex to allow escaped quotes in quoted strings and avoid matching closing brackets/braces + const PAIR_RE = /(\w+)=("(?:[^"\\]|\\.)*"|\S+)/g; const result = {}; for (const [, key, raw] of text.matchAll(PAIR_RE)) { let value; diff --git a/src/packs/subclasses/feature_Rousing_Speech_PCmYTX02JLzBpgml.json b/src/packs/subclasses/feature_Rousing_Speech_PCmYTX02JLzBpgml.json index f1596519..e803fb04 100644 --- a/src/packs/subclasses/feature_Rousing_Speech_PCmYTX02JLzBpgml.json +++ b/src/packs/subclasses/feature_Rousing_Speech_PCmYTX02JLzBpgml.json @@ -14,7 +14,15 @@ "description": "

Once per long rest, you can give a heartfelt, inspiring speech. All allies within Far range clear 2 Stress.

", "chatDisplay": false, "actionType": "action", - "cost": [], + "cost": [ + { + "scalable": false, + "key": "hitPoints", + "value": 1, + "step": null, + "consumeOnSuccess": false + } + ], "uses": { "value": null, "max": "1", diff --git a/styles/less/global/elements.less b/styles/less/global/elements.less index 713a4481..e740d917 100755 --- a/styles/less/global/elements.less +++ b/styles/less/global/elements.less @@ -54,9 +54,6 @@ input[type='checkbox'], input[type='radio'] { - height: 20px; - width: 20px; - &:checked::after { color: light-dark(@dark, @golden); } diff --git a/styles/less/hud/token-hud/token-hud.less b/styles/less/hud/token-hud/token-hud.less index e31ede4a..ea58f673 100644 --- a/styles/less/hud/token-hud/token-hud.less +++ b/styles/less/hud/token-hud/token-hud.less @@ -2,13 +2,11 @@ .status-effects { .effect-control { filter: none; - background: var(--dark-blue-90); } .effect-control-container { .effect-control { filter: none; - background: var(--dark-blue-90); } .effect-control-disabled-marker { @@ -24,7 +22,6 @@ .palette-category-title { grid-column: span var(--effect-columns); font-weight: bold; - color: light-dark(@dark-blue, @golden); } } } diff --git a/styles/less/ui/chat/chat.less b/styles/less/ui/chat/chat.less index 494af5f1..1b1e3c1c 100644 --- a/styles/less/ui/chat/chat.less +++ b/styles/less/ui/chat/chat.less @@ -82,7 +82,7 @@ } } - &:not(.duality):not(.fate) { + &:not(.duality .fate) { .font-20 { color: @dark; } @@ -176,6 +176,7 @@ } &.fate { + &.hope { --text-color: @golden; --bg-color: @golden-40; @@ -193,6 +194,7 @@ background-color: @chat-blue-bg; } } + } &.duality { diff --git a/styles/less/ui/chat/sheet.less b/styles/less/ui/chat/sheet.less index 66b539b4..b632db35 100644 --- a/styles/less/ui/chat/sheet.less +++ b/styles/less/ui/chat/sheet.less @@ -3,70 +3,68 @@ .daggerheart.chat-sidebar.theme-light, #interface.theme-light { - .chat-message:not(.duality):not(.fate) { - .message-content { - color: @dark; + .chat-message:not(.duality) .message-content { + color: @dark; - blockquote { - border-left: 5px solid @dark-blue-40; - } + blockquote { + border-left: 5px solid @dark-blue-40; + } - a[href] { + a[href] { + color: @dark-blue; + } + + a[href]:hover, + a[href].active { + font-weight: bold; + text-shadow: 0 0 8px @dark-blue; + } + + button { + background: transparent; + border: 1px solid @dark-blue; + color: @dark-blue; + + &:hover { + background: @light-black; color: @dark-blue; } - a[href]:hover, - a[href].active { - font-weight: bold; - text-shadow: 0 0 8px @dark-blue; - } - - button { + &:disabled { background: transparent; - border: 1px solid @dark-blue; color: @dark-blue; &:hover { - background: @light-black; - color: @dark-blue; - } - - &:disabled { background: transparent; color: @dark-blue; - - &:hover { - background: transparent; - color: @dark-blue; - } - } - - &.reverted { - background: @dark-blue-10; - color: @dark-blue; - border: 1px solid @dark; - &:hover { - background: transparent; - color: @dark-blue; - } - img { - border-radius: 3px; - } } } - .roll-buttons button { - height: 40px; - font-family: @font-body; - font-weight: bold; - } - - .dice-roll .dice-formula, - .dice-roll .dice-total { - background: @dark-blue-40; + &.reverted { + background: @dark-blue-10; color: @dark-blue; + border: 1px solid @dark; + &:hover { + background: transparent; + color: @dark-blue; + } + img { + border-radius: 3px; + } } } + + .roll-buttons button { + height: 40px; + font-family: @font-body; + font-weight: bold; + } + + .dice-roll .dice-formula, + .dice-roll .dice-total { + background: @dark-blue-40; + color: @dark-blue; + } } } diff --git a/styles/less/ux/tooltip/tooltip.less b/styles/less/ux/tooltip/tooltip.less index 8e6f638d..0f632772 100644 --- a/styles/less/ux/tooltip/tooltip.less +++ b/styles/less/ux/tooltip/tooltip.less @@ -227,6 +227,16 @@ aside[role='tooltip'].locked-tooltip:has(div.daggerheart.dh-style.tooltip.card-s outline: 1px solid light-dark(@dark-blue, @golden); } +.theme-light #tooltip:has(div.daggerheart.dh-style.tooltip.card-style), +.theme-light aside[role='tooltip']:has(div.daggerheart.dh-style.tooltip.card-style) { + background-image: url('../assets/parchments/dh-parchment-light.png'); +} + +.theme-light aside[role='tooltip'].locked-tooltip:has(div.daggerheart.dh-style.tooltip) { + box-shadow: 0 0 25px @dark-blue-90; + outline: 1px solid light-dark(@dark-blue, @golden); +} + #tooltip, .locked-tooltip, .daggerheart.dh-style.tooltip { diff --git a/system.json b/system.json index 4a5eee0f..8624bab7 100644 --- a/system.json +++ b/system.json @@ -2,7 +2,7 @@ "id": "daggerheart", "title": "Daggerheart", "description": "An unofficial implementation of the Daggerheart system", - "version": "1.6.1", + "version": "1.6.0", "compatibility": { "minimum": "13.346", "verified": "13.351", diff --git a/templates/dialogs/dice-roll/rollSelection.hbs b/templates/dialogs/dice-roll/rollSelection.hbs index f31a4fa8..5851a33d 100644 --- a/templates/dialogs/dice-roll/rollSelection.hbs +++ b/templates/dialogs/dice-roll/rollSelection.hbs @@ -125,6 +125,7 @@ {{/if}}
+ {{#if @root.advantage}} {{localize "DAGGERHEART.GENERAL.Modifier.plural"}}