diff --git a/locales/en/translation.json b/locales/en/translation.json index cb1ce5975..69625e93a 100644 --- a/locales/en/translation.json +++ b/locales/en/translation.json @@ -240,6 +240,7 @@ "affix_Berserker": "Berserker", "affix_BerserkerValkyrie": "BerserkerValkyrie", "affix_Bringer": "Bringer", + "affix_Captain": "Captain", "affix_Carrion": "Carrion", "affix_Cavalier": "Cavalier", "affix_Celestial": "Celestial", diff --git a/src/components/baseComponents/AffixesSelect.tsx b/src/components/baseComponents/AffixesSelect.tsx index 436749919..1ae9fce0e 100644 --- a/src/components/baseComponents/AffixesSelect.tsx +++ b/src/components/baseComponents/AffixesSelect.tsx @@ -5,18 +5,24 @@ import Autocomplete from '@mui/material/Autocomplete'; import React from 'react'; import { useTranslation } from 'react-i18next'; import { makeStyles } from 'tss-react/mui'; -import type { AffixName } from '../../utils/gw2-data'; +import type { AffixDataEntry, AffixName } from '../../utils/gw2-data'; import { Affix } from '../../utils/gw2-data'; import { objectKeys } from '../../utils/usefulFunctions'; const mistBandId = 80793; +const subLabels: Partial> = { + ascendedMismatchedTrinket: '(trinkets only)', + trinketsBackOnly: '(trinkets/back only)', +}; + const createOptions = (array: (AffixName | null)[]) => array .filter((affix) => !!affix) .map((affix) => ({ label: affix, category: Affix[affix].category, + subLabel: subLabels[Affix[affix].type], })); const order = [ 'Hybrid', @@ -126,30 +132,33 @@ const AffixesSelect = ({ name, multiple, onChange, value: selected }: AffixesSel )} - {option.label === 'Custom' || /[a-z][A-Z]/.test(option.label) ? ( - - ) : ( - - )} + + {option.label === 'Custom' || /[a-z][A-Z]/.test(option.label) ? ( + + ) : ( + + )} + {option.subLabel && {option.subLabel}} + )} renderTags={(value, getTagProps) => diff --git a/src/components/url-state/schema/SchemaDicts.js b/src/components/url-state/schema/SchemaDicts.js index c3c757cfb..ee919979e 100644 --- a/src/components/url-state/schema/SchemaDicts.js +++ b/src/components/url-state/schema/SchemaDicts.js @@ -42,6 +42,7 @@ export const gearDict = [ 'RabidApothecary', 'DireRabid', 'Demolisher', + 'Captain', ]; export const professionDict = [ diff --git a/src/utils/gw2-data.ts b/src/utils/gw2-data.ts index 838f0a2bc..c74cdf0bf 100644 --- a/src/utils/gw2-data.ts +++ b/src/utils/gw2-data.ts @@ -49,11 +49,12 @@ export type AffixName = | 'BerserkerValkyrie' | 'RabidApothecary' | 'DireRabid' + | 'Captain' | 'Custom'; export type AffixDataEntry = | { - type: 'triple' | 'quadruple'; + type: 'triple' | 'quadruple' | 'trinketsBackOnly'; category: string; bonuses: { major: GearAttributeName[]; @@ -510,6 +511,14 @@ export const Affix: Record = { jewelMinor: ['Toughness', 'Precision'], }, }, + Captain: { + type: 'trinketsBackOnly', + category: 'Power Survivability', + bonuses: { + major: ['Precision'], + minor: ['Power', 'Toughness'], + }, + }, }; export const exoticStats = { @@ -532,6 +541,10 @@ export const exoticStats = { jewelMajor: 0, jewelMinor: 0, }, + trinketsBackOnly: { + major: 0, + minor: 0, + }, }, SHOULDERS: { triple: { @@ -552,6 +565,10 @@ export const exoticStats = { jewelMajor: 0, jewelMinor: 0, }, + trinketsBackOnly: { + major: 0, + minor: 0, + }, }, CHEST: { triple: { @@ -572,6 +589,10 @@ export const exoticStats = { jewelMajor: 0, jewelMinor: 0, }, + trinketsBackOnly: { + major: 0, + minor: 0, + }, }, GLOVES: { triple: { @@ -592,6 +613,10 @@ export const exoticStats = { jewelMajor: 0, jewelMinor: 0, }, + trinketsBackOnly: { + major: 0, + minor: 0, + }, }, LEGGINGS: { triple: { @@ -612,6 +637,10 @@ export const exoticStats = { jewelMajor: 0, jewelMinor: 0, }, + trinketsBackOnly: { + major: 0, + minor: 0, + }, }, BOOTS: { triple: { @@ -632,6 +661,10 @@ export const exoticStats = { jewelMajor: 0, jewelMinor: 0, }, + trinketsBackOnly: { + major: 0, + minor: 0, + }, }, AMULET: { triple: { @@ -652,6 +685,10 @@ export const exoticStats = { jewelMajor: 0, jewelMinor: 0, }, + trinketsBackOnly: { + major: 0, + minor: 0, + }, }, RING: { triple: { @@ -672,6 +709,10 @@ export const exoticStats = { jewelMajor: 0, jewelMinor: 0, }, + trinketsBackOnly: { + major: 0, + minor: 0, + }, }, ACCESSORY: { triple: { @@ -692,6 +733,10 @@ export const exoticStats = { jewelMajor: 0, jewelMinor: 0, }, + trinketsBackOnly: { + major: 0, + minor: 0, + }, }, BACK_ITEM: { triple: { @@ -712,6 +757,10 @@ export const exoticStats = { jewelMajor: 0, jewelMinor: 0, }, + trinketsBackOnly: { + major: 0, + minor: 0, + }, }, ONEHANDED_WEAPON: { triple: { @@ -732,6 +781,10 @@ export const exoticStats = { jewelMajor: 0, jewelMinor: 0, }, + trinketsBackOnly: { + major: 0, + minor: 0, + }, }, TWOHANDED_WEAPON: { triple: { @@ -752,6 +805,10 @@ export const exoticStats = { jewelMajor: 0, jewelMinor: 0, }, + trinketsBackOnly: { + major: 0, + minor: 0, + }, }, }; @@ -775,6 +832,10 @@ export const ascendedStats = { jewelMajor: 0, jewelMinor: 0, }, + trinketsBackOnly: { + major: 0, + minor: 0, + }, }, SHOULDERS: { triple: { @@ -795,6 +856,10 @@ export const ascendedStats = { jewelMajor: 0, jewelMinor: 0, }, + trinketsBackOnly: { + major: 0, + minor: 0, + }, }, CHEST: { triple: { @@ -815,6 +880,10 @@ export const ascendedStats = { jewelMajor: 0, jewelMinor: 0, }, + trinketsBackOnly: { + major: 0, + minor: 0, + }, }, GLOVES: { triple: { @@ -835,6 +904,10 @@ export const ascendedStats = { jewelMajor: 0, jewelMinor: 0, }, + trinketsBackOnly: { + major: 0, + minor: 0, + }, }, LEGGINGS: { triple: { @@ -855,6 +928,10 @@ export const ascendedStats = { jewelMajor: 0, jewelMinor: 0, }, + trinketsBackOnly: { + major: 0, + minor: 0, + }, }, BOOTS: { triple: { @@ -875,6 +952,10 @@ export const ascendedStats = { jewelMajor: 0, jewelMinor: 0, }, + trinketsBackOnly: { + major: 0, + minor: 0, + }, }, AMULET: { triple: { @@ -895,6 +976,10 @@ export const ascendedStats = { jewelMajor: 32, jewelMinor: 18, }, + trinketsBackOnly: { + major: 157, + minor: 108, + }, }, RING: { triple: { @@ -915,6 +1000,10 @@ export const ascendedStats = { jewelMajor: 32, jewelMinor: 18, }, + trinketsBackOnly: { + major: 126, + minor: 85, + }, }, ACCESSORY: { triple: { @@ -935,6 +1024,10 @@ export const ascendedStats = { jewelMajor: 32, jewelMinor: 18, }, + trinketsBackOnly: { + major: 110, + minor: 74, + }, }, BACK_ITEM: { triple: { @@ -955,6 +1048,10 @@ export const ascendedStats = { jewelMajor: 0, jewelMinor: 0, }, + trinketsBackOnly: { + major: 63, + minor: 40, + }, }, ONEHANDED_WEAPON: { triple: { @@ -975,6 +1072,10 @@ export const ascendedStats = { jewelMajor: 0, jewelMinor: 0, }, + trinketsBackOnly: { + major: 0, + minor: 0, + }, }, TWOHANDED_WEAPON: { triple: { @@ -995,6 +1096,10 @@ export const ascendedStats = { jewelMajor: 0, jewelMinor: 0, }, + trinketsBackOnly: { + major: 0, + minor: 0, + }, }, }; diff --git a/wasm_module/src/data/affix.rs b/wasm_module/src/data/affix.rs index 3df8903df..74fc7ab62 100644 --- a/wasm_module/src/data/affix.rs +++ b/wasm_module/src/data/affix.rs @@ -47,6 +47,7 @@ pub enum Affix { RabidApothecary = 40, DireRabid = 41, Demolisher = 42, + Captain = 43, #[default] None = 255, } @@ -97,6 +98,7 @@ impl Affix { Affix::RabidApothecary => "RabidApothecary".to_string(), Affix::DireRabid => "DireRabid".to_string(), Affix::Demolisher => "Demolisher".to_string(), + Affix::Captain => "Captain".to_string(), Affix::None => "".to_string(), } }