Compare commits
3 commits
6b534b3009
...
3fe7526495
Author | SHA1 | Date | |
---|---|---|---|
3fe7526495 | |||
|
261d7a8b5a | ||
704798cc27 |
6 changed files with 265 additions and 115 deletions
10
module.json
10
module.json
|
@ -11,11 +11,11 @@
|
|||
}
|
||||
],
|
||||
"url": "https://git.f3l.de/dungeonslayers/tickwerk",
|
||||
"license": "https://git.f3l.de/dungeonslayers/tickwerk/raw/tag/1.3.2/LICENSE.md",
|
||||
"readme": "https://git.f3l.de/dungeonslayers/tickwerk/raw/tag/1.3.2/README.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.3/README.md",
|
||||
"bugs": "https://git.f3l.de/dungeonslayers/tickwerk/issues",
|
||||
"changelog": "https://git.f3l.de/dungeonslayers/tickwerk/releases/tag/1.3.2",
|
||||
"version": "1.3.2",
|
||||
"changelog": "https://git.f3l.de/dungeonslayers/tickwerk/releases/tag/1.3.3",
|
||||
"version": "1.3.3",
|
||||
"compatibility": {
|
||||
"minimum": "10.290",
|
||||
"verified": "10"
|
||||
|
@ -39,6 +39,6 @@
|
|||
}
|
||||
],
|
||||
"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"
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"private": true,
|
||||
"name": "tickwerk",
|
||||
"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",
|
||||
"homepage": "https://git.f3l.de/dungeonslayers/tickwerk",
|
||||
"repository": {
|
||||
|
@ -49,7 +49,7 @@
|
|||
"rimraf": "5.0.1",
|
||||
"rollup": "3.23.0",
|
||||
"rollup-plugin-styles": "4.0.0",
|
||||
"rollup-plugin-swc3": "0.8.2",
|
||||
"rollup-plugin-swc3": "0.9.0",
|
||||
"sass": "1.62.1",
|
||||
"semver": "7.5.1",
|
||||
"yargs": "17.7.2"
|
||||
|
|
|
@ -42,7 +42,7 @@ const CombatantMixin = (BaseCombatant) => {
|
|||
*/
|
||||
toggleWaiting() {
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -66,7 +66,8 @@ const CombatantMixin = (BaseCombatant) => {
|
|||
}
|
||||
|
||||
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) {
|
||||
await this.combat?.update(undefined, { diff: false, advanceTime });
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ import { getGame } from '../helpers';
|
|||
|
||||
export const registerDS4SpecificFunctionality = () => {
|
||||
if (CONFIG.tickwerk === undefined) CONFIG.tickwerk = {};
|
||||
foundry.utils.mergeObject(CONFIG.tickwerk, { getTiebreaker, getInitiativeFormula });
|
||||
foundry.utils.mergeObject(CONFIG.tickwerk, { getTiebreaker, getInitiativeFormula, tickTime: 0.5 });
|
||||
|
||||
registerRollItemSetting();
|
||||
Hooks.on('ds4.rollItem', onRollItem);
|
||||
|
@ -71,7 +71,7 @@ const getTiebreaker = async (combatant, combatants) => {
|
|||
const getInitiativeFormula = (combatant) => {
|
||||
const started = combatant.combat?.started ?? false;
|
||||
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})`;
|
||||
};
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@ function bumpVersion(release) {
|
|||
|
||||
console.log(`Bumping version number to '${targetVersion}'`);
|
||||
packageJson.version = targetVersion;
|
||||
fs.writeJSONSync('package.json', packageJson, { spaces: 4 });
|
||||
fs.writeJSONSync('package.json', packageJson, { spaces: 2 });
|
||||
manifest.version = targetVersion;
|
||||
manifest.url = repositoryURL;
|
||||
manifest.manifest = getManifestUrl(getChannel(targetVersion));
|
||||
|
@ -90,7 +90,7 @@ function bumpVersion(release) {
|
|||
manifest.changelog = getChangelogURL(targetVersion);
|
||||
manifest.readme = getReadmeURL(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', {
|
||||
|
|
173
yarn.lock
173
yarn.lock
|
@ -280,7 +280,7 @@ __metadata:
|
|||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@fastify/deepmerge@npm:^1.1.0":
|
||||
"@fastify/deepmerge@npm:^1.3.0":
|
||||
version: 1.3.0
|
||||
resolution: "@fastify/deepmerge@npm:1.3.0"
|
||||
checksum: 33ec927905dca320d7ae9535a1521909f7c82339706345324ab6287ad100589a799b8257c15b0e582c7bb74e2aa4883d82ba0228d7b116aa8789ada4f78d6974
|
||||
|
@ -412,6 +412,145 @@ __metadata:
|
|||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@napi-rs/magic-string-android-arm-eabi@npm:0.3.4":
|
||||
version: 0.3.4
|
||||
resolution: "@napi-rs/magic-string-android-arm-eabi@npm:0.3.4"
|
||||
conditions: os=android & cpu=arm
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@napi-rs/magic-string-android-arm64@npm:0.3.4":
|
||||
version: 0.3.4
|
||||
resolution: "@napi-rs/magic-string-android-arm64@npm:0.3.4"
|
||||
conditions: os=android & cpu=arm64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@napi-rs/magic-string-darwin-arm64@npm:0.3.4":
|
||||
version: 0.3.4
|
||||
resolution: "@napi-rs/magic-string-darwin-arm64@npm:0.3.4"
|
||||
conditions: os=darwin & cpu=arm64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@napi-rs/magic-string-darwin-x64@npm:0.3.4":
|
||||
version: 0.3.4
|
||||
resolution: "@napi-rs/magic-string-darwin-x64@npm:0.3.4"
|
||||
conditions: os=darwin & cpu=x64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@napi-rs/magic-string-freebsd-x64@npm:0.3.4":
|
||||
version: 0.3.4
|
||||
resolution: "@napi-rs/magic-string-freebsd-x64@npm:0.3.4"
|
||||
conditions: os=freebsd & cpu=x64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@napi-rs/magic-string-linux-arm-gnueabihf@npm:0.3.4":
|
||||
version: 0.3.4
|
||||
resolution: "@napi-rs/magic-string-linux-arm-gnueabihf@npm:0.3.4"
|
||||
conditions: os=linux & cpu=arm
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@napi-rs/magic-string-linux-arm64-gnu@npm:0.3.4":
|
||||
version: 0.3.4
|
||||
resolution: "@napi-rs/magic-string-linux-arm64-gnu@npm:0.3.4"
|
||||
conditions: os=linux & cpu=arm64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@napi-rs/magic-string-linux-arm64-musl@npm:0.3.4":
|
||||
version: 0.3.4
|
||||
resolution: "@napi-rs/magic-string-linux-arm64-musl@npm:0.3.4"
|
||||
conditions: os=linux & cpu=arm64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@napi-rs/magic-string-linux-x64-gnu@npm:0.3.4":
|
||||
version: 0.3.4
|
||||
resolution: "@napi-rs/magic-string-linux-x64-gnu@npm:0.3.4"
|
||||
conditions: os=linux & cpu=x64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@napi-rs/magic-string-linux-x64-musl@npm:0.3.4":
|
||||
version: 0.3.4
|
||||
resolution: "@napi-rs/magic-string-linux-x64-musl@npm:0.3.4"
|
||||
conditions: os=linux & cpu=x64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@napi-rs/magic-string-win32-arm64-msvc@npm:0.3.4":
|
||||
version: 0.3.4
|
||||
resolution: "@napi-rs/magic-string-win32-arm64-msvc@npm:0.3.4"
|
||||
conditions: os=win32 & cpu=arm64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@napi-rs/magic-string-win32-ia32-msvc@npm:0.3.4":
|
||||
version: 0.3.4
|
||||
resolution: "@napi-rs/magic-string-win32-ia32-msvc@npm:0.3.4"
|
||||
conditions: os=win32 & cpu=ia32
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@napi-rs/magic-string-win32-x64-msvc@npm:0.3.4":
|
||||
version: 0.3.4
|
||||
resolution: "@napi-rs/magic-string-win32-x64-msvc@npm:0.3.4"
|
||||
conditions: os=win32 & cpu=x64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@napi-rs/magic-string@npm:^0.3.4":
|
||||
version: 0.3.4
|
||||
resolution: "@napi-rs/magic-string@npm:0.3.4"
|
||||
dependencies:
|
||||
"@napi-rs/magic-string-android-arm-eabi": 0.3.4
|
||||
"@napi-rs/magic-string-android-arm64": 0.3.4
|
||||
"@napi-rs/magic-string-darwin-arm64": 0.3.4
|
||||
"@napi-rs/magic-string-darwin-x64": 0.3.4
|
||||
"@napi-rs/magic-string-freebsd-x64": 0.3.4
|
||||
"@napi-rs/magic-string-linux-arm-gnueabihf": 0.3.4
|
||||
"@napi-rs/magic-string-linux-arm64-gnu": 0.3.4
|
||||
"@napi-rs/magic-string-linux-arm64-musl": 0.3.4
|
||||
"@napi-rs/magic-string-linux-x64-gnu": 0.3.4
|
||||
"@napi-rs/magic-string-linux-x64-musl": 0.3.4
|
||||
"@napi-rs/magic-string-win32-arm64-msvc": 0.3.4
|
||||
"@napi-rs/magic-string-win32-ia32-msvc": 0.3.4
|
||||
"@napi-rs/magic-string-win32-x64-msvc": 0.3.4
|
||||
dependenciesMeta:
|
||||
"@napi-rs/magic-string-android-arm-eabi":
|
||||
optional: true
|
||||
"@napi-rs/magic-string-android-arm64":
|
||||
optional: true
|
||||
"@napi-rs/magic-string-darwin-arm64":
|
||||
optional: true
|
||||
"@napi-rs/magic-string-darwin-x64":
|
||||
optional: true
|
||||
"@napi-rs/magic-string-freebsd-x64":
|
||||
optional: true
|
||||
"@napi-rs/magic-string-linux-arm-gnueabihf":
|
||||
optional: true
|
||||
"@napi-rs/magic-string-linux-arm64-gnu":
|
||||
optional: true
|
||||
"@napi-rs/magic-string-linux-arm64-musl":
|
||||
optional: true
|
||||
"@napi-rs/magic-string-linux-x64-gnu":
|
||||
optional: true
|
||||
"@napi-rs/magic-string-linux-x64-musl":
|
||||
optional: true
|
||||
"@napi-rs/magic-string-win32-arm64-msvc":
|
||||
optional: true
|
||||
"@napi-rs/magic-string-win32-ia32-msvc":
|
||||
optional: true
|
||||
"@napi-rs/magic-string-win32-x64-msvc":
|
||||
optional: true
|
||||
checksum: b138f5ba72511f80b20ac068edb124cae3693a5650cb574b8fcff781c149bb76db286a314d172e15cf688bd176e0a693929422c3e0c20663fda00a8e954beaf5
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@nodelib/fs.scandir@npm:2.1.5":
|
||||
version: 2.1.5
|
||||
resolution: "@nodelib/fs.scandir@npm:2.1.5"
|
||||
|
@ -2347,10 +2486,12 @@ __metadata:
|
|||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"get-tsconfig@npm:^4.2.0":
|
||||
version: 4.5.0
|
||||
resolution: "get-tsconfig@npm:4.5.0"
|
||||
checksum: 687ee2bd69a5a07db2e2edeb4d6c41c3debb38f6281a66beb643e3f5b520252e27fcbbb5702bdd9a5f05dcf8c1d2e0150a4d8a960ad75cbdea74e06a51e91b02
|
||||
"get-tsconfig@npm:^4.6.2":
|
||||
version: 4.6.2
|
||||
resolution: "get-tsconfig@npm:4.6.2"
|
||||
dependencies:
|
||||
resolve-pkg-maps: ^1.0.0
|
||||
checksum: e791e671a9b55e91efea3ca819ecd7a25beae679e31c83234bf3dd62ddd93df070c1b95ae7e29d206358ebb6408f6f79ac6d83a32a3bbd6a6d217babe23de077
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
|
@ -4649,6 +4790,13 @@ __metadata:
|
|||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"resolve-pkg-maps@npm:^1.0.0":
|
||||
version: 1.0.0
|
||||
resolution: "resolve-pkg-maps@npm:1.0.0"
|
||||
checksum: 1012afc566b3fdb190a6309cc37ef3b2dcc35dff5fa6683a9d00cd25c3247edfbc4691b91078c97adc82a29b77a2660c30d791d65dab4fc78bfc473f60289977
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"resolve@npm:^1.10.0, resolve@npm:^1.21.0":
|
||||
version: 1.22.3
|
||||
resolution: "resolve@npm:1.22.3"
|
||||
|
@ -4739,17 +4887,18 @@ __metadata:
|
|||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"rollup-plugin-swc3@npm:0.8.2":
|
||||
version: 0.8.2
|
||||
resolution: "rollup-plugin-swc3@npm:0.8.2"
|
||||
"rollup-plugin-swc3@npm:0.9.0":
|
||||
version: 0.9.0
|
||||
resolution: "rollup-plugin-swc3@npm:0.9.0"
|
||||
dependencies:
|
||||
"@fastify/deepmerge": ^1.1.0
|
||||
"@fastify/deepmerge": ^1.3.0
|
||||
"@napi-rs/magic-string": ^0.3.4
|
||||
"@rollup/pluginutils": ^4.2.1
|
||||
get-tsconfig: ^4.2.0
|
||||
get-tsconfig: ^4.6.2
|
||||
peerDependencies:
|
||||
"@swc/core": ">=1.2.165"
|
||||
rollup: ^2.0.0 || ^3.0.0
|
||||
checksum: f7ed174616d032c606cd5a75f6045f754434c88498cc9845a7179d7a781e8dc3e0a242b30f413c8c7f8fca3caa7d0edea67a00d90b1e84571a12d26cd94b71f2
|
||||
checksum: d9f4f30241944f1df0bb011c1315db47f72187ad984f34efebd63a78e92e357d7d26ad8ca7adeea4ecaada499082670af62bacbec08050bbb139ed7792bb38a9
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
|
@ -5339,7 +5488,7 @@ __metadata:
|
|||
rimraf: 5.0.1
|
||||
rollup: 3.23.0
|
||||
rollup-plugin-styles: 4.0.0
|
||||
rollup-plugin-swc3: 0.8.2
|
||||
rollup-plugin-swc3: 0.9.0
|
||||
sass: 1.62.1
|
||||
semver: 7.5.1
|
||||
yargs: 17.7.2
|
||||
|
|
Loading…
Reference in a new issue