mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-04-25 00:43:38 +02:00
Compare commits
No commits in common. "f8df53ed8368928d241e810a08d6aba6fdb55b36" and "3a4b66f48783654ba11cee673d4381183eb1a7c2" have entirely different histories.
f8df53ed83
...
3a4b66f487
9 changed files with 86 additions and 45 deletions
2
.github/workflows/deploy.yml
vendored
2
.github/workflows/deploy.yml
vendored
|
|
@ -35,7 +35,7 @@ jobs:
|
||||||
env:
|
env:
|
||||||
version: ${{steps.get_version.outputs.version-without-v}}
|
version: ${{steps.get_version.outputs.version-without-v}}
|
||||||
url: https://github.com/${{github.repository}}
|
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
|
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
|
# Create a zip file with all files required by the module to add to the release
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ export default class DhMeasuredTemplate extends foundry.canvas.placeables.Measur
|
||||||
|
|
||||||
static getRangeLabels(distanceValue, settings) {
|
static getRangeLabels(distanceValue, settings) {
|
||||||
let result = { distance: distanceValue, units: '' };
|
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 sceneRangeMeasurement = canvas.scene.flags.daggerheart?.rangeMeasurement;
|
||||||
const { disable, custom } = CONFIG.DH.GENERAL.sceneRangeMeasurementSetting;
|
const { disable, custom } = CONFIG.DH.GENERAL.sceneRangeMeasurementSetting;
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ export default class DhTokenManager {
|
||||||
: this.#actor;
|
: this.#actor;
|
||||||
const tokenData = await actor.getTokenDocument();
|
const tokenData = await actor.getTokenDocument();
|
||||||
const result = await canvas.scene.createEmbeddedDocuments('Token', [
|
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;
|
this.#activePreview = undefined;
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,13 @@ export const renderMeasuredTemplate = async event => {
|
||||||
? '180'
|
? '180'
|
||||||
: undefined;
|
: 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 { width, height } = game.canvas.scene.dimensions;
|
||||||
const data = {
|
const data = {
|
||||||
|
|
@ -80,23 +86,3 @@ export const renderMeasuredTemplate = async event => {
|
||||||
|
|
||||||
CONFIG.ux.TemplateManager.createPreview(data);
|
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;
|
|
||||||
};
|
|
||||||
|
|
|
||||||
|
|
@ -36,8 +36,7 @@
|
||||||
"resultBased": false,
|
"resultBased": false,
|
||||||
"value": {
|
"value": {
|
||||||
"custom": {
|
"custom": {
|
||||||
"enabled": false,
|
"enabled": false
|
||||||
"formula": ""
|
|
||||||
},
|
},
|
||||||
"multiplier": "prof",
|
"multiplier": "prof",
|
||||||
"dice": "d8",
|
"dice": "d8",
|
||||||
|
|
@ -45,9 +44,7 @@
|
||||||
"flatMultiplier": 1
|
"flatMultiplier": 1
|
||||||
},
|
},
|
||||||
"applyTo": "hitPoints",
|
"applyTo": "hitPoints",
|
||||||
"type": [
|
"type": [],
|
||||||
"magical"
|
|
||||||
],
|
|
||||||
"base": false,
|
"base": false,
|
||||||
"valueAlt": {
|
"valueAlt": {
|
||||||
"multiplier": "prof",
|
"multiplier": "prof",
|
||||||
|
|
@ -55,8 +52,7 @@
|
||||||
"dice": "d6",
|
"dice": "d6",
|
||||||
"bonus": null,
|
"bonus": null,
|
||||||
"custom": {
|
"custom": {
|
||||||
"enabled": false,
|
"enabled": false
|
||||||
"formula": ""
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -91,6 +87,57 @@
|
||||||
"name": "Cast",
|
"name": "Cast",
|
||||||
"img": "icons/skills/melee/spear-tips-three-green.webp",
|
"img": "icons/skills/melee/spear-tips-three-green.webp",
|
||||||
"range": "veryClose"
|
"range": "veryClose"
|
||||||
|
},
|
||||||
|
"CUKoYyDxQhNc0pLs": {
|
||||||
|
"type": "damage",
|
||||||
|
"_id": "CUKoYyDxQhNc0pLs",
|
||||||
|
"systemPath": "actions",
|
||||||
|
"description": "<p>If a target you hit is <em>Vulnerable</em>, they take an extra <strong>1d8</strong> damage.</p>",
|
||||||
|
"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": {
|
"attribution": {
|
||||||
|
|
|
||||||
|
|
@ -5,14 +5,22 @@
|
||||||
"_id": "ijWppQzSOqVCb3rE",
|
"_id": "ijWppQzSOqVCb3rE",
|
||||||
"img": "icons/weapons/axes/axe-battle-jagged.webp",
|
"img": "icons/weapons/axes/axe-battle-jagged.webp",
|
||||||
"system": {
|
"system": {
|
||||||
"description": "<strong>Protective</strong>: +1 to Armor Score",
|
"description": "",
|
||||||
"actions": {},
|
"actions": {},
|
||||||
"attached": [],
|
"attached": [],
|
||||||
"tier": 3,
|
"tier": 3,
|
||||||
"equipped": false,
|
"equipped": false,
|
||||||
"secondary": false,
|
"secondary": false,
|
||||||
"burden": "twoHanded",
|
"burden": "twoHanded",
|
||||||
"weaponFeatures": [],
|
"weaponFeatures": [
|
||||||
|
{
|
||||||
|
"value": "protective",
|
||||||
|
"effectIds": [
|
||||||
|
"qTxADRsQnKiYfOiQ"
|
||||||
|
],
|
||||||
|
"actionIds": []
|
||||||
|
}
|
||||||
|
],
|
||||||
"attack": {
|
"attack": {
|
||||||
"name": "Attack",
|
"name": "Attack",
|
||||||
"img": "icons/skills/melee/blood-slash-foam-red.webp",
|
"img": "icons/skills/melee/blood-slash-foam-red.webp",
|
||||||
|
|
@ -103,13 +111,13 @@
|
||||||
"effects": [
|
"effects": [
|
||||||
{
|
{
|
||||||
"name": "Protective",
|
"name": "Protective",
|
||||||
"description": "+1 to Armor Score",
|
"description": "Add your character's Tier to your Armor Score",
|
||||||
"img": "icons/magic/defensive/shield-barrier-deflect-teal.webp",
|
"img": "icons/skills/melee/shield-block-gray-orange.webp",
|
||||||
"changes": [
|
"changes": [
|
||||||
{
|
{
|
||||||
"key": "system.armorScore",
|
"key": "system.armorScore",
|
||||||
"mode": 2,
|
"mode": 2,
|
||||||
"value": "1"
|
"value": "ITEM.@system.tier"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"_id": "qTxADRsQnKiYfOiQ",
|
"_id": "qTxADRsQnKiYfOiQ",
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
"id": "daggerheart",
|
"id": "daggerheart",
|
||||||
"title": "Daggerheart",
|
"title": "Daggerheart",
|
||||||
"description": "An unofficial implementation of the Daggerheart system",
|
"description": "An unofficial implementation of the Daggerheart system",
|
||||||
"version": "1.9.7",
|
"version": "1.9.6",
|
||||||
"compatibility": {
|
"compatibility": {
|
||||||
"minimum": "13.346",
|
"minimum": "13.346",
|
||||||
"verified": "13.351",
|
"verified": "13.351",
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
{{#if features.length}}
|
|
||||||
<div class="item-description-outer-container">
|
<div class="item-description-outer-container">
|
||||||
|
{{#if features.length}}
|
||||||
<div class="item-description-container">
|
<div class="item-description-container">
|
||||||
{{#each features as | feature |}}
|
{{#each features as | feature |}}
|
||||||
<div><strong>{{localize feature.label}}</strong>: {{{localize feature.description}}}</div>
|
<div><strong>{{localize feature.label}}</strong>: {{{localize feature.description}}}</div>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
{{#if features.length}}
|
|
||||||
<div class="item-description-outer-container">
|
<div class="item-description-outer-container">
|
||||||
|
{{#if features.length}}
|
||||||
<div class="item-description-container">
|
<div class="item-description-container">
|
||||||
{{#each features as | feature |}}
|
{{#each features as | feature |}}
|
||||||
<div><strong>{{localize feature.label}}</strong>: {{{localize feature.description}}}</div>
|
<div><strong>{{localize feature.label}}</strong>: {{{localize feature.description}}}</div>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
</div>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue