mirror of
https://github.com/Kvan7/Exiled-Exchange-2.git
synced 2026-09-26 14:45:44 +00:00
Ward attribute, fixes #423
This commit is contained in:
@@ -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',
|
||||
|
||||
@@ -24,6 +24,7 @@ const dict: TranslationDict = {
|
||||
'Armour: ': 'Броня: ',
|
||||
'Evasion Rating: ': 'Уклонение: ',
|
||||
'Energy Shield: ': 'Энерг. щит: ',
|
||||
'TAG_WARD': 'Барьер: ',
|
||||
'Chance to Block: ': 'Шанс заблокировать удар: ',
|
||||
'Corrupted': 'Осквернено',
|
||||
'Unidentified': 'Неопознано',
|
||||
|
||||
@@ -12,6 +12,7 @@ export interface ParsedItem {
|
||||
armour?: number
|
||||
evasion?: number
|
||||
energyShield?: number
|
||||
ward?: number
|
||||
blockChance?: number
|
||||
critChance?: number
|
||||
attackSpeed?: number
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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": "вариант",
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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: [
|
||||
|
||||
@@ -17,9 +17,11 @@ const ARMOUR_STATS = new Set<string>([
|
||||
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)
|
||||
}
|
||||
|
||||
|
||||
@@ -19,9 +19,11 @@ export const ARMOUR_STATS = new Set<string>([
|
||||
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<string>) {
|
||||
}
|
||||
|
||||
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) {
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user