From 0d0b5125bacc5d61b4f0596490842e79e8eec3de Mon Sep 17 00:00:00 2001 From: WBHarry <89362246+WBHarry@users.noreply.github.com> Date: Mon, 2 Mar 2026 09:37:33 +0100 Subject: [PATCH 01/22] [Fix] 1683 - Strange Patterns Explanation (#1693) * Added an explanation text to Strange Patterns trigger dialog * Update lang/en.json Co-authored-by: Chris Ryan <73275196+chrisryan10@users.noreply.github.com> --------- Co-authored-by: Chris Ryan <73275196+chrisryan10@users.noreply.github.com> --- lang/en.json | 1 + .../classes/feature_Strange_Patterns_6YsfFjmCGuFYVhT4.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lang/en.json b/lang/en.json index 937de844..7b0840e4 100755 --- a/lang/en.json +++ b/lang/en.json @@ -1294,6 +1294,7 @@ "triggerTexts": { "strangePatternsContentTitle": "Matched {nr} times.", "strangePatternsContentSubTitle": "Increase hope and stress to a total of {nr}.", + "strangePatternsActionExplanation": "Left click to increase, right click to decrease", "ferocityContent": "Spend 2 Hope to gain {bonus} bonus Evasion until after the next attack against you?", "ferocityEffectDescription": "Your evasion is increased by {bonus}. This bonus lasts until after the next attack made against you." }, diff --git a/src/packs/classes/feature_Strange_Patterns_6YsfFjmCGuFYVhT4.json b/src/packs/classes/feature_Strange_Patterns_6YsfFjmCGuFYVhT4.json index 95f42c06..953b3a2c 100644 --- a/src/packs/classes/feature_Strange_Patterns_6YsfFjmCGuFYVhT4.json +++ b/src/packs/classes/feature_Strange_Patterns_6YsfFjmCGuFYVhT4.json @@ -85,7 +85,7 @@ { "trigger": "dualityRoll", "triggeringActorType": "self", - "command": "/* Ignore if it's a TagTeam roll */\nconst tagTeam = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.TagTeamRoll);\nif (tagTeam.members[actor.id]) return;\n\n/* Check if there's a Strange Pattern match */\nconst dice = [roll.dFear.total, roll.dHope.total];\nconst resource = this.parent.resource?.diceStates ? Object.values(this.parent.resource.diceStates).map(x => x.value)[0] : null;\nconst nrMatches = dice.filter(x => x === resource).length;\n\nif (!nrMatches) return;\n\n/* Create a dialog to choose Hope or Stress - or to cancel*/\nconst content = `\n
When the @Lookup[@name] marks their last HP, replace them with the @UUID[Compendium.daggerheart.adversaries.Actor.RXkZTwBRi4dJ3JE5]{Fallen Warlord: Undefeated Champion} and immediately spotlight them.
", "resource": null, - "actions": {}, + "actions": { + "gP426WmWbtrZEWCD": { + "type": "transform", + "_id": "gP426WmWbtrZEWCD", + "systemPath": "actions", + "baseAction": false, + "description": "", + "chatDisplay": true, + "originItem": { + "type": "itemCollection" + }, + "actionType": "action", + "triggers": [], + "cost": [], + "uses": { + "value": null, + "max": null, + "recovery": null, + "consumeOnSuccess": false + }, + "transform": { + "actorUUID": "Compendium.daggerheart.adversaries.Actor.RXkZTwBRi4dJ3JE5", + "resourceRefresh": { + "hitPoints": true, + "stress": true + } + } + } + }, "originItemType": null, "originId": null, "featureForm": "reaction" diff --git a/src/packs/adversaries/adversary_Volcanic_Dragon__Molten_Scourge_eArAPuB38CNR0ZIM.json b/src/packs/adversaries/adversary_Volcanic_Dragon__Molten_Scourge_eArAPuB38CNR0ZIM.json index b23da064..7f9deb6c 100644 --- a/src/packs/adversaries/adversary_Volcanic_Dragon__Molten_Scourge_eArAPuB38CNR0ZIM.json +++ b/src/packs/adversaries/adversary_Volcanic_Dragon__Molten_Scourge_eArAPuB38CNR0ZIM.json @@ -846,7 +846,37 @@ "system": { "description": "When the @Lookup[@name] marks their last HP, replace them with the @UUID[Compendium.daggerheart.adversaries.Actor.pMuXGCSOQaxpi5tb]{Ashen Tyrant} and immediately spotlight them.
", "resource": null, - "actions": {}, + "actions": { + "cFqFjemAfAjB0OB0": { + "type": "transform", + "_id": "cFqFjemAfAjB0OB0", + "systemPath": "actions", + "baseAction": false, + "description": "", + "chatDisplay": true, + "originItem": { + "type": "itemCollection" + }, + "actionType": "action", + "triggers": [], + "cost": [], + "uses": { + "value": null, + "max": "", + "recovery": null, + "consumeOnSuccess": false + }, + "transform": { + "actorUUID": "Compendium.daggerheart.adversaries.Actor.pMuXGCSOQaxpi5tb", + "resourceRefresh": { + "hitPoints": true, + "stress": true + } + }, + "name": "Transform", + "range": "" + } + }, "originItemType": null, "originId": null, "featureForm": "reaction" diff --git a/src/packs/adversaries/adversary_Volcanic_Dragon__Obsidian_Predator_ladm7wykhZczYzrQ.json b/src/packs/adversaries/adversary_Volcanic_Dragon__Obsidian_Predator_ladm7wykhZczYzrQ.json index 2e2adbdd..5f32aae5 100644 --- a/src/packs/adversaries/adversary_Volcanic_Dragon__Obsidian_Predator_ladm7wykhZczYzrQ.json +++ b/src/packs/adversaries/adversary_Volcanic_Dragon__Obsidian_Predator_ladm7wykhZczYzrQ.json @@ -742,7 +742,37 @@ "system": { "description": "When the @Lookup[@name] marks their last HP, replace them with the @UUID[Compendium.daggerheart.adversaries.Actor.eArAPuB38CNR0ZIM]{Molten Scourge} and immediately spotlight them.
", "resource": null, - "actions": {}, + "actions": { + "OxGkCGgIl4vGFufD": { + "type": "transform", + "_id": "OxGkCGgIl4vGFufD", + "systemPath": "actions", + "baseAction": false, + "description": "", + "chatDisplay": true, + "originItem": { + "type": "itemCollection" + }, + "actionType": "action", + "triggers": [], + "cost": [], + "uses": { + "value": null, + "max": "", + "recovery": null, + "consumeOnSuccess": false + }, + "transform": { + "actorUUID": "Compendium.daggerheart.adversaries.Actor.eArAPuB38CNR0ZIM", + "resourceRefresh": { + "hitPoints": true, + "stress": true + } + }, + "name": "Transform", + "range": "" + } + }, "originItemType": null, "originId": null, "featureForm": "reaction" diff --git a/styles/less/sheets/actions/actions.less b/styles/less/sheets/actions/actions.less index 9be56c8e..5c21dc60 100644 --- a/styles/less/sheets/actions/actions.less +++ b/styles/less/sheets/actions/actions.less @@ -4,48 +4,78 @@ display: flex; flex-direction: column; gap: 10px; + } - .actor-summon-line { + .transform-container { + width: 100%; + display: flex; + flex-direction: column; + gap: 10px; + + .transform-resources { + display: flex; + flex-direction: column; + + .transform-resource { + display: flex; + align-items: center; + gap: 2px; + + .resource-title { + font-size: var(--font-size-18); + } + } + } + } + + .actor-drop-line { + display: flex; + align-items: center; + gap: 5px; + border-radius: 3px; + + .actor-drop-name { + flex: 2; display: flex; align-items: center; gap: 5px; - border-radius: 3px; - .actor-summon-name { - flex: 2; - display: flex; - align-items: center; - gap: 5px; - - img { - height: 40px; - } - } - - .actor-summon-controls { - flex: 1; - display: flex; - align-items: center; - gap: 5px; - - .controls { - display: flex; - gap: 5px; - } + img { + height: 40px; } } - .summon-dragger { + .actor-drop-controls { + flex: 1; display: flex; align-items: center; - justify-content: center; - box-sizing: border-box; - height: 40px; - margin-top: 10px; - border: 1px dashed light-dark(@dark-blue-50, @beige-50); - border-radius: 3px; - color: light-dark(@dark-blue-50, @beige-50); + gap: 5px; + + &.transform { + justify-content: flex-end; + } + + .controls { + display: flex; + gap: 5px; + } } + + .actor-drop-hint { + flex: none; + } + } + + .drop-dragger { + display: flex; + align-items: center; + justify-content: center; + box-sizing: border-box; + height: 40px; + margin-top: 10px; + border: 1px dashed light-dark(@dark-blue-50, @beige-50); + border-radius: 3px; + color: light-dark(@dark-blue-50, @beige-50); } .trigger-data { diff --git a/templates/actionTypes/summon.hbs b/templates/actionTypes/summon.hbs index 429977d9..18fed2e2 100644 --- a/templates/actionTypes/summon.hbs +++ b/templates/actionTypes/summon.hbs @@ -1,19 +1,19 @@ -