Skip to content

Commit

Permalink
ignore weight importance for weight limit combo filter
Browse files Browse the repository at this point in the history
  • Loading branch information
lewisc64 committed Aug 26, 2024
1 parent af74380 commit 4c67c4f
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions elden-ring-poise-optimizer/src/components/PoiseCalculator.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,10 @@ const PoiseCalculator = ({ armorData }) => {
targetPoise: Math.ceil(
targetPoise / (useBullGoats ? BULL_GOAT_TALISMAN_MULTIPLIER : 1)
),
importances: importances,
importances:
comboFilterMethod == COMBO_FILTER_METHOD.BY_WEIGHT_LIMIT
? { ...importances, weight: 0 }
: importances,
weightLimit:
Math.round(
(maxEquipLoad * ROLL_PERCENTAGES[desiredRollType] -
Expand Down Expand Up @@ -132,6 +135,11 @@ const PoiseCalculator = ({ armorData }) => {
desiredRollType,
]);

const relevantImportancesNames =
comboFilterMethod == COMBO_FILTER_METHOD.BY_WEIGHT_LIMIT
? Object.keys(importances).filter((x) => x != 'weight')
: Object.keys(importances);

return (
<div
css={css`
Expand Down Expand Up @@ -240,7 +248,7 @@ const PoiseCalculator = ({ armorData }) => {
</CollapsablePanel>
<CollapsablePanel title="Sorting Settings" collapsedByDefault={true}>
<div css={settingsSectionCss}>
{Object.keys(importances).map((x) => (
{relevantImportancesNames.map((x) => (
<Fragment key={x}>
<p>{ARMOR_ATTRIBUTE_NAME_MAP[x]} importance</p>
<TextBox
Expand Down

0 comments on commit 4c67c4f

Please sign in to comment.