Skip to content

Commit

Permalink
add mismatched ascended trinkets
Browse files Browse the repository at this point in the history
  • Loading branch information
marcustyphoon committed Aug 4, 2023
1 parent 9327cec commit 337ca81
Show file tree
Hide file tree
Showing 5 changed files with 195 additions and 5 deletions.
3 changes: 3 additions & 0 deletions locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/components/baseComponents/AffixesSelect.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ const AffixesSelect = ({ name, multiple, onChange, value: affixes }) => {
)}
</Box>
)}
{option.label === 'Custom' ? (
{option.label === 'Custom' || option.label.includes(' ') ? (
<Item
id={mistBandId}
disableIcon
Expand Down
10 changes: 9 additions & 1 deletion src/components/sections/results/table/ResultTableRow.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,14 @@ const ResultTableRow = ({
textDecoration = 'underline dotted #ffa405';
if (!exoticRarity(affix, index) && mostCommonRarity !== 'ascended')
textDecoration = 'underline dotted #fb3e8d';

const affixFragments = affix.split(' ').filter((fragment) => 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
<TableCell align="center" key={affix + index} padding="none">
Expand All @@ -92,7 +100,7 @@ const ResultTableRow = ({
color: mostCommonAffix && mostCommonAffix !== affix ? '#00cccc' : 'inherit',
}}
>
{affix.slice(0, 4)}
{shortAffix}
</Typography>
</TableCell>
);
Expand Down
2 changes: 1 addition & 1 deletion src/state/optimizer/optimizerSetup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down
Loading

0 comments on commit 337ca81

Please sign in to comment.