Compare commits

...

3 Commits
1.3.2 ... 1.3.3

Author SHA1 Message Date
woodpecker[bot] 261d7a8b5a chore(release): 1.3.3
ci/woodpecker/tag/checks Pipeline was successful Details
ci/woodpecker/push/checks Pipeline was successful Details
ci/woodpecker/tag/publish Pipeline was successful Details
2023-07-09 23:04:19 +00:00
Johannes Loher 704798cc27
fix: use correct tick value for combatants joining later
ci/woodpecker/pr/checks Pipeline was successful Details
ci/woodpecker/manual/checks Pipeline was successful Details
ci/woodpecker/push/checks Pipeline was successful Details
ci/woodpecker/manual/release Pipeline was successful Details
2023-07-10 01:01:38 +02:00
Johannes Loher a578cbff0d
docs: fix readme
ci/woodpecker/pr/checks Pipeline was successful Details
ci/woodpecker/push/checks Pipeline was successful Details
2023-07-10 00:39:30 +02:00
6 changed files with 105 additions and 104 deletions

View File

@ -10,7 +10,7 @@ SPDX-License-Identifier: MIT
[![status-badge](https://ci.f3l.de/api/badges/10/status.svg)](https://ci.f3l.de/repos/10)
[![REUSE status](https://api.reuse.software/badge/git.f3l.de/dungeonslayers/tickwerk)](https://api.reuse.software/info/git.f3l.de/dungeonslayers/tickwerk)
[![Forge installs](https://img.shields.io/badge/dynamic/json?label=Forge%20Installs&query=package.installs&suffix=%25&url=https%3A%2F%2Fforge-vtt.com%2Fapi%2Fbazaar%2Fpackage%2Ftickwerk&colorB=4aa94a)](https://forge-vtt.com/bazaar#package=tickwerk)
[![Supported foundry versions](https://img.shields.io/endpoint?url=https://foundryshields.com/version?url=https%3A%2F%2Fgit.f3l.de%2Fapi%2Fpackages%2Fdungeonslayers%2Fgeneric%2Ftickwerk%2Flatest%module.json)](https://git.f3l.de/dungeonslayers/tickwerk)
[![Supported foundry versions](https://img.shields.io/endpoint?url=https://foundryshields.com/version?url=https://git.f3l.de/api/packages/dungeonslayers/generic/tickwerk/latest/module.json)](https://git.f3l.de/dungeonslayers/tickwerk)
[![Ko-fi](https://img.shields.io/badge/Ko--fi-ghostfvtt-00B9FE?logo=kofi)](https://ko-fi.com/ghostfvtt)
A tick based combat system for [Foundry Virtual Tabletop].

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.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"
}

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