diff --git a/src/assets/data/en/client_strings.ts b/src/assets/data/en/client_strings.ts index 2ab6dcaf..a2718ca0 100644 --- a/src/assets/data/en/client_strings.ts +++ b/src/assets/data/en/client_strings.ts @@ -22,6 +22,7 @@ const dict = { 'Armour: ': 'Armour: ', 'Evasion Rating: ': 'Evasion Rating: ', 'Energy Shield: ': 'Energy Shield: ', + 'TAG_WARD': 'Ward: ', 'Chance to Block: ': 'Chance to Block: ', 'Corrupted': 'Corrupted', 'Unidentified': 'Unidentified', diff --git a/src/assets/data/ru/client_strings.ts b/src/assets/data/ru/client_strings.ts index 4ab8f94a..85a25138 100644 --- a/src/assets/data/ru/client_strings.ts +++ b/src/assets/data/ru/client_strings.ts @@ -24,6 +24,7 @@ const dict: TranslationDict = { 'Armour: ': 'Броня: ', 'Evasion Rating: ': 'Уклонение: ', 'Energy Shield: ': 'Энерг. щит: ', + 'TAG_WARD': 'Барьер: ', 'Chance to Block: ': 'Шанс заблокировать удар: ', 'Corrupted': 'Осквернено', 'Unidentified': 'Неопознано', diff --git a/src/parser/ParsedItem.ts b/src/parser/ParsedItem.ts index 4dfe60f8..fb376614 100644 --- a/src/parser/ParsedItem.ts +++ b/src/parser/ParsedItem.ts @@ -12,6 +12,7 @@ export interface ParsedItem { armour?: number evasion?: number energyShield?: number + ward?: number blockChance?: number critChance?: number attackSpeed?: number diff --git a/src/parser/Parser.ts b/src/parser/Parser.ts index 5151a7e8..77a75d02 100644 --- a/src/parser/Parser.ts +++ b/src/parser/Parser.ts @@ -409,6 +409,10 @@ function parseArmour (section: string[], item: ParsedItem) { item.props.energyShield = parseInt(line.substr(_$[C.TAG_ENERGY_SHIELD].length), 10) isParsed = SECTION_PARSED; continue } + if (line.startsWith(_$.TAG_WARD)) { + item.props.ward = parseInt(line.substr(_$.TAG_WARD.length), 10) + isParsed = SECTION_PARSED; continue + } if (line.startsWith(_$[C.TAG_BLOCK_CHANCE])) { item.props.blockChance = parseInt(line.substr(_$[C.TAG_BLOCK_CHANCE].length), 10) isParsed = SECTION_PARSED; continue diff --git a/src/web/overlay/WidgetDebug.vue b/src/web/overlay/WidgetDebug.vue index 344eed87..b3b328d3 100644 --- a/src/web/overlay/WidgetDebug.vue +++ b/src/web/overlay/WidgetDebug.vue @@ -102,41 +102,36 @@ Corrupted -------- Shaper Item `, -`Item Class: Bows +`Item Class: Helmets Rarity: Rare -Phoenix Branch -Citadel Bow +Bramble Visor +Runic Crest -------- -Bow -Quality: +5% (augmented) -Physical Damage: 114-356 (augmented) -Critical Strike Chance: 6.00% -Attacks per Second: 1.25 +Ward: 220 (augmented) -------- Requirements: -Level: 58 -Dex: 125 (augmented) +Level: 49 +Str: 55 +Dex: 55 +Int: 55 -------- -Sockets: G-G-G-G +Sockets: B -------- -Item Level: 63 +Item Level: 73 -------- -Physical Modifiers have 8% increased Effect (enchant) +{ Prefix Modifier "Coppersmith's" (Tier: 6) — Defences } ++23(16-23) to Ward +{ Prefix Modifier "Inscribed" (Tier: 3) — Defences } +79(68-79)% increased Ward +{ Prefix Modifier "Annest's" (Tier: 3) — Life, Defences } ++19(15-20) to Ward ++23(18-23) to maximum Life +{ Suffix Modifier "of the Tempest" (Tier: 4) — Elemental, Lightning, Resistance } ++32(30-35)% to Lightning Resistance +{ Suffix Modifier "of the Walrus" (Tier: 4) — Elemental, Cold, Resistance } ++34(30-35)% to Cold Resistance -------- -{ Prefix Modifier "Gleaming" (Tier: 5) — Damage, Physical, Attack — 8% Increased } -Adds 18(14-21) to 35(32-38) Physical Damage -{ Prefix Modifier "Champion's" (Tier: 4) — Damage, Physical, Attack — 8% Increased } -48(45-54)% increased Physical Damage -+103(98-123) to Accuracy Rating -{ Prefix Modifier "Vicious" (Tier: 5) — Damage, Physical, Attack — 8% Increased } -97(85-109)% increased Physical Damage -{ Suffix Modifier "of the Apt" (Tier: 1) } -32% reduced Attribute Requirements -(Attributes are Strength, Dexterity, and Intelligence) -{ Suffix Modifier "of Staggering" (Tier: 1) } -35(31-35)% increased Stun Duration on Enemies -{ Suffix Modifier "of the Dex" (Tier: 8) — Attribute } -+15(13-17) to all Attributes +Note: ~price 10 chaos `, `Item Class: Jewels Rarity: Rare diff --git a/src/web/price-check/filters/FilterModifier.vue b/src/web/price-check/filters/FilterModifier.vue index 9865b66b..cbadfe47 100644 --- a/src/web/price-check/filters/FilterModifier.vue +++ b/src/web/price-check/filters/FilterModifier.vue @@ -121,6 +121,7 @@ export default defineComponent({ 'armour.armour', 'armour.evasion_rating', 'armour.energy_shield', + 'armour.ward', 'weapon.total_dps', 'weapon.physical_dps' ].includes(props.filter.tradeId[0]) @@ -384,6 +385,7 @@ export default defineComponent({ "Armour: #": "Броня: #", "Evasion Rating: #": "Уклонение: #", "Energy Shield: #": "Энерг. щит: #", + "Ward: #": "Барьер: #", "Map is not occupied by Elder Guardian": "Карта не захвачена Хранителем Древнего", "Block: #%": "Блок: #%", "variant": "вариант", diff --git a/src/web/price-check/filters/interfaces.ts b/src/web/price-check/filters/interfaces.ts index 1593c563..bb9106f8 100644 --- a/src/web/price-check/filters/interfaces.ts +++ b/src/web/price-check/filters/interfaces.ts @@ -106,6 +106,7 @@ export const INTERNAL_TRADE_IDS = [ 'armour.armour', 'armour.evasion_rating', 'armour.energy_shield', + 'armour.ward', 'armour.block', 'weapon.total_dps', 'weapon.physical_dps', diff --git a/src/web/price-check/filters/pseudo/calc-q20.ts b/src/web/price-check/filters/pseudo/calc-q20.ts index a1236678..25114a6c 100644 --- a/src/web/price-check/filters/pseudo/calc-q20.ts +++ b/src/web/price-check/filters/pseudo/calc-q20.ts @@ -30,6 +30,12 @@ export const QUALITY_STATS = { stat('#% increased Armour, Evasion and Energy Shield') ] }, + WARD: { + flat: stat('+# to Ward'), + incr: [ + stat('#% increased Ward') + ] + }, PHYSICAL_DAMAGE: { flat: stat('Adds # to # Physical Damage'), incr: [ diff --git a/src/web/price-check/filters/pseudo/item-property-unique.ts b/src/web/price-check/filters/pseudo/item-property-unique.ts index b8e86bf3..db9cc71f 100644 --- a/src/web/price-check/filters/pseudo/item-property-unique.ts +++ b/src/web/price-check/filters/pseudo/item-property-unique.ts @@ -17,9 +17,11 @@ const ARMOUR_STATS = new Set([ QUALITY_STATS.ARMOUR.flat, QUALITY_STATS.EVASION.flat, QUALITY_STATS.ENERGY_SHIELD.flat, + QUALITY_STATS.WARD.flat, ...QUALITY_STATS.ARMOUR.incr, ...QUALITY_STATS.EVASION.incr, - ...QUALITY_STATS.ENERGY_SHIELD.incr + ...QUALITY_STATS.ENERGY_SHIELD.incr, + ...QUALITY_STATS.WARD.incr ]) function armourProps (ctx: FiltersCreationContext) { @@ -73,6 +75,22 @@ function armourProps (ctx: FiltersCreationContext) { }) } + if (item.props.ward) { + const totalQ20 = Math.floor(propAt20Quality(item.props.ward, QUALITY_STATS.WARD, item)) + + ctx.filters.push({ + ...internalPropStat( + 'armour.ward', + 'Ward: #', + 'armour' + ), + disabled: true, + hidden: (item.isCorrupted) ? undefined : 'Hidden for sake of familiar view of item stats', + sources: [], + roll: rollToFilter(totalQ20, { neverNegated: true, percent: ctx.searchInRange }) + }) + } + createHiddenFilters(ctx, ARMOUR_STATS) } diff --git a/src/web/price-check/filters/pseudo/item-property.ts b/src/web/price-check/filters/pseudo/item-property.ts index af1338bf..b0cdf9e0 100644 --- a/src/web/price-check/filters/pseudo/item-property.ts +++ b/src/web/price-check/filters/pseudo/item-property.ts @@ -19,9 +19,11 @@ export const ARMOUR_STATS = new Set([ QUALITY_STATS.ARMOUR.flat, QUALITY_STATS.EVASION.flat, QUALITY_STATS.ENERGY_SHIELD.flat, + QUALITY_STATS.WARD.flat, ...QUALITY_STATS.ARMOUR.incr, ...QUALITY_STATS.EVASION.incr, ...QUALITY_STATS.ENERGY_SHIELD.incr, + ...QUALITY_STATS.WARD.incr, stat('+#% Chance to Block') ]) @@ -73,6 +75,21 @@ function armourProps (ctx: FiltersCreationContext) { }) } + if (item.props.ward) { + const totalQ20 = Math.floor(propAt20Quality(item.props.ward, QUALITY_STATS.WARD, item)) + + ctx.filters.push({ + ...internalPropStat( + 'armour.ward', + 'Ward: #', + 'armour' + ), + sources: [], + disabled: !isSingleAttrArmour(item), + roll: rollToFilter(totalQ20, { neverNegated: true, percent: ctx.searchInRange }) + }) + } + if (item.props.blockChance) { ctx.filters.push({ ...internalPropStat( @@ -90,6 +107,7 @@ function armourProps (ctx: FiltersCreationContext) { item.props.armour || item.props.evasion || item.props.energyShield || + item.props.ward || item.props.blockChance ) { createHiddenFilters(ctx, ARMOUR_STATS) @@ -199,9 +217,12 @@ function createHiddenFilters (ctx: FiltersCreationContext, stats: Set) { } function isSingleAttrArmour (item: ParsedItem) { - return (item.props.armour != null && item.props.energyShield == null && item.props.evasion == null) || - (item.props.armour == null && item.props.energyShield != null && item.props.evasion == null) || - (item.props.armour == null && item.props.energyShield == null && item.props.evasion != null) + return [ + item.props.armour, + item.props.evasion, + item.props.energyShield, + item.props.ward + ].filter(value => value != null).length === 1 } function isPdpsImportant (item: ParsedItem) { diff --git a/src/web/price-check/trade/pathofexile-trade.ts b/src/web/price-check/trade/pathofexile-trade.ts index e0a0d302..aede4ebc 100644 --- a/src/web/price-check/trade/pathofexile-trade.ts +++ b/src/web/price-check/trade/pathofexile-trade.ts @@ -132,6 +132,7 @@ interface TradeRequest { /* eslint-disable camelcase */ ar?: FilterRange es?: FilterRange ev?: FilterRange + ward?: FilterRange block?: FilterRange } } @@ -434,6 +435,10 @@ export function createTradeRequest (filters: ItemFilters, stats: StatFilter[], i prop.set(query.filters, 'armour_filters.filters.es.min', typeof input.min === 'number' ? input.min : undefined) prop.set(query.filters, 'armour_filters.filters.es.max', typeof input.max === 'number' ? input.max : undefined) break + case 'armour.ward': + prop.set(query.filters, 'armour_filters.filters.ward.min', typeof input.min === 'number' ? input.min : undefined) + prop.set(query.filters, 'armour_filters.filters.ward.max', typeof input.max === 'number' ? input.max : undefined) + break case 'armour.block': prop.set(query.filters, 'armour_filters.filters.block.min', typeof input.min === 'number' ? input.min : undefined) prop.set(query.filters, 'armour_filters.filters.block.max', typeof input.max === 'number' ? input.max : undefined)