Skip to content

Commit

Permalink
unhide sorting options and add explanations
Browse files Browse the repository at this point in the history
  • Loading branch information
lewisc64 committed Aug 26, 2024
1 parent 4992a67 commit 9695336
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 13 deletions.
40 changes: 30 additions & 10 deletions elden-ring-poise-optimizer/src/components/PoiseCalculator.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@ const PoiseCalculator = ({ armorData }) => {
targetPoise / (useBullGoats ? BULL_GOAT_TALISMAN_MULTIPLIER : 1)
),
importances:
comboFilterMethod == COMBO_FILTER_METHOD.BY_WEIGHT_LIMIT
comboFilterMethod === COMBO_FILTER_METHOD.BY_TARGET_POISE
? { ...importances, poise: 0 }
: comboFilterMethod === COMBO_FILTER_METHOD.BY_WEIGHT_LIMIT
? { ...importances, weight: 0 }
: importances,
weightLimit:
Expand Down Expand Up @@ -137,11 +139,6 @@ 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 All @@ -160,7 +157,7 @@ const PoiseCalculator = ({ armorData }) => {
Target Poise
</option>
<option value={COMBO_FILTER_METHOD.BY_WEIGHT_LIMIT}>
Weight Limit
Equip Load
</option>
<option value={COMBO_FILTER_METHOD.BY_NOTHING}>
None (single top-scoring result)
Expand Down Expand Up @@ -257,12 +254,35 @@ const PoiseCalculator = ({ armorData }) => {
score.
</UnintrusiveText>
</p>
{comboFilterMethod === COMBO_FILTER_METHOD.BY_TARGET_POISE ? (
<p>
<UnintrusiveText
css={css`
color: #ff0;
`}
>
Poise multiplier is irrelevant when filtering by target poise.
</UnintrusiveText>
</p>
) : null}
{comboFilterMethod === COMBO_FILTER_METHOD.BY_WEIGHT_LIMIT ? (
<p>
<UnintrusiveText
css={css`
color: #ff0;
`}
>
Weight multiplier is always zero when filtering by equip load,
regardless of the setting below.
</UnintrusiveText>
</p>
) : null}
<div css={settingsSectionCss}>
{relevantImportancesNames.map((x) => (
{Object.keys(importances).map((x) => (
<Fragment key={x}>
<p>{ARMOR_ATTRIBUTE_NAME_MAP[x]} importance</p>
<p>{ARMOR_ATTRIBUTE_NAME_MAP[x]} multiplier</p>
<TextBox
placeholder={`${ARMOR_ATTRIBUTE_NAME_MAP[x]} importance`}
placeholder={`${ARMOR_ATTRIBUTE_NAME_MAP[x]} multiplier`}
type="number"
defaultValue={importances[x]}
onChange={(e) => {
Expand Down
6 changes: 3 additions & 3 deletions elden-ring-poise-optimizer/src/constants.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const DATA_VERSION = '1.13.1';
export const DATA_VERSION = '1.13.2';

export const DATA_SOURCE_LINK =
'https://er-frame-data.nyasu.business/params?pt=EquipParamProtector';
Expand Down Expand Up @@ -40,8 +40,8 @@ export const UNOBTAINABLE_ARMOR_NAMES = [
];

export const ARMOR_NAME_ALIASES = {
"Queen's Crescent Crown": ['Banana'],
'Albinauric Mask': ['Frog mask', 'Lilbro'],
"Queen's Crescent Crown": ['Banana hat'],
'Albinauric Mask': ['Frog mask'],
};

export const ARMOR_NOTHING = {
Expand Down

0 comments on commit 9695336

Please sign in to comment.