This commit is contained in:
TheGiddyLimit
2024-05-26 23:02:59 +01:00
parent d2f2daa34e
commit 0cd7a2a6fa
13 changed files with 105 additions and 78 deletions

View File

@@ -42044,7 +42044,7 @@
] ]
}, },
{ {
"area": "780", "area": "81a",
"points": [ "points": [
[ [
1833, 1833,

View File

@@ -67,7 +67,7 @@
{ {
"key": "system.attributes.hp.bonuses.overall", "key": "system.attributes.hp.bonuses.overall",
"mode": "ADD", "mode": "ADD",
"value": "+ (2 * @srd5e.userchar.classes.druid.levels)" "value": "+(2 * @srd5e.userchar.classes.druid.levels)"
}, },
{ {
"key": "data.attributes.ac.formula", "key": "data.attributes.ac.formula",
@@ -91,7 +91,7 @@
{ {
"key": "system.attributes.hp.bonuses.overall", "key": "system.attributes.hp.bonuses.overall",
"mode": "ADD", "mode": "ADD",
"value": "+ (5 * @srd5e.userchar.classes.ranger.levels)" "value": "+(5 * @srd5e.userchar.classes.ranger.levels)"
}, },
{ {
"key": "data.attributes.ac.formula", "key": "data.attributes.ac.formula",
@@ -140,7 +140,7 @@
{ {
"key": "data.skills.prc.bonuses.check", "key": "data.skills.prc.bonuses.check",
"mode": "ADD", "mode": "ADD",
"value": "+ (2 * @srd5e.userchar.pb)" "value": "+(2 * @srd5e.userchar.pb)"
}, },
{ {
"key": "data.skills.ste.bonuses.check", "key": "data.skills.ste.bonuses.check",
@@ -184,7 +184,7 @@
{ {
"key": "data.skills.prc.bonuses.check", "key": "data.skills.prc.bonuses.check",
"mode": "ADD", "mode": "ADD",
"value": "+ (2 * @srd5e.userchar.pb)" "value": "+(2 * @srd5e.userchar.pb)"
} }
] ]
} }
@@ -200,7 +200,7 @@
{ {
"key": "system.attributes.hp.bonuses.overall", "key": "system.attributes.hp.bonuses.overall",
"mode": "ADD", "mode": "ADD",
"value": "+ (5 * @srd5e.userchar.classes.druid.levels)" "value": "+(5 * @srd5e.userchar.classes.druid.levels)"
} }
] ]
} }

View File

@@ -2709,5 +2709,10 @@
"title": "Ruinous Power", "title": "Ruinous Power",
"titleAlt": "Adam of Riches", "titleAlt": "Adam of Riches",
"txt": "- Added Vecna: Eve of Ruin content\n- (Brew) Added `\"expectsLightBackground\"`/`\"expectsDarkBackground\"` for `\"image\"`-type entries, allowing a theme-dependent background to be rendered under the image\n- (Brew) Fixed crash when attempting to view subclass with multiple fluff images\n- (Fixed typos/added tags)" "txt": "- Added Vecna: Eve of Ruin content\n- (Brew) Added `\"expectsLightBackground\"`/`\"expectsDarkBackground\"` for `\"image\"`-type entries, allowing a theme-dependent background to be rendered under the image\n- (Brew) Fixed crash when attempting to view subclass with multiple fluff images\n- (Fixed typos/added tags)"
},
{
"ver": "1.207.1",
"date": "2024-05-26",
"txt": "- Fixed Classes page failing to show subclass info when enabling a subclass with the \"Info\" button active#\n- Fixed Search page `lucky` param redirecting to non-existent pages\n- (Brew) Added `\"isNoOutline\"` `\"data\"` flag for entries displayed in the Classes page\n- (Fixed typos/added tags)"
} }
] ]

View File

