Compare commits

...

3 commits

Author SHA1 Message Date
e6786b7a75 chore(deps): update commitlint monorepo to v17.6.6 2023-07-10 00:02:47 +00:00
woodpecker[bot]
261d7a8b5a chore(release): 1.3.3
All checks were successful
ci/woodpecker/tag/checks Pipeline was successful
ci/woodpecker/push/checks Pipeline was successful
ci/woodpecker/tag/publish Pipeline was successful
2023-07-09 23:04:19 +00:00
704798cc27
fix: use correct tick value for combatants joining later
All checks were successful
ci/woodpecker/pr/checks Pipeline was successful
ci/woodpecker/manual/checks Pipeline was successful
ci/woodpecker/push/checks Pipeline was successful
ci/woodpecker/manual/release Pipeline was successful
2023-07-10 01:01:38 +02:00
6 changed files with 136 additions and 135 deletions

View file

@ -1,44 +1,44 @@
{
"id": "tickwerk",
"title": "Tickwerk",
"description": "A tick based combat system for Foundry Virtual Tabletop",
"authors": [
{
"name": "Johannes Loher",
"email": "johannes.loher@fg4f.de",
"discord": "ghost#2000",
"ko-fi": "ghostfvtt"
}
],
"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",
"bugs": "https://git.f3l.de/dungeonslayers/tickwerk/issues",
"changelog": "https://git.f3l.de/dungeonslayers/tickwerk/releases/tag/1.3.2",
"version": "1.3.2",
"compatibility": {
"minimum": "10.290",
"verified": "10"
"id": "tickwerk",
"title": "Tickwerk",
"description": "A tick based combat system for Foundry Virtual Tabletop",
"authors": [
{
"name": "Johannes Loher",
"email": "johannes.loher@fg4f.de",
"discord": "ghost#2000",
"ko-fi": "ghostfvtt"
}
],
"url": "https://git.f3l.de/dungeonslayers/tickwerk",
"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.3",
"version": "1.3.3",
"compatibility": {
"minimum": "10.290",
"verified": "10"
},
"esmodules": [
"tickwerk.js"
],
"styles": [
"styles/tickwerk.css"
],
"languages": [
{
"lang": "en",
"name": "English",
"path": "lang/en.json"
},
"esmodules": [
"tickwerk.js"
],
"styles": [
"styles/tickwerk.css"
],
"languages": [
{
"lang": "en",
"name": "English",
"path": "lang/en.json"
},
{
"lang": "de",
"name": "Deutsch",
"path": "lang/de.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",
"manifestPlusVersion": "1.2.0"
{
"lang": "de",
"name": "Deutsch",
"path": "lang/de.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.3/tickwerk.zip",
"manifestPlusVersion": "1.2.0"
}

View file

@ -1,58 +1,58 @@
{
"private": true,
"name": "tickwerk",
"description": "A tick based combat system for Foundry Virtual Tabletop",
"version": "1.3.2",
"license": "https://git.f3l.de/dungeonslayers/tickwerk#licensing",
"homepage": "https://git.f3l.de/dungeonslayers/tickwerk",
"repository": {
"type": "git",
"url": "https://git.f3l.de/dungeonslayers/tickwerk"
},
"bugs": {
"url": "https://git.f3l.de/dungeonslayers/tickwerk/issues"
},
"contributors": [
{
"name": "Johannes Loher",
"email": "johannes.loher@fg4f.de"
}
],
"type": "module",
"scripts": {
"build": "run-s clean:files build:files",
"build:files": "rollup -c",
"watch": "rollup -c -w",
"link-package": "node ./tools/link-package.js",
"clean": "run-p clean:files clean:link",
"clean:files": "rimraf dist",
"clean:link": "node ./tools/link-package.js --clean",
"lint": "eslint --ext .js,.cjs,.mjs .",
"lint:fix": "eslint --ext .js,.cjs,.mjs --fix .",
"format": "prettier --write \"./**/*.(js|cjs|mjs|json|scss|yml)\"",
"bump-version": "node ./tools/bump-version.js",
"changelog": "conventional-changelog -p conventionalcommits -o CHANGELOG.md -r 2"
},
"devDependencies": {
"@commitlint/cli": "17.6.5",
"@commitlint/config-conventional": "17.6.5",
"@guanghechen/rollup-plugin-copy": "5.0.1",
"@swc/core": "1.3.62",
"conventional-changelog-cli": "2.2.2",
"conventional-changelog-conventionalcommits": "5.0.0",
"eslint": "8.42.0",
"eslint-config-prettier": "8.8.0",
"eslint-plugin-prettier": "4.2.1",
"fs-extra": "11.1.1",
"npm-run-all": "4.1.5",
"prettier": "2.8.8",
"rimraf": "5.0.1",
"rollup": "3.23.0",
"rollup-plugin-styles": "4.0.0",
"rollup-plugin-swc3": "0.8.2",
"sass": "1.62.1",
"semver": "7.5.1",
"yargs": "17.7.2"
},
"packageManager": "yarn@3.6.0"
"private": true,
"name": "tickwerk",
"description": "A tick based combat system for Foundry Virtual Tabletop",
"version": "1.3.3",
"license": "https://git.f3l.de/dungeonslayers/tickwerk#licensing",
"homepage": "https://git.f3l.de/dungeonslayers/tickwerk",
"repository": {
"type": "git",
"url": "https://git.f3l.de/dungeonslayers/tickwerk"
},
"bugs": {
"url": "https://git.f3l.de/dungeonslayers/tickwerk/issues"
},
"contributors": [
{
"name": "Johannes Loher",
"email": "johannes.loher@fg4f.de"
}
],
"type": "module",
"scripts": {
"build": "run-s clean:files build:files",
"build:files": "rollup -c",
"watch": "rollup -c -w",
"link-package": "node ./tools/link-package.js",
"clean": "run-p clean:files clean:link",
"clean:files": "rimraf dist",
"clean:link": "node ./tools/link-package.js --clean",
"lint": "eslint --ext .js,.cjs,.mjs .",
"lint:fix": "eslint --ext .js,.cjs,.mjs --fix .",
"format": "prettier --write \"./**/*.(js|cjs|mjs|json|scss|yml)\"",
"bump-version": "node ./tools/bump-version.js",
"changelog": "conventional-changelog -p conventionalcommits -o CHANGELOG.md -r 2"
},
"devDependencies": {
"@commitlint/cli": "17.6.6",
"@commitlint/config-conventional": "17.6.6",
"@guanghechen/rollup-plugin-copy": "5.0.1",
"@swc/core": "1.3.62",
"conventional-changelog-cli": "2.2.2",
"conventional-changelog-conventionalcommits": "5.0.0",
"eslint": "8.42.0",
"eslint-config-prettier": "8.8.0",
"eslint-plugin-prettier": "4.2.1",
"fs-extra": "11.1.1",
"npm-run-all": "4.1.5",
"prettier": "2.8.8",
"rimraf": "5.0.1",
"rollup": "3.23.0",
"rollup-plugin-styles": "4.0.0",
"rollup-plugin-swc3": "0.8.2",
"sass": "1.62.1",
"semver": "7.5.1",
"yargs": "17.7.2"
},
"packageManager": "yarn@3.6.0"
}

View file

@ -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 });
}

View file

@ -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})`;
};

View file

@ -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', {

View file

@ -32,12 +32,12 @@ __metadata:
languageName: node
linkType: hard
"@commitlint/cli@npm:17.6.5":
version: 17.6.5
resolution: "@commitlint/cli@npm:17.6.5"
"@commitlint/cli@npm:17.6.6":
version: 17.6.6
resolution: "@commitlint/cli@npm:17.6.6"
dependencies:
"@commitlint/format": ^17.4.4
"@commitlint/lint": ^17.6.5
"@commitlint/lint": ^17.6.6
"@commitlint/load": ^17.5.0
"@commitlint/read": ^17.5.1
"@commitlint/types": ^17.4.4
@ -48,16 +48,16 @@ __metadata:
yargs: ^17.0.0
bin:
commitlint: cli.js
checksum: acc57bdb732bf308c65e01a13d6b42f6f5f1a4dc40b2e743a5c0a4e797423fa8a2c9b4cc5377d9e6df47c06dc17e190081f7b7c0361c31de22dcf1a05619fa8a
checksum: 91c2d06bc181cb286634d963e28c71739642a94252dcf2bcd800dd3ac1d8708d8ccd195aa513a65df00fcde281a128ed763ac51f640771a11140930c5f259df8
languageName: node
linkType: hard
"@commitlint/config-conventional@npm:17.6.5":
version: 17.6.5
resolution: "@commitlint/config-conventional@npm:17.6.5"
"@commitlint/config-conventional@npm:17.6.6":
version: 17.6.6
resolution: "@commitlint/config-conventional@npm:17.6.6"
dependencies:
conventional-changelog-conventionalcommits: ^5.0.0
checksum: f2c637a9935044d6dc800eabbb0e032354afb35a7c0dd65d37115320a0fbcf4586ad769647039d0d9347988182213d7ee53339df2af9b2c8a51209ab0225366f
checksum: 0f649a2cbe684aa18555cb0027c21f58d74216dbe0a850be041af50f1db04e447b7d90995bee54c61059d735b398de61ac7ecbfd312d14480aac3a3f8c62dd66
languageName: node
linkType: hard
@ -102,25 +102,25 @@ __metadata:
languageName: node
linkType: hard
"@commitlint/is-ignored@npm:^17.6.5":
version: 17.6.5
resolution: "@commitlint/is-ignored@npm:17.6.5"
"@commitlint/is-ignored@npm:^17.6.6":
version: 17.6.6
resolution: "@commitlint/is-ignored@npm:17.6.6"
dependencies:
"@commitlint/types": ^17.4.4
semver: 7.5.0
checksum: 2b7b7f0773192bb8da018fa789689751ac5692af01e1754a214aaebc8253ee533c191409835af0fdb3c12b2fbb4bec43aeb9e442fca165646db1382ea6c21ec9
semver: 7.5.2
checksum: ff5f8816765b3f2e9f16de32b1166dd099ab23793212bf4092203441fe3d9f282c80ed96cca5cd42b0ea96d899f8989bdaa6604a3f02bf4bd36b8c7c123968df
languageName: node
linkType: hard
"@commitlint/lint@npm:^17.6.5":
version: 17.6.5
resolution: "@commitlint/lint@npm:17.6.5"
"@commitlint/lint@npm:^17.6.6":
version: 17.6.6
resolution: "@commitlint/lint@npm:17.6.6"
dependencies:
"@commitlint/is-ignored": ^17.6.5
"@commitlint/is-ignored": ^17.6.6
"@commitlint/parse": ^17.6.5
"@commitlint/rules": ^17.6.5
"@commitlint/types": ^17.4.4
checksum: 6a6c04a5ecaa89a3ad8a009489d85937ad4093d2b17dbfb9ec8ac3e7f84fac1cb04876bdd1e6306fb665474ca438598c2b874e9e44d4372a3bd99c34afcafca3
checksum: 8601cbfe037edd4aff38cf3929444e748499558dfb01a12f1e6067fb4496926711936cbd389cf792f5e3ea6b6900c6967ca5b56dc0555d75c71340ceddc6d076
languageName: node
linkType: hard
@ -4830,17 +4830,6 @@ __metadata:
languageName: node
linkType: hard
"semver@npm:7.5.0":
version: 7.5.0
resolution: "semver@npm:7.5.0"
dependencies:
lru-cache: ^6.0.0
bin:
semver: bin/semver.js
checksum: 2d266937756689a76f124ffb4c1ea3e1bbb2b263219f90ada8a11aebebe1280b13bb76cca2ca96bdee3dbc554cbc0b24752eb895b2a51577aa644427e9229f2b
languageName: node
linkType: hard
"semver@npm:7.5.1, semver@npm:^7.3.4, semver@npm:^7.3.5":
version: 7.5.1
resolution: "semver@npm:7.5.1"
@ -4852,6 +4841,17 @@ __metadata:
languageName: node
linkType: hard
"semver@npm:7.5.2":
version: 7.5.2
resolution: "semver@npm:7.5.2"
dependencies:
lru-cache: ^6.0.0
bin:
semver: bin/semver.js
checksum: 3fdf5d1e6f170fe8bcc41669e31787649af91af7f54f05c71d0865bb7aa27e8b92f68b3e6b582483e2c1c648008bc84249d2cd86301771fe5cbf7621d1fe5375
languageName: node
linkType: hard
"semver@npm:^6.0.0":
version: 6.3.0
resolution: "semver@npm:6.3.0"
@ -5324,8 +5324,8 @@ __metadata:
version: 0.0.0-use.local
resolution: "tickwerk@workspace:."
dependencies:
"@commitlint/cli": 17.6.5
"@commitlint/config-conventional": 17.6.5
"@commitlint/cli": 17.6.6
"@commitlint/config-conventional": 17.6.6
"@guanghechen/rollup-plugin-copy": 5.0.1
"@swc/core": 1.3.62
conventional-changelog-cli: 2.2.2