diff --git a/README.md b/README.md index e7c4d015f..62ecf1792 100644 --- a/README.md +++ b/README.md @@ -193,11 +193,6 @@ A demo video of most features: https://www.youtube.com/watch?v=WzDq2N1X07s about Flat Checks to rolls. It is far from complete, but it's a good start. To use it add it to your character. It currently handles: Target is undetected, hidden, invisible or concealed. Self is blinded or dazzled. Self has Blind-Fight. - * (Deprecated, will break with the next pf2e system release. You know the one that contains proper IWR handling - making this Workbench feature obsolete...) Option to create an IWR (Immunity, Weakness, Resistance) reminder - message after a damage roll against a target with an IWR that matches damage types of the attacking weapon or - spell. NOTE: Currently only handles 'simple' IWR, it doesn't handle things like 'All', 'Physical', 'All (except - force)', etc. ## Installation diff --git a/module.json b/module.json index 97f59ed91..838fe8652 100644 --- a/module.json +++ b/module.json @@ -4,7 +4,7 @@ "version": "4.25.0", "id": "xdy-pf2e-workbench", "compatibility": { - "minimum": "10.284", + "minimum": "10.291", "verified": "10.291", "maximum": "10" }, @@ -15,8 +15,8 @@ "type": "system", "manifest": "https://github.com/foundryvtt/pf2e/releases/download/latest/system.json", "compatibility": { - "minimum": "4.4.0", - "verified": "4.5.1" + "minimum": "4.6.0", + "verified": "4.6.0" } } ] diff --git a/package-lock.json b/package-lock.json index 8230d6bd2..e67720388 100644 --- a/package-lock.json +++ b/package-lock.json @@ -33,20 +33,20 @@ "@types/css-minimizer-webpack-plugin": "^3.2.1", "@types/fs-extra": "^9.0.13", "@types/glob": "^8.0.0", - "@types/jquery": "^3.5.14", - "@types/luxon": "^3.1.0", + "@types/jquery": "^3.5.16", + "@types/luxon": "^3.2.0", "@types/mini-css-extract-plugin": "^2.5.1", "@types/node": "^18.11.18", "@types/sortablejs": "^1.15.0", "@types/tooltipster": "^0.0.31", "@types/webpack-env": "^1.18.0", - "@types/yaireo__tagify": "^4.16.0", + "@types/yaireo__tagify": "^4.16.1", "@typescript-eslint/eslint-plugin": "^5.47.1", "@typescript-eslint/parser": "^5.47.1", "copy-webpack-plugin": "^11.0.0", "css-loader": "^6.7.3", "css-minimizer-webpack-plugin": "^4.2.2", - "eslint": "^8.30.0", + "eslint": "^8.31.0", "eslint-config-prettier": "^8.5.0", "eslint-import-resolver-typescript": "^3.5.2", "eslint-plugin-import": "^2.26.0", @@ -317,9 +317,9 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.4.0.tgz", - "integrity": "sha512-7yfvXy6MWLgWSFsLhz5yH3iQ52St8cdUY6FoGieKkRDVxuxmrNuUetIuu6cmjNWwniUHiWXjxCr5tTXDrbYS5A==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.4.1.tgz", + "integrity": "sha512-XXrH9Uarn0stsyldqDYq8r++mROmWRI1xKMXa640Bb//SY1+ECYX6VzT6Lcx5frD0V30XieqJ0oX9I2Xj5aoMA==", "dev": true, "dependencies": { "ajv": "^6.12.4", @@ -1528,9 +1528,9 @@ } }, "node_modules/@types/express-serve-static-core": { - "version": "4.17.31", - "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.31.tgz", - "integrity": "sha512-DxMhY+NAsTwMMFHBTtJFNp5qiHKJ7TeqOo23zVEM9alT1Ml27Q3xcTH0xwxn7Q0BbMcVEJOs/7aQtUWupUQN3Q==", + "version": "4.17.32", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.32.tgz", + "integrity": "sha512-aI5h/VOkxOF2Z1saPy0Zsxs5avets/iaiAJYznQFm5By/pamU31xWKL//epiF4OfUA2qTOc9PV6tCUjhO8wlZA==", "dev": true, "dependencies": { "@types/node": "*", @@ -1591,9 +1591,9 @@ } }, "node_modules/@types/jquery": { - "version": "3.5.14", - "resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-3.5.14.tgz", - "integrity": "sha512-X1gtMRMbziVQkErhTQmSe2jFwwENA/Zr+PprCkF63vFq+Yt5PZ4AlKqgmeNlwgn7dhsXEK888eIW2520EpC+xg==", + "version": "3.5.16", + "resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-3.5.16.tgz", + "integrity": "sha512-bsI7y4ZgeMkmpG9OM710RRzDFp+w4P1RGiIt30C1mSBT+ExCleeh4HObwgArnDFELmRrOpXgSYN9VF1hj+f1lw==", "dev": true, "dependencies": { "@types/sizzle": "*" @@ -1612,9 +1612,9 @@ "dev": true }, "node_modules/@types/luxon": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@types/luxon/-/luxon-3.1.0.tgz", - "integrity": "sha512-gCd/HcCgjqSxfMrgtqxCgYk/22NBQfypwFUG7ZAyG/4pqs51WLTcUzVp1hqTbieDYeHS3WoVEh2Yv/2l+7B0Vg==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@types/luxon/-/luxon-3.2.0.tgz", + "integrity": "sha512-lGmaGFoaXHuOLXFvuju2bfvZRqxAqkHPx9Y9IQdQABrinJJshJwfNCKV+u7rR3kJbiqfTF/NhOkcxxAFrObyaA==", "dev": true }, "node_modules/@types/mime": { @@ -1781,9 +1781,9 @@ } }, "node_modules/@types/yaireo__tagify": { - "version": "4.16.0", - "resolved": "https://registry.npmjs.org/@types/yaireo__tagify/-/yaireo__tagify-4.16.0.tgz", - "integrity": "sha512-seljsH9d92TqQl+dW+KxrfQR5O46SQD7IeUsArWqeq3Ji+uxcRsQQq0BL1GfCx6XprYdRQZxgWHqqrBRScP9XQ==", + "version": "4.16.1", + "resolved": "https://registry.npmjs.org/@types/yaireo__tagify/-/yaireo__tagify-4.16.1.tgz", + "integrity": "sha512-b/c9VTOzNGarH+FgrukyOrh2dhjg4P35I9g9r793inUsijTwqIYMcs1Tf+BNckpqmUrB7ANeWY0LnE7mp61HyA==", "dev": true, "dependencies": { "@types/react": "*", @@ -4187,12 +4187,12 @@ } }, "node_modules/eslint": { - "version": "8.30.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.30.0.tgz", - "integrity": "sha512-MGADB39QqYuzEGov+F/qb18r4i7DohCDOfatHaxI2iGlPuC65bwG2gxgO+7DkyL38dRFaRH7RaRAgU6JKL9rMQ==", + "version": "8.31.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.31.0.tgz", + "integrity": "sha512-0tQQEVdmPZ1UtUKXjX7EMm9BlgJ08G90IhWh0PKDCb3ZLsgAOHI8fYSIzYVZej92zsgq+ft0FGsxhJ3xo2tbuA==", "dev": true, "dependencies": { - "@eslint/eslintrc": "^1.4.0", + "@eslint/eslintrc": "^1.4.1", "@humanwhocodes/config-array": "^0.11.8", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -4404,9 +4404,9 @@ } }, "node_modules/eslint-plugin-import/node_modules/json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", "dev": true, "dependencies": { "minimist": "^1.2.0" @@ -6350,9 +6350,9 @@ "dev": true }, "node_modules/json5": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.2.tgz", - "integrity": "sha512-46Tk9JiOL2z7ytNQWFLpj99RZkVgeHf87yGQKsIkaPz1qSH9UczKH1rO7K3wgRselo0tYMUNfecYpm/p1vC7tQ==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true, "bin": { "json5": "lib/cli.js" @@ -14336,13 +14336,13 @@ }, "types/types/foundry": { "name": "foundry-types", - "version": "2.0.2", + "version": "4.4.2", "dev": true, "license": "Apache-2.0", "devDependencies": { - "@types/jquery": "^3.5.14", + "@types/jquery": "^3.5.16", "@types/node": "^18.11.18", - "pixi.js": "6.5.1", + "pixi.js": "6.5.2", "socket.io": "^4.5.4", "socket.io-client": "^4.5.4", "tinymce": "^6.3.1", @@ -14350,49 +14350,49 @@ } }, "types/types/foundry/node_modules/@pixi/accessibility": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@pixi/accessibility/-/accessibility-6.5.1.tgz", - "integrity": "sha512-HCOAqCtbaUI2nPg3IubVeVVKm/lbwDgh2gJGbhJ9MAs6CK85MelUW2z8DnxdPznvhKsuAHPF1gZrdqvWUON5QQ==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/@pixi/accessibility/-/accessibility-6.5.2.tgz", + "integrity": "sha512-iA/0NlhdugsDiOlJjINkNLmGALh+irwEKNPMJuyPctHsnb/WCmsr1hPNMYUDHbqwU20zWg9//JsYe0ali/3Cdw==", "dev": true, "peerDependencies": { - "@pixi/core": "6.5.1", - "@pixi/display": "6.5.1", - "@pixi/utils": "6.5.1" + "@pixi/core": "6.5.2", + "@pixi/display": "6.5.2", + "@pixi/utils": "6.5.2" } }, "types/types/foundry/node_modules/@pixi/app": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@pixi/app/-/app-6.5.1.tgz", - "integrity": "sha512-JBD5T21S2N8CVR2dXuvWzMFRNO24rbMa15qGekcItuCpw7VWe1oxEPxquxsbKlBL2Zanr+J69wW8ZIQd8yQAGA==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/@pixi/app/-/app-6.5.2.tgz", + "integrity": "sha512-y/d+d9M668fa2ztY16C6xkiYACqZu59f6FOkaIzqClwRz7Ws7xGe6llFUa5d3vN/J/O1l4SyPOlPFjSflj3aOg==", "dev": true, "peerDependencies": { - "@pixi/core": "6.5.1", - "@pixi/display": "6.5.1" + "@pixi/core": "6.5.2", + "@pixi/display": "6.5.2" } }, "types/types/foundry/node_modules/@pixi/compressed-textures": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@pixi/compressed-textures/-/compressed-textures-6.5.1.tgz", - "integrity": "sha512-6KO2r7HwrOyseQnYsflm1oACmn6O/EOMb4/VREvPaXZA51YUMY5gnGwXR2VXV3W1Y75YfktjOm/FWlrTLlmszQ==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/@pixi/compressed-textures/-/compressed-textures-6.5.2.tgz", + "integrity": "sha512-/mNHv769TPdriCxeMFkoHQM6k3gp2QtzwPfcMFAdecWpiKNu2dKkwgKpuaI56W1z/NmovgbruSCeEbyVZY0h9A==", "dev": true, "peerDependencies": { - "@pixi/constants": "6.5.1", - "@pixi/core": "6.5.1", - "@pixi/loaders": "6.5.1", - "@pixi/settings": "6.5.1", - "@pixi/utils": "6.5.1" + "@pixi/constants": "6.5.2", + "@pixi/core": "6.5.2", + "@pixi/loaders": "6.5.2", + "@pixi/settings": "6.5.2", + "@pixi/utils": "6.5.2" } }, "types/types/foundry/node_modules/@pixi/constants": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@pixi/constants/-/constants-6.5.1.tgz", - "integrity": "sha512-xhiCvpGtWlEKEuxRjygnjtfkOxW/FFDpJpwYjygfNr2WL+K6r8dfLl5VB89Au1dtp+akRqBo9AqO5gEZ0TaXzA==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/@pixi/constants/-/constants-6.5.2.tgz", + "integrity": "sha512-tlX9uv/mi3O7XL2CJnjvRkJpCCvm5prYXL4RApXeg5rYCGOk/Qj3Zm5aPKUaq7Je4PoEyPy5vC9/geV8nFzmAQ==", "dev": true }, "types/types/foundry/node_modules/@pixi/core": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@pixi/core/-/core-6.5.1.tgz", - "integrity": "sha512-TEn9mpidJKutmxAS4r3Yn39oZX1L2da1MVOQGQjW+NUdpGyVFweLGRPRKR+rV7xtXcU33jKDm8ZZaDgafO1hag==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/@pixi/core/-/core-6.5.2.tgz", + "integrity": "sha512-Km//zq2KBqEE9R3IRSaRRsIQkGctxBZpwmJaEly4VTAWVQAfd2HCQqYTu0js+9jdSLwFexiFNjKBYf8BQEbBdg==", "dev": true, "dependencies": { "@types/offscreencanvas": "^2019.6.4" @@ -14402,221 +14402,221 @@ "url": "https://opencollective.com/pixijs" }, "peerDependencies": { - "@pixi/constants": "6.5.1", - "@pixi/extensions": "6.5.1", - "@pixi/math": "6.5.1", - "@pixi/runner": "6.5.1", - "@pixi/settings": "6.5.1", - "@pixi/ticker": "6.5.1", - "@pixi/utils": "6.5.1" + "@pixi/constants": "6.5.2", + "@pixi/extensions": "6.5.2", + "@pixi/math": "6.5.2", + "@pixi/runner": "6.5.2", + "@pixi/settings": "6.5.2", + "@pixi/ticker": "6.5.2", + "@pixi/utils": "6.5.2" } }, "types/types/foundry/node_modules/@pixi/display": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@pixi/display/-/display-6.5.1.tgz", - "integrity": "sha512-2NzEEaqdKHNpLwJxOsVq1VIYozNGfq4RCLEiXN90CVIp8021i6Fzr0JoVx16Eio3rSBXk9xMmSdw3esEtf8Bmw==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/@pixi/display/-/display-6.5.2.tgz", + "integrity": "sha512-EuRH9x/EW/ds1DJ08L1B5Yiz3vCViNYyJvyBOeCCsnHiMPXxT3cfIW+PkZOMR+hyzqQhioFFjiQS8KsXPojmfg==", "dev": true, "peerDependencies": { - "@pixi/math": "6.5.1", - "@pixi/settings": "6.5.1", - "@pixi/utils": "6.5.1" + "@pixi/math": "6.5.2", + "@pixi/settings": "6.5.2", + "@pixi/utils": "6.5.2" } }, "types/types/foundry/node_modules/@pixi/extensions": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@pixi/extensions/-/extensions-6.5.1.tgz", - "integrity": "sha512-zKTFu0ZqCzlZyIR4/ckDSedMutMITmoCJnWgRaq2RdxryWIgE3s6/WCScUYlt2D9CR6fJ2xSHvNHIPESyfsS2A==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/@pixi/extensions/-/extensions-6.5.2.tgz", + "integrity": "sha512-pLCUcDZS9RQsz4AkLYhOB40JB4qSqrAQrWXp8OkQ8bhwNxiI1BupCwh2+cpxdE46iGtH6tgvUWPnuQxq5SfSYw==", "dev": true }, "types/types/foundry/node_modules/@pixi/extract": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@pixi/extract/-/extract-6.5.1.tgz", - "integrity": "sha512-BdPQHVibtp2o9WxgrlpcHIVfjFmRPUjR7Khn211jsB1B1AgR8XwZacacwlRmRD2a/EyDmFd6guYyx7PKxZRTLA==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/@pixi/extract/-/extract-6.5.2.tgz", + "integrity": "sha512-14u/PqXOnQOZoRshEI6hAy6CTRMcoH6eKxMvV7NuGATKgbAyiJZm3K6qN+DkbrSKwOmuABQYB9FPcyB8yUl0+A==", "dev": true, "peerDependencies": { - "@pixi/core": "6.5.1", - "@pixi/math": "6.5.1", - "@pixi/utils": "6.5.1" + "@pixi/core": "6.5.2", + "@pixi/math": "6.5.2", + "@pixi/utils": "6.5.2" } }, "types/types/foundry/node_modules/@pixi/filter-alpha": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@pixi/filter-alpha/-/filter-alpha-6.5.1.tgz", - "integrity": "sha512-3o73ZxMusn6cCJIPApF1ClzzUypV2m2D5mblsUs+LPr9IDdIp0K8BICNWTCmiWB9N71yKlt3BVvR5CQJlWaG1w==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/@pixi/filter-alpha/-/filter-alpha-6.5.2.tgz", + "integrity": "sha512-FJbOTbllZ2BrGNr95jmzW6viWeo2ooMCF/dDZDaSN8ptDYwO3QTH+FIqprffrw+nR1s95opZ1T1Mmisbxvulpw==", "dev": true, "peerDependencies": { - "@pixi/core": "6.5.1" + "@pixi/core": "6.5.2" } }, "types/types/foundry/node_modules/@pixi/filter-blur": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@pixi/filter-blur/-/filter-blur-6.5.1.tgz", - "integrity": "sha512-SoT55JbNNZ/FaOLWwc5zZVYvgaaVEMXzqaSkZ+tVVf6BkpzewjNzOJzWuE+vP9Y+YX4axMu2I8ysDYk4yZ+zVg==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/@pixi/filter-blur/-/filter-blur-6.5.2.tgz", + "integrity": "sha512-MCFYg35hOUHmc/IxS4zyLbMeWuCKmSI/9mSb4NwQdVIJRCKj22ra0gMrhO4qNyfi3tnaR4rrk4uMDSkCiQ9Lmg==", "dev": true, "peerDependencies": { - "@pixi/core": "6.5.1", - "@pixi/settings": "6.5.1" + "@pixi/core": "6.5.2", + "@pixi/settings": "6.5.2" } }, "types/types/foundry/node_modules/@pixi/filter-color-matrix": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@pixi/filter-color-matrix/-/filter-color-matrix-6.5.1.tgz", - "integrity": "sha512-lr3whK/+06nssPE877HPD2vnd0jnLq7RMBPeImd5v4Gno3qinszqKxmejX8SbWjb6GMqrIhaTlgLTJvUUuPrxw==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/@pixi/filter-color-matrix/-/filter-color-matrix-6.5.2.tgz", + "integrity": "sha512-hC8iWUikfvU3LbyKnrPL1MAei9nhrUdbL636Ryk5inOmwPZd33TsC0a+WUzXacj3dFcTUHC1ghYpkbWR7s4n5g==", "dev": true, "peerDependencies": { - "@pixi/core": "6.5.1" + "@pixi/core": "6.5.2" } }, "types/types/foundry/node_modules/@pixi/filter-displacement": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@pixi/filter-displacement/-/filter-displacement-6.5.1.tgz", - "integrity": "sha512-j4cV/X6yyCK1vW1pGnMOZqlwj9za6Pry8Lv0l7wLEk6kvGRQFEz+mAKDy3Psv5ja+CHLfzRI+I/gyJKAUXOA4w==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/@pixi/filter-displacement/-/filter-displacement-6.5.2.tgz", + "integrity": "sha512-VpcXd1j32VP+ylbrHw75J+pJwxtDNISKAzz+nfD9aGm3IfJW7vq696qrz09acD1Mr2buLc7G930d79eploOJ+Q==", "dev": true, "peerDependencies": { - "@pixi/core": "6.5.1", - "@pixi/math": "6.5.1" + "@pixi/core": "6.5.2", + "@pixi/math": "6.5.2" } }, "types/types/foundry/node_modules/@pixi/filter-fxaa": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@pixi/filter-fxaa/-/filter-fxaa-6.5.1.tgz", - "integrity": "sha512-1/V7Brx2v0rBczo0eXHFC1bH0q0CkyTCRserLk/+0B1mY2vhoEOF62QhrMOdL+P9gMnGWpU8j+cDEAmi/lp4DQ==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/@pixi/filter-fxaa/-/filter-fxaa-6.5.2.tgz", + "integrity": "sha512-z9UXnqIWSLlcUuTkpwz6xi3uAGMNTbiaCL9k3bDwKmvxfa6nZlTfI9QOG6Cj3L5J6bZgltax4V1V+kHzQWMujg==", "dev": true, "peerDependencies": { - "@pixi/core": "6.5.1" + "@pixi/core": "6.5.2" } }, "types/types/foundry/node_modules/@pixi/filter-noise": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@pixi/filter-noise/-/filter-noise-6.5.1.tgz", - "integrity": "sha512-V3Y8IcdxyEra1wtWCwB0D0s/KfXzTDG8MO0UbNfxR9DbM01TRfJYiaoqXU7otVMQReMjcrswA3eDZuZabkqq2g==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/@pixi/filter-noise/-/filter-noise-6.5.2.tgz", + "integrity": "sha512-26YyKXxcuoDiZ6DRaqrAZdwQFp2pS2FVVQBb0BtzB9ruwkEC4w4R1cLZKva1PM58M11Zrgbn6/tNTupBLZKTJg==", "dev": true, "peerDependencies": { - "@pixi/core": "6.5.1" + "@pixi/core": "6.5.2" } }, "types/types/foundry/node_modules/@pixi/graphics": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@pixi/graphics/-/graphics-6.5.1.tgz", - "integrity": "sha512-LeFdpmbWHZWH8ub7AqF3sKDbSvlYoGDa8029vcPJpgwDE7hrCTRX0Lgbr+xkgPu99jZKJrW4pbRTr+QGckkH1Q==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/@pixi/graphics/-/graphics-6.5.2.tgz", + "integrity": "sha512-NLPds0Mz0gfozAi3ZIs5bjEa2vw/7kiYpqZsPWWttlBOOk1ij6YxefDcRpKnBkuCsoK0f8Ts3NgohFKKTP0goQ==", "dev": true, "peerDependencies": { - "@pixi/constants": "6.5.1", - "@pixi/core": "6.5.1", - "@pixi/display": "6.5.1", - "@pixi/math": "6.5.1", - "@pixi/sprite": "6.5.1", - "@pixi/utils": "6.5.1" + "@pixi/constants": "6.5.2", + "@pixi/core": "6.5.2", + "@pixi/display": "6.5.2", + "@pixi/math": "6.5.2", + "@pixi/sprite": "6.5.2", + "@pixi/utils": "6.5.2" } }, "types/types/foundry/node_modules/@pixi/interaction": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@pixi/interaction/-/interaction-6.5.1.tgz", - "integrity": "sha512-JVQ4SAr1ykE7nJZpoROnexscRI8QYx5T8fyXwVlXxAFdpX5mtBqOlCpYOVCs8wtu6dP0R7EDlfpf5ARh1JZwvQ==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/@pixi/interaction/-/interaction-6.5.2.tgz", + "integrity": "sha512-3maSzaQT4DAwxU0f9kP7iNPsgXBa2Z/MRND7nbYIx92Rc4USsX0CyEFJmIb1K4MvpgvR/Xej3S99OZoCn3rt+w==", "dev": true, "peerDependencies": { - "@pixi/core": "6.5.1", - "@pixi/display": "6.5.1", - "@pixi/math": "6.5.1", - "@pixi/ticker": "6.5.1", - "@pixi/utils": "6.5.1" + "@pixi/core": "6.5.2", + "@pixi/display": "6.5.2", + "@pixi/math": "6.5.2", + "@pixi/ticker": "6.5.2", + "@pixi/utils": "6.5.2" } }, "types/types/foundry/node_modules/@pixi/loaders": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@pixi/loaders/-/loaders-6.5.1.tgz", - "integrity": "sha512-3a41RWFWyRtBrs/fboaFHLF7H5uof4XaWqMCxvLzfofHiz2AuiZnAx9YJAjT+RCP2uFfoU1XmDcyGdc1Q0Ib4w==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/@pixi/loaders/-/loaders-6.5.2.tgz", + "integrity": "sha512-pmnz02Lw6FvmH0G/JkOr6iq0XS5v0HNJjepm9t1zK5rsXnpKvLJ7aAQRRR15hTF8Krd83aEISRVrHc2AgGhHRw==", "dev": true, "peerDependencies": { - "@pixi/constants": "6.5.1", - "@pixi/core": "6.5.1", - "@pixi/utils": "6.5.1" + "@pixi/constants": "6.5.2", + "@pixi/core": "6.5.2", + "@pixi/utils": "6.5.2" } }, "types/types/foundry/node_modules/@pixi/math": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@pixi/math/-/math-6.5.1.tgz", - "integrity": "sha512-r5N18EBxEO4ZdeQ6e3T00Qe9YXOG1vto0fgAT4jHwxBfBn0LrY8FIiF6yi6r8af2hU6LrzNdE2nO+0kYPzR5Lw==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/@pixi/math/-/math-6.5.2.tgz", + "integrity": "sha512-nSLEDWrcdxWTkgJSjxWlt6PLTH8ysj0v487EBEv/OB1zihiZSIBVuja7LsrD52Yv31D2MxNWrgfnmwSOMuuRTg==", "dev": true }, "types/types/foundry/node_modules/@pixi/mesh": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@pixi/mesh/-/mesh-6.5.1.tgz", - "integrity": "sha512-BFh9ft8L7imGQqYHDR/3T3QvVi62y7YD85XhfpWetKwmkI5V8FhB7GnVRBlbJI3Qa6rg0UN0GK4tb/ykPhrPow==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/@pixi/mesh/-/mesh-6.5.2.tgz", + "integrity": "sha512-L3CYGoXwjGTv+gr4CFd/djYB2WmNWQrNzmW9VeUZ9G00uvPIjLj233y3eyF/ty5ye75r6lUCJiNSfxw6m9W55Q==", "dev": true, "peerDependencies": { - "@pixi/constants": "6.5.1", - "@pixi/core": "6.5.1", - "@pixi/display": "6.5.1", - "@pixi/math": "6.5.1", - "@pixi/settings": "6.5.1", - "@pixi/utils": "6.5.1" + "@pixi/constants": "6.5.2", + "@pixi/core": "6.5.2", + "@pixi/display": "6.5.2", + "@pixi/math": "6.5.2", + "@pixi/settings": "6.5.2", + "@pixi/utils": "6.5.2" } }, "types/types/foundry/node_modules/@pixi/mesh-extras": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@pixi/mesh-extras/-/mesh-extras-6.5.1.tgz", - "integrity": "sha512-Q7Zl1emYr16ZRpAKJKSnGe4AdAwj1mAG3lS5cu2rxSyTQypiFzdC6TnU4XZlGAPE7V+hvlPmSjOwhIzVXgTJ4Q==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/@pixi/mesh-extras/-/mesh-extras-6.5.2.tgz", + "integrity": "sha512-fRVPZSOurR0Au1Dm40DOmYMEV4QEMMRv5KiyBobYkpNx36khTTklA1l+7xX+JHVifezXSHSSu248jfbb4PleZg==", "dev": true, "peerDependencies": { - "@pixi/constants": "6.5.1", - "@pixi/core": "6.5.1", - "@pixi/math": "6.5.1", - "@pixi/mesh": "6.5.1", - "@pixi/utils": "6.5.1" + "@pixi/constants": "6.5.2", + "@pixi/core": "6.5.2", + "@pixi/math": "6.5.2", + "@pixi/mesh": "6.5.2", + "@pixi/utils": "6.5.2" } }, "types/types/foundry/node_modules/@pixi/mixin-cache-as-bitmap": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@pixi/mixin-cache-as-bitmap/-/mixin-cache-as-bitmap-6.5.1.tgz", - "integrity": "sha512-csim51DjrhnsFsSSrCcO4/zy8hbC8jYmuZVAQWjT5Ag8FwacJsM+88LpJYZfyUcaEVjWoPM8f4N3vCrFgN+d7Q==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/@pixi/mixin-cache-as-bitmap/-/mixin-cache-as-bitmap-6.5.2.tgz", + "integrity": "sha512-V1hDUKxaQupWnsPY4f2p0Yh0kHCzoPoMKgEhm/+xYcx+F9Em5IF9AYV9MJY0s6uz7nsbRG67+IRzNoI5Pq1SOw==", "dev": true, "peerDependencies": { - "@pixi/core": "6.5.1", - "@pixi/display": "6.5.1", - "@pixi/math": "6.5.1", - "@pixi/settings": "6.5.1", - "@pixi/sprite": "6.5.1", - "@pixi/utils": "6.5.1" + "@pixi/core": "6.5.2", + "@pixi/display": "6.5.2", + "@pixi/math": "6.5.2", + "@pixi/settings": "6.5.2", + "@pixi/sprite": "6.5.2", + "@pixi/utils": "6.5.2" } }, "types/types/foundry/node_modules/@pixi/mixin-get-child-by-name": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@pixi/mixin-get-child-by-name/-/mixin-get-child-by-name-6.5.1.tgz", - "integrity": "sha512-OvNA8Gthh+3IxPME3TtiNIEpB7cssnjZLYPfWNM6Bi2nVnjXJBkYytuIntoaQV+3b3K93+sJHJq/KMckGJgGHQ==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/@pixi/mixin-get-child-by-name/-/mixin-get-child-by-name-6.5.2.tgz", + "integrity": "sha512-SHuZXyA0PaRddyKxE2JgCRcCaiy4ow3RRERFPmtwfqCdXRodtdZqpJP0bSwHgjMs4Sd5NMaK4wIggtNX00Ewiw==", "dev": true, "peerDependencies": { - "@pixi/display": "6.5.1" + "@pixi/display": "6.5.2" } }, "types/types/foundry/node_modules/@pixi/mixin-get-global-position": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@pixi/mixin-get-global-position/-/mixin-get-global-position-6.5.1.tgz", - "integrity": "sha512-rnwOCffIPUo7BA3/6ycl9qfz7ZCUy1+8AGsqiXvYXFF8SypLGPD4NMVLvISQiJMkKKSNz1VtoBHExgPau5QMSw==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/@pixi/mixin-get-global-position/-/mixin-get-global-position-6.5.2.tgz", + "integrity": "sha512-wm0Wg55wIhEL8QapsrmNfCcSaNr7oAVdTuGjc0sobRPDfOwjyNA2yd2OwlCJayLUIOyHwe6GymflJ0mEpsYQog==", "dev": true, "peerDependencies": { - "@pixi/display": "6.5.1", - "@pixi/math": "6.5.1" + "@pixi/display": "6.5.2", + "@pixi/math": "6.5.2" } }, "types/types/foundry/node_modules/@pixi/particle-container": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@pixi/particle-container/-/particle-container-6.5.1.tgz", - "integrity": "sha512-f59C9/85Mvy+VR3juW8rC7xBUto7/CWbpxHyyiYiWY7EIlVhiuupkcQpa/rKRfmar3GaknclVlrZYxnBHltSPQ==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/@pixi/particle-container/-/particle-container-6.5.2.tgz", + "integrity": "sha512-B9S7j12T/2sAj3ksMhhd15l2ZdXc/1j6+oBG31H6k4lAmxVLVCg/CF6iBNenBsBuhm153E7FvqNxuzYg/7kdZQ==", "dev": true, "peerDependencies": { - "@pixi/constants": "6.5.1", - "@pixi/core": "6.5.1", - "@pixi/display": "6.5.1", - "@pixi/math": "6.5.1", - "@pixi/sprite": "6.5.1", - "@pixi/utils": "6.5.1" + "@pixi/constants": "6.5.2", + "@pixi/core": "6.5.2", + "@pixi/display": "6.5.2", + "@pixi/math": "6.5.2", + "@pixi/sprite": "6.5.2", + "@pixi/utils": "6.5.2" } }, "types/types/foundry/node_modules/@pixi/polyfill": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@pixi/polyfill/-/polyfill-6.5.1.tgz", - "integrity": "sha512-7VxUiNm309dxZjrKEz2S8y2gCiFhWmgiU6jzd6oTOgOl4/LKJzdxOSBX6BlSzSFUO/BiqS33NO1KWQihqRur6g==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/@pixi/polyfill/-/polyfill-6.5.2.tgz", + "integrity": "sha512-gFEOVOJDB5yAxwF7u1IqobjG4z+/T2Ip4NZXqH1175FLOh49XyeskvtZpbeKz0LC9zCSur3FMsjkosPyLMUQYA==", "dev": true, "dependencies": { "object-assign": "^4.1.1", @@ -14624,127 +14624,127 @@ } }, "types/types/foundry/node_modules/@pixi/prepare": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@pixi/prepare/-/prepare-6.5.1.tgz", - "integrity": "sha512-AVZdtjd5qzdb9fHCNp/8ZtCsx0wMKWz17sv6oO5TzWD5uZxsJ02Rv9A5CV13XoTK8bXqAgp8ZTR32z84uHMIFg==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/@pixi/prepare/-/prepare-6.5.2.tgz", + "integrity": "sha512-w9eBzB2zd5K51ZozLviHby1rZwgZReUkNZ3IGWovp2skfSpfecevTCzdO+B7GAcO12JTegjM86U1os8HPXGKng==", "dev": true, "peerDependencies": { - "@pixi/core": "6.5.1", - "@pixi/display": "6.5.1", - "@pixi/graphics": "6.5.1", - "@pixi/settings": "6.5.1", - "@pixi/text": "6.5.1", - "@pixi/ticker": "6.5.1", - "@pixi/utils": "6.5.1" + "@pixi/core": "6.5.2", + "@pixi/display": "6.5.2", + "@pixi/graphics": "6.5.2", + "@pixi/settings": "6.5.2", + "@pixi/text": "6.5.2", + "@pixi/ticker": "6.5.2", + "@pixi/utils": "6.5.2" } }, "types/types/foundry/node_modules/@pixi/runner": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@pixi/runner/-/runner-6.5.1.tgz", - "integrity": "sha512-00Uw4d/oUeGz9Av91RMZLMUNyrpo6SVCivae5zcjx1I6krVtc/RrCbkWYbIxP+Jj+ots34TJUXU0QcYQkA0g3A==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/@pixi/runner/-/runner-6.5.2.tgz", + "integrity": "sha512-ygRO5UpPJCbk1KGwwaO2/7zCqVQI+cEoMSefsi+Dbn2XfZjCHKoza4pPnD1BTr7erjqJGL4Z5AViopEl8Ad7Jg==", "dev": true }, "types/types/foundry/node_modules/@pixi/settings": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@pixi/settings/-/settings-6.5.1.tgz", - "integrity": "sha512-pIjxcko8gWWizU5LnbkkFpQLsYs4P9v82H1GPWQ2FCJp/6UzKwd2Scob3ufnDti0WBzB8tUFLIratbOJDQg8KA==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/@pixi/settings/-/settings-6.5.2.tgz", + "integrity": "sha512-6sgjEoldOzqbMN/iHs0Uv2x8O769QW9Fqw4f2JwYajTjLVYOx3pReBd8Zqubf2ZEZRRiSMjM3VQQdL36iShnQQ==", "dev": true }, "types/types/foundry/node_modules/@pixi/sprite": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@pixi/sprite/-/sprite-6.5.1.tgz", - "integrity": "sha512-r+ZI0KMhp8QK8rrxSttolAeFDum+TJtFd7itUx5tPKJscpTm/Mp5jiUJbX+pVSCkTQBqhUnZ/SbV2uJY4+E25Q==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/@pixi/sprite/-/sprite-6.5.2.tgz", + "integrity": "sha512-zEKZKjv/RTq09iZ5I+xxOntWA/Y7EglABTM5nExXKwq+n6zsMroA3mXja+Nm3CuaGHNbkhIMgR6CeNnUPYpvkQ==", "dev": true, "peerDependencies": { - "@pixi/constants": "6.5.1", - "@pixi/core": "6.5.1", - "@pixi/display": "6.5.1", - "@pixi/math": "6.5.1", - "@pixi/settings": "6.5.1", - "@pixi/utils": "6.5.1" + "@pixi/constants": "6.5.2", + "@pixi/core": "6.5.2", + "@pixi/display": "6.5.2", + "@pixi/math": "6.5.2", + "@pixi/settings": "6.5.2", + "@pixi/utils": "6.5.2" } }, "types/types/foundry/node_modules/@pixi/sprite-animated": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@pixi/sprite-animated/-/sprite-animated-6.5.1.tgz", - "integrity": "sha512-roaU01nSQtHx7302/7gueOooSsAsiSq2QVzd06SCSBIiGAg5GY5amEhkS9YHp+o97c3irimPgdcGS5/CBkSFtg==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/@pixi/sprite-animated/-/sprite-animated-6.5.2.tgz", + "integrity": "sha512-6SZK6YxN+IBvmfBZcUnpvnPv4Z4pvx9sWdGjA7fv4TfgFBhO1dP++Ixf7pAm/4XDIlQshEFVRHqGUvf9s58ISg==", "dev": true, "peerDependencies": { - "@pixi/core": "6.5.1", - "@pixi/sprite": "6.5.1", - "@pixi/ticker": "6.5.1" + "@pixi/core": "6.5.2", + "@pixi/sprite": "6.5.2", + "@pixi/ticker": "6.5.2" } }, "types/types/foundry/node_modules/@pixi/sprite-tiling": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@pixi/sprite-tiling/-/sprite-tiling-6.5.1.tgz", - "integrity": "sha512-ZnABiAv1Ss+wq/kX03DZNDNnBOn18gcOmJY/yzOwLgESvs9FWT3nEQA3ntK36uHDhqBFkzcPuAxkCPDHuIsceA==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/@pixi/sprite-tiling/-/sprite-tiling-6.5.2.tgz", + "integrity": "sha512-Y/85moGBp3UiRBg7GNhnTqrn4cOckw/mBnWk+M+iWWLOAp3kXe/Fr4LA0yxXmMQAAQmhTuVDo9kQSChtkggKnw==", "dev": true, "peerDependencies": { - "@pixi/constants": "6.5.1", - "@pixi/core": "6.5.1", - "@pixi/display": "6.5.1", - "@pixi/math": "6.5.1", - "@pixi/sprite": "6.5.1", - "@pixi/utils": "6.5.1" + "@pixi/constants": "6.5.2", + "@pixi/core": "6.5.2", + "@pixi/display": "6.5.2", + "@pixi/math": "6.5.2", + "@pixi/sprite": "6.5.2", + "@pixi/utils": "6.5.2" } }, "types/types/foundry/node_modules/@pixi/spritesheet": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@pixi/spritesheet/-/spritesheet-6.5.1.tgz", - "integrity": "sha512-5hbGCvSPBEYYbD1h2kL6U4kbWc+QLOJfiEnNxTGay2uawDSU4TixhblqZJyIR9b99RuhNAhrvM7Ii1cR0Is4Yw==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/@pixi/spritesheet/-/spritesheet-6.5.2.tgz", + "integrity": "sha512-bN6m7RkDprgMc5BiPeoAAE8lidHMzBkmWlYt3xThCP8nAdIjuCAUUhev6KWMNv981UBCRIX0qtfufOkDLhlWqA==", "dev": true, "peerDependencies": { - "@pixi/core": "6.5.1", - "@pixi/loaders": "6.5.1", - "@pixi/math": "6.5.1", - "@pixi/utils": "6.5.1" + "@pixi/core": "6.5.2", + "@pixi/loaders": "6.5.2", + "@pixi/math": "6.5.2", + "@pixi/utils": "6.5.2" } }, "types/types/foundry/node_modules/@pixi/text": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@pixi/text/-/text-6.5.1.tgz", - "integrity": "sha512-vryWN5LIHqxApOnHF2ggZ8VIQcPh9mULyeQKoWMhzCp8dvlGp246W9Qwc+/FehestLk2qIWbY3Mtp+P4hYm+5w==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/@pixi/text/-/text-6.5.2.tgz", + "integrity": "sha512-84fFJ4usQljdm0RDgSmuu773I8M1zlRMImqz9oqNHc9KdQzBqG7yVv6zy6EjQC3VS18SMj0NsIneM4dAhuIJYQ==", "dev": true, "peerDependencies": { - "@pixi/core": "6.5.1", - "@pixi/math": "6.5.1", - "@pixi/settings": "6.5.1", - "@pixi/sprite": "6.5.1", - "@pixi/utils": "6.5.1" + "@pixi/core": "6.5.2", + "@pixi/math": "6.5.2", + "@pixi/settings": "6.5.2", + "@pixi/sprite": "6.5.2", + "@pixi/utils": "6.5.2" } }, "types/types/foundry/node_modules/@pixi/text-bitmap": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@pixi/text-bitmap/-/text-bitmap-6.5.1.tgz", - "integrity": "sha512-/LUg/94h5Bppxa5IMWokbGFvK0OoXtpLvbWebfFznwzNN1FSDZoI4p2Q/+LbA7FdjblkHjl0MS6AcNvnxDB0bg==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/@pixi/text-bitmap/-/text-bitmap-6.5.2.tgz", + "integrity": "sha512-oIfRqlYmPElYLge2Ui+MVzeb/RzAVX1lswaDApIuq+gCtoLCvBJD8SMm32/45pm+RIwwYecYNZQjoDzMNon8gw==", "dev": true, "peerDependencies": { - "@pixi/constants": "6.5.1", - "@pixi/core": "6.5.1", - "@pixi/display": "6.5.1", - "@pixi/loaders": "6.5.1", - "@pixi/math": "6.5.1", - "@pixi/mesh": "6.5.1", - "@pixi/settings": "6.5.1", - "@pixi/text": "6.5.1", - "@pixi/utils": "6.5.1" + "@pixi/constants": "6.5.2", + "@pixi/core": "6.5.2", + "@pixi/display": "6.5.2", + "@pixi/loaders": "6.5.2", + "@pixi/math": "6.5.2", + "@pixi/mesh": "6.5.2", + "@pixi/settings": "6.5.2", + "@pixi/text": "6.5.2", + "@pixi/utils": "6.5.2" } }, "types/types/foundry/node_modules/@pixi/ticker": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@pixi/ticker/-/ticker-6.5.1.tgz", - "integrity": "sha512-8iHP96YMv1EmrE3EWFYY2APfTNcwH5YOXxRH5KIPWSaqXmxYI9mOgfcDuejJJiWOXOOQTt7g2Ehz9TKAFDcESQ==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/@pixi/ticker/-/ticker-6.5.2.tgz", + "integrity": "sha512-fPSUmpNVLVJljPr5tTPcvx5Lxh2nXhql1pKihAs9UzAeuVkFHg/h7V0e/ZwqEi3FQ2yPX5q6Zo1/Lsuz5KJuwA==", "dev": true, "peerDependencies": { - "@pixi/extensions": "6.5.1", - "@pixi/settings": "6.5.1" + "@pixi/extensions": "6.5.2", + "@pixi/settings": "6.5.2" } }, "types/types/foundry/node_modules/@pixi/utils": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@pixi/utils/-/utils-6.5.1.tgz", - "integrity": "sha512-bmnvajwmY2cXU3NAD6cFjUk/mrrF+SVGHURpHHiBk26/EBgm5CSHpBS9s3PhSuJ0F23KGdhOJYLqu8urcWFDZA==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/@pixi/utils/-/utils-6.5.2.tgz", + "integrity": "sha512-TbShwvp6l8sfue9tClt0jogk5g991uj59wvAgMgGiabTDqrcrosuNvpPxMIJrLtEZccpDy29inY2mTJ5oWnPaQ==", "dev": true, "dependencies": { "@types/earcut": "^2.1.0", @@ -14753,52 +14753,52 @@ "url": "^0.11.0" }, "peerDependencies": { - "@pixi/constants": "6.5.1", - "@pixi/settings": "6.5.1" + "@pixi/constants": "6.5.2", + "@pixi/settings": "6.5.2" } }, "types/types/foundry/node_modules/pixi.js": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/pixi.js/-/pixi.js-6.5.1.tgz", - "integrity": "sha512-6oW67mBPRuuNuyO+kaVKbbYjgcurm60J0PMw57y20RAefvYGqiV7vCmcizJF9jgmHhmeMJI/bXst+Vu3GQuh5w==", - "dev": true, - "dependencies": { - "@pixi/accessibility": "6.5.1", - "@pixi/app": "6.5.1", - "@pixi/compressed-textures": "6.5.1", - "@pixi/constants": "6.5.1", - "@pixi/core": "6.5.1", - "@pixi/display": "6.5.1", - "@pixi/extensions": "6.5.1", - "@pixi/extract": "6.5.1", - "@pixi/filter-alpha": "6.5.1", - "@pixi/filter-blur": "6.5.1", - "@pixi/filter-color-matrix": "6.5.1", - "@pixi/filter-displacement": "6.5.1", - "@pixi/filter-fxaa": "6.5.1", - "@pixi/filter-noise": "6.5.1", - "@pixi/graphics": "6.5.1", - "@pixi/interaction": "6.5.1", - "@pixi/loaders": "6.5.1", - "@pixi/math": "6.5.1", - "@pixi/mesh": "6.5.1", - "@pixi/mesh-extras": "6.5.1", - "@pixi/mixin-cache-as-bitmap": "6.5.1", - "@pixi/mixin-get-child-by-name": "6.5.1", - "@pixi/mixin-get-global-position": "6.5.1", - "@pixi/particle-container": "6.5.1", - "@pixi/polyfill": "6.5.1", - "@pixi/prepare": "6.5.1", - "@pixi/runner": "6.5.1", - "@pixi/settings": "6.5.1", - "@pixi/sprite": "6.5.1", - "@pixi/sprite-animated": "6.5.1", - "@pixi/sprite-tiling": "6.5.1", - "@pixi/spritesheet": "6.5.1", - "@pixi/text": "6.5.1", - "@pixi/text-bitmap": "6.5.1", - "@pixi/ticker": "6.5.1", - "@pixi/utils": "6.5.1" + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/pixi.js/-/pixi.js-6.5.2.tgz", + "integrity": "sha512-9Chz2ruwJTjsfKzhnDGiPJzJywxx6fVTBbBCoe0w0YLM0dgldkoEE2TsJSvnD0T9DaUv5x+fIMneniGdspXZjQ==", + "dev": true, + "dependencies": { + "@pixi/accessibility": "6.5.2", + "@pixi/app": "6.5.2", + "@pixi/compressed-textures": "6.5.2", + "@pixi/constants": "6.5.2", + "@pixi/core": "6.5.2", + "@pixi/display": "6.5.2", + "@pixi/extensions": "6.5.2", + "@pixi/extract": "6.5.2", + "@pixi/filter-alpha": "6.5.2", + "@pixi/filter-blur": "6.5.2", + "@pixi/filter-color-matrix": "6.5.2", + "@pixi/filter-displacement": "6.5.2", + "@pixi/filter-fxaa": "6.5.2", + "@pixi/filter-noise": "6.5.2", + "@pixi/graphics": "6.5.2", + "@pixi/interaction": "6.5.2", + "@pixi/loaders": "6.5.2", + "@pixi/math": "6.5.2", + "@pixi/mesh": "6.5.2", + "@pixi/mesh-extras": "6.5.2", + "@pixi/mixin-cache-as-bitmap": "6.5.2", + "@pixi/mixin-get-child-by-name": "6.5.2", + "@pixi/mixin-get-global-position": "6.5.2", + "@pixi/particle-container": "6.5.2", + "@pixi/polyfill": "6.5.2", + "@pixi/prepare": "6.5.2", + "@pixi/runner": "6.5.2", + "@pixi/settings": "6.5.2", + "@pixi/sprite": "6.5.2", + "@pixi/sprite-animated": "6.5.2", + "@pixi/sprite-tiling": "6.5.2", + "@pixi/spritesheet": "6.5.2", + "@pixi/text": "6.5.2", + "@pixi/text-bitmap": "6.5.2", + "@pixi/ticker": "6.5.2", + "@pixi/utils": "6.5.2" }, "funding": { "type": "opencollective", diff --git a/package.json b/package.json index ed4a8f455..b633f7b41 100644 --- a/package.json +++ b/package.json @@ -41,20 +41,20 @@ "@types/css-minimizer-webpack-plugin": "^3.2.1", "@types/fs-extra": "^9.0.13", "@types/glob": "^8.0.0", - "@types/jquery": "^3.5.14", - "@types/luxon": "^3.1.0", + "@types/jquery": "^3.5.16", + "@types/luxon": "^3.2.0", "@types/mini-css-extract-plugin": "^2.5.1", "@types/node": "^18.11.18", "@types/sortablejs": "^1.15.0", "@types/tooltipster": "^0.0.31", "@types/webpack-env": "^1.18.0", - "@types/yaireo__tagify": "^4.16.0", + "@types/yaireo__tagify": "^4.16.1", "@typescript-eslint/eslint-plugin": "^5.47.1", "@typescript-eslint/parser": "^5.47.1", "copy-webpack-plugin": "^11.0.0", "css-loader": "^6.7.3", "css-minimizer-webpack-plugin": "^4.2.2", - "eslint": "^8.30.0", + "eslint": "^8.31.0", "eslint-config-prettier": "^8.5.0", "eslint-import-resolver-typescript": "^3.5.2", "eslint-plugin-import": "^2.26.0", diff --git a/src/module/feature/reminders/index.ts b/src/module/feature/reminders/index.ts index a2a427bb4..92ed718e8 100644 --- a/src/module/feature/reminders/index.ts +++ b/src/module/feature/reminders/index.ts @@ -4,7 +4,6 @@ import { TokenDocumentPF2e } from "@scene"; import { CombatantPF2e } from "@module/encounter"; import { ActorFlagsPF2e } from "@actor/data/base"; import { ChatMessagePF2e } from "@module/chat-message"; -import { SpellPF2e } from "@item"; import { ActorPF2e, CreaturePF2e } from "@actor"; export async function reminderBreathWeapon(message: ChatMessagePF2e) { @@ -169,82 +168,3 @@ export async function reminderTargeting(message: ChatMessagePF2e) { } } } - -// Deprecated with next pf2e release (and broken, won't fix) -export async function reminderIWR(message: ChatMessagePF2e) { - if (game.user?.isGM && message.flags && message.user && message.user.targets && message.user.targets.size >= 1) { - const targets = message.user.targets; - const output: string[] = []; - for (const target of targets) { - let damageTypes: string[] = Object.keys(message.flags?.pf2e?.damageRoll?.types?.valueOf() || {}).flatMap( - (value, _index) => value - ); - if (damageTypes.length === 0) { - const originUUID = message.flags?.pf2e?.origin?.uuid; - if (originUUID) { - const origin: SpellPF2e | null = await fromUuid(originUUID); - damageTypes = Object.values(origin.system.damage.value).map((x) => x.type.value); - } - } - if (damageTypes.length > 0) { - const traits = target.actor?.system.traits; - // Filter traits that are in damageTypes - const diTypes = traits?.di?.value - ? traits?.di?.value - ?.filter((value: string) => { - return damageTypes.includes(value); - }) - .map((trait) => { - return trait?.charAt(0).toLocaleUpperCase() + trait.slice(1); - }) - : []; - const dvTypes = traits?.dv - ? traits?.dv - .filter((trait) => damageTypes.includes(trait.type)) - .filter((trait) => trait.value) - .map( - (trait) => - trait?.type.charAt(0).toLocaleUpperCase() + trait.type?.slice(1) + ":" + trait.value - ) - : []; - const drTypes = traits?.dr - ? traits?.dr - .filter((trait) => damageTypes.includes(trait.type)) - .filter((trait) => trait.value) - .map( - (trait) => - trait?.type.charAt(0).toLocaleUpperCase() + trait.type?.slice(1) + ":" + trait.value - ) - : []; - - if (diTypes.length > 0) { - output.push(game.i18n.localize(`${MODULENAME}.SETTINGS.reminderIWR.immuneTo`) + diTypes.join(", ")); - } - if (dvTypes.length > 0) { - output.push(game.i18n.localize(`${MODULENAME}.SETTINGS.reminderIWR.weakTo`) + dvTypes.join(", ")); - } - if (drTypes.length > 0) { - output.push( - game.i18n.localize(`${MODULENAME}.SETTINGS.reminderIWR.resistantTo`) + drTypes.join(", ") - ); - } - if (output.length > 0) { - let caveat = ""; - if (game.settings.get(MODULENAME, "reminderIWRCaveat")) { - caveat = game.i18n.localize(`${MODULENAME}.SETTINGS.reminderIWR.notComplex`); - } - ChatMessage.create({ - content: - game.i18n.format(`${MODULENAME}.SETTINGS.reminderIWR.is`, { - name: target?.actor?.token?.name || "", - }) + - output + - caveat, - whisper: ChatMessage.getWhisperRecipients("GM").map((u) => u.id), - blind: true, - }).then(); - } - } - } - } -} diff --git a/src/module/feature/settingsHandler/index.ts b/src/module/feature/settingsHandler/index.ts index 2d689f1a2..e6e13c028 100644 --- a/src/module/feature/settingsHandler/index.ts +++ b/src/module/feature/settingsHandler/index.ts @@ -91,13 +91,6 @@ export function toggleMenuSettings(html: JQuery, settings: SettingsMenuPF2eWorkb html.find(`select[name="${settingName}"]`).parent().parent().toggle(!valueFunction); } - if (settingName !== `reminderIWR` && settingName.startsWith(`reminderIWR`)) { - const valueFunction = !game.settings.get(MODULENAME, "reminderIWR"); - - html.find(`input[name="${settingName}"]`).parent().parent().toggle(!valueFunction); - html.find(`select[name="${settingName}"]`).parent().parent().toggle(!valueFunction); - } - if (settingName !== `tokenAnimation` && settingName.startsWith(`tokenAnimation`)) { const valueFunction = !game.settings.get(MODULENAME, "tokenAnimation"); diff --git a/src/module/settings/qol-world.ts b/src/module/settings/qol-world.ts index f50203b0c..12d20a9bf 100644 --- a/src/module/settings/qol-world.ts +++ b/src/module/settings/qol-world.ts @@ -43,15 +43,6 @@ export class WorkbenchQolWorldSettings extends SettingsMenuPF2eWorkbench { type: Boolean, onChange: () => debouncedReload(), }, - playerItemsRarityColour: { - name: `${MODULENAME}.SETTINGS.playerItemsRarityColour.name`, - hint: `${MODULENAME}.SETTINGS.playerItemsRarityColour.hint`, - scope: "world", - config: true, - default: false, - type: Boolean, - onChange: () => debouncedReload(), - }, castPrivateSpell: { name: `${MODULENAME}.SETTINGS.castPrivateSpell.name`, hint: `${MODULENAME}.SETTINGS.castPrivateSpell.hint`, diff --git a/src/module/settings/reminders.ts b/src/module/settings/reminders.ts index 20519c917..8340168dd 100644 --- a/src/module/settings/reminders.ts +++ b/src/module/settings/reminders.ts @@ -25,24 +25,6 @@ export class WorkbenchRemindersSettings extends SettingsMenuPF2eWorkbench { type: Boolean, onChange: () => debouncedReload(), }, - reminderIWR: { - name: `${MODULENAME}.SETTINGS.reminderIWR.name`, - hint: `${MODULENAME}.SETTINGS.reminderIWR.hint`, - scope: "world", - config: true, - default: false, - type: Boolean, - onChange: () => debouncedReload(), - }, - reminderIWRCaveat: { - name: `${MODULENAME}.SETTINGS.reminderIWRCaveat.name`, - hint: `${MODULENAME}.SETTINGS.reminderIWRCaveat.hint`, - scope: "world", - config: true, - default: true, - type: Boolean, - onChange: () => debouncedReload(), - }, reminderTargeting: { name: `${MODULENAME}.SETTINGS.reminderTargeting.name`, hint: `${MODULENAME}.SETTINGS.reminderTargeting.hint`, diff --git a/src/module/xdy-pf2e-workbench.ts b/src/module/xdy-pf2e-workbench.ts index 50f664207..e3f0154ec 100644 --- a/src/module/xdy-pf2e-workbench.ts +++ b/src/module/xdy-pf2e-workbench.ts @@ -46,7 +46,6 @@ import { autoReduceStunned, reminderBreathWeapon, reminderCannotAttack, - reminderIWR, reminderTargeting, } from "./feature/reminders"; import { setupNPCScaler } from "./feature/cr-scaler/NPCScalerSetup"; @@ -133,7 +132,6 @@ Hooks.once("init", async (_actor: ActorPF2e) => { game.settings.get(MODULENAME, "automatedAnimationOn") || game.settings.get(MODULENAME, "reminderBreathWeapon") || game.settings.get(MODULENAME, "reminderTargeting") || - game.settings.get(MODULENAME, "reminderIWR") || game.settings.get(MODULENAME, "reminderCannotAttack") ) { Hooks.on("createChatMessage", (message: ChatMessagePF2e) => { @@ -158,10 +156,6 @@ Hooks.once("init", async (_actor: ActorPF2e) => { if (game.settings.get(MODULENAME, "reminderBreathWeapon")) { reminderBreathWeapon(message).then(); } - } else { - if (game.settings.get(MODULENAME, "reminderIWR")) { - reminderIWR(message).then(); - } } }); } @@ -403,7 +397,6 @@ Hooks.once("init", async (_actor: ActorPF2e) => { } if ( - game.settings.get(MODULENAME, "playerItemsRarityColour") || game.settings.get(MODULENAME, "castPrivateSpell") || game.settings.get(MODULENAME, "addGmRKButtonToNpc") || game.settings.get(MODULENAME, "quickQuantities") || @@ -421,18 +414,6 @@ Hooks.once("init", async (_actor: ActorPF2e) => { }); } - if (game.settings.get(MODULENAME, "playerItemsRarityColour")) { - $html.find(".item").each((_i, e) => { - $(e).each((_i, e) => { - const rarity = $(e).attr("data-item-rarity"); - const mystified = $(e).find("span").hasClass("gm-mystified-data"); - if (rarity && !mystified) { - $(e).find("h4").addClass(`xdy-pf2e-workbench-rarity-${rarity}`); - } - }); - }); - } - if (game.user?.isGM && game.settings.get(MODULENAME, "addGmRKButtonToNpc")) { addGmRKButtonToNpc($html, sheet); } diff --git a/static/lang/cn.json b/static/lang/cn.json index 414fecbc6..08fb8f901 100644 --- a/static/lang/cn.json +++ b/static/lang/cn.json @@ -238,15 +238,6 @@ "name": "单词或随机表后缀", "hint": "添加文本到新名称后缀,默认为“”(例如:'Creature'),如果这与随机表的名称一致,则该表的随机文本结果将用作后缀。 这将在任何随机词前缀被添加*之前*生效(见前面的选项)" }, - "reminderIWR": { - "weakTo": " 弱点 ", - "is": "{name}是", - "immuneTo": " 免疫 ", - "name": "免疫/弱点/抗力提醒", - "resistantTo": " 抗性 ", - "hint": "勾选此项,受到伤害时提示免疫/弱点/抗力。目前只能处理“简单”伤害类型(如钝击或火焰,但“全部”或“物理”不行)", - "notComplex": "