@@ -532,27 +532,27 @@
{ {
"key": "data.attributes.movement.walk", "key": "data.attributes.movement.walk",
"mode": "ADD", "mode": "ADD",
"value": "+ (sign(@attributes.movement.walk) * @scale.monk.unarmored-movement)" "value": "+(sign(@attributes.movement.walk) * @scale.monk.unarmored-movement)"
}, },
{ {
"key": "data.attributes.movement.burrow", "key": "data.attributes.movement.burrow",
"mode": "ADD", "mode": "ADD",
"value": "+ (sign(@attributes.movement.burrow) * @scale.monk.unarmored-movement)" "value": "+(sign(@attributes.movement.burrow) * @scale.monk.unarmored-movement)"
}, },
{ {
"key": "data.attributes.movement.climb", "key": "data.attributes.movement.climb",
"mode": "ADD", "mode": "ADD",
"value": "+ (sign(@attributes.movement.climb) * @scale.monk.unarmored-movement)" "value": "+(sign(@attributes.movement.climb) * @scale.monk.unarmored-movement)"
}, },
{ {
"key": "data.attributes.movement.fly", "key": "data.attributes.movement.fly",
"mode": "ADD", "mode": "ADD",
"value": "+ (sign(@attributes.movement.fly) * @scale.monk.unarmored-movement)" "value": "+(sign(@attributes.movement.fly) * @scale.monk.unarmored-movement)"
}, },
{ {
"key": "data.attributes.movement.swim", "key": "data.attributes.movement.swim",
"mode": "ADD", "mode": "ADD",
"value": "+ (sign(@attributes.movement.swim) * @scale.monk.unarmored-movement)" "value": "+(sign(@attributes.movement.swim) * @scale.monk.unarmored-movement)"
} }
] ]
} }

View File

@@ -139,7 +139,7 @@
{ {
"key": "system.attributes.hp.bonuses.overall", "key": "system.attributes.hp.bonuses.overall",
"mode": "ADD", "mode": "ADD",
"value": "+ (2 * @details.level)" "value": "+(2 * @details.level)"
} }
] ]
} }

View File

@@ -11,7 +11,7 @@
{ {
"key": "data.bonuses.rsak.damage", "key": "data.bonuses.rsak.damage",
"mode": "ADD", "mode": "ADD",
"value": "+ (@srd5e.name.eldritchblast * @abilities.cha.mod)" "value": "+(@srd5e.name.eldritchblast * @abilities.cha.mod)"
} }
] ]
} }

File diff suppressed because one or more lines are too long

View File

