Compare commits
3 commits
3c184cb3e9
...
e5d9b25566
Author | SHA1 | Date | |
---|---|---|---|
e5d9b25566 | |||
|
261d7a8b5a | ||
704798cc27 |
6 changed files with 149 additions and 148 deletions
10
module.json
10
module.json
|
@ -11,11 +11,11 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"url": "https://git.f3l.de/dungeonslayers/tickwerk",
|
"url": "https://git.f3l.de/dungeonslayers/tickwerk",
|
||||||
"license": "https://git.f3l.de/dungeonslayers/tickwerk/raw/tag/1.3.2/LICENSE.md",
|
"license": "https://git.f3l.de/dungeonslayers/tickwerk/raw/tag/1.3.3/LICENSE.md",
|
||||||
"readme": "https://git.f3l.de/dungeonslayers/tickwerk/raw/tag/1.3.2/README.md",
|
"readme": "https://git.f3l.de/dungeonslayers/tickwerk/raw/tag/1.3.3/README.md",
|
||||||
"bugs": "https://git.f3l.de/dungeonslayers/tickwerk/issues",
|
"bugs": "https://git.f3l.de/dungeonslayers/tickwerk/issues",
|
||||||
"changelog": "https://git.f3l.de/dungeonslayers/tickwerk/releases/tag/1.3.2",
|
"changelog": "https://git.f3l.de/dungeonslayers/tickwerk/releases/tag/1.3.3",
|
||||||
"version": "1.3.2",
|
"version": "1.3.3",
|
||||||
"compatibility": {
|
"compatibility": {
|
||||||
"minimum": "10.290",
|
"minimum": "10.290",
|
||||||
"verified": "10"
|
"verified": "10"
|
||||||
|
@ -39,6 +39,6 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"manifest": "https://git.f3l.de/api/packages/dungeonslayers/generic/tickwerk/latest/module.json",
|
"manifest": "https://git.f3l.de/api/packages/dungeonslayers/generic/tickwerk/latest/module.json",
|
||||||
"download": "https://git.f3l.de/dungeonslayers/tickwerk/releases/download/1.3.2/tickwerk.zip",
|
"download": "https://git.f3l.de/dungeonslayers/tickwerk/releases/download/1.3.3/tickwerk.zip",
|
||||||
"manifestPlusVersion": "1.2.0"
|
"manifestPlusVersion": "1.2.0"
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"private": true,
|
"private": true,
|
||||||
"name": "tickwerk",
|
"name": "tickwerk",
|
||||||
"description": "A tick based combat system for Foundry Virtual Tabletop",
|
"description": "A tick based combat system for Foundry Virtual Tabletop",
|
||||||
"version": "1.3.2",
|
"version": "1.3.3",
|
||||||
"license": "https://git.f3l.de/dungeonslayers/tickwerk#licensing",
|
"license": "https://git.f3l.de/dungeonslayers/tickwerk#licensing",
|
||||||
"homepage": "https://git.f3l.de/dungeonslayers/tickwerk",
|
"homepage": "https://git.f3l.de/dungeonslayers/tickwerk",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
"@commitlint/cli": "17.6.5",
|
"@commitlint/cli": "17.6.5",
|
||||||
"@commitlint/config-conventional": "17.6.5",
|
"@commitlint/config-conventional": "17.6.5",
|
||||||
"@guanghechen/rollup-plugin-copy": "5.0.1",
|
"@guanghechen/rollup-plugin-copy": "5.0.1",
|
||||||
"@swc/core": "1.3.62",
|
"@swc/core": "1.3.68",
|
||||||
"conventional-changelog-cli": "2.2.2",
|
"conventional-changelog-cli": "2.2.2",
|
||||||
"conventional-changelog-conventionalcommits": "5.0.0",
|
"conventional-changelog-conventionalcommits": "5.0.0",
|
||||||
"eslint": "8.42.0",
|
"eslint": "8.42.0",
|
||||||
|
|
|
@ -42,7 +42,7 @@ const CombatantMixin = (BaseCombatant) => {
|
||||||
*/
|
*/
|
||||||
toggleWaiting() {
|
toggleWaiting() {
|
||||||
const update = { [`flags.${packageId}.waiting`]: !this.waiting };
|
const update = { [`flags.${packageId}.waiting`]: !this.waiting };
|
||||||
if (this.parent?.started && this.waiting) update.initiative = this.parent?.round;
|
if (this.parent?.started && this.waiting) update.initiative = this.parent?.tickValue;
|
||||||
return this.update(update);
|
return this.update(update);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,7 +66,8 @@ const CombatantMixin = (BaseCombatant) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
await this.update({ initiative: this.initiative + ticks });
|
await this.update({ initiative: this.initiative + ticks });
|
||||||
const advanceTime = ticks * CONFIG.time.roundTime;
|
const tickTime = CONFIG.tickwerk?.tickTime;
|
||||||
|
const advanceTime = tickTime !== undefined ? ticks * tickTime : undefined;
|
||||||
if (advanceTime !== 0) {
|
if (advanceTime !== 0) {
|
||||||
await this.combat?.update(undefined, { diff: false, advanceTime });
|
await this.combat?.update(undefined, { diff: false, advanceTime });
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ import { getGame } from '../helpers';
|
||||||
|
|
||||||
export const registerDS4SpecificFunctionality = () => {
|
export const registerDS4SpecificFunctionality = () => {
|
||||||
if (CONFIG.tickwerk === undefined) CONFIG.tickwerk = {};
|
if (CONFIG.tickwerk === undefined) CONFIG.tickwerk = {};
|
||||||
foundry.utils.mergeObject(CONFIG.tickwerk, { getTiebreaker, getInitiativeFormula });
|
foundry.utils.mergeObject(CONFIG.tickwerk, { getTiebreaker, getInitiativeFormula, tickTime: 0.5 });
|
||||||
|
|
||||||
registerRollItemSetting();
|
registerRollItemSetting();
|
||||||
Hooks.on('ds4.rollItem', onRollItem);
|
Hooks.on('ds4.rollItem', onRollItem);
|
||||||
|
@ -71,7 +71,7 @@ const getTiebreaker = async (combatant, combatants) => {
|
||||||
const getInitiativeFormula = (combatant) => {
|
const getInitiativeFormula = (combatant) => {
|
||||||
const started = combatant.combat?.started ?? false;
|
const started = combatant.combat?.started ?? false;
|
||||||
if (!started) return '-@combatValues.initiative.total';
|
if (!started) return '-@combatValues.initiative.total';
|
||||||
const tickValue = combatant.combat?.round ?? 0;
|
const tickValue = combatant.combat?.tickValue ?? 0;
|
||||||
return `max(${tickValue} + 10 - @combatValues.initiative.total, ${tickValue})`;
|
return `max(${tickValue} + 10 - @combatValues.initiative.total, ${tickValue})`;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -81,7 +81,7 @@ function bumpVersion(release) {
|
||||||
|
|
||||||
console.log(`Bumping version number to '${targetVersion}'`);
|
console.log(`Bumping version number to '${targetVersion}'`);
|
||||||
packageJson.version = targetVersion;
|
packageJson.version = targetVersion;
|
||||||
fs.writeJSONSync('package.json', packageJson, { spaces: 4 });
|
fs.writeJSONSync('package.json', packageJson, { spaces: 2 });
|
||||||
manifest.version = targetVersion;
|
manifest.version = targetVersion;
|
||||||
manifest.url = repositoryURL;
|
manifest.url = repositoryURL;
|
||||||
manifest.manifest = getManifestUrl(getChannel(targetVersion));
|
manifest.manifest = getManifestUrl(getChannel(targetVersion));
|
||||||
|
@ -90,7 +90,7 @@ function bumpVersion(release) {
|
||||||
manifest.changelog = getChangelogURL(targetVersion);
|
manifest.changelog = getChangelogURL(targetVersion);
|
||||||
manifest.readme = getReadmeURL(targetVersion);
|
manifest.readme = getReadmeURL(targetVersion);
|
||||||
manifest.license = getLicenseURL(targetVersion);
|
manifest.license = getLicenseURL(targetVersion);
|
||||||
fs.writeJSONSync(manifestPath, manifest, { spaces: 4 });
|
fs.writeJSONSync(manifestPath, manifest, { spaces: 2 });
|
||||||
}
|
}
|
||||||
|
|
||||||
const argv = yargs(hideBin(process.argv)).usage('Usage: $0').option('release', {
|
const argv = yargs(hideBin(process.argv)).usage('Usage: $0').option('release', {
|
||||||
|
|
90
yarn.lock
90
yarn.lock
|
@ -476,90 +476,90 @@ __metadata:
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@swc/core-darwin-arm64@npm:1.3.62":
|
"@swc/core-darwin-arm64@npm:1.3.68":
|
||||||
version: 1.3.62
|
version: 1.3.68
|
||||||
resolution: "@swc/core-darwin-arm64@npm:1.3.62"
|
resolution: "@swc/core-darwin-arm64@npm:1.3.68"
|
||||||
conditions: os=darwin & cpu=arm64
|
conditions: os=darwin & cpu=arm64
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@swc/core-darwin-x64@npm:1.3.62":
|
"@swc/core-darwin-x64@npm:1.3.68":
|
||||||
version: 1.3.62
|
version: 1.3.68
|
||||||
resolution: "@swc/core-darwin-x64@npm:1.3.62"
|
resolution: "@swc/core-darwin-x64@npm:1.3.68"
|
||||||
conditions: os=darwin & cpu=x64
|
conditions: os=darwin & cpu=x64
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@swc/core-linux-arm-gnueabihf@npm:1.3.62":
|
"@swc/core-linux-arm-gnueabihf@npm:1.3.68":
|
||||||
version: 1.3.62
|
version: 1.3.68
|
||||||
resolution: "@swc/core-linux-arm-gnueabihf@npm:1.3.62"
|
resolution: "@swc/core-linux-arm-gnueabihf@npm:1.3.68"
|
||||||
conditions: os=linux & cpu=arm
|
conditions: os=linux & cpu=arm
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@swc/core-linux-arm64-gnu@npm:1.3.62":
|
"@swc/core-linux-arm64-gnu@npm:1.3.68":
|
||||||
version: 1.3.62
|
version: 1.3.68
|
||||||
resolution: "@swc/core-linux-arm64-gnu@npm:1.3.62"
|
resolution: "@swc/core-linux-arm64-gnu@npm:1.3.68"
|
||||||
conditions: os=linux & cpu=arm64 & libc=glibc
|
conditions: os=linux & cpu=arm64 & libc=glibc
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@swc/core-linux-arm64-musl@npm:1.3.62":
|
"@swc/core-linux-arm64-musl@npm:1.3.68":
|
||||||
version: 1.3.62
|
version: 1.3.68
|
||||||
resolution: "@swc/core-linux-arm64-musl@npm:1.3.62"
|
resolution: "@swc/core-linux-arm64-musl@npm:1.3.68"
|
||||||
conditions: os=linux & cpu=arm64 & libc=musl
|
conditions: os=linux & cpu=arm64 & libc=musl
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@swc/core-linux-x64-gnu@npm:1.3.62":
|
"@swc/core-linux-x64-gnu@npm:1.3.68":
|
||||||
version: 1.3.62
|
version: 1.3.68
|
||||||
resolution: "@swc/core-linux-x64-gnu@npm:1.3.62"
|
resolution: "@swc/core-linux-x64-gnu@npm:1.3.68"
|
||||||
conditions: os=linux & cpu=x64 & libc=glibc
|
conditions: os=linux & cpu=x64 & libc=glibc
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@swc/core-linux-x64-musl@npm:1.3.62":
|
"@swc/core-linux-x64-musl@npm:1.3.68":
|
||||||
version: 1.3.62
|
version: 1.3.68
|
||||||
resolution: "@swc/core-linux-x64-musl@npm:1.3.62"
|
resolution: "@swc/core-linux-x64-musl@npm:1.3.68"
|
||||||
conditions: os=linux & cpu=x64 & libc=musl
|
conditions: os=linux & cpu=x64 & libc=musl
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@swc/core-win32-arm64-msvc@npm:1.3.62":
|
"@swc/core-win32-arm64-msvc@npm:1.3.68":
|
||||||
version: 1.3.62
|
version: 1.3.68
|
||||||
resolution: "@swc/core-win32-arm64-msvc@npm:1.3.62"
|
resolution: "@swc/core-win32-arm64-msvc@npm:1.3.68"
|
||||||
conditions: os=win32 & cpu=arm64
|
conditions: os=win32 & cpu=arm64
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@swc/core-win32-ia32-msvc@npm:1.3.62":
|
"@swc/core-win32-ia32-msvc@npm:1.3.68":
|
||||||
version: 1.3.62
|
version: 1.3.68
|
||||||
resolution: "@swc/core-win32-ia32-msvc@npm:1.3.62"
|
resolution: "@swc/core-win32-ia32-msvc@npm:1.3.68"
|
||||||
conditions: os=win32 & cpu=ia32
|
conditions: os=win32 & cpu=ia32
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@swc/core-win32-x64-msvc@npm:1.3.62":
|
"@swc/core-win32-x64-msvc@npm:1.3.68":
|
||||||
version: 1.3.62
|
version: 1.3.68
|
||||||
resolution: "@swc/core-win32-x64-msvc@npm:1.3.62"
|
resolution: "@swc/core-win32-x64-msvc@npm:1.3.68"
|
||||||
conditions: os=win32 & cpu=x64
|
conditions: os=win32 & cpu=x64
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@swc/core@npm:1.3.62":
|
"@swc/core@npm:1.3.68":
|
||||||
version: 1.3.62
|
version: 1.3.68
|
||||||
resolution: "@swc/core@npm:1.3.62"
|
resolution: "@swc/core@npm:1.3.68"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@swc/core-darwin-arm64": 1.3.62
|
"@swc/core-darwin-arm64": 1.3.68
|
||||||
"@swc/core-darwin-x64": 1.3.62
|
"@swc/core-darwin-x64": 1.3.68
|
||||||
"@swc/core-linux-arm-gnueabihf": 1.3.62
|
"@swc/core-linux-arm-gnueabihf": 1.3.68
|
||||||
"@swc/core-linux-arm64-gnu": 1.3.62
|
"@swc/core-linux-arm64-gnu": 1.3.68
|
||||||
"@swc/core-linux-arm64-musl": 1.3.62
|
"@swc/core-linux-arm64-musl": 1.3.68
|
||||||
"@swc/core-linux-x64-gnu": 1.3.62
|
"@swc/core-linux-x64-gnu": 1.3.68
|
||||||
"@swc/core-linux-x64-musl": 1.3.62
|
"@swc/core-linux-x64-musl": 1.3.68
|
||||||
"@swc/core-win32-arm64-msvc": 1.3.62
|
"@swc/core-win32-arm64-msvc": 1.3.68
|
||||||
"@swc/core-win32-ia32-msvc": 1.3.62
|
"@swc/core-win32-ia32-msvc": 1.3.68
|
||||||
"@swc/core-win32-x64-msvc": 1.3.62
|
"@swc/core-win32-x64-msvc": 1.3.68
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
"@swc/helpers": ^0.5.0
|
"@swc/helpers": ^0.5.0
|
||||||
dependenciesMeta:
|
dependenciesMeta:
|
||||||
|
@ -586,7 +586,7 @@ __metadata:
|
||||||
peerDependenciesMeta:
|
peerDependenciesMeta:
|
||||||
"@swc/helpers":
|
"@swc/helpers":
|
||||||
optional: true
|
optional: true
|
||||||
checksum: a7a0d9ffdb8a2b0050e0ff89fdb86fe189d9bcb7f91cb6847f1bfe3e2b520a87ea2e83692dfd80b6d541fb5addb2194769484516b8ca6d3c62ad80f1c79a9368
|
checksum: f56ad1d4cb91f7cc1cb5d4b9894bbb528da0b2eabc98984581f5b3f3187cf2c0d512003880f6ff7a3f6d215b7a3dcbf5a9c45e8a428ac2d711941027c0151d89
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
@ -5327,7 +5327,7 @@ __metadata:
|
||||||
"@commitlint/cli": 17.6.5
|
"@commitlint/cli": 17.6.5
|
||||||
"@commitlint/config-conventional": 17.6.5
|
"@commitlint/config-conventional": 17.6.5
|
||||||
"@guanghechen/rollup-plugin-copy": 5.0.1
|
"@guanghechen/rollup-plugin-copy": 5.0.1
|
||||||
"@swc/core": 1.3.62
|
"@swc/core": 1.3.68
|
||||||
conventional-changelog-cli: 2.2.2
|
conventional-changelog-cli: 2.2.2
|
||||||
conventional-changelog-conventionalcommits: 5.0.0
|
conventional-changelog-conventionalcommits: 5.0.0
|
||||||
eslint: 8.42.0
|
eslint: 8.42.0
|
||||||
|
|
Loading…
Reference in a new issue