注意:复杂的免疫、弱点和抗性比如全部、心灵、物理等暂不支持,如果目标拥有此类抗力/弱点,请手动处理。" - }, "customPauseImage": { "hint": "自定义暂停图标。留空则使用系统默认的闹钟图标。", "name": "自定义暂停图标。" @@ -471,10 +462,6 @@ "petrified": "被石化", "unconscious": "失去意识" }, - "reminderIWRCaveat": { - "hint": "勾选此项,在每条信息中提醒复杂抗力/弱点无法支持。", - "name": "勾选此项,在每条信息中提醒复杂抗力/弱点无法支持。" - }, "tokenAnimation": { "hint": "启用此项更改token的移动动画。如有Multilevel Tokens模组,可能会引发问题。", "name": "启用以更改token移动动画。" diff --git a/static/lang/en.json b/static/lang/en.json index 03a1f1e4f..137335437 100644 --- a/static/lang/en.json +++ b/static/lang/en.json @@ -483,19 +483,6 @@ "hint": "Check to allow eidolons that are dead/have no hp to attack without a reminder.", "name": "Eidolons can attack while dead" }, - "reminderIWR": { - "hint": "Check to show reminder for IWR when damage is taken. Currently only handles 'simple' damage types (e.g. handles ones like 'Bludgeoning' or 'Fire', not ones like 'All' or 'Physical')", - "immuneTo": " Immune to ", - "is": "{name} is", - "name": "IWR reminder", - "notComplex": "

