diff --git a/locales/en/translation.json b/locales/en/translation.json index eecec8f43..74a6ae232 100644 --- a/locales/en/translation.json +++ b/locales/en/translation.json @@ -203,6 +203,7 @@ "affix_Apothecary": "Apothecary", "affix_Assassin": "Assassin", "affix_Berserker": "Berserker", + "affix_Berserker and Valkyrie": "Berserker and Valkyrie", "affix_Bringer": "Bringer", "affix_Carrion": "Carrion", "affix_Cavalier": "Cavalier", @@ -212,6 +213,7 @@ "affix_Crusader": "Crusader", "affix_Custom": "Custom", "affix_Dire": "Dire", + "affix_Dire and Rabid": "Dire and Rabid", "affix_Diviner": "Diviner", "affix_Dragon": "Dragon", "affix_Giver": "Giver", @@ -225,6 +227,7 @@ "affix_Nomad": "Nomad", "affix_Plaguedoctor": "Plaguedoctor", "affix_Rabid": "Rabid", + "affix_Rabid and Apothecary": "Rabid and Apothecary", "affix_Rampager": "Rampager", "affix_Ritualist": "Ritualist", "affix_Sentinel": "Sentinel", diff --git a/src/components/baseComponents/AffixesSelect.jsx b/src/components/baseComponents/AffixesSelect.jsx index 4609a0f61..ec60efd10 100644 --- a/src/components/baseComponents/AffixesSelect.jsx +++ b/src/components/baseComponents/AffixesSelect.jsx @@ -87,7 +87,7 @@ const AffixesSelect = ({ name, multiple, onChange, value: affixes }) => { )} )} - {option.label === 'Custom' ? ( + {option.label === 'Custom' || option.label.includes(' ') ? ( fragment !== 'and'); + const multiWordAffix = affixFragments.length > 1; + + const shortAffix = affixFragments + .map((fragment) => fragment.slice(0, multiWordAffix ? 3 : 4)) + .join('+'); + return ( // eslint-disable-next-line react/no-array-index-key @@ -92,7 +100,7 @@ const ResultTableRow = ({ color: mostCommonAffix && mostCommonAffix !== affix ? '#00cccc' : 'inherit', }} > - {affix.slice(0, 4)} + {shortAffix} ); diff --git a/src/state/optimizer/optimizerSetup.ts b/src/state/optimizer/optimizerSetup.ts index 32828baf5..7a91cdb80 100644 --- a/src/state/optimizer/optimizerSetup.ts +++ b/src/state/optimizer/optimizerSetup.ts @@ -826,7 +826,7 @@ export function setupCombinations(reduxState: any) { number, ][]; for (const [type, bonus] of bonuses) { - for (const stat of Affix[affix].bonuses[type]) { + for (const stat of Affix[affix].bonuses[type] ?? []) { statTotals[stat] = (statTotals[stat] || 0) + bonus; } } diff --git a/src/utils/gw2-data.ts b/src/utils/gw2-data.ts index 94b643ede..fc644068a 100644 --- a/src/utils/gw2-data.ts +++ b/src/utils/gw2-data.ts @@ -42,15 +42,20 @@ export type AffixName = | 'Settler' | 'Bringer' | 'Ritualist' - | 'Dragon'; + | 'Dragon' + | 'Berserker and Valkyrie' + | 'Rabid and Apothecary' + | 'Dire and Rabid'; type AffixNameOrCustom = AffixName | 'Custom'; export interface AffixData { - type: 'triple' | 'quadruple' | 'celestial'; + type: 'triple' | 'quadruple' | 'celestial' | 'ascendedMismatchedTrinket'; category: string; bonuses: { major: (PrimaryAttributeName | SecondaryAttributeName)[]; minor: (PrimaryAttributeName | SecondaryAttributeName)[]; + jewelMajor?: (PrimaryAttributeName | SecondaryAttributeName)[]; + jewelMinor?: (PrimaryAttributeName | SecondaryAttributeName)[]; }; } export const Affix: Record = { @@ -366,6 +371,36 @@ export const Affix: Record = { minor: ['Precision', 'Vitality'], }, }, + 'Berserker and Valkyrie': { + type: 'ascendedMismatchedTrinket', + category: 'Open World', + bonuses: { + major: ['Power'], + minor: ['Precision', 'Ferocity'], + jewelMajor: ['Power'], + jewelMinor: ['Vitality', 'Ferocity'], + }, + }, + 'Rabid and Apothecary': { + type: 'ascendedMismatchedTrinket', + category: 'Open World', + bonuses: { + major: ['Condition Damage'], + minor: ['Toughness', 'Precision'], + jewelMajor: ['Healing Power'], + jewelMinor: ['Condition Damage', 'Toughness'], + }, + }, + 'Dire and Rabid': { + type: 'triple', + category: 'Open World', + bonuses: { + major: ['Condition Damage'], + minor: ['Toughness', 'Vitality'], + jewelMajor: ['Condition Damage'], + jewelMinor: ['Toughness', 'Precision'], + }, + }, }; export const ExoticItem = { @@ -382,6 +417,12 @@ export const ExoticItem = { major: 28, minor: 28, }, + ascendedMismatchedTrinket: { + major: 0, + minor: 0, + jewelMajor: 0, + jewelMinor: 0, + }, }, SHOULDERS: { triple: { @@ -396,6 +437,12 @@ export const ExoticItem = { major: 21, minor: 21, }, + ascendedMismatchedTrinket: { + major: 0, + minor: 0, + jewelMajor: 0, + jewelMinor: 0, + }, }, CHEST: { triple: { @@ -410,6 +457,12 @@ export const ExoticItem = { major: 63, minor: 63, }, + ascendedMismatchedTrinket: { + major: 0, + minor: 0, + jewelMajor: 0, + jewelMinor: 0, + }, }, GLOVES: { triple: { @@ -424,6 +477,12 @@ export const ExoticItem = { major: 21, minor: 21, }, + ascendedMismatchedTrinket: { + major: 0, + minor: 0, + jewelMajor: 0, + jewelMinor: 0, + }, }, LEGGINGS: { triple: { @@ -438,6 +497,12 @@ export const ExoticItem = { major: 42, minor: 42, }, + ascendedMismatchedTrinket: { + major: 0, + minor: 0, + jewelMajor: 0, + jewelMinor: 0, + }, }, BOOTS: { triple: { @@ -452,6 +517,12 @@ export const ExoticItem = { major: 21, minor: 21, }, + ascendedMismatchedTrinket: { + major: 0, + minor: 0, + jewelMajor: 0, + jewelMinor: 0, + }, }, AMULET: { triple: { @@ -466,6 +537,12 @@ export const ExoticItem = { major: 68, minor: 68, }, + ascendedMismatchedTrinket: { + major: 0, + minor: 0, + jewelMajor: 0, + jewelMinor: 0, + }, }, RING: { triple: { @@ -480,6 +557,12 @@ export const ExoticItem = { major: 54, minor: 54, }, + ascendedMismatchedTrinket: { + major: 0, + minor: 0, + jewelMajor: 0, + jewelMinor: 0, + }, }, ACCESSORY: { triple: { @@ -494,6 +577,12 @@ export const ExoticItem = { major: 47, minor: 47, }, + ascendedMismatchedTrinket: { + major: 0, + minor: 0, + jewelMajor: 0, + jewelMinor: 0, + }, }, BACK_ITEM: { triple: { @@ -508,6 +597,12 @@ export const ExoticItem = { major: 26, minor: 26, }, + ascendedMismatchedTrinket: { + major: 0, + minor: 0, + jewelMajor: 0, + jewelMinor: 0, + }, }, ONEHANDED_WEAPON: { triple: { @@ -522,6 +617,12 @@ export const ExoticItem = { major: 56, minor: 56, }, + ascendedMismatchedTrinket: { + major: 0, + minor: 0, + jewelMajor: 0, + jewelMinor: 0, + }, }, TWOHANDED_WEAPON: { triple: { @@ -536,6 +637,12 @@ export const ExoticItem = { major: 113, minor: 113, }, + ascendedMismatchedTrinket: { + major: 0, + minor: 0, + jewelMajor: 0, + jewelMinor: 0, + }, }, }; @@ -553,6 +660,12 @@ export const AscendedItem = { major: 30, minor: 30, }, + ascendedMismatchedTrinket: { + major: 0, + minor: 0, + jewelMajor: 0, + jewelMinor: 0, + }, }, SHOULDERS: { triple: { @@ -567,6 +680,12 @@ export const AscendedItem = { major: 22, minor: 22, }, + ascendedMismatchedTrinket: { + major: 0, + minor: 0, + jewelMajor: 0, + jewelMinor: 0, + }, }, CHEST: { triple: { @@ -581,6 +700,12 @@ export const AscendedItem = { major: 67, minor: 67, }, + ascendedMismatchedTrinket: { + major: 0, + minor: 0, + jewelMajor: 0, + jewelMinor: 0, + }, }, GLOVES: { triple: { @@ -595,6 +720,12 @@ export const AscendedItem = { major: 22, minor: 22, }, + ascendedMismatchedTrinket: { + major: 0, + minor: 0, + jewelMajor: 0, + jewelMinor: 0, + }, }, LEGGINGS: { triple: { @@ -609,6 +740,12 @@ export const AscendedItem = { major: 44, minor: 44, }, + ascendedMismatchedTrinket: { + major: 0, + minor: 0, + jewelMajor: 0, + jewelMinor: 0, + }, }, BOOTS: { triple: { @@ -623,6 +760,12 @@ export const AscendedItem = { major: 22, minor: 22, }, + ascendedMismatchedTrinket: { + major: 0, + minor: 0, + jewelMajor: 0, + jewelMinor: 0, + }, }, AMULET: { triple: { @@ -637,6 +780,12 @@ export const AscendedItem = { major: 72, minor: 72, }, + ascendedMismatchedTrinket: { + major: 157 - 32, + minor: 108 - 18, + jewelMajor: 32, + jewelMinor: 18, + }, }, RING: { triple: { @@ -651,6 +800,12 @@ export const AscendedItem = { major: 57, minor: 57, }, + ascendedMismatchedTrinket: { + major: 126 - 32, + minor: 85 - 18, + jewelMajor: 32, + jewelMinor: 18, + }, }, ACCESSORY: { triple: { @@ -665,6 +820,12 @@ export const AscendedItem = { major: 50, minor: 50, }, + ascendedMismatchedTrinket: { + major: 110 - 32, + minor: 74 - 18, + jewelMajor: 32, + jewelMinor: 18, + }, }, BACK_ITEM: { triple: { @@ -679,6 +840,12 @@ export const AscendedItem = { major: 28, minor: 28, }, + ascendedMismatchedTrinket: { + major: 0, + minor: 0, + jewelMajor: 0, + jewelMinor: 0, + }, }, ONEHANDED_WEAPON: { triple: { @@ -693,6 +860,12 @@ export const AscendedItem = { major: 59, minor: 59, }, + ascendedMismatchedTrinket: { + major: 0, + minor: 0, + jewelMajor: 0, + jewelMinor: 0, + }, }, TWOHANDED_WEAPON: { triple: { @@ -707,6 +880,12 @@ export const AscendedItem = { major: 118, minor: 118, }, + ascendedMismatchedTrinket: { + major: 0, + minor: 0, + jewelMajor: 0, + jewelMinor: 0, + }, }, };