diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 33910ac9..aef0ddd1 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -35,7 +35,7 @@ jobs: env: version: ${{steps.get_version.outputs.version-without-v}} url: https://github.com/${{github.repository}} - manifest: https://raw.githubusercontent.com/{{github.repository}}/V13/system.json + manifest: https://github.com/${{github.repository}}/releases/latest/download/system.json download: https://github.com/${{github.repository}}/releases/download/${{github.event.release.tag_name}}/system.zip # Create a zip file with all files required by the module to add to the release diff --git a/module/canvas/placeables/measuredTemplate.mjs b/module/canvas/placeables/measuredTemplate.mjs index e439dadc..e1ea79f5 100644 --- a/module/canvas/placeables/measuredTemplate.mjs +++ b/module/canvas/placeables/measuredTemplate.mjs @@ -18,7 +18,7 @@ export default class DhMeasuredTemplate extends foundry.canvas.placeables.Measur static getRangeLabels(distanceValue, settings) { let result = { distance: distanceValue, units: '' }; - if (!settings.enabled || !canvas.scene) return result; + if (!settings.enabled) return result; const sceneRangeMeasurement = canvas.scene.flags.daggerheart?.rangeMeasurement; const { disable, custom } = CONFIG.DH.GENERAL.sceneRangeMeasurementSetting; diff --git a/module/documents/tokenManager.mjs b/module/documents/tokenManager.mjs index f766a677..be5467da 100644 --- a/module/documents/tokenManager.mjs +++ b/module/documents/tokenManager.mjs @@ -95,7 +95,7 @@ export default class DhTokenManager { : this.#actor; const tokenData = await actor.getTokenDocument(); const result = await canvas.scene.createEmbeddedDocuments('Token', [ - { ...tokenData.toObject(), x: this.#activePreview.document.x, y: this.#activePreview.document.y } + { ...tokenData, x: this.#activePreview.document.x, y: this.#activePreview.document.y } ]); this.#activePreview = undefined; diff --git a/module/enrichers/TemplateEnricher.mjs b/module/enrichers/TemplateEnricher.mjs index 74462e00..4bc8fdeb 100644 --- a/module/enrichers/TemplateEnricher.mjs +++ b/module/enrichers/TemplateEnricher.mjs @@ -65,7 +65,13 @@ export const renderMeasuredTemplate = async event => { ? '180' : undefined; - const distance = getTemplateDistance(range, type); + let baseDistance = range; + if (Number.isNaN(Number(range))) { + baseDistance = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.variantRules).rangeMeasurement[ + range + ]; + } + const distance = type === CONFIG.DH.GENERAL.templateTypes.EMANATION ? baseDistance + 2.5 : baseDistance; const { width, height } = game.canvas.scene.dimensions; const data = { @@ -80,23 +86,3 @@ export const renderMeasuredTemplate = async event => { CONFIG.ux.TemplateManager.createPreview(data); }; - -const getTemplateDistance = (range, type) => { - const rangeNumber = Number(range); - if (!Number.isNaN(rangeNumber)) return rangeNumber; - - const { custom } = CONFIG.DH.GENERAL.sceneRangeMeasurementSetting; - const sceneMeasurements = canvas.scene?.flags.daggerheart?.rangeMeasurement; - const globalMeasurements = game.settings.get( - CONFIG.DH.id, - CONFIG.DH.SETTINGS.gameSettings.variantRules - ).rangeMeasurement; - - const settings = sceneMeasurements?.setting === custom.id ? sceneMeasurements : globalMeasurements; - const baseDistance = settings[range]; - - if (type !== CONFIG.DH.GENERAL.templateTypes.EMANATION) return baseDistance; - - const emanationAddDistance = settings.melee / 2; - return baseDistance + emanationAddDistance; -}; diff --git a/src/packs/domains/domainCard_Rain_of_Blades_Ucenef6JpjQxwXni.json b/src/packs/domains/domainCard_Rain_of_Blades_Ucenef6JpjQxwXni.json index 7a5ccb1b..839dc2c2 100644 --- a/src/packs/domains/domainCard_Rain_of_Blades_Ucenef6JpjQxwXni.json +++ b/src/packs/domains/domainCard_Rain_of_Blades_Ucenef6JpjQxwXni.json @@ -36,8 +36,7 @@ "resultBased": false, "value": { "custom": { - "enabled": false, - "formula": "" + "enabled": false }, "multiplier": "prof", "dice": "d8", @@ -45,9 +44,7 @@ "flatMultiplier": 1 }, "applyTo": "hitPoints", - "type": [ - "magical" - ], + "type": [], "base": false, "valueAlt": { "multiplier": "prof", @@ -55,8 +52,7 @@ "dice": "d6", "bonus": null, "custom": { - "enabled": false, - "formula": "" + "enabled": false } } } @@ -91,6 +87,57 @@ "name": "Cast", "img": "icons/skills/melee/spear-tips-three-green.webp", "range": "veryClose" + }, + "CUKoYyDxQhNc0pLs": { + "type": "damage", + "_id": "CUKoYyDxQhNc0pLs", + "systemPath": "actions", + "description": "

