Compare commits
3 commits
4f6b3f5f1d
...
37b52e9b67
Author | SHA1 | Date | |
---|---|---|---|
37b52e9b67 | |||
|
261d7a8b5a | ||
704798cc27 |
6 changed files with 120 additions and 108 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": {
|
||||||
|
@ -51,7 +51,7 @@
|
||||||
"rollup-plugin-styles": "4.0.0",
|
"rollup-plugin-styles": "4.0.0",
|
||||||
"rollup-plugin-swc3": "0.8.2",
|
"rollup-plugin-swc3": "0.8.2",
|
||||||
"sass": "1.62.1",
|
"sass": "1.62.1",
|
||||||
"semver": "7.5.1",
|
"semver": "7.5.4",
|
||||||
"yargs": "17.7.2"
|
"yargs": "17.7.2"
|
||||||
},
|
},
|
||||||
"packageManager": "yarn@3.6.0"
|
"packageManager": "yarn@3.6.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', {
|
||||||
|
|
21
yarn.lock
21
yarn.lock
|
@ -4841,14 +4841,14 @@ __metadata:
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"semver@npm:7.5.1, semver@npm:^7.3.4, semver@npm:^7.3.5":
|
"semver@npm:7.5.4":
|
||||||
version: 7.5.1
|
version: 7.5.4
|
||||||
resolution: "semver@npm:7.5.1"
|
resolution: "semver@npm:7.5.4"
|
||||||
dependencies:
|
dependencies:
|
||||||
lru-cache: ^6.0.0
|
lru-cache: ^6.0.0
|
||||||
bin:
|
bin:
|
||||||
semver: bin/semver.js
|
semver: bin/semver.js
|
||||||
checksum: d16dbedad53c65b086f79524b9ef766bf38670b2395bdad5c957f824dcc566b624988013564f4812bcace3f9d405355c3635e2007396a39d1bffc71cfec4a2fc
|
checksum: 12d8ad952fa353b0995bf180cdac205a4068b759a140e5d3c608317098b3575ac2f1e09182206bf2eb26120e1c0ed8fb92c48c592f6099680de56bb071423ca3
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
@ -4861,6 +4861,17 @@ __metadata:
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"semver@npm:^7.3.4, semver@npm:^7.3.5":
|
||||||
|
version: 7.5.1
|
||||||
|
resolution: "semver@npm:7.5.1"
|
||||||
|
dependencies:
|
||||||
|
lru-cache: ^6.0.0
|
||||||
|
bin:
|
||||||
|
semver: bin/semver.js
|
||||||
|
checksum: d16dbedad53c65b086f79524b9ef766bf38670b2395bdad5c957f824dcc566b624988013564f4812bcace3f9d405355c3635e2007396a39d1bffc71cfec4a2fc
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
"set-blocking@npm:^2.0.0":
|
"set-blocking@npm:^2.0.0":
|
||||||
version: 2.0.0
|
version: 2.0.0
|
||||||
resolution: "set-blocking@npm:2.0.0"
|
resolution: "set-blocking@npm:2.0.0"
|
||||||
|
@ -5341,7 +5352,7 @@ __metadata:
|
||||||
rollup-plugin-styles: 4.0.0
|
rollup-plugin-styles: 4.0.0
|
||||||
rollup-plugin-swc3: 0.8.2
|
rollup-plugin-swc3: 0.8.2
|
||||||
sass: 1.62.1
|
sass: 1.62.1
|
||||||
semver: 7.5.1
|
semver: 7.5.4
|
||||||
yargs: 17.7.2
|
yargs: 17.7.2
|
||||||
languageName: unknown
|
languageName: unknown
|
||||||
linkType: soft
|
linkType: soft
|
||||||
|
|
Loading…
Reference in a new issue