Compare commits
3 commits
d1c3a7f23e
...
e67998949e
Author | SHA1 | Date | |
---|---|---|---|
e67998949e | |||
|
261d7a8b5a | ||
704798cc27 |
7 changed files with 261 additions and 260 deletions
File diff suppressed because one or more lines are too long
|
@ -4,4 +4,4 @@ plugins:
|
|||
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
|
||||
spec: '@yarnpkg/plugin-interactive-tools'
|
||||
|
||||
yarnPath: .yarn/releases/yarn-3.6.0.cjs
|
||||
yarnPath: .yarn/releases/yarn-3.6.1.cjs
|
||||
|
|
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": {
|
||||
|
@ -54,5 +54,5 @@
|
|||
"semver": "7.5.1",
|
||||
"yargs": "17.7.2"
|
||||
},
|
||||
"packageManager": "yarn@3.6.0"
|
||||
"packageManager": "yarn@3.6.1"
|
||||
}
|
||||
|
|
|
@ -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', {
|
||||
|
|
Loading…
Reference in a new issue