NOTE: Complex IWR such as All, Mental, Physical, etc, are not yet supported, check manually if you target might have such.", - "resistantTo": " Resistant to ", - "weakTo": " Weak to " - }, - "reminderIWRCaveat": { - "hint": "Check to show warning about complex IWR not being supported in each message.", - "name": "Check to show warning about complex IWR not being supported in each message." - }, "remindersSettings": { "hint": "Enable and configure various reminders", "label": "Manage Reminders Settings", diff --git a/static/lang/fr.json b/static/lang/fr.json index 00c152100..74c56c506 100644 --- a/static/lang/fr.json +++ b/static/lang/fr.json @@ -431,19 +431,6 @@ "hint": "Cliquez pour permettre aux eidolons qui sont morts/n'ont plus de PV d'attaquer sans rappel.", "name": "Les eidolons peuvent attaquer alors qu'ils sont morts" }, - "reminderIWR": { - "hint": "Activer pour montrer un rappel des résistances/faiblesses/immunités lorsque les dégâts sont appliqués. Ne prend en compte actuellement que les types de dégâts simples (ex : contondant ou feu, pas ceux comme 'tous' ou 'Physique')", - "immuneTo": " Immunité : ", - "is": "{name} est", - "name": "Rappel FIR", - "notComplex": "

NOTE : Les Immunités/Faiblesses/Résistances complexes (comme Tous, mental, physique, etc...) ne sont pas encore prises en compte. Vérifiez manuellement si vos cibles pourraient en avoir de telles.", - "resistantTo": " Résistance : ", - "weakTo": " Faiblesse : " - }, - "reminderIWRCaveat": { - "hint": "Cliquez pour afficher un avertissement à propos des FIR complexes qui ne sont pas supportées dans chaque message.", - "name": "Cliquez pour afficher un avertissement à propos des FIR complexes qui ne sont pas supportées dans chaque message." - }, "remindersSettings": { "hint": "Activer et configurer des pense-bêtes divers", "label": "Régler les pense-bêtes", diff --git a/static/lang/pt-BR.json b/static/lang/pt-BR.json index a590995c1..004d665dc 100644 --- a/static/lang/pt-BR.json +++ b/static/lang/pt-BR.json @@ -354,15 +354,6 @@ "hint": "Permite que Eidolons que estejam mortos ou sem PV possam atacar sem mostrar o lembrete.", "name": "Ignorar lembrete para Eidolons" }, - "reminderIWR": { - "hint": "Mostra lembrete para Imunidades, Fraquezas e Resistências quando dano é recebido. Atualmente só funciona com tipos \\\"simples\\\", como \\\"fogo\\\" e \\\"contundente\\\", mas não \\\"todo dano\\\" ou \\\"Físico\\\".", - "immuneTo": " Imune a ", - "is": "{name} é", - "name": "Imunidades, Fraquezas e Resistências", - "resistantTo": " Resistente a ", - "weakTo": " Fraco a ", - "notComplex": "

