Compare commits
No commits in common. "main" and "1.20.0-3" have entirely different histories.
7 changed files with 3537 additions and 3847 deletions
6
.vscode/launch.json
vendored
6
.vscode/launch.json
vendored
|
@ -5,14 +5,12 @@
|
|||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"type": "chrome",
|
||||
"type": "pwa-chrome",
|
||||
"request": "launch",
|
||||
"runtimeExecutable": "/usr/bin/chromium",
|
||||
"name": "Launch Chrome against localhost",
|
||||
"url": "http://localhost:30000/game",
|
||||
"pathMapping": {
|
||||
"/systems/ds4": "${workspaceFolder}/dist"
|
||||
}
|
||||
"webRoot": "${workspaceFolder}/dist"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
54
package.json
54
package.json
|
@ -2,7 +2,7 @@
|
|||
"private": true,
|
||||
"name": "dungeonslayers4",
|
||||
"description": "An implementation of the Dungeonslayers 4 game system for Foundry Virtual Tabletop.",
|
||||
"version": "1.21.1",
|
||||
"version": "1.20.0-3",
|
||||
"license": "https://git.f3l.de/dungeonslayers/ds4#licensing",
|
||||
"homepage": "https://git.f3l.de/dungeonslayers/ds4",
|
||||
"repository": {
|
||||
|
@ -63,35 +63,35 @@
|
|||
"changelog": "conventional-changelog -p conventionalcommits -o CHANGELOG.md -r 2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "19.5.0",
|
||||
"@commitlint/config-conventional": "19.5.0",
|
||||
"@commitlint/cli": "17.6.7",
|
||||
"@commitlint/config-conventional": "17.6.7",
|
||||
"@foundryvtt/foundryvtt-cli": "0.0.9",
|
||||
"@guanghechen/rollup-plugin-copy": "6.0.2",
|
||||
"@guanghechen/rollup-plugin-copy": "5.0.2",
|
||||
"@ironkinoko/rollup-plugin-styles": "4.0.3",
|
||||
"@swc/core": "1.7.39",
|
||||
"@types/fs-extra": "11.0.4",
|
||||
"@types/jquery": "3.5.31",
|
||||
"@types/node": "18.19.3",
|
||||
"@typescript-eslint/eslint-plugin": "7.18.0",
|
||||
"@typescript-eslint/parser": "7.18.0",
|
||||
"conventional-changelog-cli": "5.0.0",
|
||||
"conventional-changelog-conventionalcommits": "8.0.0",
|
||||
"eslint": "8.57.1",
|
||||
"eslint-config-prettier": "9.1.0",
|
||||
"fs-extra": "11.2.0",
|
||||
"handlebars": "4.7.8",
|
||||
"@swc/core": "1.3.70",
|
||||
"@types/fs-extra": "11.0.1",
|
||||
"@types/jquery": "3.5.16",
|
||||
"@types/node": "18.17.0",
|
||||
"@typescript-eslint/eslint-plugin": "6.1.0",
|
||||
"@typescript-eslint/parser": "6.1.0",
|
||||
"conventional-changelog-cli": "3.0.0",
|
||||
"conventional-changelog-conventionalcommits": "6.1.0",
|
||||
"eslint": "8.45.0",
|
||||
"eslint-config-prettier": "8.8.0",
|
||||
"fs-extra": "11.1.1",
|
||||
"handlebars": "4.7.7",
|
||||
"npm-run-all": "4.1.5",
|
||||
"prettier": "3.3.3",
|
||||
"rimraf": "6.0.1",
|
||||
"rollup": "4.24.0",
|
||||
"rollup-plugin-swc3": "0.12.1",
|
||||
"sass": "1.80.3",
|
||||
"semver": "7.6.3",
|
||||
"tslib": "2.8.0",
|
||||
"typescript": "5.5.4",
|
||||
"vite": "4.5.5",
|
||||
"vitest": "0.34.6",
|
||||
"prettier": "3.0.0",
|
||||
"rimraf": "5.0.1",
|
||||
"rollup": "3.26.3",
|
||||
"rollup-plugin-swc3": "0.9.1",
|
||||
"sass": "1.64.1",
|
||||
"semver": "7.5.4",
|
||||
"tslib": "2.6.0",
|
||||
"typescript": "5.1.6",
|
||||
"vite": "4.4.6",
|
||||
"vitest": "0.33.0",
|
||||
"yargs": "17.7.2"
|
||||
},
|
||||
"packageManager": "pnpm@9.12.2"
|
||||
"packageManager": "pnpm@8.6.9"
|
||||
}
|
||||
|
|
7291
pnpm-lock.yaml
7291
pnpm-lock.yaml
File diff suppressed because it is too large
Load diff
|
@ -5,8 +5,7 @@
|
|||
|
||||
import { DS4 } from "../../config";
|
||||
import { createCheckRoll } from "../../dice/check-factory";
|
||||
import { Evaluator } from "../../expression-evaluation/evaluator";
|
||||
import { Validator } from "../../expression-evaluation/validator";
|
||||
import { mathEvaluator } from "../../expression-evaluation/evaluator";
|
||||
import { logger } from "../../utils/logger";
|
||||
import { getGame } from "../../utils/utils";
|
||||
import { DS4ActiveEffect } from "../active-effect";
|
||||
|
@ -60,7 +59,7 @@ export class DS4Actor extends Actor {
|
|||
}
|
||||
|
||||
/**
|
||||
* The effects that should be applied to this actor.
|
||||
* The effects that should be applioed to this actor.
|
||||
* @type {import("../active-effect").DS4ActiveEffect[]}
|
||||
* @protected
|
||||
*/
|
||||
|
@ -91,7 +90,7 @@ export class DS4Actor extends Actor {
|
|||
if (condition !== undefined && condition !== "") {
|
||||
try {
|
||||
const replacedCondition = DS4Actor.replaceFormulaData(condition, { item, actor: this, effect });
|
||||
return replacedCondition !== undefined ? Boolean(DS4Actor.evaluator.evaluate(replacedCondition)) : false;
|
||||
return replacedCondition !== undefined ? Boolean(mathEvaluator.evaluate(replacedCondition)) : false;
|
||||
} catch (error) {
|
||||
logger.warn(error);
|
||||
return false;
|
||||
|
@ -521,12 +520,6 @@ export class DS4Actor extends Actor {
|
|||
rejectClose: false,
|
||||
});
|
||||
}
|
||||
|
||||
static evaluator = new Evaluator({
|
||||
context: Math,
|
||||
predicate: (identifier) =>
|
||||
Validator.defaultPredicate(identifier) || ["includes", "toLowerCase", "toUpperCase"].includes(identifier),
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -19,7 +19,7 @@ export class Evaluator<Context extends object> {
|
|||
get: (t, k) => (k === Symbol.unscopables ? undefined : t[k as keyof typeof t]),
|
||||
});
|
||||
actualPredicate = (identifier: string) =>
|
||||
predicate(identifier) || Object.getOwnPropertyNames(context).includes(identifier);
|
||||
predicate(identifier) || Object.getOwnPropertyNames(Math).includes(identifier);
|
||||
}
|
||||
this.validator = new Validator(actualPredicate);
|
||||
}
|
||||
|
|
16
system.json
16
system.json
|
@ -28,11 +28,12 @@
|
|||
"name": "Sascha Martens"
|
||||
}
|
||||
],
|
||||
"license": "https://git.f3l.de/dungeonslayers/ds4/raw/tag/1.21.1/LICENSE.md",
|
||||
"readme": "https://git.f3l.de/dungeonslayers/ds4/raw/tag/1.21.1/README.md",
|
||||
"url": "https://git.f3l.de/dungeonslayers/ds4",
|
||||
"license": "https://git.f3l.de/dungeonslayers/ds4/raw/tag/1.20.0-3/LICENSE.md",
|
||||
"readme": "https://git.f3l.de/dungeonslayers/ds4/raw/tag/1.20.0-3/README.md",
|
||||
"bugs": "https://git.f3l.de/dungeonslayers/ds4/issues",
|
||||
"changelog": "https://git.f3l.de/dungeonslayers/ds4/releases/tag/1.21.1",
|
||||
"version": "1.21.1",
|
||||
"changelog": "https://git.f3l.de/dungeonslayers/ds4/releases/tag/1.20.0-3",
|
||||
"version": "1.20.0-3",
|
||||
"flags": {
|
||||
"hotReload": {
|
||||
"extensions": ["css", "hbs", "json"],
|
||||
|
@ -115,12 +116,11 @@
|
|||
"type": "Item"
|
||||
}
|
||||
],
|
||||
"manifest": "https://git.f3l.de/api/packages/dungeonslayers/generic/ds4/latest/system.json",
|
||||
"download": "https://git.f3l.de/dungeonslayers/ds4/releases/download/1.21.1/ds4.zip",
|
||||
"manifest": "https://git.f3l.de/api/packages/dungeonslayers/generic/ds4/beta/system.json",
|
||||
"download": "https://git.f3l.de/dungeonslayers/ds4/releases/download/1.20.0-3/ds4.zip",
|
||||
"initiative": "@combatValues.initiative.total",
|
||||
"gridDistance": 1,
|
||||
"gridUnits": "m",
|
||||
"primaryTokenAttribute": "combatValues.hitPoints",
|
||||
"manifestPlusVersion": "1.2.0",
|
||||
"url": "https://git.f3l.de/dungeonslayers/ds4"
|
||||
"manifestPlusVersion": "1.2.0"
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ import { hideBin } from "yargs/helpers";
|
|||
const packageType = "system";
|
||||
const repositoryOwner = process.env.CI_REPO_OWNER;
|
||||
const repositoryName = process.env.CI_REPO_NAME;
|
||||
const repositoryURL = process.env.CI_REPO_URL;
|
||||
const repositoryURL = process.env.CI_REPO_LINK;
|
||||
const forgeURL = process.env.CI_FORGE_URL;
|
||||
|
||||
const getManifestUrl = (channel) =>
|
||||
|
|
Loading…
Reference in a new issue