bnstooltips 1.22.3 → 1.23.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/Utilities/Helpers.d.ts +18 -0
- package/build/Utilities/ISkill.d.ts +13 -0
- package/build/index.es.js +74 -4
- package/build/index.es.js.map +1 -1
- package/build/index.js +74 -4
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -330,7 +330,7 @@ function GetSkillMasteryValue(points, arcaneInfo) {
|
|
|
330
330
|
return 0;
|
|
331
331
|
return arcaneInfo.IsCooldown
|
|
332
332
|
? GetSkillMasteryCdValueForPoints(points, arcaneInfo.CooldownBreakpoints)
|
|
333
|
-
:
|
|
333
|
+
: GetSkillMasteryDamageValueForPoints(points, arcaneInfo.DamageSections);
|
|
334
334
|
}
|
|
335
335
|
function GetSkillMasteryValue2(points, arcaneInfo) {
|
|
336
336
|
if (points <= 0 || arcaneInfo == undefined || arcaneInfo == null)
|
|
@@ -339,7 +339,7 @@ function GetSkillMasteryValue2(points, arcaneInfo) {
|
|
|
339
339
|
return 0; // No modification
|
|
340
340
|
if (arcaneInfo.Type === 1) {
|
|
341
341
|
// Damage modification
|
|
342
|
-
return
|
|
342
|
+
return GetSkillMasteryDamageValueForPoints(points, arcaneInfo.Breakpoints);
|
|
343
343
|
}
|
|
344
344
|
if (arcaneInfo.Type === 2) {
|
|
345
345
|
// Cooldown modification
|
|
@@ -376,7 +376,7 @@ function GetSkillMasteryCdValueForPoints(mastery, cooldownBreakpoints) {
|
|
|
376
376
|
* @param damageSections - An object defining breakpoints and corresponding multipliers.
|
|
377
377
|
* @returns The total bonus percentage.
|
|
378
378
|
*/
|
|
379
|
-
function
|
|
379
|
+
function GetSkillMasteryDamageValueForPoints(mastery, damageSections) {
|
|
380
380
|
var bonus = 0; // Stores the accumulated bonus percentage
|
|
381
381
|
var previousLimit = 0; // Keeps track of the previous breakpoint
|
|
382
382
|
// Iterate over the damageSections object, sorted by its keys (breakpoints)
|
|
@@ -8755,7 +8755,7 @@ function JsonArrayToJsxArray(stringArray) {
|
|
|
8755
8755
|
return jsxArray;
|
|
8756
8756
|
}
|
|
8757
8757
|
|
|
8758
|
-
var css_248z$8 = ".TooltipBase_bns_upgradeRed_color {\n color: #FF2818;\n}\n\n.TooltipBase_bns_downgradeBlue_color {\n color: #28A9F0;\n}\n\n.SkillTooltip_skillIconContainer {\n width: 60px;\n height: 60px;\n padding: 0;\n float: left;\n position: relative;\n}\n.SkillTooltip_skillIcon {\n width: 60px;\n height: 60px;\n position: relative;\n}\n.SkillTooltip_skillIconCanvas {\n width: 60px;\n height: 60px;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n filter: blur(30px);\n opacity: 0.5;\n}\n.SkillTooltip_buttonIcon {\n position: absolute;\n right: 1px;\n bottom: 1px;\n height: 18px;\n opacity: 0.9;\n}\n.SkillTooltip_buttonIconMouse {\n background-color: rgba(0, 0, 0, 0.8);\n}\n.SkillTooltip_mainText {\n font-weight: 500;\n}\n.SkillTooltip_smallText {\n font-size: 12px;\n}\n.SkillTooltip_subTextMargin {\n margin-bottom: 0.3rem;\n}\n.SkillTooltip_boundaryContainer {\n display: flex;\n width: 100%;\n margin-bottom: 0.5rem;\n line-height: 17px;\n}\n.SkillTooltip_boundary {\n flex: 1;\n flex-basis: 0px;\n min-width: 0;\n display: flex;\n flex-direction: column;\n color: black;\n margin: 0.15rem;\n}\n.SkillTooltip_boundary:first-of-type > .SkillTooltip_boundaryHead {\n border-radius: 3px 0 0 0;\n}\n.SkillTooltip_boundary:last-of-type > .SkillTooltip_boundaryHead {\n border-radius: 0 3px 0 0;\n}\n.SkillTooltip_boundary:first-of-type > .SkillTooltip_boundaryBody {\n border-radius: 0 0 0 3px;\n}\n.SkillTooltip_boundary:last-of-type > .SkillTooltip_boundaryBody {\n border-radius: 0 0 3px 0;\n}\n.SkillTooltip_boundaryHead {\n color: white;\n font-weight: 500;\n font-size: 12px;\n text-overflow: ellipsis;\n overflow: hidden;\n padding: 0.3rem;\n text-align: center;\n flex: 1;\n min-height: 26px;\n background-color: rgba(127, 127, 127, 0.4);\n}\n.SkillTooltip_boundaryBody {\n color: white;\n padding: 0.5rem 0.3rem;\n margin-top: 0.15rem;\n text-align: center;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 40px;\n flex: 2;\n background-color: rgba(127, 127, 127, 0.4);\n}\n.SkillTooltip_boundaryBodyModifier {\n min-height: 33px !important;\n}\n.SkillTooltip_boundaryHasIcon {\n min-height: 50px !important;\n}\n.SkillTooltip_conditionRow {\n display: flex;\n align-items: center;\n font-size: 12px;\n}\n.SkillTooltip_conditionRow:not(:last-of-type) {\n margin-bottom: 0.1rem;\n}\n.SkillTooltip_conditionIcon {\n width: 20px;\n height: 20px;\n margin-right: 0.33rem;\n}\n.SkillTooltip_conditionIconSmall {\n width: 12px;\n height: 12px;\n margin-right: 0.22rem;\n}\n\n.tooltipArg {\n color: #00D9FF;\n font-weight: 600;\n}\n\n.wordbreakall {\n word-break: break-all;\n}\n\n.wordbreakword {\n word-break: break-word;\n}\n\n.target-360 {\n background-image: url(\"./360.png\");\n background-repeat: no-repeat;\n background-position: 50% 60%;\n background-size: auto 64px;\n}\n\n.target-front-180 {\n background-image: url(\"./180.png\");\n background-repeat: no-repeat;\n background-position: 50% 70%;\n background-size: auto 64px;\n}\n\n.laser {\n background-image: url(\"./laser.png\");\n background-repeat: no-repeat;\n background-position: 50% 50%;\n background-size: auto 64px;\n}\n\n.arcanemark {\n background-image: url(\"./arcanemark.png\");\n width: 24px;\n height: 24px;\n background-position: 50% 50%;\n background-size: auto 24px;\n margin-left: 0.25rem;\n}";
|
|
8758
|
+
var css_248z$8 = ".TooltipBase_bns_upgradeRed_color {\n color: #FF2818;\n}\n\n.TooltipBase_bns_downgradeBlue_color {\n color: #28A9F0;\n}\n\n.SkillTooltip_skillIconContainer {\n width: 60px;\n height: 60px;\n padding: 0;\n float: left;\n position: relative;\n}\n.SkillTooltip_skillIcon {\n width: 60px;\n height: 60px;\n position: relative;\n}\n.SkillTooltip_skillIconCanvas {\n width: 60px;\n height: 60px;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n filter: blur(30px);\n opacity: 0.5;\n}\n.SkillTooltip_buttonIcon {\n position: absolute;\n right: 1px;\n bottom: 1px;\n height: 18px;\n opacity: 0.9;\n}\n.SkillTooltip_buttonIconMouse {\n background-color: rgba(0, 0, 0, 0.8);\n}\n.SkillTooltip_mainText {\n font-weight: 500;\n}\n.SkillTooltip_smallText {\n font-size: 12px;\n}\n.SkillTooltip_subTextMargin {\n margin-bottom: 0.3rem;\n}\n.SkillTooltip_boundaryContainer {\n display: flex;\n width: 100%;\n margin-bottom: 0.5rem;\n line-height: 17px;\n}\n.SkillTooltip_boundary {\n flex: 1;\n flex-basis: 0px;\n min-width: 0;\n display: flex;\n flex-direction: column;\n color: black;\n margin: 0.15rem;\n}\n.SkillTooltip_boundary:first-of-type > .SkillTooltip_boundaryHead {\n border-radius: 3px 0 0 0;\n}\n.SkillTooltip_boundary:last-of-type > .SkillTooltip_boundaryHead {\n border-radius: 0 3px 0 0;\n}\n.SkillTooltip_boundary:first-of-type > .SkillTooltip_boundaryBody {\n border-radius: 0 0 0 3px;\n}\n.SkillTooltip_boundary:last-of-type > .SkillTooltip_boundaryBody {\n border-radius: 0 0 3px 0;\n}\n.SkillTooltip_boundaryHead {\n color: white;\n font-weight: 500;\n font-size: 12px;\n text-overflow: ellipsis;\n overflow: hidden;\n padding: 0.3rem;\n text-align: center;\n flex: 1;\n min-height: 26px;\n background-color: rgba(127, 127, 127, 0.4);\n}\n.SkillTooltip_boundaryBody {\n color: white;\n padding: 0.5rem 0.3rem;\n margin-top: 0.15rem;\n text-align: center;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 40px;\n flex: 2;\n background-color: rgba(127, 127, 127, 0.4);\n}\n.SkillTooltip_boundaryBodyModifier {\n min-height: 33px !important;\n}\n.SkillTooltip_boundaryHasIcon {\n min-height: 50px !important;\n}\n.SkillTooltip_conditionRow {\n display: flex;\n align-items: center;\n font-size: 12px;\n}\n.SkillTooltip_conditionRow:not(:last-of-type) {\n margin-bottom: 0.1rem;\n}\n.SkillTooltip_conditionIcon {\n width: 20px;\n height: 20px;\n margin-right: 0.33rem;\n}\n.SkillTooltip_conditionIconSmall {\n width: 12px;\n height: 12px;\n margin-right: 0.22rem;\n}\n\n.tooltipArg {\n color: #00D9FF;\n font-weight: 600;\n}\n\n.tooltipArgDisabled {\n color: rgba(255, 255, 255, 0.7) !important;\n font-weight: 600;\n}\n\n.wordbreakall {\n word-break: break-all;\n}\n\n.wordbreakword {\n word-break: break-word;\n}\n\n.target-360 {\n background-image: url(\"./360.png\");\n background-repeat: no-repeat;\n background-position: 50% 60%;\n background-size: auto 64px;\n}\n\n.target-front-180 {\n background-image: url(\"./180.png\");\n background-repeat: no-repeat;\n background-position: 50% 70%;\n background-size: auto 64px;\n}\n\n.laser {\n background-image: url(\"./laser.png\");\n background-repeat: no-repeat;\n background-position: 50% 50%;\n background-size: auto 64px;\n}\n\n.arcanemark {\n background-image: url(\"./arcanemark.png\");\n width: 24px;\n height: 24px;\n background-position: 50% 50%;\n background-size: auto 24px;\n margin-left: 0.25rem;\n}\n\n.arcaneContainer {\n margin-top: 0.33rem;\n display: flex;\n flex-direction: column;\n row-gap: 0.33rem;\n}\n\n.arcaneSection {\n display: flex;\n flex-direction: column;\n row-gap: 0.25rem;\n}\n\n.arcaneRow {\n display: flex;\n align-items: center;\n}\n\n.arcanebackgroundFormat {\n position: relative;\n width: 24px;\n height: 24px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n margin-right: 0.25rem;\n}\n\n.arcanebackground {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n width: 100%;\n height: 100%;\n background-image: url(\"./arcanebackground.png\");\n background-size: contain;\n background-repeat: no-repeat;\n background-position: center;\n filter: brightness(0) saturate(100%) invert(81%) sepia(98%) saturate(749%) hue-rotate(74deg) brightness(104%) contrast(101%);\n z-index: 1;\n}\n\n.arcanebackgroundText {\n position: relative;\n z-index: 2;\n font-size: 12px;\n text-align: center;\n width: 100%;\n line-height: 24px;\n pointer-events: none;\n}\n\n.arcanebackgroundDisabled {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n width: 100%;\n height: 100%;\n background-image: url(\"./arcanebackground_disabled.png\");\n background-size: contain;\n background-repeat: no-repeat;\n background-position: center;\n z-index: 1;\n}";
|
|
8759
8759
|
styleInject(css_248z$8);
|
|
8760
8760
|
|
|
8761
8761
|
function getButtonIconPath(button) {
|
|
@@ -8951,6 +8951,7 @@ function SkillTooltip(_a) {
|
|
|
8951
8951
|
AddBreakValue(tooltipBaseProps.subInfoGroups, skill);
|
|
8952
8952
|
AddSkillMastery(tooltipBaseProps.subInfoGroups, masteryPoints, skill.ArcaneInfo, showZeroMastery);
|
|
8953
8953
|
AddSkillMastery2(tooltipBaseProps.subInfoGroups, masteryPoints, skill.ArcaneInfo2, showZeroMastery);
|
|
8954
|
+
AddSkillMastery3(tooltipBaseProps.subInfoGroups, masteryPoints, skill.ArcaneInfo3, showZeroMastery);
|
|
8954
8955
|
AddSkillMasteryDiff(tooltipBaseProps.subInfoGroups, skill.ArcaneInfoDiffText);
|
|
8955
8956
|
AddPvpModifiers(tooltipBaseProps.subInfoGroups, skill);
|
|
8956
8957
|
AddBoundaries(tooltipBaseProps.subInfoGroups, skill);
|
|
@@ -9020,6 +9021,75 @@ function AddSkillMasteryDiff(subInfoGroups, arcaneInfoDiffText) {
|
|
|
9020
9021
|
],
|
|
9021
9022
|
});
|
|
9022
9023
|
}
|
|
9024
|
+
function AddSkillMastery3(subInfoGroups, masteryPoints, arcaneInfo3, showZeroMastery) {
|
|
9025
|
+
if (showZeroMastery === void 0) { showZeroMastery = false; }
|
|
9026
|
+
if (arcaneInfo3 == undefined ||
|
|
9027
|
+
masteryPoints == null ||
|
|
9028
|
+
(masteryPoints == 0 && !showZeroMastery) ||
|
|
9029
|
+
arcaneInfo3 == null)
|
|
9030
|
+
return;
|
|
9031
|
+
var damageSectionCount = Object.keys(arcaneInfo3.DamageSections).length;
|
|
9032
|
+
var damageMasteryValue = (damageSectionCount > 0
|
|
9033
|
+
? GetSkillMasteryDamageValueForPoints(masteryPoints, arcaneInfo3.DamageSections)
|
|
9034
|
+
: 0)
|
|
9035
|
+
.toFixed(2)
|
|
9036
|
+
.replace(",", ".");
|
|
9037
|
+
var cooldownBreakpointsCount = Object.keys(arcaneInfo3.CooldownBreakpoints).length;
|
|
9038
|
+
var effectBreakpointsCount = Object.keys(arcaneInfo3.EffectBreakpoints).length;
|
|
9039
|
+
subInfoGroups.push({
|
|
9040
|
+
title: "",
|
|
9041
|
+
texts: [
|
|
9042
|
+
React__default["default"].createElement("div", null,
|
|
9043
|
+
React__default["default"].createElement("div", { style: { display: "flex", alignItems: "center" } },
|
|
9044
|
+
React__default["default"].createElement("span", { className: "tooltipArg", style: { fontSize: "14px" } }, "Skill Grandmaster"),
|
|
9045
|
+
React__default["default"].createElement("div", { className: "arcanemark" }),
|
|
9046
|
+
React__default["default"].createElement("span", { className: "tooltipArg", style: { fontSize: "14px" } }, masteryPoints)),
|
|
9047
|
+
React__default["default"].createElement("div", { className: "arcaneContainer" },
|
|
9048
|
+
damageSectionCount > 0 ? (React__default["default"].createElement("div", null,
|
|
9049
|
+
"Damage increase:\u00A0",
|
|
9050
|
+
React__default["default"].createElement("span", { className: "tooltipArg" },
|
|
9051
|
+
damageMasteryValue,
|
|
9052
|
+
"%"))) : null,
|
|
9053
|
+
cooldownBreakpointsCount > 0 ? (React__default["default"].createElement("div", { className: "arcaneSection" }, Object.entries(arcaneInfo3.CooldownBreakpoints).map(function (_a) {
|
|
9054
|
+
var key = _a[0], value = _a[1];
|
|
9055
|
+
var numericKey = Number(key);
|
|
9056
|
+
return (React__default["default"].createElement("div", { className: "arcaneRow", key: key },
|
|
9057
|
+
React__default["default"].createElement("span", { className: "arcanebackgroundFormat" },
|
|
9058
|
+
React__default["default"].createElement("span", { className: masteryPoints >= numericKey
|
|
9059
|
+
? "arcanebackground"
|
|
9060
|
+
: "arcanebackgroundDisabled" }),
|
|
9061
|
+
React__default["default"].createElement("span", { className: "arcanebackgroundText " +
|
|
9062
|
+
(masteryPoints >= numericKey
|
|
9063
|
+
? "00008130.UI.Label_Green03_12"
|
|
9064
|
+
: "tooltipArgDisabled") }, key)),
|
|
9065
|
+
React__default["default"].createElement("span", { className: masteryPoints >= numericKey
|
|
9066
|
+
? "00008130.UI.Label_Green03_12"
|
|
9067
|
+
: "tooltipArgDisabled" },
|
|
9068
|
+
"Cooldown decreases by",
|
|
9069
|
+
" ",
|
|
9070
|
+
((value * -1) / 1000).toFixed(1).replace(",", "."),
|
|
9071
|
+
" ",
|
|
9072
|
+
"sec.")));
|
|
9073
|
+
}))) : null,
|
|
9074
|
+
effectBreakpointsCount > 0 ? (React__default["default"].createElement("div", { className: "arcaneSection" }, Object.entries(arcaneInfo3.EffectBreakpoints).map(function (_a) {
|
|
9075
|
+
var key = _a[0], value = _a[1];
|
|
9076
|
+
var numericKey = Number(key);
|
|
9077
|
+
return (React__default["default"].createElement("div", { className: "arcaneRow", key: key },
|
|
9078
|
+
React__default["default"].createElement("span", { className: "arcanebackgroundFormat" },
|
|
9079
|
+
React__default["default"].createElement("span", { className: masteryPoints >= numericKey
|
|
9080
|
+
? "arcanebackground"
|
|
9081
|
+
: "arcanebackgroundDisabled" }),
|
|
9082
|
+
React__default["default"].createElement("span", { className: "arcanebackgroundText " +
|
|
9083
|
+
(masteryPoints >= numericKey
|
|
9084
|
+
? "00008130.UI.Label_Green03_12"
|
|
9085
|
+
: "tooltipArgDisabled") }, key)),
|
|
9086
|
+
React__default["default"].createElement("span", { className: masteryPoints >= numericKey
|
|
9087
|
+
? "00008130.UI.Label_Green03_12"
|
|
9088
|
+
: "tooltipArgDisabled", dangerouslySetInnerHTML: { __html: value } })));
|
|
9089
|
+
}))) : null)),
|
|
9090
|
+
],
|
|
9091
|
+
});
|
|
9092
|
+
}
|
|
9023
9093
|
function AddSkillMastery2(subInfoGroups, masteryPoints, arcaneInfo2, showZeroMastery) {
|
|
9024
9094
|
var _a;
|
|
9025
9095
|
if (showZeroMastery === void 0) { showZeroMastery = false; }
|