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.
@@ -15,3 +15,21 @@ export interface IBnsMoney {
15
15
  export declare function getMoneyObj(money: number): IBnsMoney | null;
16
16
  export declare function GetSkillMasteryValue(points: number, arcaneInfo: SkillArcaneInfo): number;
17
17
  export declare function GetSkillMasteryValue2(points: number, arcaneInfo: SkillArcaneInfo2 | undefined): number;
18
+ /**
19
+ * Calculates the cooldown reduction value based on skill mastery points and defined breakpoints.
20
+ *
21
+ * @param mastery - The total skill mastery points.
22
+ * @param cooldownBreakpoints - An object mapping breakpoints to their corresponding cooldown reduction values.
23
+ * @returns The total cooldown reduction value.
24
+ */
25
+ export declare function GetSkillMasteryCdValueForPoints(mastery: number, cooldownBreakpoints: {
26
+ [id: number]: number;
27
+ }): number;
28
+ /**
29
+ * Calculates the total skill bonus based on mastery points and the given damage sections.
30
+ *
31
+ * @param mastery - The total mastery points.
32
+ * @param damageSections - An object defining breakpoints and corresponding multipliers.
33
+ * @returns The total bonus percentage.
34
+ */
35
+ export declare function GetSkillMasteryDamageValueForPoints(mastery: number, damageSections: Record<number, number>): number;
@@ -27,8 +27,21 @@ export interface Skill {
27
27
  RealEffects: RealEffects;
28
28
  ArcaneInfo?: SkillArcaneInfo;
29
29
  ArcaneInfo2?: SkillArcaneInfo2;
30
+ ArcaneInfo3?: SkillArcaneInfo3;
30
31
  ArcaneInfoDiffText?: string;
31
32
  }
33
+ export interface SkillArcaneInfo3 {
34
+ ArcaneScore: number;
35
+ DamageSections: {
36
+ [id: number]: number;
37
+ };
38
+ CooldownBreakpoints: {
39
+ [id: number]: number;
40
+ };
41
+ EffectBreakpoints: {
42
+ [id: number]: string;
43
+ };
44
+ }
32
45
  export declare enum ArcaneModifyType {
33
46
  None = 0,
34
47
  Damage = 1,
package/build/index.es.js CHANGED
@@ -322,7 +322,7 @@ function GetSkillMasteryValue(points, arcaneInfo) {
322
322
  return 0;
323
323
  return arcaneInfo.IsCooldown
324
324
  ? GetSkillMasteryCdValueForPoints(points, arcaneInfo.CooldownBreakpoints)
325
- : GetSkillMasteryValueForPoints(points, arcaneInfo.DamageSections);
325
+ : GetSkillMasteryDamageValueForPoints(points, arcaneInfo.DamageSections);
326
326
  }
327
327
  function GetSkillMasteryValue2(points, arcaneInfo) {
328
328
  if (points <= 0 || arcaneInfo == undefined || arcaneInfo == null)
@@ -331,7 +331,7 @@ function GetSkillMasteryValue2(points, arcaneInfo) {
331
331
  return 0; // No modification
332
332
  if (arcaneInfo.Type === 1) {
333
333
  // Damage modification
334
- return GetSkillMasteryValueForPoints(points, arcaneInfo.Breakpoints);
334
+ return GetSkillMasteryDamageValueForPoints(points, arcaneInfo.Breakpoints);
335
335
  }
336
336
  if (arcaneInfo.Type === 2) {
337
337
  // Cooldown modification
@@ -368,7 +368,7 @@ function GetSkillMasteryCdValueForPoints(mastery, cooldownBreakpoints) {
368
368
  * @param damageSections - An object defining breakpoints and corresponding multipliers.
369
369
  * @returns The total bonus percentage.
370
370
  */
371
- function GetSkillMasteryValueForPoints(mastery, damageSections) {
371
+ function GetSkillMasteryDamageValueForPoints(mastery, damageSections) {
372
372
  var bonus = 0; // Stores the accumulated bonus percentage
373
373
  var previousLimit = 0; // Keeps track of the previous breakpoint
374
374
  // Iterate over the damageSections object, sorted by its keys (breakpoints)
@@ -8747,7 +8747,7 @@ function JsonArrayToJsxArray(stringArray) {
8747
8747
  return jsxArray;
8748
8748
  }
8749
8749
 
8750
- 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}";
8750
+ 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}";
8751
8751
  styleInject(css_248z$8);
8752
8752
 
8753
8753
  function getButtonIconPath(button) {
@@ -8943,6 +8943,7 @@ function SkillTooltip(_a) {
8943
8943
  AddBreakValue(tooltipBaseProps.subInfoGroups, skill);
8944
8944
  AddSkillMastery(tooltipBaseProps.subInfoGroups, masteryPoints, skill.ArcaneInfo, showZeroMastery);
8945
8945
  AddSkillMastery2(tooltipBaseProps.subInfoGroups, masteryPoints, skill.ArcaneInfo2, showZeroMastery);
8946
+ AddSkillMastery3(tooltipBaseProps.subInfoGroups, masteryPoints, skill.ArcaneInfo3, showZeroMastery);
8946
8947
  AddSkillMasteryDiff(tooltipBaseProps.subInfoGroups, skill.ArcaneInfoDiffText);
8947
8948
  AddPvpModifiers(tooltipBaseProps.subInfoGroups, skill);
8948
8949
  AddBoundaries(tooltipBaseProps.subInfoGroups, skill);
@@ -9012,6 +9013,75 @@ function AddSkillMasteryDiff(subInfoGroups, arcaneInfoDiffText) {
9012
9013
  ],
9013
9014
  });
9014
9015
  }
9016
+ function AddSkillMastery3(subInfoGroups, masteryPoints, arcaneInfo3, showZeroMastery) {
9017
+ if (showZeroMastery === void 0) { showZeroMastery = false; }
9018
+ if (arcaneInfo3 == undefined ||
9019
+ masteryPoints == null ||
9020
+ (masteryPoints == 0 && !showZeroMastery) ||
9021
+ arcaneInfo3 == null)
9022
+ return;
9023
+ var damageSectionCount = Object.keys(arcaneInfo3.DamageSections).length;
9024
+ var damageMasteryValue = (damageSectionCount > 0
9025
+ ? GetSkillMasteryDamageValueForPoints(masteryPoints, arcaneInfo3.DamageSections)
9026
+ : 0)
9027
+ .toFixed(2)
9028
+ .replace(",", ".");
9029
+ var cooldownBreakpointsCount = Object.keys(arcaneInfo3.CooldownBreakpoints).length;
9030
+ var effectBreakpointsCount = Object.keys(arcaneInfo3.EffectBreakpoints).length;
9031
+ subInfoGroups.push({
9032
+ title: "",
9033
+ texts: [
9034
+ React.createElement("div", null,
9035
+ React.createElement("div", { style: { display: "flex", alignItems: "center" } },
9036
+ React.createElement("span", { className: "tooltipArg", style: { fontSize: "14px" } }, "Skill Grandmaster"),
9037
+ React.createElement("div", { className: "arcanemark" }),
9038
+ React.createElement("span", { className: "tooltipArg", style: { fontSize: "14px" } }, masteryPoints)),
9039
+ React.createElement("div", { className: "arcaneContainer" },
9040
+ damageSectionCount > 0 ? (React.createElement("div", null,
9041
+ "Damage increase:\u00A0",
9042
+ React.createElement("span", { className: "tooltipArg" },
9043
+ damageMasteryValue,
9044
+ "%"))) : null,
9045
+ cooldownBreakpointsCount > 0 ? (React.createElement("div", { className: "arcaneSection" }, Object.entries(arcaneInfo3.CooldownBreakpoints).map(function (_a) {
9046
+ var key = _a[0], value = _a[1];
9047
+ var numericKey = Number(key);
9048
+ return (React.createElement("div", { className: "arcaneRow", key: key },
9049
+ React.createElement("span", { className: "arcanebackgroundFormat" },
9050
+ React.createElement("span", { className: masteryPoints >= numericKey
9051
+ ? "arcanebackground"
9052
+ : "arcanebackgroundDisabled" }),
9053
+ React.createElement("span", { className: "arcanebackgroundText " +
9054
+ (masteryPoints >= numericKey
9055
+ ? "00008130.UI.Label_Green03_12"
9056
+ : "tooltipArgDisabled") }, key)),
9057
+ React.createElement("span", { className: masteryPoints >= numericKey
9058
+ ? "00008130.UI.Label_Green03_12"
9059
+ : "tooltipArgDisabled" },
9060
+ "Cooldown decreases by",
9061
+ " ",
9062
+ ((value * -1) / 1000).toFixed(1).replace(",", "."),
9063
+ " ",
9064
+ "sec.")));
9065
+ }))) : null,
9066
+ effectBreakpointsCount > 0 ? (React.createElement("div", { className: "arcaneSection" }, Object.entries(arcaneInfo3.EffectBreakpoints).map(function (_a) {
9067
+ var key = _a[0], value = _a[1];
9068
+ var numericKey = Number(key);
9069
+ return (React.createElement("div", { className: "arcaneRow", key: key },
9070
+ React.createElement("span", { className: "arcanebackgroundFormat" },
9071
+ React.createElement("span", { className: masteryPoints >= numericKey
9072
+ ? "arcanebackground"
9073
+ : "arcanebackgroundDisabled" }),
9074
+ React.createElement("span", { className: "arcanebackgroundText " +
9075
+ (masteryPoints >= numericKey
9076
+ ? "00008130.UI.Label_Green03_12"
9077
+ : "tooltipArgDisabled") }, key)),
9078
+ React.createElement("span", { className: masteryPoints >= numericKey
9079
+ ? "00008130.UI.Label_Green03_12"
9080
+ : "tooltipArgDisabled", dangerouslySetInnerHTML: { __html: value } })));
9081
+ }))) : null)),
9082
+ ],
9083
+ });
9084
+ }
9015
9085
  function AddSkillMastery2(subInfoGroups, masteryPoints, arcaneInfo2, showZeroMastery) {
9016
9086
  var _a;
9017
9087
  if (showZeroMastery === void 0) { showZeroMastery = false; }