mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-04-22 23:43:37 +02:00
Compare commits
53 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d7b37f8178 | ||
|
|
f8df53ed83 | ||
|
|
8ee5db2832 | ||
|
|
bbc521ece0 | ||
|
|
be8d7f6469 | ||
|
|
3a4b66f487 | ||
|
|
cdf159b4a7 | ||
|
|
413a37483c | ||
|
|
c5e21d9d92 | ||
|
|
10c0b6b51e | ||
|
|
652a554c9a | ||
|
|
c0ed5fe697 | ||
|
|
ff65abe09b | ||
|
|
ec7a7b378d | ||
|
|
8e34356905 | ||
|
|
35bceac520 | ||
|
|
436acb0617 | ||
|
|
1d114633f5 | ||
|
|
1c70b46639 | ||
|
|
ae38245877 | ||
|
|
af5d3d4568 | ||
|
|
6b5c1ff965 | ||
|
|
42a22a49f0 | ||
|
|
da77c2a190 | ||
|
|
68decf0b57 | ||
|
|
4f0670cc35 | ||
|
|
b346ce6766 | ||
|
|
dddd0581f7 | ||
|
|
83329fac46 | ||
|
|
ee0b7b2792 | ||
|
|
4d062a6892 | ||
|
|
487c1fd9a2 | ||
|
|
3aa5cd806a | ||
|
|
2e93b79633 | ||
|
|
244dbd4902 | ||
|
|
c7aed6825a | ||
|
|
9cb5112b62 | ||
|
|
81b6f7fc51 | ||
|
|
828fffd552 | ||
|
|
fc5626ac47 | ||
|
|
2e62545aa7 | ||
|
|
b09c712dd5 | ||
|
|
ca4336bd39 | ||
|
|
77ac11c522 | ||
|
|
50311679a5 | ||
|
|
3a7bcd1b0a | ||
|
|
511e4bd644 | ||
|
|
395820513b | ||
|
|
3566ea3fd3 | ||
|
|
29d502fb97 | ||
|
|
685a25d25a | ||
|
|
dd045b3df7 | ||
|
|
0aabcec340 |
9 changed files with 45 additions and 86 deletions
2
.github/workflows/deploy.yml
vendored
2
.github/workflows/deploy.yml
vendored
|
|
@ -35,7 +35,7 @@ jobs:
|
|||
env:
|
||||
version: ${{steps.get_version.outputs.version-without-v}}
|
||||
url: https://github.com/${{github.repository}}
|
||||
manifest: https://github.com/${{github.repository}}/releases/latest/download/system.json
|
||||
manifest: https://raw.githubusercontent.com/${{github.repository}}/V13/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
|
||||
|
|
|
|||
|
|
@ -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) return result;
|
||||
if (!settings.enabled || !canvas.scene) return result;
|
||||
|
||||
const sceneRangeMeasurement = canvas.scene.flags.daggerheart?.rangeMeasurement;
|
||||
const { disable, custom } = CONFIG.DH.GENERAL.sceneRangeMeasurementSetting;
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ export default class DhTokenManager {
|
|||
: this.#actor;
|
||||
const tokenData = await actor.getTokenDocument();
|
||||
const result = await canvas.scene.createEmbeddedDocuments('Token', [
|
||||
{ ...tokenData, x: this.#activePreview.document.x, y: this.#activePreview.document.y }
|
||||
{ ...tokenData.toObject(), x: this.#activePreview.document.x, y: this.#activePreview.document.y }
|
||||
]);
|
||||
|
||||
this.#activePreview = undefined;
|
||||
|
|
|
|||
|
|
@ -65,13 +65,7 @@ export const renderMeasuredTemplate = async event => {
|
|||
? '180'
|
||||
: undefined;
|
||||
|
||||
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 distance = getTemplateDistance(range, type);
|
||||
|
||||
const { width, height } = game.canvas.scene.dimensions;
|
||||
const data = {
|
||||
|
|
@ -86,3 +80,23 @@ 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;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -36,7 +36,8 @@
|
|||
"resultBased": false,
|
||||
"value": {
|
||||
"custom": {
|
||||
"enabled": false
|
||||
"enabled": false,
|
||||
"formula": ""
|
||||
},
|
||||
"multiplier": "prof",
|
||||
"dice": "d8",
|
||||
|
|
@ -44,7 +45,9 @@
|
|||
"flatMultiplier": 1
|
||||
},
|
||||
"applyTo": "hitPoints",
|
||||
"type": [],
|
||||
"type": [
|
||||
"magical"
|
||||
],
|
||||
"base": false,
|
||||
"valueAlt": {
|
||||
"multiplier": "prof",
|
||||
|
|
@ -52,7 +55,8 @@
|
|||
"dice": "d6",
|
||||
"bonus": null,
|
||||
"custom": {
|
||||
"enabled": false
|
||||
"enabled": false,
|
||||
"formula": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -87,57 +91,6 @@
|
|||
"name": "Cast",
|
||||
"img": "icons/skills/melee/spear-tips-three-green.webp",
|
||||
"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": {
|
||||
|
|
|
|||
|
|
@ -5,22 +5,14 @@
|
|||
"_id": "ijWppQzSOqVCb3rE",
|
||||
"img": "icons/weapons/axes/axe-battle-jagged.webp",
|
||||
"system": {
|
||||
"description": "",
|
||||
"description": "<strong>Protective</strong>: +1 to Armor Score",
|
||||
"actions": {},
|
||||
"attached": [],
|
||||
"tier": 3,
|
||||
"equipped": false,
|
||||
"secondary": false,
|
||||
"burden": "twoHanded",
|
||||
"weaponFeatures": [
|
||||
{
|
||||
"value": "protective",
|
||||
"effectIds": [
|
||||
"qTxADRsQnKiYfOiQ"
|
||||
],
|
||||
"actionIds": []
|
||||
}
|
||||
],
|
||||
"weaponFeatures": [],
|
||||
"attack": {
|
||||
"name": "Attack",
|
||||
"img": "icons/skills/melee/blood-slash-foam-red.webp",
|
||||
|
|
@ -111,13 +103,13 @@
|
|||
"effects": [
|
||||
{
|
||||
"name": "Protective",
|
||||
"description": "Add your character's Tier to your Armor Score",
|
||||
"img": "icons/skills/melee/shield-block-gray-orange.webp",
|
||||
"description": "+1 to Armor Score",
|
||||
"img": "icons/magic/defensive/shield-barrier-deflect-teal.webp",
|
||||
"changes": [
|
||||
{
|
||||
"key": "system.armorScore",
|
||||
"mode": 2,
|
||||
"value": "ITEM.@system.tier"
|
||||
"value": "1"
|
||||
}
|
||||
],
|
||||
"_id": "qTxADRsQnKiYfOiQ",
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"id": "daggerheart",
|
||||
"title": "Daggerheart",
|
||||
"description": "An unofficial implementation of the Daggerheart system",
|
||||
"version": "1.9.6",
|
||||
"version": "1.9.8",
|
||||
"compatibility": {
|
||||
"minimum": "13.346",
|
||||
"verified": "13.351",
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<div class="item-description-outer-container">
|
||||
{{#if features.length}}
|
||||
{{#if features.length}}
|
||||
<div class="item-description-outer-container">
|
||||
<div class="item-description-container">
|
||||
{{#each features as | feature |}}
|
||||
<div><strong>{{localize feature.label}}</strong>: {{{localize feature.description}}}</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
<div class="item-description-outer-container">
|
||||
{{#if features.length}}
|
||||
{{#if features.length}}
|
||||
<div class="item-description-outer-container">
|
||||
<div class="item-description-container">
|
||||
{{#each features as | feature |}}
|
||||
<div><strong>{{localize feature.label}}</strong>: {{{localize feature.description}}}</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
Loading…
Add table
Add a link
Reference in a new issue