Skip to content

Commit

Permalink
update breaker mod identification regex
Browse files Browse the repository at this point in the history
  • Loading branch information
nev-r committed Jul 26, 2023
1 parent d858862 commit 06924fb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion output/artifact-breaker-weapon-types.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"485622768": [],
"485622768": [
5
],
"2611060930": [
8,
2489664120
Expand Down
3 changes: 2 additions & 1 deletion src/generate-artifact-breaker-weapons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const itemCategories = getAllDefs('ItemCategory')
.map((cat) => [cat.hash, cat.displayProperties.name.replace(/s$/, '')] as const);

// "strong against [Disruption]", "bonus damage against [Shield-Piercing]"
const breakerRegex = /against \[([\w\s-]+)\]/;
const breakerRegex = /(?:against|stuns?) \[([\w\s-]+)\]/;

const findBreakerPerk = (i: DestinyInventoryItemDefinition) => {
for (const perk of i.perks) {
Expand All @@ -60,6 +60,7 @@ for (const mod of armsMods) {
.filter(([, name]) => perkDef.displayProperties.description.includes(name))
.map(([hash]) => hash);
const breakerType = glyphToBreakerType[breakerCat];
console.log(breakerType);
if (glyphToBreakerType) {
breakerMods[breakerType].push(...matchingCategories);
} else {
Expand Down

0 comments on commit 06924fb

Please sign in to comment.