NOTA: \"A tudo\", mental, fisico e outras complexidades devem ser verificadas na ficha do alvo." - }, "remindersSettings": { "hint": "Configure vários lembretes.", "label": "Configurações de Lembretes", @@ -387,10 +378,6 @@ "name": "Texto customizado para usar no texto de Pause.", "hint": "Texto customizado para usar no texto de Pause. Deixe vazio para utilizar o texto padrão 'Jogo Pausado'." }, - "reminderIWRCaveat": { - "name": "Mostrar Alerta de verificação de certas Fraquezas/Imunidades/Resistencias, não suportados em cada mensagem.", - "hint": "Mostrar Alerta de verificação de certas Fraquezas/Imunidades/Resistencias, não suportados em cada mensagem." - }, "applyClumsyIfWieldingLargerWeapon": { "hint": "Automaticamente aplica Desajeitado se a Arma for maior de quem á estiver segurando.", "name": "Automaticamente aplica Desajeitado se a Arma for maior de quem á estiver segurando." diff --git a/types/en.json b/types/en.json index 6f5db1f8f..baa7389b3 100644 --- a/types/en.json +++ b/types/en.json @@ -820,6 +820,12 @@ "Notification": "Generated NPC attack: {attack}" } }, + "IWREditor": { + "Title": "{actor}: {category}", + "Type": "Type", + "Exceptions": "Exceptions", + "DoubleVs": "Double Vs." + }, "Plural": "Actors" }, "ActorSizeGargantuan": "Gargantuan", @@ -875,6 +881,7 @@ "AreaSize50": "50 Foot", "AreaSize500": "500 Foot", "AreaSize60": "60 Foot", + "AreaSize65": "65 Foot", "AreaSize75": "75 Foot", "AreaSize80": "80 Foot", "AreaSize90": "90 Foot", @@ -1126,8 +1133,8 @@ "criticalFailure": "Critical Failure" } }, - "Label": "Result: {degree} by {offset}", - "AdjustedLabel": "Result: {degree} by {offset} ({adjustment})" + "Label": "Result: {unadjusted} by {offset}", + "AdjustedLabel": "Result: {unadjusted} {adjusted} by {offset}" }, "Specific": { "Perception": { @@ -1320,7 +1327,162 @@ "CurrentStaminaTitle": "The amount of stamina points you have", "Damage": { "Base": "Base", - "NoDamageFormulaLabel": "No damage" + "IWR": { + "ApplicationBreakdown": { + "unaffected": "Unaffected by {type}: {adjustment}", + "immunity": "Immune to {type}: {adjustment}", + "weakness": "Weak to {type}: {adjustment}", + "resistance": "Resistant to {type}: {adjustment}" + }, + "CompositeLabel": { + "Exceptions0DoubleVs0": "{type} {value}", + "Exceptions0DoubleVs1": "{type} {value} (double resistance vs. {doubleVs1})", + "Exceptions0DoubleVs2": "{type} {value} (double resistance vs. {doubleVs1} or {doubleVs2})", + "Exceptions0DoubleVs3": "{type} {value} (double resistance vs. {doubleVs1}, {doubleVs2}, or {doubleVs3})", + "Exceptions0DoubleVs4": "{type} {value} (double resistance vs. {doubleVs1}, {doubleVs2}, {doubleVs3}, or {doubleVs4})", + "Exceptions1DoubleVs0": "{type} {value} (except {exception1})", + "Exceptions1DoubleVs1": "{type} {value} (except {exception1}; double resistance vs. {doubleVs1})", + "Exceptions1DoubleVs2": "{type} {value} (except {exception1}; double resistance vs. {doubleVs1} or {doubleVs2})", + "Exceptions1DoubleVs3": "{type} {value} (except {exception1}; double resistance vs. {doubleVs1}, {doubleVs2}, or {doubleVs3})", + "Exceptions1DoubleVs4": "{type} {value} (except {exception1}; double resistance vs. {doubleVs1}, {doubleVs2}, {doubleVs3}, or {doubleVs4})", + "Exceptions2DoubleVs0": "{type} {value} (except {exception1} or {exception2})", + "Exceptions2DoubleVs1": "{type} {value} (except {exception1} or {exception2}; double resistance vs. {doubleVs1})", + "Exceptions2DoubleVs2": "{type} {value} (except {exception1} or {exception2}; double resistance vs. {doubleVs1} or {doubleVs2})", + "Exceptions2DoubleVs3": "{type} {value} (except {exception1} or {exception2}; double resistance vs. {doubleVs1}, {doubleVs2}, or {doubleVs3})", + "Exceptions2DoubleVs4": "{type} {value} (except {exception1} or {exception2}; double resistance vs. {doubleVs1}, {doubleVs2}, {doubleVs3}, or {doubleVs4})", + "Exceptions3DoubleVs0": "{type} {value} (except {exception1}, {exception2}, or {exception3})", + "Exceptions3DoubleVs1": "{type} {value} (except {exception1}, {exception2}, or {exception3}; double resistance vs. {doubleVs1})", + "Exceptions3DoubleVs2": "{type} {value} (except {exception1}, {exception2}, or {exception3}; double resistance vs. {doubleVs1} or {doubleVs2})", + "Exceptions3DoubleVs3": "{type} {value} (except {exception1}, {exception2}, or {exception3}; double resistance vs. {doubleVs1}, {doubleVs2}, or {doubleVs3})", + "Exceptions3DoubleVs4": "{type} {value} (except {exception1}, {exception2}, or {exception3}; double resistance vs. {doubleVs1}, {doubleVs2}, {doubleVs3}, or {doubleVs4})", + "Exceptions4DoubleVs0": "{type} {value} (except {exception1}, {exception2}, {exception3}, or {exception4})", + "Exceptions4DoubleVs1": "{type} {value} (except {exception1}, {exception2}, {exception3}, or {exception4}; double resistance vs. {doubleVs1})", + "Exceptions4DoubleVs2": "{type} {value} (except {exception1}, {exception2}, {exception3}, or {exception4}; double resistance vs. {doubleVs1} or {doubleVs2})", + "Exceptions4DoubleVs3": "{type} {value} (except {exception1}, {exception2}, {exception3}, or {exception4}; double resistance vs. {doubleVs1}, {doubleVs2}, or {doubleVs3})", + "Exceptions4DoubleVs4": "{type} {value} (except {exception1}, {exception2}, {exception3}, or {exception4}; double resistance vs. {doubleVs1}, {doubleVs2}, {doubleVs3}, or {doubleVs4})" + }, + "Type": { + "abjuration": "abjuration", + "adamantine": "adamantine", + "all-damage": "all damage", + "area-damage": "area damage", + "arrow-vulnerability": "arrow vulnerability", + "auditory": "auditory", + "axe-vulnerability": "axe vulnerability", + "blinded": "blinded", + "broken": "broken", + "clumsy": "clumsy", + "cold-iron": "cold iron", + "confused": "confused", + "conjuration": "conjuration", + "controlled": "controlled", + "critical-hits": "critical hits", + "curse": "curse", + "darkwood": "darkwood", + "dazzled": "dazzled", + "deafened": "deafened", + "death-effects": "death effects", + "disease": "disease", + "divination": "divination", + "doomed": "doomed", + "drained": "drained", + "emotion": "emotion", + "enchantment": "enchantment", + "energy": "energy", + "enfeebled": "enfeebled", + "evocation": "evocation", + "fascinated": "fascinated", + "fatigued": "fatigued", + "fear-effects": "fear effects", + "flat-footed": "flat-footed", + "fleeing": "fleeing", + "frightened": "frightened", + "ghost-touch": "ghost touch", + "grabbed": "grabbed", + "healing": "healing", + "hidden": "hidden", + "illusion": "illusion", + "immobilized": "immobilized", + "inhaled": "inhaled", + "light": "light", + "magic": "magic", + "magical": "magical", + "misfortune-effects": "misfortune effects", + "mithral": "mithral", + "necromancy": "necromancy", + "non-magical": "non-magical", + "nonlethal": "nonlethal", + "nonlethal-attacks": "nonlethal attacks", + "object-immunities": "object immunities", + "olfactory": "olfactory", + "orichalcum": "orichalcum", + "paralyzed": "paralyzed", + "petrified": "petrified", + "physical": "physical", + "plant": "plant", + "polymorph": "polymorph", + "possession": "possession", + "prone": "prone", + "protean-anatomy": "protean anatomy", + "radiation": "radiation", + "restrained": "restrained", + "salt": "salt", + "salt-water": "salt water", + "scrying": "scrying", + "sickened": "sickened", + "silver": "silver", + "sleep": "sleep", + "slowed": "slowed", + "splash-damage": "splash damage", + "spell-deflection": "spell deflection", + "stunned": "stunned", + "stupefied": "stupefied", + "swarm-attacks": "swarm attacks", + "swarm-mind": "swarm mind", + "transmutation": "transmutation", + "trip": "trip", + "unarmed-attacks": "unarmed-attacks", + "unconscious": "unconscious", + "vampire-weaknesses": "vampire weaknesses", + "visual": "visual", + "vorpal": "vorpal", + "vorpal-fear": "vorpal fear", + "vulnerable-to-sunlight": "vulnerable to sunlight", + "warpglass": "warpglass", + "water": "water", + "weapons": "weapons", + "weapons-shedding-bright-light": "weapons shedding bright light" + } + }, + "NoDamageFormulaLabel": "No damage", + "PersistentTooltip": "Persistent {damageType}", + "RollFlavor": { + "acid": "acid", + "air": "air", + "bleed": "bleed", + "bludgeoning": "bludgeoning", + "chaotic": "chaotic", + "cold": "cold", + "earth": "earth", + "electricity": "electricity", + "evil": "evil", + "fire": "fire", + "force": "force", + "good": "good", + "lawful": "lawful", + "mental": "mental", + "metal": "metal", + "negative": "negative", + "persistent": "persistent {damageType}", + "piercing": "piercing", + "poison": "poison", + "positive": "positive", + "precision": "precision", + "slashing": "slashing", + "sonic": "sonic", + "splash": "splash", + "untyped": "untyped" + } }, "DamageCategoriesLabel": "Damage Categories", "DamageDieD10": "d10", @@ -1349,6 +1511,7 @@ "DeleteItemQuestion": "Are you sure you want to delete:", "DeleteItemTitle": "Delete Item", "DeleteShortLabel": "Delete", + "DeleteSpellcastEntryTitle": "Delete Spellcasting", "DeleteSpellcastEntryQuestion": "Are you sure you want to delete this spellcasting entry?", "DeleteSpellcastEntryWarning": "WARNING: All spells in this spellcasting entry will also be deleted.", "DenominationLabel": "Denomination", @@ -1370,8 +1533,14 @@ "WasAt": " (was at {oldQuantity})" }, "FastHealing": { - "FastHealingLabel": "Received Fast Healing", - "RegenerationLabel": "Received Regeneration", + "fast-healing": { + "Name": "Fast Healing", + "ReceivedMessage": "Received fast healing" + }, + "regeneration": { + "Name": "Regeneration", + "ReceivedMessage": "Received regeneration" + }, "DeactivatedBy": "Deactivated by {types}" } }, @@ -1636,6 +1805,15 @@ }, "CannotAddType": "{type} items cannot be added to this actor.", "Condition": { + "PersistentDamage": { + "Name": "Persistent Damage ({formula})", + "NameWithDC": "Persistent Damage ({formula} DC{dc})", + "Dialog": { + "Title": "Persistent Damage ({actor})", + "Add": "Add Persistent Damage", + "Remove": "Remove Persistent Damage" + } + }, "Flanked": "Flat-Footed (Flanked)" }, "CreationDialog": { @@ -2094,6 +2272,10 @@ "spear": "The weapon pierces the target, weakening its attacks. The target is @UUID[Compendium.pf2e.conditionitems.i3OJZU2nk64Df3xm]{Clumsy 1} until the start of your next turn.", "sword": "The target is made off-balance by your attack, becoming @UUID[Compendium.pf2e.conditionitems.AJh5ex99aV6VTggg]{Flat-Footed} until the start of your next turn." }, + "Damage": { + "DiceNumber": "Dice Number" + }, + "FromABP": "Automatic bonus progression has adjusted this weapon's {property} to {value}.", "FromMaterialAndRunes": "Precious materials and runes on this item have adjusted its {property} to {value}.", "GeneratedName": { "Hint": "This is the name of the base weapon. For most weapons, the base is used to generate a fuller name, taking into account the material composition and/or runes. Giving this weapon a custom name or marking it as \"specific\" will prevent the generated name from appearing.", @@ -2455,10 +2637,6 @@ "NoAmmoLabel": "No Ammo", "NoStackGroup": "Does not stack", "NoneOption": "None", - "OneDegreeBetter": "one degree better", - "OneDegreeWorse": "one degree worse", - "TwoDegreesBetter": "two degrees better", - "TwoDegreesWorse": "two degrees worse", "OpenActionBrowserTitle": "Open Action Browser", "OpenInventoryBrowser": "Open Inventory Browser", "OpenItemTitle": "Toggle Container Contents", @@ -2664,11 +2842,11 @@ }, "critFumbleCards": { "hint": "Automatically draw a critical hit or fumble card on appropriate rolls.", - "name": "Critical Hit and Fumble Cards" + "name": "Critical Hit & Fumble Cards" }, "critFumbleCardButtons": { "hint": "Show critical hit and fumble card draw buttons on attack rolls.", - "name": "Critical Hit and Fumble Card Buttons" + "name": "Critical Hit & Fumble Card Buttons" }, "DeathIcon": { "Name": "Death Icon", @@ -2682,13 +2860,9 @@ "Name": "Theater of the Mind Toggles", "Hint": "Include additional toggles on actor sheets to facilitate Theater of the Mind play. Such toggles will allow for enabling certain abilities without targeting in Foundry." }, - "statusEffectKeepFoundry": { - "hint": "Determines if you want to show the Foundry Icon set below the Pathfinder 2E icon set. This will trigger a reload.", - "name": "Status Icon Foundry Set" - }, "statusEffectShowCombatMessage": { - "hint": "Show the status effects of the current combatant in chat each turn. If your game has more than one GM this setting should only be enabled for one of them.", - "name": "Show Status Effects in Combat" + "hint": "Each turn of an encounter, send a chat message containing the conditions of the turn's participant.", + "name": "Show Conditions during Encounters" }, "statusEffectType": { "blackWhite": "Black & white", @@ -2716,10 +2890,6 @@ "Name": "World Schema Version", "Hint": "Records the schema version for documents in the PF2e system (don't modify this unless you know what you are doing)." }, - "IgnoreCoinBulk": { - "Name": "Coins are weightless", - "Hint": "Toggle on to ignore currency weight." - }, "IdentifyMagicNotMatchingTraditionModifier": { "Name": "Identify Magic Skill Modifier", "Hint": "Modifier to add to Identify Magic Skill DCs if the skill does not match the item's magic tradition", @@ -2756,6 +2926,10 @@ "Hint": "Apply vision mechanics consistent with Pathfinder 2e rules. Enabling this setting will remove the ability to configure Unrestricted Global Vision as well as Token Sight radii.", "ManagedBy": "Managed by rules-based vision." }, + "IWR": { + "Name": "Immunities, Weaknesses, & Resistances", + "Hint": "When applying damage to an actor, adjust its value according to the actor's immunities, weaknesses, and resistances." + }, "EffectExpiration": { "Name": "Effects auto-expire", "Hint": "Effects automatically disable attached rule elements when the duration expires." @@ -2786,6 +2960,10 @@ "Label": "Manage Homebrew Elements", "Hint": "Add custom traits, languages, and other elements of a homebrew world.", "Instructions": "These settings allow GMs to add traits, languages, and other elements to a homebrew world. To add such elements, simply type the desired terms in the appropriate fields, separated by commas or tab keystrokes. They will then appear in the appropriate places on actor and item sheets. To update a term, click it to make the desired changes.", + "Tabs": { + "Traits": "Traits and Categories", + "Damage": "Damage Types" + }, "ConfirmDelete": { "Title": "Delete Homebrew Element?", "Message": "Delete Homebrew element {element}?" @@ -2829,6 +3007,10 @@ "EquipmentTraits": { "Name": "Equipment Traits", "Hint": "Traits applicable to equipment other than weapons" + }, + "DamageTypes": { + "name": "Custom Damage Types", + "Hint": "Additional damage types for the system to recognize" } }, "Metagame": { @@ -3165,6 +3347,7 @@ "SpellLevelLabel": "Spell Level", "SpellLevelBase": "Base: {level}", "SpellLevelHeightened": "Heightened: +{heightened}", + "SpellNonCantripLabel": "Non-Cantrip", "SpellPreparedLabel": "Prepared", "SpellRangeLabel": "Range", "SpellRequirementsLabel": "Requirements", @@ -3296,8 +3479,8 @@ "Label": "Size", "Dimensions": "Dimensions", "LinkToActorSize": { - "Label": "Link to Actor Size", - "Hint": "Keep this token's dimensions consistent with its actor's size category" + "Link": "Link to Actor Size", + "Unlink": "Unlink from Actor Size" } } }, @@ -3335,7 +3518,6 @@ "TraitAir": "Air", "TraitAlchemical": "Alchemical", "TraitAlchemist": "Alchemist", - "TraitAll": "All", "TraitAmphibious": "Amphibious", "TraitAmp": "Amp", "TraitAnadi": "Anadi", @@ -3374,7 +3556,6 @@ "TraitAuditory": "Auditory", "TraitAutomaton": "Automaton", "TraitAura": "Aura", - "TraitAxeVulnerability": "Axe Vulnerability", "TraitAzarketi": "Azarketi", "TraitAzata": "Azata", "TraitBackstabber": "Backstabber", @@ -3391,6 +3572,7 @@ "TraitBulwark": "Bulwark", "TraitCaligni": "Caligni", "TraitCantrip": "Cantrip", + "TraitCapacity": "Capacity", "TraitCapacity3": "Capacity 3", "TraitCapacity4": "Capacity 4", "TraitCapacity5": "Capacity 5", @@ -3429,13 +3611,13 @@ "TraitContract": "Contract", "TraitCouatl": "Couatl", "TraitCriticalFusion": "Critical Fusion", - "TraitCriticalHits": "Critical Hits", "TraitCurse": "Curse", "TraitCursed": "Cursed", "TraitCursebound": "Cursebound", "TraitDaemon": "Daemon", "TraitDarkness": "Darkness", "TraitDarvakka": "Darvakka", + "TraitDeadly": "Deadly", "TraitDeadlyD10": "Deadly d10", "TraitDeadlyD12": "Deadly d12", "TraitDeadlyD6": "Deadly d6", @@ -3450,7 +3632,6 @@ "TraitDeadly4D10": "Deadly 4d10", "TraitDeadly4D12": "Deadly 4d12", "TraitDeath": "Death", - "TraitDeathEffects": "Death Effects", "TraitDedication": "Dedication", "TraitDemon": "Demon", "TraitDero": "Dero", @@ -3597,7 +3778,6 @@ "TraitDescriptionIfrit": "A type of geniekin descended from a being from the Plane of Fire.", "TraitDescriptionIncarnate": "A spell with the incarnate trait is similar in theme to spells that summon creatures, but it doesn't conjure a minion with the summoned trait. Instead, when summoned, the incarnate creature takes its Arrive action when you finish Casting the Spell. At the end of your next turn, the incarnate creature can either Step, Stride, or take the action for another movement type it has (such as Climb or Burrow), and then takes its Depart action. The spell then ends. The names of specific Arrive and Depart actions are listed in italics after the word “Arrive” or “Depart” respectively, along with any traits. A creature summoned by an incarnate spell acts in your interests, directs its effects away from you and your allies as much as possible, and might listen to your requests, but ultimately makes its own decisions. If the spell indicates that the incarnate makes a decision, the GM determines what the incarnate would do. It might even become more inclined to do precisely as you wish over multiple summonings. The incarnate is not fully a creature. It can't take any other actions, nor can it be targeted or harmed by Strikes, spells, or other effects unless they would be able to target or end a spell effect (such as dispel magic). It has a size for the purposes of determining its placement for effects, but it doesn't block movement. If applicable, its effects use your spell DCs and spell attack roll modifier.", "TraitDescriptionIncapacitation": "An ability with this trait can take a character completely out of the fight or even kill them, and it's harder to use on a more powerful character. If a spell has the incapacitation trait, any creature of more than twice the spell's level treats the result of their check to prevent being incapacitated by the spell as one degree of success better, or the result of any check the spellcaster made to incapacitate them as one degree of success worse. If any other effect has the incapacitation trait, a creature of higher level than the item, creature, or hazard generating the effect gains the same benefits.", - "TraitDescriptionIncapacitationShort": "If the target level is higher than the ability level (or 2x spell level) treat the result as one degree better.", "TraitDescriptionIncorporeal": "An incorporeal creature or object has no physical form. It can pass through solid objects, including walls. When inside an object, an incorporeal creature can't perceive, attack, or interact with anything outside the object, and if it starts its turn in an object, it is slowed 1. Corporeal creatures can pass through an incorporeal creature, but they can't end their movement in its space. An incorporeal creature can't attempt Strength-based checks against physical creatures or objects-only against incorporeal ones-unless those objects have the ghost touch property rune. Likewise, a corporeal creature can't attempt Strength-based checks against incorporeal creatures or objects. Incorporeal creatures usually have immunity to effects or conditions that require a physical body, like disease, poison, and precision damage. They usually have resistance against all damage (except force damage and damage from Strikes with the ghost touch property rune), with double the resistance against non-magical damage.", "TraitDescriptionInfused": "You created an alchemical item with the infused trait using your infused reagents, and it has a limited time before it becomes inert. Any nonpermanent effects from your infused alchemical items, with the exception of afflictions such as slow-acting poisons, end when you make your daily preparations again.", "TraitDescriptionIngested": "This poison is delivered when drunk or eaten.", @@ -3608,7 +3788,7 @@ "TraitDescriptionInventor": "This indicates abilities from the inventor class.", "TraitDescriptionInvested": "A character can wear only 10 magical items that have the invested trait. None of the magical effects of the item apply if the character hasn't invested it, nor can it be activated, though the character still gains any normal benefits from wearing the physical item (like a hat keeping rain off their head).", "TraitDescriptionInvestigator": "This indicates abilities from the investigator class.", - "TraitDescriptionJoustingD6": "The weapon is suited for mounted combat with a harness or similar means. When mounted, if you moved at least 10 feet on the action before your attack, add a circumstance bonus to damage for that attack equal to the number of damage dice for the weapon. In addition, while mounted, you can wield the weapon in one hand, changing the damage die to the listed value.", + "TraitDescriptionJousting": "The weapon is suited for mounted combat with a harness or similar means. When mounted, if you moved at least 10 feet on the action before your attack, add a circumstance bonus to damage for that attack equal to the number of damage dice for the weapon. In addition, while mounted, you can wield the weapon in one hand, changing the damage die to the listed value.", "TraitDescriptionKashrishi": "A stout ancestry bearing distinctive crystal horns and inherent psychic abilities.", "TraitDescriptionKobold": "A creature with this trait is a member of the kobold ancestry.", "TraitDescriptionKickback": "A kickback weapon is extra powerful and difficult to use due to its high recoil. A kickback weapon deals 1 additional damage with all attacks. Firing a kickback weapon gives a -2 circumstance penalty to the attack roll, but characters with 14 or more Strength ignore the penalty. Attaching a kickback weapon to a deployed bipod, tripod, or other stabilizer can lower or negate this penalty.", @@ -3631,7 +3811,7 @@ "TraitDescriptionMinion": "Minions are creatures that directly serve another creature. A creature with this trait can use only 2 actions per turn, doesn't have reactions, and can't act when it's not your turn. Your minion acts on your turn in combat, once per turn, when you spend an action to issue it commands. For an animal companion, you Command an Animal; for a minion that's a spell or magic item effect, like a summoned minion, you Sustain a Spell or Sustain an Activation; if not otherwise specified, you issue a verbal command as a single action with the auditory and concentrate traits. If given no commands, minions use no actions except to defend themselves or to escape obvious harm. If left unattended for long enough, typically 1 minute, mindless minions usually don't act, animals follow their instincts, and sapient minions act how they please. A minion can't control other creatures.", "TraitDescriptionMisfortune": "A misfortune effect detrimentally alters how you roll your dice. You can never have more than one misfortune effect alter a single roll. If multiple misfortune effects would apply, the GM decides which is worse and applies it. If a fortune effect and a misfortune effect would apply to the same roll, the two cancel each other out, and you roll normally.", "TraitDescriptionModification": "A feat with this trait alters the construction of your innovation. If you have the reconfigure class feature, you can retrain such a feat more easily.", - "TraitDescriptionModular": "The weapon has multiple configurations that you can switch between using an Interact action. Typically, switching between configurations of a modular weapon allows it to deal different types of damage (listed in the trait, such as “modular B, P, or S”), though it's possible for a modular weapon's description to list more complicated configurations.", + "TraitDescriptionModular": "The weapon has multiple configurations that you can switch between using an Interact action. Typically, switching between configurations of a modular weapon allows it to deal different types of damage (listed in the trait, such as \"modular B, P, or S\"), though it's possible for a modular weapon's description to list more complicated configurations.", "TraitDescriptionMonk": "Abilities with this trait are from the monk class. A weapon with this trait is primarily used by monks.", "TraitDescriptionMonkWeapon": "Many monks learn to use these weapons.", "TraitDescriptionMorph": "Effects that slightly alter a creature's form have the morph trait. Any Strikes specifically granted by a morph effect are magical. You can be affected by multiple morph spells at once, but if you morph the same body part more than once, the second morph effect attempts to counteract the first (in the same manner as two polymorph effects, described in that trait). Your morph effects might also end if you are polymorphed and the polymorph effect invalidates or overrides your morph effect. The GM determines which morph effects can be used together and which can't.", @@ -3641,7 +3821,7 @@ "TraitDescriptionNagaji": "A traditionalist ancestry with reptilian features and serpentine heads.", "TraitDescriptionNecromancy": "Effects and magic items with this trait are associated with the necromancy school of magic, typically involving forces of life and death.", "TraitDescriptionNegative": "Effects with this trait heal undead creatures with negative energy, deal negative damage to living creatures, or manipulate negative energy.", - "TraitDescriptionNoisy": "This armor is loud and likely to alert others to your presence when you're using the Avoid Notice exploration activity.", + "TraitDescriptionNoisy": "This armor is loud and likely to alert others to your presence when you're using the Avoid Notice exploration activity. The armor's check penalty applies to Stealth checks even if you meet the required Strength score.", "TraitDescriptionNone": "This trait has no description.", "TraitDescriptionNonlethal": "Attacks with this weapon are nonlethal, and are used to knock creatures unconscious instead of kill them. You can use a nonlethal weapon to make a lethal attack with a -2 circumstance penalty.", "TraitDescriptionOath": "Oaths add an additional tenet to your code. You can usually have only one feat with this trait.", @@ -3733,7 +3913,7 @@ "TraitDescriptionVanara": "An inquisitive ancestry with primate-like features and prehensile tails.", "TraitDescriptionVersatile": "A versatile weapon can be used to deal a different type of damage than that listed in the Damage entry. This trait indicates the alternate damage type. For instance, a piercing weapon that is versatile S can be used to deal piercing or slashing damage. You choose the damage type each time you make an attack.", "TraitDescriptionVirulent": "Afflictions with the virulent trait are harder to remove. You must succeed at two consecutive saves to reduce a virulent affliction's stage by 1. A critical success reduces a virulent affliction's stage by only 1 instead of by 2.", - "TraitDescription": "An ancestry with snake-like features and powerful venom.", + "TraitDescriptionVishkanya": "An ancestry with snake-like features and powerful venom.", "TraitDescriptionVisual": "A visual effect can affect only creatures that can see it. This applies only to visible parts of the effect, as determined by the GM.", "TraitDescriptionVolley": "This ranged weapon is less effective at close distances. Your attacks against targets that are at a distance within the range listed take a -2 penalty.", "TraitDescriptionWater": "Effects with the water trait either manipulate or conjure water. Those that manipulate water have no effect in an area without water. Creatures with this trait consist primarily of water or have a magical connection to the element.", @@ -3793,13 +3973,14 @@ "TraitEvolution": "Evolution", "TraitExploration": "Exploration", "TraitExtradimensional": "Extradimensional", + "TraitFatalAim": "Fatal Aim", "TraitFatalAimD10": "Fatal Aim d10", "TraitFatalAimD12": "Fatal Aim d12", + "TraitFatal": "Fatal", "TraitFatalD10": "Fatal d10", "TraitFatalD12": "Fatal d12", "TraitFatalD8": "Fatal d8", "TraitFear": "Fear", - "TraitFearEffects": "Fear Effects", "TraitFetchling": "Fetchling", "TraitFey": "Fey", "TraitFiend": "Fiend", @@ -3873,6 +4054,7 @@ "TraitInventor": "Inventor", "TraitInvested": "Invested", "TraitInvestigator": "Investigator", + "TraitJousting": "Jousting", "TraitJoustingD6": "Jousting d6", "TraitKaiju": "Kaiju", "TraitKami": "Kami", @@ -3921,11 +4103,8 @@ "TraitNegative": "Negative", "TraitNoisy": "Noisy", "TraitNonlethal": "Nonlethal", - "TraitNonlethalAttacks": "Nonlethal Attacks", - "TraitNonmagicalAttacks": "Non-magical Attacks", "TraitNymph": "Nymph", "TraitOath": "Oath", - "TraitObjectImmunities": "Object Immunities", "TraitOccult": "Occult", "TraitOil": "Oil", "TraitOlfactory": "Olfactory", @@ -3957,7 +4136,6 @@ "TraitPrimal": "Primal", "TraitPropulsive": "Propulsive", "TraitProtean": "Protean", - "TraitProteanAnatomy": "Protean Anatomy", "TraitPsychopomp": "Psychopomp", "TraitPsyche": "Psyche", "TraitPsychic": "Psychic", @@ -3965,6 +4143,7 @@ "TraitRadiation": "Radiation", "TraitRage": "Rage", "TraitRakshasa": "Rakshasa", + "TraitRange": "Range", "TraitRange5": "Range 5 ft", "TraitRange10": "Range 10 ft", "TraitRange15": "Range 15 ft", @@ -3978,9 +4157,15 @@ "TraitRange80": "Range 80 ft", "TraitRange90": "Range 90 ft", "TraitRange100": "Range 100 ft", + "TraitRange110": "Range 110 ft", "TraitRange120": "Range 120 ft", + "TraitRange130": "Range 130 ft", + "TraitRange140": "Range 140 ft", "TraitRange150": "Range 150 ft", + "TraitRange160": "Range 160 ft", + "TraitRange170": "Range 170 ft", "TraitRange180": "Range 180 ft", + "TraitRange190": "Range 190 ft", "TraitRange200": "Range 200 ft", "TraitRange240": "Range 240 ft", "TraitRange300": "Range 300 ft", @@ -4039,6 +4224,7 @@ "TraitReach1000": "Reach 1,000 ft", "TraitReckless": "Reckless", "TraitReflection": "Reflection", + "TraitReload": "Reload", "TraitReload0": "Reload 0", "TraitReload1": "Reload 1", "TraitReload2": "Reload 2", @@ -4049,9 +4235,8 @@ "TraitRogue": "Rogue", "TraitSaggorak": "Saggorak", "TraitSahkil": "Sahkil", - "TraitSalt": "Salt", - "TraitSaltWater": "Salt Water", "TraitSamsaran": "Samsaran", + "TraitScatter": "Scatter", "TraitScatter5": "Scatter 5", "TraitScatter10": "Scatter 10", "TraitScatter15": "Scatter 15", @@ -4080,12 +4265,10 @@ "TraitSonic": "Sonic", "TraitSorcerer": "Sorcerer", "TraitSoulbound": "Soulbound", - "TraitSpellDeflection": "Spell Deflection", "TraitSpellheart": "Spellheart", "TraitSpellshot": "Spellshot", "TraitSpirit": "Spirit", "TraitSplash": "Splash", - "TraitSplashDamage": "Splash Damage", "TraitSplash10": "Splash 10 ft", "TraitSpriggan": "Spriggan", "TraitSprite": "Sprite", @@ -4100,8 +4283,6 @@ "TraitSummon": "Summon", "TraitSummoned": "Summoned", "TraitSummoner": "Summoner", - "TraitSwarmAttacks": "Swarm Attacks", - "TraitSwarmMind": "Swarm Mind", "TraitSwashbuckler": "Swashbuckler", "TraitSwarm": "Swarm", "TraitSweep": "Sweep", @@ -4138,11 +4319,11 @@ "TraitTroop": "Troop", "TraitTrueName": "True Name", "TraitTwin": "Twin", + "TraitTwoHand": "Two-Hand", "TraitTwoHandD10": "Two-Hand d10", "TraitTwoHandD12": "Two-Hand d12", "TraitTwoHandD6": "Two-Hand d6", "TraitTwoHandD8": "Two-Hand d8", - "TraitTwoHandedHelp": "This item can be wielded in two hands. To toggle the two-handed strike, click the two-handed trait in the strikes tab.", "TraitUnarmed": "Unarmed", "TraitUncommon": "Uncommon", "TraitUndead": "Undead", @@ -4152,9 +4333,9 @@ "TraitUntyped": "Untyped", "TraitUrdefhan": "Urdefhan", "TraitVampire": "Vampire", - "TraitVampireWeaknesses": "Vampire Weaknesses", "TraitVanara": "Vanara", "TraitVelstrac": "Velstrac", + "TraitVersatile": "Versatile", "TraitVersatileAcid": "Versatile Acid", "TraitVersatileB": "Versatile B", "TraitVersatileChaotic": "Versatile Chaotic", @@ -4175,11 +4356,11 @@ "TraitVirulent": "Virulent", "TraitVishkanya": "Vishkanya", "TraitVisual": "Visual", + "TraitVolley": "Volley", "TraitVolley20": "Volley 20 ft.", "TraitVolley30": "Volley 30 ft.", "TraitVolley50": "Volley 50 ft.", "TraitVorpalFear": "Vorpal Fear", - "TraitVulnerableToSunlight": "Vulnerable to Sunlight", "TraitWand": "Wand", "TraitWater": "Water", "TraitWayang": "Wayang", @@ -4292,8 +4473,8 @@ }, "errorTargetToken": "Select at least one token.", "noDamageInfoForOutcome": "No damage information for outcome {outcome}.", - "shiftModifyDamageLabel": "Modifier:", - "shiftModifyDamageTitle": "Modify the rolled damage/healing" + "shiftModifyDamageLabel": "Adjust Damage/Healing", + "shiftModifyDamageTitle": "Adjust the rolled damage/healing" }, "UnitPriceLabel": "Unit price", "UnprepareItemTitle": "Unprepare Item", @@ -4660,10 +4841,7 @@ } }, "flaming": { - "Name": "Flaming", - "Note": { - "criticalSuccess": "When you critically succeed at a Strike with this weapon, you deal an additional [[/r {1d10}[persistent,fire]]] @UUID[Compendium.pf2e.conditionitems.lDVqvLKA6eF3Df60]{Persistent Fire Damage}." - } + "Name": "Flaming" }, "frost": { "Name": "Frost", @@ -4708,7 +4886,7 @@ "greaterDisrupting": { "Name": "Greater Disrupting", "Note": { - "criticalSuccess": "On a critical hit, the undead creature must attempt a @Check[type:fortitude|dc:34|traits:incapacitation|name:Greater Disrupting Rune] save with the following effects. This is an incapacitation effect.

Critical Success It's @UUID[Compendium.pf2e.conditionitems.MIRkyAjyBeXivMa7]{Enfeebled 1} until the end of your next turn.
Success It's @UUID[Compendium.pf2e.conditionitems.MIRkyAjyBeXivMa7]{Enfeebled 2} until the end of your next turn.
Failure It's @UUID[Compendium.pf2e.conditionitems.MIRkyAjyBeXivMa7]{Enfeebled 3} until the end of your next turn.
Critical Failure It's destroyed." + "criticalSuccess": "On a critical hit, the undead creature must attempt a @Check[type:fortitude|dc:34|traits:incapacitation|name:Greater Disrupting Rune] save with the following effects. This is an incapacitation effect.
Critical Success It's @UUID[Compendium.pf2e.conditionitems.MIRkyAjyBeXivMa7]{Enfeebled 1} until the end of your next turn.
Success It's @UUID[Compendium.pf2e.conditionitems.MIRkyAjyBeXivMa7]{Enfeebled 2} until the end of your next turn.
Failure It's @UUID[Compendium.pf2e.conditionitems.MIRkyAjyBeXivMa7]{Enfeebled 3} until the end of your next turn.
Critical Failure It's destroyed." } }, "greaterExtending": { @@ -4726,7 +4904,7 @@ "greaterFlaming": { "Name": "Greater Flaming", "Note": { - "criticalSuccess": "Fire damage dealt by this weapon (including the persistent fire damage) ignores the target's fire resistance. When you critically succeed at a Strike with this weapon, you deal an additional [[/r {2d10}[persistent,fire]]] @UUID[Compendium.pf2e.conditionitems.lDVqvLKA6eF3Df60]{Persistent Fire Damage}.", + "criticalSuccess": "Fire damage dealt by this weapon (including the persistent fire damage) ignores the target's fire resistance. When you critically succeed at a Strike with this weapon, you deal an additional [[/r 2d10[persistent,fire]]].", "success": "Fire damage dealt by this weapon ignores the target's fire resistance." } }, @@ -4767,7 +4945,7 @@ "Bow": "Grievous Rune The Athletics check to pull the missile free is DC 20.", "Brawling": "Grievous Rune The target takes a -4 circumstance penalty to its save.", "Club": "Grievous Rune You can knock the target up to 15 feet away.", - "Dart": "Grievous Rune The base persistent bleed damage increases to [[/r {2d6}[persistent,bleed]]] @UUID[Compendium.pf2e.conditionitems.lDVqvLKA6eF3Df60]{Persistent Bleed Damage}.", + "Dart": "Grievous Rune The base persistent bleed damage increases to [[/r 2d6[persistent,bleed]]].", "Flail": "Grievous Rune You move the target 5 feet. You can't move it away from you, but you can move it in another direction of your choice.", "Hammer": "Grievous Rune You can also knock the target 5 feet away from you.", "Knife": "Grievous Rune The target takes a -5-foot status penalty to its Speed while it has the @UUID[Compendium.pf2e.conditionitems.lDVqvLKA6eF3Df60]{Persistent Bleed Damage}.", @@ -4785,7 +4963,7 @@ "holy": { "Name": "Holy", "Note": { - "criticalSuccess": "(R command; once per day)

Trigger You critically succeed at an attack roll against an evil creature with the weapon

Effect You regain HP equal to double the evil creature's level. This is a good, positive, healing effect." + "criticalSuccess": "(R command; once per day)
Trigger You critically succeed at an attack roll against an evil creature with the weapon
Effect You regain HP equal to double the evil creature's level. This is a good, positive, healing effect." } }, "hopeful": { @@ -4844,21 +5022,17 @@ "unholy": { "Name": "Unholy", "Note": { - "criticalSuccess": "(R command; once per day)

Trigger You critically succeed at an attack roll against a good creature with the weapon

Effect The target takes @UUID[Compendium.pf2e.conditionitems.lDVqvLKA6eF3Df60]{Persistent Bleed Damage} equal to 1d8 per weapon damage die of the etched weapon." + "criticalSuccess": "(R command; once per day)
Trigger You critically succeed at an attack roll against a good creature with the weapon
Effect The target takes @UUID[Compendium.pf2e.conditionitems.lDVqvLKA6eF3Df60]{Persistent Bleed Damage} equal to 1d8 per weapon damage die of the etched weapon." } }, "vorpal": { "Name": "Vorpal", "Note": { - "criticalSuccess": "(R envision (death, incapacitation))

Trigger You roll a natural 20 on a Strike with the weapon, critically succeed, and deal slashing damage. The target must have a head

Effect The target must succeed at a @Check[type:fortitude|dc:37|traits:death,incapacitation]|name:Vorpal Rune] save or be decapitated. This kills any creature except ones that don't require a head to live. For creatures with multiple heads, this usually kills the creature only if you sever its last head." + "criticalSuccess": "(R envision (death, incapacitation))
Trigger You roll a natural 20 on a Strike with the weapon, critically succeed, and deal slashing damage. The target must have a head
Effect The target must succeed at a @Check[type:fortitude|dc:37|traits:death,incapacitation|name:Vorpal Rune] save or be decapitated. This kills any creature except ones that don't require a head to live. For creatures with multiple heads, this usually kills the creature only if you sever its last head." } }, "wounding": { - "Name": "Wounding", - "Note": { - "criticalSuccess": "When you critically hit a creature with a wounding weapon, you deal an extra [[/r {1d6*2}[persistent,bleed]]] @UUID[Compendium.pf2e.conditionitems.lDVqvLKA6eF3Df60]{Persistent Bleed Damage}.", - "success": "When you hit a creature with a wounding weapon, you deal an extra [[/r {1d6}[persistent,bleed]]] @UUID[Compendium.pf2e.conditionitems.lDVqvLKA6eF3Df60]{Persistent Bleed Damage}." - } + "Name": "Wounding" } }, "WeaponPropertyStrikeDamageLabel": "Strike Damage", @@ -5236,7 +5410,6 @@ }, "loot": { "EditLootLabel": "Configure Loot?", - "GMSettings": "GM Settings", "PermissionError": "A GM must be online in order to loot or stow an item.", "InsufficientCurrencyError": "Insufficient currency for purchase by {buyer}", "LootDescription": "Allows for distribution of coins across players", @@ -5451,24 +5624,25 @@ } }, "DamageButton": { - "Full": "Apply full damage to selected tokens.", + "Full": "[Click] Apply full damage to selected tokens.", "FullContext": "Apply Damage", "FullShort": "Damage", - "Half": "Apply half damage to selected tokens.", + "Half": "[Click] Apply half damage to selected tokens.", "HalfContext": "Half Damage", "HalfShort": "Half", - "Double": "Apply double damage to selected tokens.", + "Double": "[Click] Apply double damage to selected tokens.", "DoubleContext": "Double Damage", "DoubleShort": "Double", - "Triple": "Apply triple damage to selected tokens.", + "Triple": "[Click] Apply triple damage to selected tokens.", "TripleContext": "Apply Triple Damage", "TripleShort": "Triple", - "ShieldBlock": "Toggle the shield block status of the selected tokens.", + "ShieldBlock": "[Click] Toggle the shield block status of the selected tokens before applying damage.", "ShieldBlockContext": "Shield Block", "ShieldBlockShort": "Block", - "Healing": "Apply full healing to selected tokens.", + "Healing": "[Click] Apply full healing to selected tokens.", "HealingContext": "Apply Healing", - "HealingShort": "Heal" + "HealingShort": "Heal", + "Adjust": "[Shift-Click] Adjust value before applying." } } } diff --git a/types/global.d.ts b/types/global.d.ts index 91f03f295..8553c1af2 100644 --- a/types/global.d.ts +++ b/types/global.d.ts @@ -7,9 +7,9 @@ import { CoinsPF2e } from "@item/physical/helpers"; import { ActiveEffectPF2e } from "@module/active-effect"; import { CompendiumBrowser, CompendiumBrowserSettings } from "@module/apps/compendium-browser"; import { EffectsPanel } from "@module/apps/effects-panel"; +import { HotbarPF2e } from "@module/apps/hotbar"; import { LicenseViewer } from "@module/apps/license-viewer"; -import { ActorDirectoryPF2e, ChatLogPF2e, CompendiumDirectoryPF2e, EncounterTrackerPF2e } from "@module/apps/ui"; -import { HotbarPF2e } from "@module/apps/ui/hotbar"; +import { ActorDirectoryPF2e, ChatLogPF2e, CompendiumDirectoryPF2e, EncounterTrackerPF2e } from "@module/apps/sidebar"; import { WorldClock } from "@module/apps/world-clock"; import { CanvasPF2e, EffectsCanvasGroupPF2e } from "@module/canvas"; import { StatusEffects } from "@module/canvas/status-effects"; @@ -29,6 +29,7 @@ import { PF2ECONFIG, StatusEffectIconTheme } from "@scripts/config"; import { DicePF2e } from "@scripts/dice"; import { calculateXP, + editPersistent, launchTravelSheet, perceptionForSelected, rollActionMacro, @@ -37,10 +38,9 @@ import { } from "@scripts/macros"; import { ModuleArt, registerModuleArt } from "@scripts/register-module-art"; import { remigrate } from "@scripts/system/remigrate"; -import { UserVisibility } from "@scripts/ui/user-visibility"; -import { EffectTracker } from "@system/effect-tracker"; import { CheckPF2e } from "@system/check"; -import { HomebrewSettingsKey, HomebrewTag } from "@system/settings/homebrew"; +import { EffectTracker } from "@system/effect-tracker"; +import { CustomDamageData, HomebrewTag, HomebrewTraitSettingsKey } from "@system/settings/homebrew"; import { TextEditorPF2e } from "@system/text-editor"; import { sluggify } from "@util"; import { CombatantPF2e, EncounterPF2e } from "./module/encounter"; @@ -62,6 +62,7 @@ declare global { launchTravelSheet: typeof launchTravelSheet; perceptionForSelected: typeof perceptionForSelected; stealthForSelected: typeof stealthForSelected; + editPersistent: typeof editPersistent; }; system: { moduleArt: { @@ -118,6 +119,7 @@ declare global { get(module: "pf2e", setting: "automation.actorsDeadAtZero"): "neither" | "npcsOnly" | "pcsOnly" | "both"; get(module: "pf2e", setting: "automation.effectExpiration"): boolean; get(module: "pf2e", setting: "automation.flankingDetection"): boolean; + get(module: "pf2e", setting: "automation.iwr"): boolean; get(module: "pf2e", setting: "automation.lootableNPCs"): boolean; get(module: "pf2e", setting: "automation.removeExpiredEffects"): boolean; get(module: "pf2e", setting: "automation.rulesBasedVision"): boolean; @@ -156,7 +158,8 @@ declare global { get(module: "pf2e", setting: "campaignFeatSections"): FeatCategoryOptions[]; get(module: "pf2e", setting: "homebrew.weaponCategories"): HomebrewTag<"weaponCategories">[]; - get(module: "pf2e", setting: HomebrewSettingsKey): HomebrewTag[]; + get(module: "pf2e", setting: HomebrewTraitSettingsKey): HomebrewTag[]; + get(module: "pf2e", setting: "homebrew.damageTypes"): CustomDamageData[]; get(module: "pf2e", setting: "compendiumBrowserPacks"): CompendiumBrowserSettings; get(module: "pf2e", setting: "critFumbleButtons"): boolean; @@ -187,13 +190,14 @@ declare global { } const BUILD_MODE: "development" | "production"; + const ROLL_GRAMMAR: string; } type ConfiguredConfig = Config< AmbientLightDocumentPF2e, ActiveEffectPF2e, ActorPF2e, - ActorDirectoryPF2e, + ActorDirectoryPF2e, ChatLogPF2e, ChatMessagePF2e, EncounterPF2e, diff --git a/types/src/module/actor/character/document.d.ts b/types/src/module/actor/character/document.d.ts new file mode 100644 index 000000000..d097f2070 --- /dev/null +++ b/types/src/module/actor/character/document.d.ts @@ -0,0 +1,105 @@ +import { CreaturePF2e, FamiliarPF2e } from "@actor"; +import { Abilities, CreatureSpeeds, LabeledSpeed, MovementType } from "@actor/creature/data"; +import { CreatureUpdateContext } from "@actor/creature/types"; +import { CharacterSource } from "@actor/data"; +import { StatisticModifier } from "@actor/modifiers"; +import { AbilityString, AttackItem, AttackRollContext, StrikeRollContext, StrikeRollContextParams } from "@actor/types"; +import { AncestryPF2e, BackgroundPF2e, ClassPF2e, DeityPF2e, FeatPF2e, HeritagePF2e, WeaponPF2e } from "@item"; +import { ItemType } from "@item/data"; +import { MagicTradition } from "@item/spell/types"; +import { UserPF2e } from "@module/user"; +import { RollParameters } from "@system/rolls"; +import { Statistic } from "@system/statistic"; +import { CraftingEntry, CraftingFormula } from "./crafting"; +import { AuxiliaryAction, BaseWeaponProficiencyKey, CharacterData, CharacterFlags, CharacterStrike, ClassDCData, WeaponGroupProficiencyKey } from "./data"; +import { CharacterFeats } from "./feats"; +import { CharacterHitPointsSummary, CharacterSkills, CreateAuxiliaryParams } from "./types"; +declare class CharacterPF2e extends CreaturePF2e { + /** Core singular embeds for PCs */ + ancestry: Embedded | null; + heritage: Embedded | null; + background: Embedded | null; + class: Embedded | null; + deity: Embedded | null; + /** A cached reference to this PC's familiar */ + familiar: FamiliarPF2e | null; + feats: CharacterFeats; + pfsBoons: FeatPF2e[]; + deityBoonsCurses: FeatPF2e[]; + /** All base casting tradition proficiences, which spellcasting build off of */ + traditions: Record; + /** The primary class DC */ + classDC: Statistic | null; + /** All class DCs regardless of whether or not its the primary */ + classDCs: Record; + get allowedItemTypes(): (ItemType | "physical")[]; + get keyAbility(): AbilityString; + /** This PC's ability scores */ + get abilities(): Abilities; + get hitPoints(): CharacterHitPointsSummary; + get skills(): CharacterSkills; + get heroPoints(): { + value: number; + max: number; + }; + getCraftingFormulas(): Promise; + getCraftingEntries(): Promise; + getCraftingEntry(selector: string): Promise; + performDailyCrafting(): Promise; + /** If one exists, prepare this character's familiar */ + prepareData(): void; + /** Setup base ephemeral data to be modified by active effects and derived-data preparation */ + prepareBaseData(): void; + /** After AE-likes have been applied, set numeric roll options */ + prepareEmbeddedDocuments(): void; + /** + * Immediately after boosts from this PC's ancestry, background, and class have been acquired, set ability scores + * according to them. + */ + prepareDataFromItems(): void; + prepareDerivedData(): void; + /** Using a string, attempts to retrieve a statistic proficiency */ + getProficiencyStatistic(slug: string): Statistic | null; + private setAbilityScores; + /** Set roll operations for ability scores, proficiency ranks, and number of hands free */ + protected setNumericRollOptions(): void; + private prepareSaves; + private prepareSkills; + prepareSpeed(movementType: "land"): CreatureSpeeds; + prepareSpeed(movementType: Exclude): (LabeledSpeed & StatisticModifier) | null; + prepareSpeed(movementType: MovementType): CreatureSpeeds | (LabeledSpeed & StatisticModifier) | null; + prepareFeats(): void; + prepareClassDC(slug: string, classDC: Pick): Statistic; + /** Create an "auxiliary" action, an Interact or Release action using a weapon */ + createAuxAction({ weapon, action, purpose, hands }: CreateAuxiliaryParams): AuxiliaryAction; + /** Prepare this character's strike actions */ + prepareStrikes({ includeBasicUnarmed }?: { + includeBasicUnarmed?: boolean | undefined; + }): CharacterStrike[]; + /** Prepare a strike action from a weapon */ + private prepareStrike; + getStrikeDescription(weapon: WeaponPF2e): { + description: string; + criticalSuccess: string; + success: string; + }; + /** Possibly modify this weapon depending on its */ + getStrikeRollContext(params: StrikeRollContextParams): StrikeRollContext; + /** Create attack-roll modifiers from weapon traits */ + getAttackRollContext(params: StrikeRollContextParams): AttackRollContext; + consumeAmmo(weapon: WeaponPF2e, params: RollParameters): boolean; + /** Prepare stored and synthetic martial proficiencies */ + prepareMartialProficiencies(): void; + /** Toggle the invested state of an owned magical item */ + toggleInvested(itemId: string): Promise; + /** Add a proficiency in a weapon group or base weapon */ + addAttackProficiency(key: BaseWeaponProficiencyKey | WeaponGroupProficiencyKey): Promise; + protected _preUpdate(changed: DeepPartial, options: CreatureUpdateContext, user: UserPF2e): Promise; + /** Toggle between boost-driven and manual management of ability scores */ + toggleAbilityManagement(): Promise; +} +interface CharacterPF2e { + readonly data: CharacterData; + flags: CharacterFlags; +} +export { CharacterPF2e }; diff --git a/types/src/module/actor/creature/document.d.ts b/types/src/module/actor/creature/document.d.ts new file mode 100644 index 000000000..3fa56c728 --- /dev/null +++ b/types/src/module/actor/creature/document.d.ts @@ -0,0 +1,101 @@ +/// +import { ActorPF2e } from "@actor"; +import { HitPointsSummary } from "@actor/base"; +import { CreatureData } from "@actor/data"; +import { ModifierPF2e, StatisticModifier } from "@actor/modifiers"; +import { SaveType } from "@actor/types"; +import { ArmorPF2e, ItemPF2e, PhysicalItemPF2e } from "@item"; +import { ItemCarryType } from "@item/physical/data"; +import { ActiveEffectPF2e } from "@module/active-effect"; +import { Rarity } from "@module/data"; +import { RuleElementSynthetics } from "@module/rules"; +import { UserPF2e } from "@module/user"; +import { CheckRoll } from "@system/check"; +import { DamageType } from "@system/damage"; +import { RawPredicate } from "@system/predication"; +import { Statistic } from "@system/statistic"; +import { CreatureSkills, CreatureSpeeds, CreatureTrait, LabeledSpeed, MovementType, SenseData, VisionLevel } from "./data"; +import { CreatureSensePF2e } from "./sense"; +import { Alignment, CreatureUpdateContext, GetReachParameters, IsFlatFootedParams } from "./types"; +/** An "actor" in a Pathfinder sense rather than a Foundry one: all should contain attributes and abilities */ +declare abstract class CreaturePF2e extends ActorPF2e { + /** Skill `Statistic`s for the creature */ + get skills(): CreatureSkills; + /** The creature's position on the alignment axes */ + get alignment(): Alignment; + get rarity(): Rarity; + /** + * A currently naive measurement of this creature's reach + * @param [context.action] The action context of the reach measurement. Interact actions don't consider weapons. + * @param [context.weapon] The "weapon," literal or otherwise, used in an attack-reach measurement + */ + getReach({ action, weapon }?: GetReachParameters): number; + get visionLevel(): VisionLevel; + get hasDarkvision(): boolean; + get hasLowLightVision(): boolean; + get canSee(): boolean; + get canAct(): boolean; + get canAttack(): boolean; + get isDead(): boolean; + /** Whether the creature emits sound: overridable by AE-like */ + get emitsSound(): boolean; + get isSpellcaster(): boolean; + get perception(): Statistic; + get wornArmor(): Embedded | null; + /** Get the held shield of most use to the wielder */ + get heldShield(): Embedded | null; + /** Whether the actor is flat-footed in the current scene context: currently only handles flanking */ + isFlatFooted({ dueTo }: IsFlatFootedParams): boolean; + /** Setup base ephemeral data to be modified by active effects and derived-data preparation */ + prepareBaseData(): void; + /** Apply ActiveEffect-Like rule elements immediately after application of actual `ActiveEffect`s */ + prepareEmbeddedDocuments(): void; + prepareDerivedData(): void; + protected prepareInitiative(): void; + protected prepareSynthetics(): void; + /** Add a circumstance bonus if this creature has a raised shield */ + protected getShieldBonus(): ModifierPF2e | null; + /** + * Changes the carry type of an item (held/worn/stowed/etc) and/or regrips/reslots + * @param item The item + * @param carryType Location to be set to + * @param handsHeld Number of hands being held + * @param inSlot Whether the item is in the slot or not. Equivilent to "equipped" previously + */ + adjustCarryType(item: Embedded, carryType: ItemCarryType, handsHeld?: number, inSlot?: boolean): Promise; + /** + * Adds a custom modifier that will be included when determining the final value of a stat. The slug generated by + * the name parameter must be unique for the custom modifiers for the specified stat, or it will be ignored. + */ + addCustomModifier(stat: string, label: string, value: number, type: string, predicate?: RawPredicate, damageType?: DamageType, damageCategory?: string): Promise; + /** Removes a custom modifier by slug */ + removeCustomModifier(stat: string, slug: string): Promise; + /** + * Roll a Recovery Check + * Prompt the user for input regarding Advantage/Disadvantage and any Situational Bonus + */ + rollRecovery(event: JQuery.TriggeredEvent): Promise | null>; + /** Prepare derived creature senses from Rules Element synthetics */ + prepareSenses(data: SenseData[], synthetics: RuleElementSynthetics): CreatureSensePF2e[]; + prepareSpeed(movementType: "land"): this["system"]["attributes"]["speed"]; + prepareSpeed(movementType: Exclude): (LabeledSpeed & StatisticModifier) | null; + prepareSpeed(movementType: MovementType): CreatureSpeeds | (LabeledSpeed & StatisticModifier) | null; + protected _preUpdate(changed: DeepPartial, options: CreatureUpdateContext, user: UserPF2e): Promise; +} +interface CreaturePF2e { + readonly data: CreatureData; + /** Saving throw rolls for the creature, built during data prep */ + saves: Record; + get traits(): Set; + get hitPoints(): HitPointsSummary; + /** Expand DocumentModificationContext for creatures */ + update(data: DocumentUpdateData, options?: CreatureUpdateContext): Promise; + /** See implementation in class */ + updateEmbeddedDocuments(embeddedName: "ActiveEffect", updateData: EmbeddedDocumentUpdateData[], options?: DocumentModificationContext): Promise; + updateEmbeddedDocuments(embeddedName: "Item", updateData: EmbeddedDocumentUpdateData[], options?: DocumentModificationContext): Promise; + updateEmbeddedDocuments(embeddedName: "ActiveEffect" | "Item", updateData: EmbeddedDocumentUpdateData[], options?: DocumentModificationContext): Promise; + deleteEmbeddedDocuments(embeddedName: "ActiveEffect", dataId: string[], context?: DocumentModificationContext): Promise; + deleteEmbeddedDocuments(embeddedName: "Item", dataId: string[], context?: DocumentModificationContext): Promise; + deleteEmbeddedDocuments(embeddedName: "ActiveEffect" | "Item", dataId: string[], context?: DocumentModificationContext): Promise; +} +export { CreaturePF2e }; diff --git a/types/src/module/actor/data/iwr.d.ts b/types/src/module/actor/data/iwr.d.ts new file mode 100644 index 000000000..1160b8118 --- /dev/null +++ b/types/src/module/actor/data/iwr.d.ts @@ -0,0 +1,256 @@ +import { ImmunityType, IWRType, ResistanceType, WeaknessType } from "@actor/types"; +declare abstract class IWRData { + readonly type: TType; + readonly exceptions: TType[]; + readonly source: string | null; + protected abstract readonly typeLabels: Record; + constructor(data: IWRConstructorData); + abstract get label(): string; + get typeLabel(): string; + toObject(): Readonly>; + /** Construct an object argument for Localization#format (see also PF2E.Actor.IWR.CompositeLabel in en.json) */ + protected createFormatData({ list, prefix }: { + list: TType[]; + prefix: string; + }): Record; +} +type IWRConstructorData = { + type: TType; + exceptions?: TType[]; + source?: string | null; +}; +type IWRDisplayData = Pick, "type" | "exceptions" | "source" | "label">; +declare class ImmunityData extends IWRData implements ImmunitySource { + protected readonly typeLabels: { + acid: string; + adamantine: string; + air: string; + "area-damage": string; + auditory: string; + bleed: string; + blinded: string; + bludgeoning: string; + chaotic: string; + clumsy: string; + cold: string; + "cold-iron": string; + confused: string; + conjuration: string; + controlled: string; + "critical-hits": string; + curse: string; + darkwood: string; + dazzled: string; + deafened: string; + "death-effects": string; + disease: string; + doomed: string; + drained: string; + earth: string; + electricity: string; + emotion: string; + enchantment: string; + energy: string; + enfeebled: string; + evil: string; + evocation: string; + fascinated: string; + fatigued: string; + "fear-effects": string; + fire: string; + "flat-footed": string; + fleeing: string; + force: string; + frightened: string; + good: string; + grabbed: string; + healing: string; + illusion: string; + immobilized: string; + inhaled: string; + lawful: string; + light: string; + magic: string; + mental: string; + "misfortune-effects": string; + mithral: string; + necromancy: string; + negative: string; + "non-magical": string; + "nonlethal-attacks": string; + "object-immunities": string; + olfactory: string; + orichalcum: string; + paralyzed: string; + petrified: string; + physical: string; + piercing: string; + poison: string; + polymorph: string; + positive: string; + possession: string; + precision: string; + prone: string; + restrained: string; + "salt-water": string; + scrying: string; + sickened: string; + silver: string; + slashing: string; + sleep: string; + slowed: string; + sonic: string; + "spell-deflection": string; + stunned: string; + stupefied: string; + "swarm-attacks": string; + "swarm-mind": string; + transmutation: string; + trip: string; + "unarmed-attacks": string; + unconscious: string; + visual: string; + water: string; + }; + get label(): string; +} +interface IWRSource { + type: TType; + exceptions?: TType[]; +} +type ImmunitySource = IWRSource; +declare class WeaknessData extends IWRData implements WeaknessSource { + protected readonly typeLabels: { + acid: string; + adamantine: string; + air: string; + "area-damage": string; + "arrow-vulnerability": string; + "axe-vulnerability": string; + bleed: string; + bludgeoning: string; + chaotic: string; + cold: string; + "cold-iron": string; + "critical-hits": string; + darkwood: string; + earth: string; + electricity: string; + emotion: string; + energy: string; + evil: string; + fire: string; + force: string; + "ghost-touch": string; + good: string; + lawful: string; + light: string; + magical: string; + mental: string; + metal: string; + mithral: string; + negative: string; + "non-magical": string; + "nonlethal-attacks": string; + orichalcum: string; + physical: string; + piercing: string; + poison: string; + positive: string; + precision: string; + radiation: string; + salt: string; + "salt-water": string; + silver: string; + slashing: string; + sonic: string; + "splash-damage": string; + "unarmed-attacks": string; + "vampire-weaknesses": string; + vorpal: string; + "vorpal-fear": string; + "vulnerable-to-sunlight": string; + warpglass: string; + water: string; + weapons: string; + "weapons-shedding-bright-light": string; + }; + value: number; + constructor(data: IWRConstructorData & { + value: number; + }); + get label(): string; + toObject(): Readonly; +} +type WeaknessDisplayData = IWRDisplayData & Pick; +interface WeaknessSource extends IWRSource { + value: number; +} +declare class ResistanceData extends IWRData implements ResistanceSource { + protected readonly typeLabels: { + acid: string; + adamantine: string; + air: string; + "all-damage": string; + "area-damage": string; + bleed: string; + bludgeoning: string; + chaotic: string; + cold: string; + "cold-iron": string; + "critical-hits": string; + darkwood: string; + earth: string; + electricity: string; + energy: string; + evil: string; + fire: string; + force: string; + "ghost-touch": string; + good: string; + lawful: string; + light: string; + magical: string; + mental: string; + metal: string; + mithral: string; + negative: string; + "non-magical": string; + nonlethal: string; + "nonlethal-attacks": string; + orichalcum: string; + physical: string; + piercing: string; + plant: string; + poison: string; + positive: string; + precision: string; + "protean-anatomy": string; + radiation: string; + salt: string; + "salt-water": string; + silver: string; + slashing: string; + sonic: string; + "unarmed-attacks": string; + vorpal: string; + warpglass: string; + water: string; + weapons: string; + "weapons-shedding-bright-light": string; + }; + value: number; + readonly doubleVs: ResistanceType[]; + constructor(data: IWRConstructorData & { + value: number; + doubleVs?: ResistanceType[]; + }); + get label(): string; + toObject(): ResistanceDisplayData; +} +type ResistanceDisplayData = IWRDisplayData & Pick; +interface ResistanceSource extends IWRSource { + value: number; + doubleVs?: ResistanceType[]; +} +export { IWRSource, ImmunityData, ImmunitySource, ResistanceData, ResistanceSource, WeaknessData, WeaknessSource }; diff --git a/types/src/module/actor/familiar/document.d.ts b/types/src/module/actor/familiar/document.d.ts new file mode 100644 index 000000000..1dd91ed1c --- /dev/null +++ b/types/src/module/actor/familiar/document.d.ts @@ -0,0 +1,21 @@ +import { CharacterPF2e, CreaturePF2e } from "@actor"; +import { FamiliarData } from "./data"; +declare class FamiliarPF2e extends CreaturePF2e { + /** The familiar's master, if selected */ + get master(): CharacterPF2e | null; + get masterAbilityModifier(): number | null; + prepareData({ fromMaster }?: { + fromMaster?: boolean | undefined; + }): void; + /** Set base emphemeral data for later updating by derived-data preparation */ + prepareBaseData(): void; + prepareDerivedData(): void; + /** Familiars cannot have item bonuses. Nor do they have ability mods nor proficiency (sans master level) */ + private stripInvalidModifiers; + /** Remove the master's reference to this familiar */ + protected _onDelete(options: DocumentModificationContext, userId: string): void; +} +interface FamiliarPF2e { + readonly data: FamiliarData; +} +export { FamiliarPF2e }; diff --git a/types/src/module/actor/hazard/document.d.ts b/types/src/module/actor/hazard/document.d.ts new file mode 100644 index 000000000..c52093bfb --- /dev/null +++ b/types/src/module/actor/hazard/document.d.ts @@ -0,0 +1,26 @@ +import { ActorPF2e } from "@actor"; +import { SaveType } from "@actor/types"; +import { ItemType } from "@item/data"; +import { Rarity } from "@module/data"; +import { Statistic } from "@system/statistic"; +import { HazardData } from "./data"; +declare class HazardPF2e extends ActorPF2e { + get allowedItemTypes(): (ItemType | "physical")[]; + get rarity(): Rarity; + get isComplex(): boolean; + /** Minimal check since the disabled status of a hazard isn't logged */ + get canAttack(): boolean; + get emitsSound(): boolean; + prepareBaseData(): void; + prepareDerivedData(): void; + protected prepareSaves(): { + [K in SaveType]?: Statistic; + }; +} +interface HazardPF2e { + readonly data: HazardData; + saves: { + [K in SaveType]?: Statistic; + }; +} +export { HazardPF2e }; diff --git a/types/src/module/actor/loot/document.d.ts b/types/src/module/actor/loot/document.d.ts new file mode 100644 index 000000000..c3a9cbf8c --- /dev/null +++ b/types/src/module/actor/loot/document.d.ts @@ -0,0 +1,35 @@ +import { ActorPF2e } from "@actor/base"; +import { PhysicalItemPF2e } from "@item/physical"; +import { ItemPF2e } from "@item/base"; +import { UserPF2e } from "@module/user"; +import { LootData, LootSource } from "./data"; +import { ActiveEffectPF2e } from "@module/active-effect"; +import { ItemSourcePF2e, ItemType } from "@item/data"; +declare class LootPF2e extends ActorPF2e { + get allowedItemTypes(): (ItemType | "physical")[]; + get isLoot(): boolean; + get isMerchant(): boolean; + /** Should this actor's token(s) be hidden when there are no items in its inventory? */ + get hiddenWhenEmpty(): boolean; + /** Loot actors can never benefit from rule elements */ + get canHostRuleElements(): boolean; + /** It's a box. */ + get canAct(): false; + /** Anyone with Limited permission can update a loot actor */ + canUserModify(user: UserPF2e, action: UserAction): boolean; + /** A user can see a loot actor in the actor directory only if they have at least Observer permission */ + get visible(): boolean; + transferItemToActor(targetActor: ActorPF2e, item: Embedded, quantity: number, containerId?: string, newStack?: boolean): Promise | null>; + /** Hide this actor's token(s) when in loot (rather than merchant) mode, empty, and configured thus */ + toggleTokenHiding(): Promise; + protected _onCreate(data: LootSource, options: DocumentModificationContext, userId: string): void; + protected _onUpdate(changed: DeepPartial, options: DocumentUpdateContext, userId: string): void; + protected _onCreateEmbeddedDocuments(embeddedName: "ActiveEffect" | "Item", documents: ActiveEffectPF2e[] | ItemPF2e[], result: foundry.data.ActiveEffectSource[] | ItemSourcePF2e[], options: DocumentModificationContext, userId: string): void; + protected _onDeleteEmbeddedDocuments(embeddedName: "ActiveEffect" | "Item", documents: ActiveEffectPF2e[] | ItemPF2e[], result: foundry.data.ActiveEffectSource[] | ItemSourcePF2e[], options: DocumentModificationContext, userId: string): void; +} +interface LootPF2e extends ActorPF2e { + readonly data: LootData; + readonly saves?: never; + get hitPoints(): null; +} +export { LootPF2e }; diff --git a/types/src/module/actor/npc/document.d.ts b/types/src/module/actor/npc/document.d.ts new file mode 100644 index 000000000..17680f160 --- /dev/null +++ b/types/src/module/actor/npc/document.d.ts @@ -0,0 +1,56 @@ +import { CreaturePF2e } from "@actor"; +import { Abilities } from "@actor/creature/data"; +import { MeleePF2e } from "@item"; +import { ItemType } from "@item/data"; +import { RollNotePF2e } from "@module/notes"; +import { NPCData, NPCFlags } from "./data"; +import { NPCSheetPF2e } from "./sheet"; +import { VariantCloneParams } from "./types"; +declare class NPCPF2e extends CreaturePF2e { + get allowedItemTypes(): (ItemType | "physical")[]; + /** This NPC's ability scores */ + get abilities(): Abilities; + get description(): string; + /** Does this NPC have the Elite adjustment? */ + get isElite(): boolean; + /** Does this NPC have the Weak adjustment? */ + get isWeak(): boolean; + /** Users with limited permission can loot a dead NPC */ + canUserModify(user: User, action: UserAction): boolean; + /** A user can see a synthetic NPC in the actor directory only if they have at least Observer permission */ + get visible(): boolean; + get isLootable(): boolean; + /** Grant all users at least limited permission on dead NPCs */ + get permission(): PermissionLevel; + /** Grant players limited permission on dead NPCs */ + testUserPermission(user: User, permission: DocumentPermission | DocumentPermissionNumber, options?: { + exact?: boolean; + }): boolean; + /** Setup base ephemeral data to be modified by active effects and derived-data preparation */ + prepareBaseData(): void; + /** The NPC level needs to be known before the rest of the weak/elite adjustments */ + prepareEmbeddedDocuments(): void; + prepareDerivedData(): void; + prepareSaves(): void; + getAttackEffects(attack: MeleePF2e): Promise; + protected getHpAdjustment(level: number, adjustment: "elite" | "weak" | null): number; + /** Make the NPC elite, weak, or normal */ + applyAdjustment(adjustment: "elite" | "weak" | null): Promise; + /** Returns the base level of a creature, as this gets modified on elite and weak adjustments */ + getBaseLevel(): number; + /** Create a variant clone of this NPC, adjusting any of name, description, and images */ + variantClone(params: VariantCloneParams & { + save?: false; + }): this; + variantClone(params: VariantCloneParams & { + save: true; + }): Promise; + variantClone(params: VariantCloneParams): this | Promise; +} +interface NPCPF2e { + readonly data: NPCData; + flags: NPCFlags; + _sheet: NPCSheetPF2e | null; + get sheet(): NPCSheetPF2e; +} +export { NPCPF2e }; diff --git a/types/src/module/actor/sheet/popups/iwr-editor.d.ts b/types/src/module/actor/sheet/popups/iwr-editor.d.ts new file mode 100644 index 000000000..1ad95454a --- /dev/null +++ b/types/src/module/actor/sheet/popups/iwr-editor.d.ts @@ -0,0 +1,36 @@ +/// +/// +/// +import { ActorPF2e } from "@actor"; +import { ImmunityData, IWRSource, ResistanceData, WeaknessData } from "@actor/data/iwr"; +import { ImmunityType, ResistanceType, WeaknessType } from "@actor/types"; +declare class IWREditor extends DocumentSheet { + #private; + category: ListCategory; + types: Record; + constructor(actor: TActor, options: IWREditorConstructorOptions); + static get defaultOptions(): DocumentSheetOptions; + get id(): string; + get title(): string; + get actor(): TActor; + get categoryLabel(): string; + /** Exclude sheet selection and compendium import */ + protected _getHeaderButtons(): ApplicationHeaderButton[]; + getData(options?: Partial): Promise>; + activateListeners($html: JQuery): void; +} +interface IWREditorOptions extends DocumentSheetOptions { + category: ListCategory; +} +interface IWREditorConstructorOptions extends Partial { + category: ListCategory; +} +interface IWREditorData extends DocumentSheetData { + header: string; + category: ListCategory; + list: ImmunityData[] | WeaknessData[] | ResistanceData[]; + sourceData: IWRSource[]; + types: Record; +} +type ListCategory = "immunities" | "weaknesses" | "resistances"; +export { IWREditor }; diff --git a/types/src/module/actor/vehicle/document.d.ts b/types/src/module/actor/vehicle/document.d.ts new file mode 100644 index 000000000..90ea99659 --- /dev/null +++ b/types/src/module/actor/vehicle/document.d.ts @@ -0,0 +1,24 @@ +import { ActorDimensions } from "@actor/types"; +import { ItemType } from "@item/data"; +import { UserPF2e } from "@module/user"; +import { Statistic } from "@system/statistic"; +import { ActorPF2e, HitPointsSummary } from "../base"; +import { TokenDimensions, VehicleData, VehicleSource } from "./data"; +declare class VehiclePF2e extends ActorPF2e { + get allowedItemTypes(): (ItemType | "physical")[]; + /** Vehicle dimensions are specified for all three axes and usually do not form cubes */ + get dimensions(): ActorDimensions; + getTokenDimensions(dimensions?: Omit): TokenDimensions; + prepareBaseData(): void; + prepareDerivedData(): void; + private prepareSaves; + protected _preUpdate(changed: DeepPartial, options: DocumentModificationContext, user: UserPF2e): Promise; +} +interface VehiclePF2e { + readonly data: VehicleData; + get hitPoints(): HitPointsSummary; + saves: { + fortitude: Statistic; + }; +} +export { VehiclePF2e }; diff --git a/types/src/module/apps/hotbar.d.ts b/types/src/module/apps/hotbar.d.ts new file mode 100644 index 000000000..c912c4eea --- /dev/null +++ b/types/src/module/apps/hotbar.d.ts @@ -0,0 +1,7 @@ +import { MacroPF2e } from "@module/macro"; +declare class HotbarPF2e extends Hotbar { + #private; + /** Handle macro creation from non-macros */ + _onDrop(event: ElementDragEvent): Promise; +} +export { HotbarPF2e }; diff --git a/types/src/module/apps/sidebar/actor-directory.d.ts b/types/src/module/apps/sidebar/actor-directory.d.ts new file mode 100644 index 000000000..468ebb7fb --- /dev/null +++ b/types/src/module/apps/sidebar/actor-directory.d.ts @@ -0,0 +1,12 @@ +/// +/// +/// +import { ActorPF2e } from "@actor/base"; +/** Extend ActorDirectory to show more information */ +export declare class ActorDirectoryPF2e extends ActorDirectory { + static get defaultOptions(): SidebarDirectoryOptions; + getData(): Promise; + activateListeners($html: JQuery): void; + /** Include flattened update data so parent method can read nested update keys */ + protected _render(force?: boolean, context?: SidebarDirectoryRenderOptions): Promise; +} diff --git a/types/src/module/apps/sidebar/chat-log.d.ts b/types/src/module/apps/sidebar/chat-log.d.ts new file mode 100644 index 000000000..51c56d851 --- /dev/null +++ b/types/src/module/apps/sidebar/chat-log.d.ts @@ -0,0 +1,6 @@ +import { ChatMessagePF2e } from "@module/chat-message"; +export declare class ChatLogPF2e extends ChatLog { + /** Replace parent method in order to use DamageRoll class as needed */ + protected _processDiceCommand(command: string, matches: RegExpMatchArray[], chatData: DeepPartial, createOptions: ChatMessageModificationContext): Promise; + protected _getEntryContextOptions(): EntryContextOption[]; +} diff --git a/types/src/module/apps/sidebar/compendium-directory.d.ts b/types/src/module/apps/sidebar/compendium-directory.d.ts new file mode 100644 index 000000000..539be5a3b --- /dev/null +++ b/types/src/module/apps/sidebar/compendium-directory.d.ts @@ -0,0 +1,26 @@ +/// +/// +/// +import MiniSearch from "minisearch"; +/** Extend CompendiumDirectory to support a search bar */ +export declare class CompendiumDirectoryPF2e extends CompendiumDirectory { + #private; + readonly searchEngine: MiniSearch; + constructor(options?: ApplicationOptions); + /** Include ability to search and drag document search results */ + static get defaultOptions(): ApplicationOptions; + getData(options?: Partial): Promise; + activateListeners($html: JQuery): void; + /** Add a context menu for content search results */ + protected _contextMenu($html: JQuery): void; + /** System compendium search */ + protected _onSearchFilter(_event: KeyboardEvent, query: string): void; + /** Anyone can drag from search results */ + protected _canDragStart(): boolean; + /** Replicate the functionality of dragging a compendium document from an open `Compendium` */ + protected _onDragStart(event: ElementDragEvent): void; +} +interface CompendiumDirectoryDataPF2e extends CompendiumDirectoryData { + searchContents: boolean; +} +export {}; diff --git a/types/src/module/apps/sidebar/encounter-tracker.d.ts b/types/src/module/apps/sidebar/encounter-tracker.d.ts new file mode 100644 index 000000000..39a7de839 --- /dev/null +++ b/types/src/module/apps/sidebar/encounter-tracker.d.ts @@ -0,0 +1,25 @@ +/// +/// +/// +import { CombatantPF2e, EncounterPF2e } from "@module/encounter"; +import Sortable from "sortablejs"; +export declare class EncounterTrackerPF2e extends CombatTracker { + #private; + sortable: Sortable; + /** Make the combatants sortable */ + activateListeners($html: JQuery): void; + /** Allow CTRL-clicking to make the rolls blind */ + protected _onCombatControl(event: JQuery.ClickEvent): Promise; + /** Allow CTRL-clicking to make the roll blind */ + protected _onCombatantControl(event: JQuery.ClickEvent): Promise; + /** Replace parent method with system-specific procedure */ + protected _onToggleDefeatedStatus(combatant: CombatantPF2e): Promise; + private setInitiativeFromDrop; + /** Save the new order, or reset the viewed order if no change was made */ + private saveNewOrder; + /** Adjust the final order of combatants if necessary, keeping unrolled combatants at the bottom */ + private adjustFinalOrder; + private validateDrop; + /** Retrieve the (rolled) combatants in the real-time order as seen in the DOM */ + private getCombatantsFromDOM; +} diff --git a/types/src/module/apps/sidebar/index.d.ts b/types/src/module/apps/sidebar/index.d.ts new file mode 100644 index 000000000..e73cfcad0 --- /dev/null +++ b/types/src/module/apps/sidebar/index.d.ts @@ -0,0 +1,4 @@ +export { ActorDirectoryPF2e } from "./actor-directory"; +export { ChatLogPF2e } from "./chat-log"; +export { CompendiumDirectoryPF2e } from "./compendium-directory"; +export { EncounterTrackerPF2e } from "./encounter-tracker"; diff --git a/types/src/module/canvas/perception/hearing-source.d.ts b/types/src/module/canvas/perception/hearing-source.d.ts new file mode 100644 index 000000000..68e0b26be --- /dev/null +++ b/types/src/module/canvas/perception/hearing-source.d.ts @@ -0,0 +1,11 @@ +import { TokenPF2e } from "../token"; +/** A `PointSource` to track token hearing sense */ +declare class HearingSource extends PointSource { + static sourceType: string; + initialize(): this; + protected _getPolygonConfiguration(): PointSourcePolygonConfig; +} +interface HearingSource extends PointSource { + data: Required; +} +export { HearingSource }; diff --git a/types/src/module/chat-message/helpers.d.ts b/types/src/module/chat-message/helpers.d.ts new file mode 100644 index 000000000..c57d9b26d --- /dev/null +++ b/types/src/module/chat-message/helpers.d.ts @@ -0,0 +1,3 @@ +import { ChatContextFlag, CheckRollContextFlag } from "./data"; +declare function isCheckContextFlag(flag?: ChatContextFlag): flag is CheckRollContextFlag; +export { isCheckContextFlag }; diff --git a/types/src/module/chat-message/listeners/damage-taken.d.ts b/types/src/module/chat-message/listeners/damage-taken.d.ts new file mode 100644 index 000000000..f93326a3e --- /dev/null +++ b/types/src/module/chat-message/listeners/damage-taken.d.ts @@ -0,0 +1,3 @@ +export declare const DamageTaken: { + listen: (html: HTMLElement) => Promise; +}; diff --git a/types/src/module/chat-message/listeners/index.d.ts b/types/src/module/chat-message/listeners/index.d.ts new file mode 100644 index 000000000..087e24c3b --- /dev/null +++ b/types/src/module/chat-message/listeners/index.d.ts @@ -0,0 +1,2 @@ +export { DamageButtons } from "./damage-buttons"; +export { DamageTaken } from "./damage-taken"; diff --git a/types/src/module/item/condition/persistent-damage-dialog.d.ts b/types/src/module/item/condition/persistent-damage-dialog.d.ts new file mode 100644 index 000000000..b4b0eb53c --- /dev/null +++ b/types/src/module/item/condition/persistent-damage-dialog.d.ts @@ -0,0 +1,34 @@ +/// +/// +/// +import { ActorPF2e } from "@actor"; +import { DamageType } from "@system/damage"; +declare class PersistentDamageDialog extends Application { + #private; + private actor; + constructor(actor: ActorPF2e, options?: Partial); + static get defaultOptions(): ApplicationOptions; + /** Override to guarantee one persistent damage dialog per actor */ + get id(): string; + get title(): string; + getData(): Promise; + activateListeners($html: JQuery): void; +} +interface PersistentDialogData { + existing: DamageEntryData[]; + damageTypes: DamageTypeData[]; +} +interface DamageEntryData { + id: string; + bullet: string; + active: boolean; + formula: string; + damageType: DamageType; + dc: number; +} +interface DamageTypeData { + type: string; + iconClass: string; + label: string; +} +export { PersistentDamageDialog as PersistentDialog }; diff --git a/types/src/module/item/sheet/rule-elements/fast-healing-form.d.ts b/types/src/module/item/sheet/rule-elements/fast-healing-form.d.ts new file mode 100644 index 000000000..a5d357175 --- /dev/null +++ b/types/src/module/item/sheet/rule-elements/fast-healing-form.d.ts @@ -0,0 +1,12 @@ +import { FastHealingData, FastHealingRuleElement, FastHealingSource } from "@module/rules/rule-element/fast-healing"; +import { RuleElementForm, RuleElementFormSheetData } from "./base"; +declare class FastHealingForm extends RuleElementForm { + template: string; + activateListeners(html: HTMLElement): void; + getData(): Promise; + _updateObject(formData: Partial): void; +} +interface FastHealingSheetData extends RuleElementFormSheetData { + types: Record; +} +export { FastHealingForm }; diff --git a/types/src/module/item/sheet/rule-elements/flat-modifier-form.d.ts b/types/src/module/item/sheet/rule-elements/flat-modifier-form.d.ts new file mode 100644 index 000000000..5ed4330b9 --- /dev/null +++ b/types/src/module/item/sheet/rule-elements/flat-modifier-form.d.ts @@ -0,0 +1,31 @@ +import { FlatModifierSource } from "@module/rules/rule-element/flat-modifier"; +import { RuleElementForm } from "./base"; +/** Form handler for the flat modifier rule element */ +declare class FlatModifierForm extends RuleElementForm { + template: string; + activateListeners(html: HTMLElement): void; + getData(): Promise<{ + selectorIsArray: boolean; + abilities: { + str: string; + dex: string; + con: string; + int: string; + wis: string; + cha: string; + }; + types: ("item" | "status" | "untyped" | "ability" | "circumstance" | "potency" | "proficiency")[]; + damageCategories: Pick, "persistent" | "precision" | "splash">; + isDamage: boolean; + value: { + mode: string; + data: unknown; + }; + item: import("../../base").ItemPF2e; + index: number; + rule: FlatModifierSource; + object: import("../../../rules/rule-element/base").RuleElementPF2e | null; + }>; + _updateObject(formData: Partial): void; +} +export { FlatModifierForm }; diff --git a/types/src/module/item/sheet/rule-elements/grant-item-form.d.ts b/types/src/module/item/sheet/rule-elements/grant-item-form.d.ts new file mode 100644 index 000000000..43f43da98 --- /dev/null +++ b/types/src/module/item/sheet/rule-elements/grant-item-form.d.ts @@ -0,0 +1,16 @@ +import { GrantItemSource } from "@module/rules/rule-element/grant-item/rule-element"; +import { RuleElementForm } from "./base"; +/** Form handler for the GrantItem rule element */ +declare class GrantItemForm extends RuleElementForm { + template: string; + getData(): Promise<{ + granted: ClientDocument | null; + allowDuplicate: {}; + item: import("../../base").ItemPF2e; + index: number; + rule: GrantItemSource; + object: import("../../../rules/rule-element/base").RuleElementPF2e | null; + }>; + _updateObject(ruleData: DeepPartial): void; +} +export { GrantItemForm }; diff --git a/types/src/module/item/sheet/rule-elements/roll-note-form.d.ts b/types/src/module/item/sheet/rule-elements/roll-note-form.d.ts new file mode 100644 index 000000000..30c2fbe6c --- /dev/null +++ b/types/src/module/item/sheet/rule-elements/roll-note-form.d.ts @@ -0,0 +1,9 @@ +import { RuleElementForm } from "./base"; +/** Form handler for the RollNote rule element */ +declare class RollNoteForm extends RuleElementForm { + private html; + template: string; + activateListeners(html: HTMLElement): void; + _updateObject(ruleData: Partial>): void; +} +export { RollNoteForm }; diff --git a/types/src/module/item/spellcasting-entry/document.d.ts b/types/src/module/item/spellcasting-entry/document.d.ts new file mode 100644 index 000000000..90f2e18ec --- /dev/null +++ b/types/src/module/item/spellcasting-entry/document.d.ts @@ -0,0 +1,61 @@ +import { AbilityString } from "@actor/types"; +import { ItemPF2e, PhysicalItemPF2e, SpellPF2e } from "@item"; +import { MagicTradition } from "@item/spell/types"; +import { ZeroToFour } from "@module/data"; +import { UserPF2e } from "@module/user"; +import { Statistic } from "@system/statistic"; +import { SpellCollection } from "./collection"; +import { SpellcastingAbilityData, SpellcastingEntry, SpellcastingEntryData, SpellcastingEntryListData, SpellcastingEntryPF2eCastOptions } from "./data"; +declare class SpellcastingEntryPF2e extends ItemPF2e implements SpellcastingEntry { + spells: SpellCollection | null; + /** Spellcasting attack and dc data created during actor preparation */ + statistic: Statistic; + get ability(): AbilityString; + /** This entry's magic tradition, null if the spell's tradition should be used instead */ + get tradition(): MagicTradition | null; + /** + * Returns the proficiency used for calculations. + * For innate spells, this is the highest spell proficiency (min trained) + */ + get rank(): ZeroToFour; + get isPrepared(): boolean; + get isFlexible(): boolean; + get isSpontaneous(): boolean; + get isInnate(): boolean; + get isFocusPool(): boolean; + get isRitual(): boolean; + get highestLevel(): number; + prepareBaseData(): void; + prepareSiblingData(): void; + prepareActorData(this: Embedded): void; + /** All spells associated with this spellcasting entry on the actor that should also be deleted */ + getLinkedItems(): Embedded[]; + /** Returns if the spell is valid to cast by this spellcasting entry */ + canCastSpell(spell: SpellPF2e, options?: { + origin?: PhysicalItemPF2e; + }): boolean; + /** Casts the given spell as if it was part of this spellcasting entry */ + cast(spell: Embedded, options?: SpellcastingEntryPF2eCastOptions): Promise; + consume(spell: SpellPF2e, level: number, slot?: number): Promise; + /** + * Adds a spell to this spellcasting entry, either moving it from another one if its the same actor, + * or creating a new spell if its not. + */ + addSpell(spell: SpellPF2e, options?: { + slotLevel?: number; + }): Promise; + /** Saves the prepared spell slot data to the spellcasting entry */ + prepareSpell(spell: SpellPF2e, slotLevel: number, spellSlot: number): Promise; + /** Removes the spell slot and updates the spellcasting entry */ + unprepareSpell(spellLevel: number, slotLevel: number): Promise; + /** Sets the expended state of a spell slot and updates the spellcasting entry */ + setSlotExpendedState(slotLevel: number, spellSlot: number, isExpended: boolean): Promise; + /** Returns rendering data to display the spellcasting entry in the sheet */ + getSpellData(): Promise; + getRollOptions(prefix?: string): string[]; + protected _preUpdate(changed: DeepPartial, options: DocumentModificationContext, user: UserPF2e): Promise; +} +interface SpellcastingEntryPF2e { + readonly data: SpellcastingEntryData; +} +export { SpellcastingEntryPF2e }; diff --git a/types/src/module/migration/migrations/801-color-darkvision.d.ts b/types/src/module/migration/migrations/801-color-darkvision.d.ts new file mode 100644 index 000000000..b558570d7 --- /dev/null +++ b/types/src/module/migration/migrations/801-color-darkvision.d.ts @@ -0,0 +1,8 @@ +import { ItemSourcePF2e } from "@item/data"; +import { MigrationBase } from "../base"; +/** Add color darkvision flags to fetchlings and the Resonant Reflection of Life */ +export declare class Migration801ColorDarkvision extends MigrationBase { + #private; + static version: number; + updateItem(source: ItemSourcePF2e): Promise; +} diff --git a/types/src/module/migration/migrations/802-strip-feat-action-category.d.ts b/types/src/module/migration/migrations/802-strip-feat-action-category.d.ts new file mode 100644 index 000000000..36a5b5c5e --- /dev/null +++ b/types/src/module/migration/migrations/802-strip-feat-action-category.d.ts @@ -0,0 +1,6 @@ +import { ItemSourcePF2e } from "@item/data"; +import { MigrationBase } from "../base"; +export declare class Migration802StripFeatActionCategory extends MigrationBase { + static version: number; + updateItem(source: ItemSourcePF2e): Promise; +} diff --git a/types/src/module/migration/migrations/803-normalize-spell-area.d.ts b/types/src/module/migration/migrations/803-normalize-spell-area.d.ts new file mode 100644 index 000000000..e504392aa --- /dev/null +++ b/types/src/module/migration/migrations/803-normalize-spell-area.d.ts @@ -0,0 +1,15 @@ +import { ItemSourcePF2e } from "@item/data"; +import { MigrationBase } from "../base"; +/** Ensure spell-area values are numbers, null out area object if not in use */ +export declare class Migration803NormalizeSpellArea extends MigrationBase { + #private; + static version: number; + updateItem(source: MaybeWithAreasize): Promise; +} +type MaybeWithAreasize = ItemSourcePF2e & { + system: { + areasize?: unknown; + "-=areasize"?: unknown; + }; +}; +export {}; diff --git a/types/src/module/migration/migrations/804-remove-consumable-properties.d.ts b/types/src/module/migration/migrations/804-remove-consumable-properties.d.ts new file mode 100644 index 000000000..8cd6d8734 --- /dev/null +++ b/types/src/module/migration/migrations/804-remove-consumable-properties.d.ts @@ -0,0 +1,6 @@ +import { ItemSourcePF2e } from "@item/data"; +import { MigrationBase } from "../base"; +export declare class Migration804RemoveConsumableProperties extends MigrationBase { + static version: number; + updateItem(source: ItemSourcePF2e): Promise; +} diff --git a/types/src/module/migration/migrations/805-inline-damage-formulas.d.ts b/types/src/module/migration/migrations/805-inline-damage-formulas.d.ts new file mode 100644 index 000000000..f428409d3 --- /dev/null +++ b/types/src/module/migration/migrations/805-inline-damage-formulas.d.ts @@ -0,0 +1,11 @@ +import { ActorSourcePF2e } from "@actor/data"; +import { ItemSourcePF2e } from "@item/data"; +import { MigrationBase } from "../base"; +/** Update inline damage-roll links to be formatted to new standard */ +export declare class Migration805InlineDamageRolls extends MigrationBase { + #private; + static version: number; + updateActor(source: ActorSourcePF2e): Promise; + updateItem(source: ItemSourcePF2e): Promise; + updateJournalEntry(source: foundry.data.JournalEntrySource): Promise; +} diff --git a/types/src/module/migration/migrations/806-torch-improvised-othertags.d.ts b/types/src/module/migration/migrations/806-torch-improvised-othertags.d.ts new file mode 100644 index 000000000..0dd5f02d7 --- /dev/null +++ b/types/src/module/migration/migrations/806-torch-improvised-othertags.d.ts @@ -0,0 +1,7 @@ +import { ItemSourcePF2e } from "@item/data"; +import { MigrationBase } from "../base"; +/** Move torch improvised from traits to otherTags */ +export declare class Migration806TorchImprovisedOtherTags extends MigrationBase { + static version: number; + updateItem(source: ItemSourcePF2e): Promise; +} diff --git a/types/src/module/migration/migrations/807-rm-activated-effect-fields.d.ts b/types/src/module/migration/migrations/807-rm-activated-effect-fields.d.ts new file mode 100644 index 000000000..d824d626c --- /dev/null +++ b/types/src/module/migration/migrations/807-rm-activated-effect-fields.d.ts @@ -0,0 +1,14 @@ +import { ItemSourcePF2e } from "@item/data"; +import { MigrationBase } from "../base"; +/** Remove properties from unused "activatedEffect" template defaults */ +export declare class Migration807RMActivatedEffectFields extends MigrationBase { + static version: number; + updateItem(source: ItemSourceWithDeletions): Promise; +} +type ActivatedEffectKey = "activation" | "duration" | "range" | "target" | "uses"; +type ItemSourceWithDeletions = ItemSourcePF2e & { + system: { + [K in ActivatedEffectKey | `-=${ActivatedEffectKey}`]?: unknown; + }; +}; +export {}; diff --git a/types/src/module/migration/migrations/808-count-damage-dice.d.ts b/types/src/module/migration/migrations/808-count-damage-dice.d.ts new file mode 100644 index 000000000..3fad3c9be --- /dev/null +++ b/types/src/module/migration/migrations/808-count-damage-dice.d.ts @@ -0,0 +1,7 @@ +import { ItemSourcePF2e } from "@item/data"; +import { MigrationBase } from "../base"; +/** Have REs counting dice damage via "1 + @weapon.system.runes.striking" instead use "@weapon.system.damage.dice" */ +export declare class Migration808CountDamageDice extends MigrationBase { + static version: number; + updateItem(source: ItemSourcePF2e): Promise; +} diff --git a/types/src/module/migration/migrations/809-automaton-enhancements.d.ts b/types/src/module/migration/migrations/809-automaton-enhancements.d.ts new file mode 100644 index 000000000..98f676001 --- /dev/null +++ b/types/src/module/migration/migrations/809-automaton-enhancements.d.ts @@ -0,0 +1,8 @@ +import { ItemSourcePF2e } from "@item/data"; +import { MigrationBase } from "../base"; +/** Add base REs to Automaton anncestry to allow for automation of enhancements */ +export declare class Migration809AutomatonEnhancements extends MigrationBase { + #private; + static version: number; + updateItem(source: ItemSourcePF2e): Promise; +} diff --git a/types/src/module/migration/migrations/810-loot-description-value.d.ts b/types/src/module/migration/migrations/810-loot-description-value.d.ts new file mode 100644 index 000000000..21d6442d8 --- /dev/null +++ b/types/src/module/migration/migrations/810-loot-description-value.d.ts @@ -0,0 +1,7 @@ +import { ActorSourcePF2e } from "@actor/data"; +import { MigrationBase } from "../base"; +/** Remove value property from loot actor description */ +export declare class Migration810LootDescriptionValue extends MigrationBase { + static version: number; + updateActor(source: ActorSourcePF2e): Promise; +} diff --git a/types/src/module/migration/migrations/811-inline-damage-rolls-persistent.d.ts b/types/src/module/migration/migrations/811-inline-damage-rolls-persistent.d.ts new file mode 100644 index 000000000..668f2e3b3 --- /dev/null +++ b/types/src/module/migration/migrations/811-inline-damage-rolls-persistent.d.ts @@ -0,0 +1,11 @@ +import { ActorSourcePF2e } from "@actor/data"; +import { ItemSourcePF2e } from "@item/data"; +import { MigrationBase } from "../base"; +/** Update persistent damage roll links to also be formatted to new standard */ +export declare class Migration811InlineDamageRollsPersistent extends MigrationBase { + #private; + static version: number; + updateActor(source: ActorSourcePF2e): Promise; + updateItem(source: ItemSourcePF2e): Promise; + updateJournalEntry(source: foundry.data.JournalEntrySource): Promise; +} diff --git a/types/src/module/migration/migrations/812-restructure-iwr.d.ts b/types/src/module/migration/migrations/812-restructure-iwr.d.ts new file mode 100644 index 000000000..e864a1be7 --- /dev/null +++ b/types/src/module/migration/migrations/812-restructure-iwr.d.ts @@ -0,0 +1,11 @@ +import { ActorSourcePF2e } from "@actor/data"; +import { ItemSourcePF2e } from "@item/data"; +import { MigrationBase } from "../base"; +/** Move IWR data to `actor.system.attributes` */ +export declare class Migration812RestructureIWR extends MigrationBase { + #private; + static version: number; + updateActor(source: ActorSourcePF2e): Promise; + /** Sluggify precious material types, normalize precious material grades */ + updateItem(source: ItemSourcePF2e): Promise; +} diff --git a/types/src/module/rules/helpers.d.ts b/types/src/module/rules/helpers.d.ts new file mode 100644 index 000000000..6c6808229 --- /dev/null +++ b/types/src/module/rules/helpers.d.ts @@ -0,0 +1,21 @@ +import { ActorPF2e } from "@actor"; +import { DamageDicePF2e, DeferredValueParams, ModifierAdjustment, ModifierPF2e } from "@actor/modifiers"; +import { RollNotePF2e } from "@module/notes"; +import { DegreeOfSuccessAdjustment } from "@system/degree-of-success"; +import { RollTwiceOption } from "@system/rolls"; +import { BracketedValue } from "./rule-element/data"; +import { DamageDiceSynthetics, RollSubstitution, RollTwiceSynthetic, RuleElementSynthetics } from "./synthetics"; +/** Extracts a list of all cloned modifiers across all given keys in a single list. */ +declare function extractModifiers(synthetics: Pick, selectors: string[], options?: DeferredValueParams): ModifierPF2e[]; +declare function extractModifierAdjustments(adjustmentsRecord: RuleElementSynthetics["modifierAdjustments"], selectors: string[], slug: string): ModifierAdjustment[]; +/** Extracts a list of all cloned notes across all given keys in a single list. */ +declare function extractNotes(rollNotes: Record, selectors: string[]): RollNotePF2e[]; +declare function extractDamageDice(deferredDice: DamageDiceSynthetics, selectors: string[], options?: DeferredValueParams): DamageDicePF2e[]; +declare function extractRollTwice(rollTwices: Record, selectors: string[], options: Set): RollTwiceOption; +declare function extractRollSubstitutions(substitutions: Record, domains: string[], rollOptions: Set): RollSubstitution[]; +declare function extractDegreeOfSuccessAdjustments(synthetics: Pick, selectors: string[]): DegreeOfSuccessAdjustment[]; +declare function isBracketedValue(value: unknown): value is BracketedValue; +declare function processPreUpdateActorHooks(changed: DocumentUpdateData, { pack }: { + pack: string | null; +}): Promise; +export { extractDamageDice, extractDegreeOfSuccessAdjustments, extractModifierAdjustments, extractModifiers, extractNotes, extractRollSubstitutions, extractRollTwice, isBracketedValue, processPreUpdateActorHooks, }; diff --git a/types/src/module/rules/rule-element/grant-item/rule-element.d.ts b/types/src/module/rules/rule-element/grant-item/rule-element.d.ts new file mode 100644 index 000000000..8bdae9204 --- /dev/null +++ b/types/src/module/rules/rule-element/grant-item/rule-element.d.ts @@ -0,0 +1,52 @@ +import { ActorType } from "@actor/data"; +import { ItemPF2e } from "@item"; +import { ItemSourcePF2e } from "@item/data"; +import { ItemGrantDeleteAction } from "@item/data/base"; +import { RuleElementPF2e, RuleElementSource } from ".."; +import { RuleElementOptions } from "../base"; +declare class GrantItemRuleElement extends RuleElementPF2e { + #private; + static validActorTypes: ActorType[]; + /** The UUID of the item to grant: must be a compendium or world item */ + uuid: string; + /** Whether the granted item should replace the granting item */ + protected replaceSelf: boolean; + /** Permit this grant to be applied during an actor update--if it isn't already granted and the predicate passes */ + protected reevaluateOnUpdate: boolean; + /** Allow multiple of the same item (as determined by source ID) to be granted */ + protected allowDuplicate: boolean; + /** The id of the granted item */ + grantedId: string | null; + /** A flag for referencing the granted item ID in other rule elements */ + flag: string | null; + /** + * If the granted item has a `ChoiceSet`, its selection may be predetermined. The key of the record must be the + * `ChoiceSet`'s designated `flag` property. + */ + preselectChoices: Record; + onDeleteActions: Partial | null; + constructor(data: GrantItemSource, item: Embedded, options?: RuleElementOptions); + static ON_DELETE_ACTIONS: readonly ["cascade", "detach", "restrict"]; + preCreate(args: RuleElementPF2e.PreCreateParams): Promise; + /** Grant an item if this rule element permits it and the predicate passes */ + preUpdateActor(): Promise<{ + create: ItemSourcePF2e[]; + delete: string[]; + }>; + /** Run the preCreate callbacks of REs from the granted item */ + private runGrantedItemPreCreates; +} +interface GrantItemSource extends RuleElementSource { + uuid?: unknown; + replaceSelf?: unknown; + preselectChoices?: unknown; + reevaluateOnUpdate?: unknown; + allowDuplicate?: unknown; + onDeleteActions?: unknown; + flag?: unknown; +} +interface OnDeleteActions { + granter: ItemGrantDeleteAction; + grantee: ItemGrantDeleteAction; +} +export { GrantItemRuleElement, GrantItemSource }; diff --git a/types/src/module/system/damage/formula.d.ts b/types/src/module/system/damage/formula.d.ts new file mode 100644 index 000000000..10a5cdab5 --- /dev/null +++ b/types/src/module/system/damage/formula.d.ts @@ -0,0 +1,8 @@ +import { DegreeOfSuccessIndex, DEGREE_OF_SUCCESS } from "@system/degree-of-success"; +import { DamageFormulaData } from "./types"; +/** Convert the damage definition into a final formula, depending on whether the hit is a critical or not. */ +declare function createDamageFormula(damage: DamageFormulaData, degree: typeof DEGREE_OF_SUCCESS["SUCCESS" | "CRITICAL_SUCCESS"]): string; +declare function createDamageFormula(damage: DamageFormulaData): string; +declare function createDamageFormula(damage: DamageFormulaData, degree: typeof DEGREE_OF_SUCCESS.CRITICAL_FAILURE): null; +declare function createDamageFormula(damage: DamageFormulaData, degree?: DegreeOfSuccessIndex): string | null; +export { createDamageFormula }; diff --git a/types/src/module/system/damage/iwr.d.ts b/types/src/module/system/damage/iwr.d.ts new file mode 100644 index 000000000..de51cd3e1 --- /dev/null +++ b/types/src/module/system/damage/iwr.d.ts @@ -0,0 +1,30 @@ +import { ActorPF2e } from "@actor"; +import { DamageRoll } from "./roll"; +/** Apply an actor's IWR applications to an evaluated damage roll's instances */ +declare function applyIWR(actor: ActorPF2e, roll: Rolled): IWRApplicationData; +interface IWRApplicationData { + finalDamage: number; + applications: IWRApplication[]; +} +interface UnafectedApplication { + category: "unaffected"; + type: string; + adjustment: number; +} +interface ImmunityApplication { + category: "immunity"; + type: string; + adjustment: number; +} +interface WeaknessApplication { + category: "weakness"; + type: string; + adjustment: number; +} +interface ResistanceApplication { + category: "resistance"; + type: string; + adjustment: number; +} +type IWRApplication = UnafectedApplication | ImmunityApplication | WeaknessApplication | ResistanceApplication; +export { IWRApplication, IWRApplicationData, applyIWR }; diff --git a/types/src/module/system/damage/terms.d.ts b/types/src/module/system/damage/terms.d.ts new file mode 100644 index 000000000..ef0548af8 --- /dev/null +++ b/types/src/module/system/damage/terms.d.ts @@ -0,0 +1,52 @@ +import { DamageInstance } from "./roll"; +declare class ArithmeticExpression extends RollTerm { + operator: ArithmeticOperator; + operands: RollTerm[]; + constructor(termData: ArithmeticExpressionData); + static SERIALIZE_ATTRIBUTES: string[]; + static totalOf(operator: ArithmeticOperator, left: number, right: number): number; + get dice(): DiceTerm[]; + get expression(): string; + get total(): number | undefined; + get isDeterministic(): boolean; + get expectedValue(): number; + /** Construct a string for an HTML rendering of this term */ + render(): DocumentFragment; + protected _evaluate(options?: { + minimize?: boolean; + maximize?: boolean; + }): Promise>; + protected _evaluateSync(): never; +} +type ArithmeticOperator = "+" | "-" | "*" | "/" | "%"; +/** A parenthetically-exclosed expression as a single arithmetic term or number */ +declare class Grouping extends RollTerm { + term: RollTerm; + constructor(termData: GroupingData); + static SERIALIZE_ATTRIBUTES: string[]; + get dice(): DiceTerm[]; + get expression(): string; + get total(): number | undefined; + get isDeterministic(): boolean; + get expectedValue(): number; + protected _evaluate(options?: { + minimize?: boolean; + maximize?: boolean; + }): Promise>; + protected _evaluateSync(): never; +} +declare class InstancePool extends PoolTerm { + /** Work around upstream bug in which method attempts to construct `Roll`s from display formulas */ + static fromRolls(this: ConstructorOf, rolls?: Roll[]): TTerm; +} +interface InstancePool extends PoolTerm { + rolls: DamageInstance[]; +} +interface ArithmeticExpressionData extends RollTermData { + operator: ArithmeticOperator; + operands: [RollTermData, RollTermData]; +} +interface GroupingData extends RollTermData { + term: RollTermData; +} +export { ArithmeticExpression, Grouping, InstancePool }; diff --git a/types/src/module/system/settings/homebrew/data.d.ts b/types/src/module/system/settings/homebrew/data.d.ts new file mode 100644 index 000000000..ffcb7e141 --- /dev/null +++ b/types/src/module/system/settings/homebrew/data.d.ts @@ -0,0 +1,30 @@ +import { BaseWeaponType } from "@item"; +import { MenuTemplateData, SettingsTemplateData } from "../menu"; +declare const HOMEBREW_TRAIT_KEYS: readonly ["creatureTraits", "featTraits", "languages", "magicSchools", "spellTraits", "weaponCategories", "weaponGroups", "baseWeapons", "weaponTraits", "equipmentTraits"]; +/** Homebrew elements from some of the above records are propagated to related records */ +declare const SECONDARY_TRAIT_RECORDS: { + readonly creatureTraits: readonly ["ancestryItemTraits"]; + readonly equipmentTraits: readonly ["armorTraits", "consumableTraits"]; + readonly featTraits: readonly ["actionTraits"]; + readonly weaponTraits: readonly ["npcAttackTraits"]; +}; +type HomebrewTraitKey = typeof HOMEBREW_TRAIT_KEYS[number]; +type HomebrewKey = HomebrewTraitKey | "damageTypes"; +type HomebrewTraitSettingsKey = `homebrew.${HomebrewTraitKey}`; +interface HomebrewTag { + id: T extends "baseWeapons" ? BaseWeaponType : T extends Exclude ? keyof ConfigPF2e["PF2E"][T] : never; + value: string; +} +type MainDamageCategories = "physical" | "energy"; +interface CustomDamageData { + slug?: string; + label: string; + category: MainDamageCategories; + icon: string | null; +} +interface HomebrewElementsSheetData extends MenuTemplateData { + traitSettings: Record; + damageCategories: Record; + customDamageTypes: CustomDamageData[]; +} +export { CustomDamageData, HOMEBREW_TRAIT_KEYS, HomebrewElementsSheetData, HomebrewKey, HomebrewTag, HomebrewTraitKey, HomebrewTraitSettingsKey, SECONDARY_TRAIT_RECORDS, }; diff --git a/types/src/scripts/config/iwr.d.ts b/types/src/scripts/config/iwr.d.ts new file mode 100644 index 000000000..a1e654e4f --- /dev/null +++ b/types/src/scripts/config/iwr.d.ts @@ -0,0 +1,199 @@ +declare const immunityTypes: { + acid: string; + adamantine: string; + air: string; + "area-damage": string; + auditory: string; + bleed: string; + blinded: string; + bludgeoning: string; + chaotic: string; + clumsy: string; + cold: string; + "cold-iron": string; + confused: string; + conjuration: string; + controlled: string; + "critical-hits": string; + curse: string; + darkwood: string; + dazzled: string; + deafened: string; + "death-effects": string; + disease: string; + doomed: string; + drained: string; + earth: string; + electricity: string; + emotion: string; + enchantment: string; + energy: string; + enfeebled: string; + evil: string; + evocation: string; + fascinated: string; + fatigued: string; + "fear-effects": string; + fire: string; + "flat-footed": string; + fleeing: string; + force: string; + frightened: string; + good: string; + grabbed: string; + healing: string; + illusion: string; + immobilized: string; + inhaled: string; + lawful: string; + light: string; + magic: string; + mental: string; + "misfortune-effects": string; + mithral: string; + necromancy: string; + negative: string; + "non-magical": string; + "nonlethal-attacks": string; + "object-immunities": string; + olfactory: string; + orichalcum: string; + paralyzed: string; + petrified: string; + physical: string; + piercing: string; + poison: string; + polymorph: string; + positive: string; + possession: string; + precision: string; + prone: string; + restrained: string; + "salt-water": string; + scrying: string; + sickened: string; + silver: string; + slashing: string; + sleep: string; + slowed: string; + sonic: string; + "spell-deflection": string; + stunned: string; + stupefied: string; + "swarm-attacks": string; + "swarm-mind": string; + transmutation: string; + trip: string; + "unarmed-attacks": string; + unconscious: string; + visual: string; + water: string; +}; +declare const weaknessTypes: { + acid: string; + adamantine: string; + air: string; + "area-damage": string; + "arrow-vulnerability": string; + "axe-vulnerability": string; + bleed: string; + bludgeoning: string; + chaotic: string; + cold: string; + "cold-iron": string; + "critical-hits": string; + darkwood: string; + earth: string; + electricity: string; + emotion: string; + energy: string; + evil: string; + fire: string; + force: string; + "ghost-touch": string; + good: string; + lawful: string; + light: string; + magical: string; + mental: string; + metal: string; + mithral: string; + negative: string; + "non-magical": string; + "nonlethal-attacks": string; + orichalcum: string; + physical: string; + piercing: string; + poison: string; + positive: string; + precision: string; + radiation: string; + salt: string; + "salt-water": string; + silver: string; + slashing: string; + sonic: string; + "splash-damage": string; + "unarmed-attacks": string; + "vampire-weaknesses": string; + vorpal: string; + "vorpal-fear": string; + "vulnerable-to-sunlight": string; + warpglass: string; + water: string; + weapons: string; + "weapons-shedding-bright-light": string; +}; +declare const resistanceTypes: { + acid: string; + adamantine: string; + air: string; + "all-damage": string; + "area-damage": string; + bleed: string; + bludgeoning: string; + chaotic: string; + cold: string; + "cold-iron": string; + "critical-hits": string; + darkwood: string; + earth: string; + electricity: string; + energy: string; + evil: string; + fire: string; + force: string; + "ghost-touch": string; + good: string; + lawful: string; + light: string; + magical: string; + mental: string; + metal: string; + mithral: string; + negative: string; + "non-magical": string; + nonlethal: string; + "nonlethal-attacks": string; + orichalcum: string; + physical: string; + piercing: string; + plant: string; + poison: string; + positive: string; + precision: string; + "protean-anatomy": string; + radiation: string; + salt: string; + "salt-water": string; + silver: string; + slashing: string; + sonic: string; + "unarmed-attacks": string; + vorpal: string; + warpglass: string; + water: string; + weapons: string; + "weapons-shedding-bright-light": string; +}; +export { immunityTypes, weaknessTypes, resistanceTypes }; diff --git a/types/src/scripts/macros/edit-persistent.d.ts b/types/src/scripts/macros/edit-persistent.d.ts new file mode 100644 index 000000000..3e88c369d --- /dev/null +++ b/types/src/scripts/macros/edit-persistent.d.ts @@ -0,0 +1,2 @@ +import { ActionDefaultOptions } from "@system/action-macros"; +export declare function editPersistent(options: ActionDefaultOptions): Promise; diff --git a/types/tests/fakes/journal-entry.d.ts b/types/tests/fakes/journal-entry.d.ts new file mode 100644 index 000000000..e55fb227c --- /dev/null +++ b/types/tests/fakes/journal-entry.d.ts @@ -0,0 +1,5 @@ +export declare class FakeJournalEntry { + _source: foundry.data.JournalEntrySource; + readonly pages: object[]; + constructor(source: foundry.data.JournalEntrySource); +} diff --git a/types/types/foundry/client/application/base.d.ts b/types/types/foundry/client/application/base.d.ts index c0ebe3aa8..28be87010 100644 --- a/types/types/foundry/client/application/base.d.ts +++ b/types/types/foundry/client/application/base.d.ts @@ -262,7 +262,7 @@ declare global { * Take no action for applications which are not of the pop-out variety or are already maximized * @return A Promise which resolves to true once the maximization action has completed */ - maximise(): Promise; + maximize(): Promise; /** * Set the application position and store it's new location diff --git a/types/types/foundry/client/application/form-application/base.d.ts b/types/types/foundry/client/application/form-application/base.d.ts index f79651a20..c67dc1270 100644 --- a/types/types/foundry/client/application/form-application/base.d.ts +++ b/types/types/foundry/client/application/form-application/base.d.ts @@ -90,6 +90,13 @@ declare global { */ protected _getSubmitData(updateData?: Record): Record; + /** + * Handle changes to an input element, submitting the form if options.submitOnChange is true. + * Do not preventDefault in this handler as other interactions on the form may also be occurring. + * @param event The initial change event + */ + protected _onChangeInput(event: Event): Promise; + /** * Handle unfocusing an input on form - maybe trigger an update if ``options.liveUpdate`` has been set to true * @param event The initial triggering event diff --git a/types/types/foundry/client/application/form-application/document-sheet/item-sheet.d.ts b/types/types/foundry/client/application/form-application/document-sheet/item-sheet.d.ts index 8979646c6..7aa715349 100644 --- a/types/types/foundry/client/application/form-application/document-sheet/item-sheet.d.ts +++ b/types/types/foundry/client/application/form-application/document-sheet/item-sheet.d.ts @@ -19,7 +19,7 @@ declare class ItemSheet extends DocumentSheet static override get defaultOptions(): DocumentSheetOptions; - override get id(): `item-${string}` | `actor-${string}-item-{string}`; + override get id(): string; /** * A convenience reference to the Item entity diff --git a/types/types/foundry/client/application/form-application/token-config.d.ts b/types/types/foundry/client/application/form-application/token-config.d.ts index 8cd44637e..51e35e477 100644 --- a/types/types/foundry/client/application/form-application/token-config.d.ts +++ b/types/types/foundry/client/application/form-application/token-config.d.ts @@ -34,6 +34,18 @@ declare class TokenConfig< protected override _getSubmitData(updateData?: Record | null): Record; + protected override _onChangeInput(event: Event): Promise; + + /** + * Mimic changes to the Token document as if they were true document updates. + * @param change Data which simulates a document update + * @param [reset=false] To know if this preview change is a reset + */ + protected _previewChanges(change: Record, reset?: boolean): void; + + /** Reset the temporary preview of the Token when the form is submitted or closed. */ + protected _resetPreview(): void; + protected override _updateObject(event: Event, formData: Record): Promise; /** diff --git a/types/types/foundry/client/application/sidebar/sidebar-tab/chat-log.d.ts b/types/types/foundry/client/application/sidebar/sidebar-tab/chat-log.d.ts index 39f41d886..851dfaec1 100644 --- a/types/types/foundry/client/application/sidebar/sidebar-tab/chat-log.d.ts +++ b/types/types/foundry/client/application/sidebar/sidebar-tab/chat-log.d.ts @@ -124,6 +124,20 @@ declare class ChatLog extends Si */ protected processMessage(message: string): Promise; + /** + * Process messages which are posted using a dice-roll command + * @param command The chat command type + * @param matches Multi-line matched roll expressions + * @param chatData The initial chat data + * @param createOptions Options used to create the message + */ + protected _processDiceCommand( + command: string, + matches: RegExpMatchArray[], + chatData: DeepPartial, + createOptions: ChatMessageModificationContext + ): Promise; + /** * Get the ChatLog entry context options * @return The sidebar entry context options diff --git a/types/types/foundry/client/config.d.ts b/types/types/foundry/client/config.d.ts index dd2251d22..668847a31 100644 --- a/types/types/foundry/client/config.d.ts +++ b/types/types/foundry/client/config.d.ts @@ -460,11 +460,12 @@ declare global { types: (typeof Die | typeof DiceTerm)[]; rollModes: Record; rolls: ConstructorOf[]; - termTypes: Record>; + termTypes: Record & { fromData(data: object): RollTerm }>; terms: { c: typeof Coin; d: typeof Die; f: typeof FateDie; + [key: string]: ConstructorOf; }; randomUniform: Function; }; diff --git a/types/types/foundry/client/core/text-editor.d.ts b/types/types/foundry/client/core/text-editor.d.ts index 06b7a2775..fbc92737d 100644 --- a/types/types/foundry/client/core/text-editor.d.ts +++ b/types/types/foundry/client/core/text-editor.d.ts @@ -115,21 +115,17 @@ declare global { /** * Replace an inline roll formula with a rollable <a> element or an eagerly evaluated roll result - * @param match The matched string - * @param command An optional command - * @param formula The matched formula - * @param closing The closing brackets for the inline roll - * @param [label] An optional label which configures the button text - * @return The replaced match - */ - protected static _createInlineRoll( - match: string, - command: string, - formula: string, - closing: string, - label: string, - ...args: RollData[] - ): HTMLAnchorElement | null; + * @param match The regular expression match array + * @param rollData Provided roll data for use in roll evaluation + * @param [options] Additional options to configure enrichment behaviour + * @returns The replaced match, returned as a Promise if async was true and the message contained an + * immediate inline roll. + */ + static _createInlineRoll( + match: RegExpMatchArray, + rollData: Record, + options?: EvaluateRollParams + ): HTMLAnchorElement | null | Promise; /* -------------------------------------------- */ /* Event Listeners and Handlers */ @@ -144,7 +140,7 @@ declare global { * Handle left-mouse clicks on an inline roll, dispatching the formula or displaying the tooltip * @param event The initiating click event */ - protected static _onClickInlineRoll(event: MouseEvent): Promise; + static _onClickInlineRoll(event: MouseEvent): Promise; /** * Toggle playing or stopping an embedded {@link PlaylistSound} link. diff --git a/types/types/foundry/client/documents/chat-message.d.ts b/types/types/foundry/client/documents/chat-message.d.ts index 76d0cb733..9406281a4 100644 --- a/types/types/foundry/client/documents/chat-message.d.ts +++ b/types/types/foundry/client/documents/chat-message.d.ts @@ -137,7 +137,7 @@ declare global { * Obtain an Actor instance which represents the speaker of this message (if any) * @param speaker The speaker data object */ - static getSpeakerActor(speaker: foundry.data.ChatSpeakerSource | foundry.data.ChatSpeakerData): Actor | null; + static getSpeakerActor(speaker: DeepPartial): Actor | null; /** Obtain a data object used to evaluate any dice rolls associated with this particular chat message */ getRollData(): object; diff --git a/types/types/foundry/client/pixi/helpers/point-source/base.d.ts b/types/types/foundry/client/pixi/helpers/point-source/base.d.ts index cf2a35e0b..cd27ade79 100644 --- a/types/types/foundry/client/pixi/helpers/point-source/base.d.ts +++ b/types/types/foundry/client/pixi/helpers/point-source/base.d.ts @@ -1,11 +1,14 @@ export {}; declare global { - /** An extension of the default PIXI.Polygon which is used to represent the line of sight for a point source. */ + /** + * A helper class used by the Sight Layer to represent a source of vision or illumination. + * @param object The object responsible for the PointSource + */ abstract class PointSource { constructor(object: TObject); - /** The object responsible for this source. */ + /** The PlaceableObject which is the origin of this PointSource. */ object: TObject; /** @@ -14,14 +17,14 @@ declare global { */ static sourceType: string; - /** The default Geometry stored in the GPU for all Point Source meshes. */ - static GEOMETRY: PIXI.Geometry; - - /** A flag for whether this source is currently active (rendered) or not */ + /** A flag for whether this source is currently rendered or not. */ active: boolean; + /** The animation configuration applied to this source */ + animation: PointSourceAnimationConfiguration; + /** The object of data which configures how this source is rendered */ - data: PointSourceData; + data: object; /** The maximum radius of emission for this source */ radius: number; @@ -29,14 +32,20 @@ declare global { /** The restricted line-of-sight polygon that is generated by the origin and radius of this source. */ los: PointSourcePolygon; + /** PIXI Geometry generated to draw meshes. */ + protected _sourceGeometry: PIXI.Geometry | null; + /** A Graphics object with pre-computed geometry used for masking based on line-of-sight. */ losMask: PIXI.Graphics; - /** Is the angle of emission for this source limited? */ - limited: boolean; + /** Additional information which controls whether certain behaviors of the source must be enforced */ + protected _flags: Record; - /** Boolean flags which control whether certain behaviors of the source must be enforced */ - protected _flags: Record; + /** To track meshes initialization */ + protected _meshesInit: boolean; + + /** The offset in pixels applied to create soft edges. */ + static EDGE_OFFSET: number; /** The x-coordinate of the point source origin. */ get x(): number; @@ -48,17 +57,20 @@ declare global { get sourceType(): PointSourceType; /** - * Create the structure of a source Container which can be rendered to the sight layer shadow-map - * @return The constructed light source container + * The elevation of the object bound to this base source, if any. + * Returns the canvas primary background elevation otherwise. */ - protected _createContainer(shaderCls: typeof PIXI.Shader): PIXI.Container; + get elevation(): number; + + /** If the source is animated or not. */ + get isAnimated(): boolean; /* -------------------------------------------- */ /* Point Source Methods */ /* -------------------------------------------- */ /** - * A point is contained with the area of the source if it is within both the FOV circle as well as the LOS polygon. + * A point is contained with the area of the source if it is within both the FOV circle and the LOS polygon. * @param point The point to test * @returns Is the point contained */ @@ -67,44 +79,78 @@ declare global { /** Steps that must be performed when the base source is destroyed. */ destroy(): void; - /** Each subclass of PointSource must implement the initialize method */ - abstract initialize(data?: Partial): void; + abstract initialize(data?: object): void; - /** - * Get power of 2 size pertaining to base-source radius and performance modes - * @returns The computed power of 2 size - */ - getPowerOf2Size(): number; + /** Refresh the state and uniforms of the BaseSource */ + refreshSource(): void; /* -------------------------------------------- */ /* Rendering */ /* -------------------------------------------- */ + /** + * Create or update the source geometry with a polygon shape + * Triangulate the form and create buffers + * @param polygon The pixi polygon + */ + protected _updateLosGeometry(polygon: PIXI.Polygon): void; + + /** Configure the parameters of the polygon that is generated for this source. */ + protected abstract _getPolygonConfiguration(): PointSourcePolygonConfig; + + /** Create the LOS polygon for this Light Source instance using provided parameters. */ + protected _createPolygon(): PointSourcePolygon; + + /** + * Create or update the source geometry and create meshes if necessary + * @param polygon A pixi polygon + */ + protected _initializeMeshes(polygon: PIXI.Polygon): void; + /** * Create a new Mesh for this source using a provided shader class * @param shaderCls The subclass of AdaptiveLightingShader being used for this Mesh * @returns The created Mesh */ - protected _createMesh(shaderCls: PIXI.Shader): PIXI.Mesh; + protected _createMesh(shaderCls: Function): PIXI.Mesh; + + /** Create all meshes needed with this PointSource */ + protected _createMeshes(): void; /** * Update the position and size of the mesh each time it is drawn. * @param mesh The Mesh being updated * @returns The updated Mesh */ - protected _updateMesh(mesh: T): T; + protected _updateMesh(mesh: PIXI.Mesh): PIXI.Mesh; - /** Render this source to a texture which can be used for masking and blurring. */ - protected _renderTexture(): PIXI.RenderTexture; + /* -------------------------------------------- */ + /* Animation Functions */ + /* -------------------------------------------- */ /** - * Create a container that should be rendered to the fov texture for this source - * @returns The drawn container for the render texture + * Animate the BaseSource, if an animation is enabled and if it currently has rendered containers. + * @param dt Delta time. */ - _drawRenderTextureContainer(): PIXI.Container; + animate(dt: number): void; } type PointSourceType = "light" | "sight"; - type PointSourceData = LightSourceData | VisionSourceData; + interface PointSourceAnimationConfiguration { + /** The human-readable (localized) label for the animation */ + label?: string; + /** The animation function that runs every frame */ + animation?: Function; + /** A custom illumination shader used by this animation */ + illuminationShader?: PIXI.Shader; + /** A custom coloration shader used by this animation */ + colorationShader?: PIXI.Shader; + /** A custom background shader used by this animation */ + backgroundShader?: PIXI.Shader; + /** The animation seed */ + seed?: number; + /** The animation time */ + time?: number; + } } diff --git a/types/types/foundry/client/pixi/helpers/point-source/index.d.ts b/types/types/foundry/client/pixi/helpers/point-source/index.d.ts index 1f0f59047..3bf5236e3 100644 --- a/types/types/foundry/client/pixi/helpers/point-source/index.d.ts +++ b/types/types/foundry/client/pixi/helpers/point-source/index.d.ts @@ -1,3 +1,4 @@ import "./base"; import "./light-source"; +import "./sound-source"; import "./vision-source"; diff --git a/types/types/foundry/client/pixi/helpers/point-source/light-source.d.ts b/types/types/foundry/client/pixi/helpers/point-source/light-source.d.ts index 893af8358..e62f2352f 100644 --- a/types/types/foundry/client/pixi/helpers/point-source/light-source.d.ts +++ b/types/types/foundry/client/pixi/helpers/point-source/light-source.d.ts @@ -23,18 +23,7 @@ declare global { static BLUR_STRENGTH: number; /** Keys in the LightSourceData structure which, when modified, change the appearance of the light */ - protected static _appearanceKeys: [ - "dim", - "bright", - "gradual", - "alpha", - "coloration", - "color", - "contrast", - "saturation", - "shadows", - "luminosity" - ]; + protected static _appearanceKeys: string[]; /* -------------------------------------------- */ /* Light Source Attributes */ @@ -84,6 +73,15 @@ declare global { */ initialize(data?: Partial): this; + protected _getPolygonConfiguration(): { + type: "light" | "universal"; + angle: number; + density: number; + radius: number; + rotation: number; + source: LightSource; + }; + /** * Initialize the PointSource with new input data * @param data Initial data provided to the light source diff --git a/types/types/foundry/client/pixi/helpers/point-source/sound-source.d.ts b/types/types/foundry/client/pixi/helpers/point-source/sound-source.d.ts new file mode 100644 index 000000000..a5c53c228 --- /dev/null +++ b/types/types/foundry/client/pixi/helpers/point-source/sound-source.d.ts @@ -0,0 +1,50 @@ +export {}; + +declare global { + /** + * A specialized subclass of the PointSource abstraction which is used to control the rendering of sound sources. + * @param object The AmbientSound object that generates this sound source + */ + class SoundSource extends PointSource { + static sourceType: "sound"; + + /* -------------------------------------------- */ + /* Sound Source Attributes */ + /* -------------------------------------------- */ + + /** The object of data which configures how the source is rendered */ + data: Partial; + + /* -------------------------------------------- */ + /* Sound Source Initialization */ + /* -------------------------------------------- */ + + /** + * Initialize the source with provided object data. + * @param data Initial data provided to the point source + * @returns A reference to the initialized source + */ + initialize(data?: Partial): this; + + protected _getPolygonConfiguration(): PointSourcePolygonConfig; + + /** + * Process new input data provided to the SoundSource. + * @param data Initial data provided to the sound source + */ + protected _initializeData(data: Partial): void; + } + + interface SoundSourceData { + /** The x-coordinate of the source location */ + x?: number; + /** The y-coordinate of the source location */ + y?: number; + // undocumented + z?: number; + /** The radius of the sound effect */ + radius?: number; + /** Whether or not the source is constrained by walls */ + walls?: boolean; + } +} diff --git a/types/types/foundry/client/pixi/helpers/point-source/vision-source.d.ts b/types/types/foundry/client/pixi/helpers/point-source/vision-source.d.ts index 7516b413a..d271cbc62 100644 --- a/types/types/foundry/client/pixi/helpers/point-source/vision-source.d.ts +++ b/types/types/foundry/client/pixi/helpers/point-source/vision-source.d.ts @@ -6,16 +6,27 @@ declare global { * @param object The Token object that generates this vision source */ class VisionSource extends PointSource { - constructor(object: TObject); + /** The current background mesh for this source */ + background: PIXI.Mesh | null; + + /** The current vision illumination mesh for this source */ + illumination: PIXI.Mesh | null; + + /** The current vision coloration mesh for this source */ + coloration: PIXI.Mesh | null; - /** The current vision mesh for this source */ - illumination: PIXI.Mesh; + /** The vision mode linked to this VisionSource */ + visionMode: VisionMode | null; + + constructor(object: TObject); static sourceType: "vision"; /** Keys in the VisionSourceData structure which, when modified, change the appearance of the source */ protected static _appearanceKeys: string[]; + static override EDGE_OFFSET: number; + /* -------------------------------------------- */ /* Vision Source Attributes */ /* -------------------------------------------- */ @@ -23,20 +34,14 @@ declare global { /** The object of data which configures how the source is rendered */ data: VisionSourceData; - /** The ratio of dim:bright as part of the source radius */ - ratio: number; - - /** The rendered field-of-vision texture for the source for use within shaders. */ - fovTexture: PIXI.RenderTexture | null; + /** The constrained LOS polygon that is generated by the origin and radius of this source. */ + fov: PointSourcePolygon; /** Track which uniforms need to be reset */ - _resetUniforms: { illumination: boolean }; + protected _resetUniforms: Record<"background" | "illumination" | "coloration", boolean>; /** To track if a source is temporarily shutdown to avoid glitches */ - _shutdown: { illumination: boolean }; - - // Store the FOV circle - fov: PIXI.Circle; + protected _shutdown: Record<"background" | "illumination" | "coloration", boolean>; /* -------------------------------------------- */ /* Vision Source Initialization */ @@ -49,37 +54,98 @@ declare global { */ initialize(data?: Partial): this; + /** Responsible for assigning the Vision Mode and handling exceptions based on vision special status. */ + protected _initializeVisionMode(): void; + + /** If this vision source background is rendered into the lighting container. */ + get preferred(): number; + + protected _getPolygonConfiguration(): { + source: VisionSource; + type: "sight"; + angle: number; + rotation: number; + externalRadius: number; + }; + + /** Create a restricted FOV polygon by limiting the radius of the unrestricted LOS polygon. */ + protected _createRestrictedPolygon(): PointSourcePolygon; + + /** Initialize the shaders used for this source, swapping to a different shader if the vision effect has changed. */ + protected _initializeShaders(): void; + /** Initialize the blend mode and vertical sorting of this source relative to others in the container. */ - _initializeBlending(): void; + protected _initializeBlending(): void; /** * Process new input data provided to the LightSource. * @param data Initial data provided to the vision source * @returns The changes compared to the prior data */ - _initializeData(data: Partial): void; + protected _initializeData(data: VisionSourceData): VisionSourceData; /* -------------------------------------------- */ /* Vision Source Rendering */ /* -------------------------------------------- */ + protected _createMeshes(): Record<"background" | "illumination" | "coloration", PIXI.Mesh>; + + override destroy(): void; + + override refreshSource(): void; + + /** Render the containers used to represent this light source within the LightingLayer. */ + drawMeshes(): Record<"background" | "illumination" | "coloration", PIXI.Mesh>; + /** - * Draw the display of this source to remove darkness from the LightingLayer illumination container. - * @see {LightSource#drawLight} - * @return The rendered light container + * Draw the background mesh which provide special vision. + * @returns The rendered light container. + */ + drawBackground(): PIXI.Mesh | null; + + /** + * Draw the illumination mesh which provide vision. + * @returns The rendered light container. */ drawVision(): PIXI.Mesh | null; - /** Draw a Container used for exploring the FOV area of Token sight in the SightLayer */ - drawSight(): PIXI.Container; + /** + * Draw and return a container used to depict the visible color tint of the light source on the LightingLayer + * @returns An updated color container for the source + */ + drawColor(): PIXI.Mesh | null; + + /* -------------------------------------------- */ + /* Shader Management */ + /* -------------------------------------------- */ + + /** Update all layer uniforms. */ + protected _updateUniforms(): void; + + /** Update shader uniforms by providing data from this PointSource */ + _updateColorationUniforms(): void; + + /** Update shader uniforms by providing data from this PointSource */ + _updateIlluminationUniforms(): void; + + /** Update shader uniforms by providing data from this PointSource */ + protected _updateBackgroundUniforms(): void; /** - * Update shader uniforms by providing data from this PointSource + * Update shader uniforms shared by all shader types * @param shader The shader being updated */ - _updateIlluminationUniforms(shader: PIXI.Shader): void; + protected _updateCommonUniforms(shader: PIXI.Shader): void; + + /* -------------------------------------------- */ + /* Animation Functions */ + /* -------------------------------------------- */ - override _drawRenderTextureContainer(): PIXI.Container; + /** + * Generic time animation with Vision Sources. + * @param dt Delta time. + */ + animateTime(dt: number): void; } interface VisionSourceData { diff --git a/types/types/foundry/client/pixi/placeable-object/base.d.ts b/types/types/foundry/client/pixi/placeable-object/base.d.ts index 7b0476c01..b17d215f9 100644 --- a/types/types/foundry/client/pixi/placeable-object/base.d.ts +++ b/types/types/foundry/client/pixi/placeable-object/base.d.ts @@ -138,6 +138,12 @@ declare global { override destroy(options?: boolean | PIXI.IDestroyOptions): void; + /** + * The inner _destroy method which may optionally be defined by each PlaceableObject subclass. + * @param [options] Options passed to the initial destroy call + */ + protected _destroy(options?: object): void; + /** Draw the placeable object into its parent container */ draw(): Promise; diff --git a/types/types/foundry/client/pixi/placeable-object/token.d.ts b/types/types/foundry/client/pixi/placeable-object/token.d.ts index 7ec0557a8..0c472124f 100644 --- a/types/types/foundry/client/pixi/placeable-object/token.d.ts +++ b/types/types/foundry/client/pixi/placeable-object/token.d.ts @@ -147,20 +147,12 @@ declare global { get sourceId(): `Token.${string}`; /** - * Update the light and vision source objects associated with this Token - * @param [defer] Defer refreshing the SightLayer to manually call that refresh later. - * @param [deleted] Indicate that this light source has been deleted. - * @param [skipUpdateFog] Never update the Fog exploration progress for this update. + * Update the light and vision source objects associated with this Token. + * @param [options={}] Options which configure how perception sources are updated + * @param [options.defer=false] Defer refreshing the SightLayer to manually call that refresh later + * @param [options.deleted=false]Indicate that this light source has been deleted */ - updateSource({ - defer, - deleted, - skipUpdateFog, - }?: { - defer?: boolean; - deleted?: boolean; - skipUpdateFog?: boolean; - }): void; + updateSource(options?: { defer?: boolean; deleted?: boolean }): void; /** * Update an emitted light source associated with this Token. @@ -199,7 +191,7 @@ declare global { /** Draw the HUD container which provides an interface for managing this Token */ protected _drawHUD(): ObjectHUD; - override destroy(options?: boolean | PIXI.IDestroyOptions): void; + protected override _destroy(options?: object): void; /** Apply initial sanitizations to the provided input data to ensure that a Token has valid required attributes. */ protected _cleanData(): void; diff --git a/types/types/foundry/client/pixi/placeables-layer/base.d.ts b/types/types/foundry/client/pixi/placeables-layer/base.d.ts index 27db8dbbb..482dc2d2a 100644 --- a/types/types/foundry/client/pixi/placeables-layer/base.d.ts +++ b/types/types/foundry/client/pixi/placeables-layer/base.d.ts @@ -13,8 +13,10 @@ declare global { /** Keep track of history so that CTRL+Z can undo changes */ history: CanvasHistory[]; - /** Track the PlaceableObject on this layer which is currently being hovered upon */ - protected hover: TObject | null; + /** Track the PlaceableObject on this layer which is currently hovered upon. */ + get hover(): TObject | null; + + set hover(object: TObject | null); /** Track the set of PlaceableObjects on this layer which are currently controlled by their id */ protected _controlled: Record; diff --git a/types/types/foundry/client/roll-term/base.d.ts b/types/types/foundry/client/roll-term/base.d.ts index e7961363c..20d74f694 100644 --- a/types/types/foundry/client/roll-term/base.d.ts +++ b/types/types/foundry/client/roll-term/base.d.ts @@ -5,14 +5,14 @@ declare global { * An abstract class which represents a single token that can be used as part of a Roll formula. * Every portion of a Roll formula is parsed into a subclass of RollTerm in order for the Roll to be fully evaluated. */ - abstract class RollTerm { - constructor({ options }?: { options?: TData }); + abstract class RollTerm { + constructor(termData?: TTermData); /** An object of additional options which describes and modifies the term. */ - options: Record; + options: RollOptions; /** An internal flag for whether the term has been evaluated */ - protected _evaluated: boolean; + _evaluated: boolean; /** Is this term intermediate, and should be evaluated first as part of the simplification process? */ isIntermediate?: boolean; @@ -45,6 +45,9 @@ declare global { /** Optional flavor text which modifies and describes this term. */ get flavor(): string; + /** Whether this term is entirely deterministic or contains some randomness. */ + get isDeterministic(): boolean; + /* -------------------------------------------- */ /* RollTerm Methods */ /* -------------------------------------------- */ @@ -133,12 +136,12 @@ declare global { * Serialize the RollTerm to a JSON string which allows it to be saved in the database or embedded in text. * This method should return an object suitable for passing to the JSON.stringify function. */ - toJSON(): TData; + toJSON(): TTermData; } interface RollTermData { class?: string; - options?: this; + options?: RollOptions; evaluated?: boolean; } diff --git a/types/types/foundry/client/roll-term/dice-term/base.d.ts b/types/types/foundry/client/roll-term/dice-term/base.d.ts index 837b9656d..3cb1a685e 100644 --- a/types/types/foundry/client/roll-term/dice-term/base.d.ts +++ b/types/types/foundry/client/roll-term/dice-term/base.d.ts @@ -105,16 +105,7 @@ declare global { * Render the tooltip HTML for a Roll instance * @return The data object used to render the default tooltip template for this DiceTerm */ - getTooltipData(): { - formula: string; - total: number; - faces: number; - flavor: string; - rolls: { - result: string; - classes: string; - }; - }; + getTooltipData(): DiceTermTooltipData; /* -------------------------------------------- */ /* Modifier Methods */ @@ -225,4 +216,15 @@ declare global { } type ComparisonOperator = "=" | "<" | "<=" | ">" | ">="; + + interface DiceTermTooltipData { + formula: string; + total: number; + faces: number; + flavor: string; + rolls: { + result: string; + classes: string; + }; + } } diff --git a/types/types/foundry/client/roll-term/pool-term.d.ts b/types/types/foundry/client/roll-term/pool-term.d.ts index f0d9a5434..ac4369bfa 100644 --- a/types/types/foundry/client/roll-term/pool-term.d.ts +++ b/types/types/foundry/client/roll-term/pool-term.d.ts @@ -14,7 +14,13 @@ declare global { * pool.evaluate(); */ class PoolTerm extends RollTerm { - constructor({ terms, modifiers, rolls, results, options }?: TData); + constructor({ + terms, + modifiers, + rolls, + results, + options, + }?: Omit & { rolls: TData["rolls"] | Roll[] }); /** The original provided terms to the Dice Pool */ terms: RollTerm[]; @@ -116,7 +122,7 @@ declare global { * @param rolls An array of Roll objects from which to create the pool * @returns The constructed PoolTerm comprised of the provided rolls */ - static fromRolls(rolls?: Roll[]): PoolTerm; + static fromRolls(this: ConstructorOf, rolls?: Roll[]): TTerm; /* -------------------------------------------- */ /* Modifiers */ @@ -172,7 +178,7 @@ declare global { interface PoolTermData extends RollTermData { terms?: string[]; modifiers?: string[]; - rolls?: RollData[]; + rolls?: RollJSON[]; results?: DiceTermResult[]; } } diff --git a/types/types/foundry/client/roll.d.ts b/types/types/foundry/client/roll.d.ts index 1e1b0a53a..1e786f966 100644 --- a/types/types/foundry/client/roll.d.ts +++ b/types/types/foundry/client/roll.d.ts @@ -26,14 +26,14 @@ declare global { * // The total resulting from the roll * console.log(r.total); // 22 */ - class Roll { - constructor(formula: string, data?: Record, options?: Partial); + class Roll { + constructor(formula: string, data?: Record, options?: RollOptions); /** The original provided data object which substitutes into attributes of the roll formula */ data: Record; /** Options which modify or describe the Roll */ - options: TOptions; + options: RollOptions; /** The identified terms of the Roll */ terms: RollTerm[]; @@ -42,10 +42,10 @@ declare global { protected _dice: DiceTerm[]; /** Store the original cleaned formula for the Roll, prior to any internal evaluation or simplification */ - protected _formula: string; + _formula: string; /** Track whether this Roll instance has been evaluated or not. Once evaluated the Roll is immutable. */ - protected _evaluated: boolean; + _evaluated: boolean; /** Cache the numeric total generated through evaluation of the Roll. */ protected _total: number | undefined; @@ -65,7 +65,7 @@ declare global { * @param data Provided roll data * @returns The prepared data object */ - protected _prepareData(data: TOptions): TOptions; + protected _prepareData(data: Record): Record; /* -------------------------------------------- */ /* Roll Attributes */ @@ -137,7 +137,7 @@ declare global { * Safely evaluate the final total result for the Roll using its component terms. * @returns The evaluated total */ - protected _evaluateTotal(this: Rolled): number; + protected _evaluateTotal(): number; /** * Alias for evaluate. @@ -168,7 +168,7 @@ declare global { * @param [options={}] Additional options which modify or describe this Roll * @return The constructed Roll instance */ - static create(formula: string, data?: T, options?: Record): Roll; + static create(formula: string, data?: Record, options?: RollOptions): Roll; /** * Transform an array of RollTerm objects into a cleaned string formula representation. @@ -216,7 +216,7 @@ declare global { * @param data A data object used to substitute for attributes in the formula * @returns A parsed array of RollTerm instances */ - static parse(formula: string, data: T): RollTerm[]; + static parse(formula: string, data: object): RollTerm[]; /** * Replace referenced data attributes in the roll formula with values from the provided data. @@ -228,9 +228,9 @@ declare global { * left as-is. * @param [warn] Display a warning notification when encountering an un-matched key. */ - static replaceFormulaData( + static replaceFormulaData( formula: string, - data: T, + data: Record, { missing, warn }?: { missing?: string; warn?: boolean } ): string; @@ -336,10 +336,13 @@ declare global { /** * Render a Roll instance to HTML - * @param [options={}] Options which affect how the Roll is rendered + * @param [options={}] Options which affect how the Roll is rendered + * @param [options.flavor] Flavor text to include + * @param [options.template] A custom HTML template path + * @param [options.isPrivate=false] Is the Roll displayed privately? * @returns The rendered HTML template as a string */ - render(chatOptions?: RollRenderOptions): Promise; + render(options?: RollRenderOptions): Promise; /** * Transform a Roll instance into a ChatMessage, displaying the roll result. @@ -356,7 +359,7 @@ declare global { toMessage( messageData: PreCreate | undefined, { rollMode, create }: { rollMode: RollMode; create: false } - ): Promise; + ): Promise; toMessage( messageData?: PreCreate, { rollMode, create }?: { rollMode?: RollMode; create?: true } @@ -397,7 +400,7 @@ declare global { * @param data Unpacked data representing the Roll * @return A reconstructed Roll instance */ - static fromData(data: T): Roll; + static fromData(this: AbstractConstructorOf, data: RollJSON): T; /** * Recreate a Roll instance using a provided JSON string @@ -419,30 +422,21 @@ declare global { * const roll = Roll.fromTerms([t1, plus, t2]); * roll.formula; // 4d8 + 8 */ - static fromTerms( - this: ConstructorOf, - terms: RollTerm[], - options?: Record - ): T; + static fromTerms(this: ConstructorOf, terms: RollTerm[], options?: RollOptions): T; } - interface RollData { - class?: string; - options?: RollData; - dice?: DiceTermData[]; - formula?: string; - terms?: RollTermData[]; - total?: number | undefined; - evaluated?: boolean; - } + type RollOptions = { + [key: string]: unknown; + flavor?: string; + }; interface RollJSON { class: string; options: Record; - data?: RollData; + data?: RollOptions; dice: DiceTerm[]; formula: string; - terms: RollTerm[]; + terms: RollTerm[] | RollTermData[]; total?: number; evaluated: boolean; } diff --git a/types/types/foundry/common/abstract/document.d.ts b/types/types/foundry/common/abstract/document.d.ts index 1baedbc1d..2beb522ad 100644 --- a/types/types/foundry/common/abstract/document.d.ts +++ b/types/types/foundry/common/abstract/document.d.ts @@ -220,10 +220,11 @@ declare global { * const updated = await Actor.updateDocuments([{_id: actor.id, name: "New Name"}], {pack: "mymodule.mypack"}); */ // eslint-disable-next-line @typescript-eslint/no-explicit-any - static updateDocuments>( - updates?: DocumentUpdateData>[], + static updateDocuments( + this: ConstructorOf, + updates?: DocumentUpdateData[], context?: DocumentModificationContext - ): Promise[]>; + ): Promise; /** * Delete one or multiple existing Documents using an array of provided ids. diff --git a/types/types/foundry/common/data/data/chat-message-data.d.ts b/types/types/foundry/common/data/data/chat-message-data.d.ts index 527b02026..8b1f0415d 100644 --- a/types/types/foundry/common/data/data/chat-message-data.d.ts +++ b/types/types/foundry/common/data/data/chat-message-data.d.ts @@ -12,7 +12,7 @@ declare module foundry { speaker: ChatSpeakerSource; whisper: string[]; blind: boolean; - roll: string | RollJSON; + rolls: (string | RollJSON)[]; sound: AudioPath; emote?: boolean; flags: ChatMessageFlags; diff --git a/types/types/foundry/common/data/data/journal-entry-data.d.ts b/types/types/foundry/common/data/data/journal-entry-data.d.ts index 916cc6c94..b2e7d2816 100644 --- a/types/types/foundry/common/data/data/journal-entry-data.d.ts +++ b/types/types/foundry/common/data/data/journal-entry-data.d.ts @@ -9,7 +9,7 @@ declare module foundry { * * @property _id The _id which uniquely identifies this JournalEntry document * @property name The name of this JournalEntry - * @property content The HTML content of the JournalEntry + * @property pages The pages contained within this JournalEntry document * @property [img] An image file path which provides the artwork for this JournalEntry * @property folder The _id of a Folder which contains this JournalEntry * @property [sort] The numeric sort value which orders this JournalEntry relative to its siblings @@ -19,12 +19,13 @@ declare module foundry { interface JournalEntrySource extends abstract.DocumentSource { _id: string; name: string; + pages: JournalEntryPageSource[]; content: string; img: ImagePath; folder: string | null; sort: number; ownership: Record; - flags: Record; + flags: Record>; } class JournalEntryData< diff --git a/types/types/foundry/package.json b/types/types/foundry/package.json index 363e07ed7..3d31b5878 100644 --- a/types/types/foundry/package.json +++ b/types/types/foundry/package.json @@ -1,6 +1,6 @@ { "name": "foundry-types", - "version": "2.0.2", + "version": "4.4.2", "description": "Type definitions for the Foundry VTT client, used by the PF2e system", "private": true, "keywords": [ @@ -9,19 +9,15 @@ ], "devDependencies": { "@types/jquery": "^3.5.14", - "@types/node": "^18.11.18", - "pixi.js": "6.5.1", - "socket.io": "^4.5.4", - "socket.io-client": "^4.5.4", - "tinymce": "^6.3.1", + "@types/node": "^18.11.12", + "pixi.js": "6.5.2", + "socket.io": "^4.5.1", + "socket.io-client": "^4.5.1", + "tinymce": "^6.1.2", "typescript": "^4.9.4" }, "author": "the pf2e system developers", "license": "Apache-2.0", "type": "module", - "exports": { - ".": { - "import": "./index.js" - } - } + "types": "./index.d.ts" } diff --git a/types/types/foundry/utils.d.ts b/types/types/foundry/utils.d.ts index 06a121b48..c66a6b02e 100644 --- a/types/types/foundry/utils.d.ts +++ b/types/types/foundry/utils.d.ts @@ -13,6 +13,8 @@ declare global { // eslint-disable-next-line @typescript-eslint/no-explicit-any type ConstructorOf = new (...args: any[]) => T; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + type AbstractConstructorOf = abstract new (...args: any[]) => T; type SetElement> = TSet extends Set ? TElement : never; }