Skip to content

Commit 1d833b0

Browse files
committed
relax filter requirements SnosMe#1711
1 parent fe1e1ef commit 1d833b0

File tree

1 file changed

+15
-26
lines changed
  • renderer/src/web/price-check/filters/pseudo

1 file changed

+15
-26
lines changed

renderer/src/web/price-check/filters/pseudo/maps.ts

Lines changed: 15 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ export function mapProps (ctx: FiltersCreationContext): void {
1515
const { item } = ctx
1616
if (!item.map || item.mapBlighted || item.mapCompletionReward || item.rarity === ItemRarity.Unique) return
1717

18-
if (!item.isCorrupted && item.map.tier !== 17) return
18+
const hasMoreDrops = Boolean(item.map.moreMaps || item.map.moreScarabs || item.map.moreCurrency || item.map.moreDivCards)
19+
20+
if (!item.isCorrupted && !hasMoreDrops && item.map.tier !== 17) return
1921

2022
if (item.map.itemQuantity) {
2123
ctx.filters.push(propToFilter({
@@ -32,7 +34,7 @@ export function mapProps (ctx: FiltersCreationContext): void {
3234
tradeId: 'item.map_item_rarity',
3335
roll: { min: 0, max: Number.MAX_SAFE_INTEGER, value: item.map.itemRarity },
3436
sources: [],
35-
disabled: true
37+
disabled: hasMoreDrops
3638
}, ctx))
3739
}
3840
if (item.map.packSize) {
@@ -45,54 +47,41 @@ export function mapProps (ctx: FiltersCreationContext): void {
4547
}, ctx))
4648
}
4749

48-
const explicitMods = item.newMods.filter(mod => mod.info.generation === 'prefix' || mod.info.generation === 'suffix')
49-
const moreHidden = (explicitMods.length < 6 && item.map.tier !== 17) ? 'less_than_6_mods' : undefined
50-
5150
if (item.map.moreMaps) {
5251
ctx.filters.push(noSourcePseudoToFilter({
5352
pseudo: pseudoStatByRef(PSEUDO.MORE_MAPS)!,
5453
roll: { min: 0, max: Number.MAX_SAFE_INTEGER, value: item.map.moreMaps },
55-
hidden: moreHidden,
56-
disabled: moreHidden != null
54+
disabled: false
5755
}, ctx))
5856
}
5957
if (item.map.moreScarabs) {
6058
ctx.filters.push(noSourcePseudoToFilter({
6159
pseudo: pseudoStatByRef(PSEUDO.MORE_SCARABS)!,
6260
roll: { min: 0, max: Number.MAX_SAFE_INTEGER, value: item.map.moreScarabs },
63-
hidden: moreHidden,
64-
disabled: moreHidden != null
61+
disabled: false
6562
}, ctx))
6663
}
6764
if (item.map.moreCurrency) {
6865
ctx.filters.push(noSourcePseudoToFilter({
6966
pseudo: pseudoStatByRef(PSEUDO.MORE_CURRENCY)!,
7067
roll: { min: 0, max: Number.MAX_SAFE_INTEGER, value: item.map.moreCurrency },
71-
hidden: moreHidden,
72-
disabled: moreHidden != null
68+
disabled: false
7369
}, ctx))
7470
}
7571
if (item.map.moreDivCards) {
7672
ctx.filters.push(noSourcePseudoToFilter({
7773
pseudo: pseudoStatByRef(PSEUDO.MORE_DIVINATION_CARDS)!,
7874
roll: { min: 0, max: Number.MAX_SAFE_INTEGER, value: item.map.moreDivCards },
79-
hidden: moreHidden,
80-
disabled: moreHidden != null
75+
disabled: false
8176
}, ctx))
8277
}
8378

84-
if (
85-
!item.map.moreMaps &&
86-
!item.map.moreScarabs &&
87-
!item.map.moreCurrency &&
88-
!item.map.moreDivCards
89-
) {
90-
if (explicitMods.length === 8) {
91-
ctx.filters.push(noSourcePseudoToFilter({
92-
pseudo: pseudoStatByRef(PSEUDO.EXPLICIT_MODIFIERS)!,
93-
roll: { min: 0, max: 8, value: explicitMods.length },
94-
disabled: false
95-
}, { ...ctx, searchInRange: 0 }))
96-
}
79+
const explicitMods = item.newMods.filter(mod => mod.info.generation === 'prefix' || mod.info.generation === 'suffix')
80+
if (explicitMods.length === 8 && !hasMoreDrops) {
81+
ctx.filters.push(noSourcePseudoToFilter({
82+
pseudo: pseudoStatByRef(PSEUDO.EXPLICIT_MODIFIERS)!,
83+
roll: { min: 0, max: 8, value: explicitMods.length },
84+
disabled: false
85+
}, { ...ctx, searchInRange: 0 }))
9786
}
9887
}

0 commit comments

Comments
 (0)