Compare commits
3 commits
f481b134a8
...
e6786b7a75
Author | SHA1 | Date | |
---|---|---|---|
e6786b7a75 | |||
|
261d7a8b5a | ||
704798cc27 |
6 changed files with 136 additions and 135 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": {
|
||||||
|
@ -34,8 +34,8 @@
|
||||||
"changelog": "conventional-changelog -p conventionalcommits -o CHANGELOG.md -r 2"
|
"changelog": "conventional-changelog -p conventionalcommits -o CHANGELOG.md -r 2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@commitlint/cli": "17.6.5",
|
"@commitlint/cli": "17.6.6",
|
||||||
"@commitlint/config-conventional": "17.6.5",
|
"@commitlint/config-conventional": "17.6.6",
|
||||||
"@guanghechen/rollup-plugin-copy": "5.0.1",
|
"@guanghechen/rollup-plugin-copy": "5.0.1",
|
||||||
"@swc/core": "1.3.62",
|
"@swc/core": "1.3.62",
|
||||||
"conventional-changelog-cli": "2.2.2",
|
"conventional-changelog-cli": "2.2.2",
|
||||||
|
|
|
@ -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', {
|
||||||
|
|
64
yarn.lock
64
yarn.lock
|
@ -32,12 +32,12 @@ __metadata:
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@commitlint/cli@npm:17.6.5":
|
"@commitlint/cli@npm:17.6.6":
|
||||||
version: 17.6.5
|
version: 17.6.6
|
||||||
resolution: "@commitlint/cli@npm:17.6.5"
|
resolution: "@commitlint/cli@npm:17.6.6"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@commitlint/format": ^17.4.4
|
"@commitlint/format": ^17.4.4
|
||||||
"@commitlint/lint": ^17.6.5
|
"@commitlint/lint": ^17.6.6
|
||||||
"@commitlint/load": ^17.5.0
|
"@commitlint/load": ^17.5.0
|
||||||
"@commitlint/read": ^17.5.1
|
"@commitlint/read": ^17.5.1
|
||||||
"@commitlint/types": ^17.4.4
|
"@commitlint/types": ^17.4.4
|
||||||
|
@ -48,16 +48,16 @@ __metadata:
|
||||||
yargs: ^17.0.0
|
yargs: ^17.0.0
|
||||||
bin:
|
bin:
|
||||||
commitlint: cli.js
|
commitlint: cli.js
|
||||||
checksum: acc57bdb732bf308c65e01a13d6b42f6f5f1a4dc40b2e743a5c0a4e797423fa8a2c9b4cc5377d9e6df47c06dc17e190081f7b7c0361c31de22dcf1a05619fa8a
|
checksum: 91c2d06bc181cb286634d963e28c71739642a94252dcf2bcd800dd3ac1d8708d8ccd195aa513a65df00fcde281a128ed763ac51f640771a11140930c5f259df8
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@commitlint/config-conventional@npm:17.6.5":
|
"@commitlint/config-conventional@npm:17.6.6":
|
||||||
version: 17.6.5
|
version: 17.6.6
|
||||||
resolution: "@commitlint/config-conventional@npm:17.6.5"
|
resolution: "@commitlint/config-conventional@npm:17.6.6"
|
||||||
dependencies:
|
dependencies:
|
||||||
conventional-changelog-conventionalcommits: ^5.0.0
|
conventional-changelog-conventionalcommits: ^5.0.0
|
||||||
checksum: f2c637a9935044d6dc800eabbb0e032354afb35a7c0dd65d37115320a0fbcf4586ad769647039d0d9347988182213d7ee53339df2af9b2c8a51209ab0225366f
|
checksum: 0f649a2cbe684aa18555cb0027c21f58d74216dbe0a850be041af50f1db04e447b7d90995bee54c61059d735b398de61ac7ecbfd312d14480aac3a3f8c62dd66
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
@ -102,25 +102,25 @@ __metadata:
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@commitlint/is-ignored@npm:^17.6.5":
|
"@commitlint/is-ignored@npm:^17.6.6":
|
||||||
version: 17.6.5
|
version: 17.6.6
|
||||||
resolution: "@commitlint/is-ignored@npm:17.6.5"
|
resolution: "@commitlint/is-ignored@npm:17.6.6"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@commitlint/types": ^17.4.4
|
"@commitlint/types": ^17.4.4
|
||||||
semver: 7.5.0
|
semver: 7.5.2
|
||||||
checksum: 2b7b7f0773192bb8da018fa789689751ac5692af01e1754a214aaebc8253ee533c191409835af0fdb3c12b2fbb4bec43aeb9e442fca165646db1382ea6c21ec9
|
checksum: ff5f8816765b3f2e9f16de32b1166dd099ab23793212bf4092203441fe3d9f282c80ed96cca5cd42b0ea96d899f8989bdaa6604a3f02bf4bd36b8c7c123968df
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@commitlint/lint@npm:^17.6.5":
|
"@commitlint/lint@npm:^17.6.6":
|
||||||
version: 17.6.5
|
version: 17.6.6
|
||||||
resolution: "@commitlint/lint@npm:17.6.5"
|
resolution: "@commitlint/lint@npm:17.6.6"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@commitlint/is-ignored": ^17.6.5
|
"@commitlint/is-ignored": ^17.6.6
|
||||||
"@commitlint/parse": ^17.6.5
|
"@commitlint/parse": ^17.6.5
|
||||||
"@commitlint/rules": ^17.6.5
|
"@commitlint/rules": ^17.6.5
|
||||||
"@commitlint/types": ^17.4.4
|
"@commitlint/types": ^17.4.4
|
||||||
checksum: 6a6c04a5ecaa89a3ad8a009489d85937ad4093d2b17dbfb9ec8ac3e7f84fac1cb04876bdd1e6306fb665474ca438598c2b874e9e44d4372a3bd99c34afcafca3
|
checksum: 8601cbfe037edd4aff38cf3929444e748499558dfb01a12f1e6067fb4496926711936cbd389cf792f5e3ea6b6900c6967ca5b56dc0555d75c71340ceddc6d076
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
@ -4830,17 +4830,6 @@ __metadata:
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
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":
|
"semver@npm:7.5.1, semver@npm:^7.3.4, semver@npm:^7.3.5":
|
||||||
version: 7.5.1
|
version: 7.5.1
|
||||||
resolution: "semver@npm:7.5.1"
|
resolution: "semver@npm:7.5.1"
|
||||||
|
@ -4852,6 +4841,17 @@ __metadata:
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
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":
|
"semver@npm:^6.0.0":
|
||||||
version: 6.3.0
|
version: 6.3.0
|
||||||
resolution: "semver@npm:6.3.0"
|
resolution: "semver@npm:6.3.0"
|
||||||
|
@ -5324,8 +5324,8 @@ __metadata:
|
||||||
version: 0.0.0-use.local
|
version: 0.0.0-use.local
|
||||||
resolution: "tickwerk@workspace:."
|
resolution: "tickwerk@workspace:."
|
||||||
dependencies:
|
dependencies:
|
||||||
"@commitlint/cli": 17.6.5
|
"@commitlint/cli": 17.6.6
|
||||||
"@commitlint/config-conventional": 17.6.5
|
"@commitlint/config-conventional": 17.6.6
|
||||||
"@guanghechen/rollup-plugin-copy": 5.0.1
|
"@guanghechen/rollup-plugin-copy": 5.0.1
|
||||||
"@swc/core": 1.3.62
|
"@swc/core": 1.3.62
|
||||||
conventional-changelog-cli: 2.2.2
|
conventional-changelog-cli: 2.2.2
|
||||||
|
|
Loading…
Reference in a new issue