If a target you hit is Vulnerable, they take an extra 1d8 damage.

", + "chatDisplay": true, + "actionType": "action", + "cost": [], + "uses": { + "value": null, + "max": "", + "recovery": null + }, + "damage": { + "parts": [ + { + "value": { + "custom": { + "enabled": false + }, + "multiplier": "flat", + "flatMultiplier": 1, + "dice": "d8", + "bonus": null + }, + "applyTo": "hitPoints", + "type": [], + "base": false, + "resultBased": false, + "valueAlt": { + "multiplier": "prof", + "flatMultiplier": 1, + "dice": "d6", + "bonus": null, + "custom": { + "enabled": false + } + } + } + ], + "includeBase": false + }, + "target": { + "type": "any", + "amount": null + }, + "effects": [], + "name": "Damage Against Vulnerable", + "img": "icons/skills/melee/spear-tips-three-purple.webp", + "range": "" } }, "attribution": { diff --git a/src/packs/items/weapons/weapon_Labrys_Axe_ijWppQzSOqVCb3rE.json b/src/packs/items/weapons/weapon_Labrys_Axe_ijWppQzSOqVCb3rE.json index 3c11528e..4958bbe5 100644 --- a/src/packs/items/weapons/weapon_Labrys_Axe_ijWppQzSOqVCb3rE.json +++ b/src/packs/items/weapons/weapon_Labrys_Axe_ijWppQzSOqVCb3rE.json @@ -5,14 +5,22 @@ "_id": "ijWppQzSOqVCb3rE", "img": "icons/weapons/axes/axe-battle-jagged.webp", "system": { - "description": "Protective: +1 to Armor Score", + "description": "", "actions": {}, "attached": [], "tier": 3, "equipped": false, "secondary": false, "burden": "twoHanded", - "weaponFeatures": [], + "weaponFeatures": [ + { + "value": "protective", + "effectIds": [ + "qTxADRsQnKiYfOiQ" + ], + "actionIds": [] + } + ], "attack": { "name": "Attack", "img": "icons/skills/melee/blood-slash-foam-red.webp", @@ -103,13 +111,13 @@ "effects": [ { "name": "Protective", - "description": "+1 to Armor Score", - "img": "icons/magic/defensive/shield-barrier-deflect-teal.webp", + "description": "Add your character's Tier to your Armor Score", + "img": "icons/skills/melee/shield-block-gray-orange.webp", "changes": [ { "key": "system.armorScore", "mode": 2, - "value": "1" + "value": "ITEM.@system.tier" } ], "_id": "qTxADRsQnKiYfOiQ", diff --git a/system.json b/system.json index a19d9e91..9242a24a 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.9.7", + "version": "1.9.6", "compatibility": { "minimum": "13.346", "verified": "13.351", diff --git a/templates/sheets/items/armor/description.hbs b/templates/sheets/items/armor/description.hbs index 086879d6..af2698ef 100644 --- a/templates/sheets/items/armor/description.hbs +++ b/templates/sheets/items/armor/description.hbs @@ -1,9 +1,9 @@ -{{#if features.length}} -
+
+ {{#if features.length}}
{{#each features as | feature |}}
{{localize feature.label}}: {{{localize feature.description}}}
{{/each}}
-
-{{/if}} \ No newline at end of file + {{/if}} +
\ No newline at end of file diff --git a/templates/sheets/items/weapon/description.hbs b/templates/sheets/items/weapon/description.hbs index 74e4e234..af2698ef 100644 --- a/templates/sheets/items/weapon/description.hbs +++ b/templates/sheets/items/weapon/description.hbs @@ -1,9 +1,9 @@ -{{#if features.length}} -
+
+ {{#if features.length}}
{{#each features as | feature |}}
{{localize feature.label}}: {{{localize feature.description}}}
{{/each}}
-
-{{/if}} \ No newline at end of file + {{/if}} +
\ No newline at end of file