@@ -895,6 +895,8 @@ class ClassesPage extends MixinComponentGlobalState(MixinBaseComponent(MixinProx
const isVisible = this._state[stateKey]; const isVisible = this._state[stateKey];
$(`[data-subclass-id="${stateKey}"]`).toggleVe(!!isVisible); $(`[data-subclass-id="${stateKey}"]`).toggleVe(!!isVisible);
$(`[data-subclass-id-fluff="${stateKey}"]`).toggleVe(!!isVisible && this._state.isShowFluff);
if (!isFirstRun) hkIsShowNamePrefixes(); if (!isFirstRun) hkIsShowNamePrefixes();
}; };
this._addHookBase(stateKey, hkDisplaySubclass); this._addHookBase(stateKey, hkDisplaySubclass);
@@ -1843,6 +1845,11 @@ class ClassesPage extends MixinComponentGlobalState(MixinBaseComponent(MixinProx
.appendTo($wrpBody); .appendTo($wrpBody);
} }
_render_renderOutline_isOutlineRenderable (depthEntry) {
return depthEntry.name
&& !depthEntry.data?.isNoOutline;
}
_render_renderOutline_renderFeature ( _render_renderOutline_renderFeature (
{ {
ixLvl, ixLvl,
@@ -1860,23 +1867,25 @@ class ClassesPage extends MixinComponentGlobalState(MixinBaseComponent(MixinProx
const depthData = MiscUtil.get(this._outlineData.classFeatures, ixLvl, ixFeature); const depthData = MiscUtil.get(this._outlineData.classFeatures, ixLvl, ixFeature);
if (!this._state.isHideFeatures && depthData) { if (!this._state.isHideFeatures && depthData) {
depthData.filter(it => it.name).forEach(it => { depthData
const additionalCssClassesRaw = UtilClassesPage.getColorStyleClasses( .filter(this._render_renderOutline_isOutlineRenderable.bind(this))
it, .forEach(it => {
{ const additionalCssClassesRaw = UtilClassesPage.getColorStyleClasses(
isForceStandardSource: it.source === this.activeClass.source, it,
prefix: "cls-nav__item--", {
}, isForceStandardSource: it.source === this.activeClass.source,
); prefix: "cls-nav__item--",
},
);
this._render_renderOutline_doMakeItem({ this._render_renderOutline_doMakeItem({
depthData: it, depthData: it,
additionalCssClasses: additionalCssClassesRaw.join(" "), additionalCssClasses: additionalCssClassesRaw.join(" "),
filterValues, filterValues,
isUseSubclassSources, isUseSubclassSources,
$wrpBody, $wrpBody,
});
}); });
});
} }
const activeScStateKeys = this._getActiveSubclasses(true); const activeScStateKeys = this._getActiveSubclasses(true);
@@ -1888,23 +1897,25 @@ class ClassesPage extends MixinComponentGlobalState(MixinBaseComponent(MixinProx
if (activeScStateKeys.length) { if (activeScStateKeys.length) {
// If we didn't render the intro for gaining a subclass feature, do so now // If we didn't render the intro for gaining a subclass feature, do so now
if (this._state.isHideFeatures && depthData) { if (this._state.isHideFeatures && depthData) {
depthData.filter(it => it.name).forEach(it => { depthData
const additionalCssClassesRaw = UtilClassesPage.getColorStyleClasses( .filter(this._render_renderOutline_isOutlineRenderable.bind(this))
it, .forEach(it => {
{ const additionalCssClassesRaw = UtilClassesPage.getColorStyleClasses(
isSubclass: true, it,
isForceStandardSource: true, {
prefix: "cls-nav__item--", isSubclass: true,
}, isForceStandardSource: true,
); prefix: "cls-nav__item--",
},
);
this._render_renderOutline_doMakeItem({ this._render_renderOutline_doMakeItem({
depthData: it, depthData: it,
filterValues, filterValues,
isUseSubclassSources, isUseSubclassSources,
$wrpBody, $wrpBody,
});
}); });
});
} }
this.activeClass.subclasses.forEach(sc => { this.activeClass.subclasses.forEach(sc => {
@@ -1917,24 +1928,26 @@ class ClassesPage extends MixinComponentGlobalState(MixinBaseComponent(MixinProx
scLvlFeatures.forEach((scFeature, ixScFeature) => { scLvlFeatures.forEach((scFeature, ixScFeature) => {
const depthData = MiscUtil.get(this._outlineData, stateKey, scFeature.level, ixScFeature); const depthData = MiscUtil.get(this._outlineData, stateKey, scFeature.level, ixScFeature);
depthData.filter(it => it.name).map(it => { depthData
const additionalCssClassesRaw = UtilClassesPage.getColorStyleClasses( .filter(this._render_renderOutline_isOutlineRenderable.bind(this))
it, .map(it => {
{ const additionalCssClassesRaw = UtilClassesPage.getColorStyleClasses(
isSubclass: true, it,
isForceStandardSource: sc._isStandardSource, {
prefix: "cls-nav__item--", isSubclass: true,
}, isForceStandardSource: sc._isStandardSource,
); prefix: "cls-nav__item--",
},
);
this._render_renderOutline_doMakeItem({ this._render_renderOutline_doMakeItem({
depthData: it, depthData: it,
additionalCssClasses: additionalCssClassesRaw.join(" "), additionalCssClasses: additionalCssClassesRaw.join(" "),
filterValues, filterValues,
isUseSubclassSources, isUseSubclassSources,
$wrpBody, $wrpBody,
});
}); });
});
}); });
}); });
} }

View File

@@ -1113,6 +1113,10 @@ Parser.spRangeTypeToFull = function (range) {
return Parser._parse_aToB(Parser.SP_RANGE_TYPE_TO_FULL, range); return Parser._parse_aToB(Parser.SP_RANGE_TYPE_TO_FULL, range);
}; };
Parser.UNT_LBS = "lbs";
Parser.UNT_TONS_IMPERIAL = "tns";
Parser.UNT_TONS_METRIC = "Mg";
Parser.UNT_FEET = "feet"; Parser.UNT_FEET = "feet";
Parser.UNT_YARDS = "yards"; Parser.UNT_YARDS = "yards";
Parser.UNT_MILES = "miles"; Parser.UNT_MILES = "miles";
@@ -3732,7 +3736,7 @@ Parser.metric = {
case "ft.": case "ft": case Parser.UNT_FEET: out = originalValue * Parser.metric.FEET_TO_METRES; break; case "ft.": case "ft": case Parser.UNT_FEET: out = originalValue * Parser.metric.FEET_TO_METRES; break;
case "yd.": case "yd": case Parser.UNT_YARDS: out = originalValue * Parser.metric.YARDS_TO_METRES; break; case "yd.": case "yd": case Parser.UNT_YARDS: out = originalValue * Parser.metric.YARDS_TO_METRES; break;
case "mi.": case "mi": case Parser.UNT_MILES: out = originalValue * Parser.metric.MILES_TO_KILOMETRES; break; case "mi.": case "mi": case Parser.UNT_MILES: out = originalValue * Parser.metric.MILES_TO_KILOMETRES; break;
case "lb.": case "lb": case "lbs": out = originalValue * Parser.metric.POUNDS_TO_KILOGRAMS; break; case "lb.": case "lb": case Parser.UNT_LBS: out = originalValue * Parser.metric.POUNDS_TO_KILOGRAMS; break;
default: return originalValue; default: return originalValue;
} }
if (toFixed != null) return NumberUtil.toFixedNumber(out, toFixed); if (toFixed != null) return NumberUtil.toFixedNumber(out, toFixed);
@@ -3744,7 +3748,7 @@ Parser.metric = {
case "ft.": case "ft": case Parser.UNT_FEET: return isShortForm ? "m" : `meter`[isPlural ? "toPlural" : "toString"](); case "ft.": case "ft": case Parser.UNT_FEET: return isShortForm ? "m" : `meter`[isPlural ? "toPlural" : "toString"]();
case "yd.": case "yd": case Parser.UNT_YARDS: return isShortForm ? "m" : `meter`[isPlural ? "toPlural" : "toString"](); case "yd.": case "yd": case Parser.UNT_YARDS: return isShortForm ? "m" : `meter`[isPlural ? "toPlural" : "toString"]();
case "mi.": case "mi": case Parser.UNT_MILES: return isShortForm ? "km" : `kilometre`[isPlural ? "toPlural" : "toString"](); case "mi.": case "mi": case Parser.UNT_MILES: return isShortForm ? "km" : `kilometre`[isPlural ? "toPlural" : "toString"]();
case "lb.": case "lb": case "lbs": return isShortForm ? "kg" : `kilogram`[isPlural ? "toPlural" : "toString"](); case "lb.": case "lb": case Parser.UNT_LBS: return isShortForm ? "kg" : `kilogram`[isPlural ? "toPlural" : "toString"]();
default: return originalUnit; default: return originalUnit;
} }
}, },

View File

@@ -182,9 +182,14 @@ class SearchPage {
} }
if (this._PARAM_LUCKY in params) { if (this._PARAM_LUCKY in params) {
const [result] = results; const [href] = results
window.location = `${Renderer.get().baseUrl}${Omnisearch.getResultHref(result.doc)}`; .map(res => Omnisearch.getResultHref(res.doc))
return; .filter(Boolean);
if (href) {
window.location = `${Renderer.get().baseUrl}${href}`;
return;
}
} }
SearchPage._rowMetas = results.map(result => { SearchPage._rowMetas = results.map(result => {

View File

@@ -2,7 +2,7 @@
// in deployment, `IS_DEPLOYED = "<version number>";` should be set below. // in deployment, `IS_DEPLOYED = "<version number>";` should be set below.
globalThis.IS_DEPLOYED = undefined; globalThis.IS_DEPLOYED = undefined;
globalThis.VERSION_NUMBER = /* 5ETOOLS_VERSION__OPEN */"1.207.0"/* 5ETOOLS_VERSION__CLOSE */; globalThis.VERSION_NUMBER = /* 5ETOOLS_VERSION__OPEN */"1.207.1"/* 5ETOOLS_VERSION__CLOSE */;
globalThis.DEPLOYED_IMG_ROOT = undefined; globalThis.DEPLOYED_IMG_ROOT = undefined;
// for the roll20 script to set // for the roll20 script to set
globalThis.IS_VTT = false; globalThis.IS_VTT = false;

20
package-lock.json generated
View File

@@ -1,15 +1,15 @@
{ {
"name": "5etools", "name": "5etools",
"version": "1.207.0", "version": "1.207.1",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "5etools", "name": "5etools",
"version": "1.207.0", "version": "1.207.1",
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {
"5etools-utils": "^0.11.2", "5etools-utils": "^0.12.2",
"ajv": "^8.12.0", "ajv": "^8.12.0",
"ajv-formats": "^2.1.1", "ajv-formats": "^2.1.1",
"commander": "^12.0.0", "commander": "^12.0.0",
@@ -3926,9 +3926,9 @@
"dev": true "dev": true
}, },
"node_modules/5etools-utils": { "node_modules/5etools-utils": {
"version": "0.11.2", "version": "0.12.2",
"resolved": "https://registry.npmjs.org/5etools-utils/-/5etools-utils-0.11.2.tgz", "resolved": "https://registry.npmjs.org/5etools-utils/-/5etools-utils-0.12.2.tgz",
"integrity": "sha512-79x7asL9VBerejHpSzkdS4vjZhHszaUnn12lhv7/bNIuQWyMqyPKIKM7/yVCzp1HG0/w3O2V3Mlkk2SJxYdG0w==", "integrity": "sha512-F/JhtSOuUo3yWvRVj2w/wUyBzVulLzwFbYhXbeAQU1hrGkGw95n0nSfr6QHC3UvBeB4+2WzZPeb5aMTRIbY0Uw==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"ajv": "^8.12.0", "ajv": "^8.12.0",
@@ -3939,8 +3939,8 @@
"number-precision": "^1.6.0" "number-precision": "^1.6.0"
}, },
"bin": { "bin": {
"test-file-extensions": "bin/test-file-extensions.js",
"test-file-locations": "bin/test-file-locations.js", "test-file-locations": "bin/test-file-locations.js",
"test-file-names": "bin/test-file-names.js",
"test-json-brew": "bin/test-json-brew.js", "test-json-brew": "bin/test-json-brew.js",
"test-json-ua": "bin/test-json-ua.js" "test-json-ua": "bin/test-json-ua.js"
} }
@@ -14589,9 +14589,9 @@
"dev": true "dev": true
}, },
"5etools-utils": { "5etools-utils": {
"version": "0.11.2", "version": "0.12.2",
"resolved": "https://registry.npmjs.org/5etools-utils/-/5etools-utils-0.11.2.tgz", "resolved": "https://registry.npmjs.org/5etools-utils/-/5etools-utils-0.12.2.tgz",
"integrity": "sha512-79x7asL9VBerejHpSzkdS4vjZhHszaUnn12lhv7/bNIuQWyMqyPKIKM7/yVCzp1HG0/w3O2V3Mlkk2SJxYdG0w==", "integrity": "sha512-F/JhtSOuUo3yWvRVj2w/wUyBzVulLzwFbYhXbeAQU1hrGkGw95n0nSfr6QHC3UvBeB4+2WzZPeb5aMTRIbY0Uw==",
"dev": true, "dev": true,
"requires": { "requires": {
"ajv": "^8.12.0", "ajv": "^8.12.0",

View File

@@ -1,7 +1,7 @@
{ {
"name": "5etools", "name": "5etools",
"author": "TheGiddyLimit", "author": "TheGiddyLimit",
"version": "1.207.0", "version": "1.207.1",
"license": "MIT", "license": "MIT",
"description": "A site dedicated to making playing games with your friends as easy as possible.", "description": "A site dedicated to making playing games with your friends as easy as possible.",
"type": "module", "type": "module",
@@ -46,7 +46,7 @@
"url": "git+https://github.com/5etools-mirror-2/5etools-mirror-2.github.io.git" "url": "git+https://github.com/5etools-mirror-2/5etools-mirror-2.github.io.git"
}, },
"devDependencies": { "devDependencies": {
"5etools-utils": "^0.11.2", "5etools-utils": "^0.12.2",
"ajv": "^8.12.0", "ajv": "^8.12.0",
"ajv-formats": "^2.1.1", "ajv-formats": "^2.1.1",
"commander": "^12.0.0", "commander": "^12.0.0",