Skip to content

Commit 4c5fea3

Browse files
committed
Clarity Stats schema 1.9
1 parent 70d9be6 commit 4c5fea3

File tree

5 files changed

+14
-20
lines changed

5 files changed

+14
-20
lines changed

config/i18n.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1227,6 +1227,7 @@
12271227
"StrafingSpeed": "Strafing",
12281228
"CrouchingSpeed": "Crouching",
12291229
"TotalHP": "Total HP",
1230+
"ShieldHP": "Shield HP",
12301231
"DamageResistance": "PvE Damage Resist",
12311232
"FlinchResistance": "Flinch Resist"
12321233
},

src/app/clarity/descriptions/character-stats.ts

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,6 @@ export interface SuperAbility {
2929
Hash: number;
3030
/** Array index represents the Character Stat tier. Cooldowns are in seconds. Rounded to 2 decimal points. Note: Rounding to 2 decimal places is solely for improving math precision when combined with Override objects. When displaying these cooldown times, it is STRONGLY recommended to round them to an integer. */
3131
Cooldowns: number[];
32-
/** Numbers are provided in Damage Resist percentages and represent the Damage Resistance the super provied inside PvP. If the array is empty, the DR value is still unknown. If the array only contains one value, it represents the passive DR of the super. If the value is -9999, the value is still unknown (workaround that allows only inputting one of the PvE or PvP values. If other values are present, check the condition array for the conditions of each of them. */
33-
PvPDamageResistance: number[];
34-
/** Same length as the PvPDamageResistance array and works the exact same way except it stores the DR values for PvE. */
35-
PvEDamageResistance: number[];
36-
/** Array length matches the length of the DamageResistance arrays. This property can be ignored when the length of the arrays is 1 as that represents the passive DR of the Super that doesn't have a condition. The array contains the condition for each Damage Resist value at the same index in the DamageResistance arrays. Unfortunately, there is no way to realistically account for all the different conditions without using simple text for it so these will be succinct descriptions instead of item hashes or the like. */
37-
DRCondition: Description[];
3832
}
3933

4034
export interface Override {
@@ -43,7 +37,7 @@ export interface Override {
4337
/** The inventoryItem hash of each ability that is required to trigger the effects of this 'Override'. Only overrides 'Abilities' under the same Character Stat as the 'Override'. Any one of these will trigger its effect defined in the other 'Override' properties. Wildcards: if the requirements array only contains 1 item and it's a 0, any ability tied to this Character Stat will have its cooldown overwritten. Negative numbers in the array indicate filters, these will be the inventoryItem hashes of subclasses multiplied by -1. Any abilities tied to the given subclass will have their cooldowns overwritten. */
4438
Requirements: number[];
4539

46-
// One of CooldownOverride, Scalar, or FlatIncrease will be set.
40+
// One of CooldownOverride, Scalar, or ChunkEnergyOverride will be set.
4741

4842
/** Array index represents the Character Stat tier. Cooldowns are in seconds. Rounded to 2 decimal points. Overrides the cooldowns of the items listed in the 'Requirements' array before the scalar is applied. Identical to the 'Cooldowns' array of the 'Ability' object. */
4943
CooldownOverride?: number[];
@@ -52,9 +46,9 @@ export interface Override {
5246
*/
5347
Scalar?: number[];
5448
/**
55-
* Length of the array is equal to the length of the 'Requirements' array. Each item represents a flat increase to the cooldown time of the abilities (of a subclass) listed in the 'Requirements' array at the same array index. If 'CooldownOverride' or 'Scalar' property is specified: Time is added to the cooldown times at every tier after 'CooldownOverride's and 'Scalar's have been applied.
49+
* Length of the array is equal to the length of the <Requirements> array. Each item represents an override of the <ChunkEnergyScalar> property of the abilities (of a subclass) listed in the <Requirements> array at the same array index. If <CooldownOverride> or <Scalar> property is specified: Time is added to the cooldown times at every tier after <CooldownOverride>s and <Scalar>s have been applied.
5650
*/
57-
FlatIncrease?: number[];
51+
ChunkEnergyOverride?: number[];
5852
}
5953

6054
export interface StatAbilities {
@@ -91,8 +85,8 @@ export interface Recovery extends StatAbilities {
9185
}
9286

9387
export interface Resilience extends StatAbilities {
94-
/** Array index represents the Resilience tier. The numbers represent your total HP at each tier. 'Health' is a static 70 HP, the rest are what Bungie calls 'Shields' in-game. If you wish to display them separately, just subtract 70 from the numbers to get your shield HP. */
95-
TotalHP: DescriptionArray;
88+
/** Array index represents the Resilience tier. The numbers represent how much HP your <Shields> have at each tier. <Shields> are the 115 to 130 HP 'right-side portion' of your Total HP alongside <Health>. The amount of <Health> you have depends on the activity: 100 HP in most Crucible playlists (excluding Momentum Control and Mayhem) and 70 HP everywhere else. */
89+
ShieldHP: DescriptionArray;
9690
/** Array index represents the Resilience tier. The numbers represent the percentage damage resistance granted IN PVE at each tier. */
9791
PvEDamageResistance: DescriptionArray;
9892
/** Array index represents the Resilience tier. The numbers represent the percentage flinch resistance granted at each tier. */

src/app/clarity/descriptions/loadDescriptions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const urls = {
1616
statsVersion: `${CLARITY_BASE}Character-Stats/update.json`,
1717
} as const;
1818

19-
const CLARITY_STATS_SUPPORTED_SCHEMA = '1.8';
19+
const CLARITY_STATS_SUPPORTED_SCHEMA = '1.9';
2020

2121
const fetchClarity = async <T>(type: keyof typeof urls, version?: string) => {
2222
const url = urls[type];

src/app/store-stats/ClarityCharacterStat.tsx

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,6 @@ export default function ClarityCharacterStat({
8989
if (scalar) {
9090
cooldowns = cooldowns.map((v) => scalar * v);
9191
}
92-
const flatIncrease = o.FlatIncrease?.[abilityIndex];
93-
if (flatIncrease) {
94-
cooldowns = cooldowns.map((v) => v + flatIncrease);
95-
}
9692
overrides.push(defs.InventoryItem.get(o.Hash));
9793
}
9894
}
@@ -137,12 +133,14 @@ export default function ClarityCharacterStat({
137133
unit={t('Stats.MetersPerSecond')}
138134
/>,
139135
);
140-
} else if ('TotalHP' in clarityStatData) {
136+
} else if ('ShieldHP' in clarityStatData) {
141137
intrinsicCooldowns.push(
142138
<StatTableRow
143-
key="TotalHP"
144-
name={t('Stats.TotalHP')}
145-
cooldowns={clarityStatData.TotalHP.Array}
139+
key="ShieldHP"
140+
// t('Stats.TotalHP')
141+
// keep this around maybe?
142+
name={t('Stats.ShieldHP')}
143+
cooldowns={clarityStatData.ShieldHP.Array}
146144
tier={tier}
147145
unit={t('Stats.HP')}
148146
/>,

src/locale/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1207,6 +1207,7 @@
12071207
"PowerModifier": "Power granted by seasonal experience progression",
12081208
"Prestige": "Prestige Level: {{level}}\n{{exp}}xp until 5 motes of light.",
12091209
"Quality": "Stats quality",
1210+
"ShieldHP": "Shield HP",
12101211
"StrafingSpeed": "Strafing",
12111212
"Strength": "Strength",
12121213
"Sunset": "Sunset",

0 commit comments

Comments
 (0)