parse corrupted implicits, fix for unique items

This commit is contained in:
Alexander Drozdov
2021-08-08 12:55:41 +03:00
parent 5b1469a075
commit a7d493a2e5
8 changed files with 21 additions and 5 deletions
+2 -1
View File
@@ -76,7 +76,8 @@ const dict = {
'SUFFIX_MODIFIER': 'Suffix Modifier',
'CRAFTED_PREFIX': 'Master Crafted Prefix Modifier',
'CRAFTED_SUFFIX': 'Master Crafted Suffix Modifier',
'UNSCALABLE_VALUE': ' — Unscalable Value'
'UNSCALABLE_VALUE': ' — Unscalable Value',
'CORRUPTED_IMPLICIT': 'Corruption Implicit Modifier'
}
export default dict
+2 -1
View File
@@ -78,7 +78,8 @@ const dict: TranslationDict = {
'SUFFIX_MODIFIER': 'Суффикс',
'CRAFTED_PREFIX': 'Мастерский префикс',
'CRAFTED_SUFFIX': 'Мастерский суффикс',
'UNSCALABLE_VALUE': ' — Неизменяемое значение'
'UNSCALABLE_VALUE': ' — Неизменяемое значение',
'CORRUPTED_IMPLICIT': 'Осквернённое собственное свойство'
}
export default dict
+5 -1
View File
@@ -12,7 +12,7 @@ export interface ParsedModifier {
export interface ModifierInfo {
type: ModifierType
generation?: 'suffix' | 'prefix'
generation?: 'suffix' | 'prefix' | 'corrupted'
name?: string
tier?: number
rank?: number
@@ -39,6 +39,8 @@ export function parseModInfoLine (line: string, type: ModifierType): ModifierInf
case _$.SUFFIX_MODIFIER:
case _$.CRAFTED_SUFFIX:
generation = 'suffix'; break
case _$.CORRUPTED_IMPLICIT:
generation = 'corrupted'; break
}
const name = match.groups!.name || undefined
@@ -168,6 +170,7 @@ export function sumStatsFromMods (mods: readonly ParsedModifier[]): LegacyItemMo
trade: dbStatA.trade,
string: translation.string,
type: modA.info.type,
corrupted: (modA.info.generation === 'corrupted') || undefined,
negate: translation.negate,
value: statA.roll?.value,
bounds: statA.roll && { min: statA.roll.min, max: statA.roll.max }
@@ -195,6 +198,7 @@ export function sumStatsFromMods (mods: readonly ParsedModifier[]): LegacyItemMo
trade: dbStatA.trade,
string: translation.string,
type: modA.info.type,
corrupted: (modA.info.generation === 'corrupted') || undefined,
negate: translation.negate,
value: roll.value,
bounds: {
+1
View File
@@ -19,6 +19,7 @@ export interface LegacyItemModifier extends
max: number
}
type: ModifierType
corrupted?: true
}
export { LegacyItemModifier as ItemModifier }
@@ -41,6 +41,8 @@
class="text-xs leading-none px-1 rounded" :class="`mod-type-${filter.type}`">{{ t(filter.type) }}</span>
<span v-if="filter.variant"
class="text-xs leading-none px-1 rounded mod-type-variant">{{ t('variant') }}</span>
<span v-if="filter.corrupted"
class="text-xs leading-none px-1 rounded mod-type-corrupted">{{ t('corrupted') }}</span>
<filter-modifier-item-has-empty :filter="filter" />
</div>
<div v-if="filter.boundMin !== undefined"
@@ -112,7 +114,7 @@ export default defineComponent({
})
const showTypeTags = computed(() => {
if (props.filter.boundMin !== undefined || props.filter.variant) {
if (props.filter.boundMin !== undefined || props.filter.variant || props.filter.corrupted) {
return false
}
return props.filter.type !== 'armour' &&
@@ -204,6 +206,10 @@ export default defineComponent({
@apply bg-yellow-700 text-yellow-100
}
.mod-type-corrupted {
@apply bg-red-700 text-red-100
}
.mod-type-fractured {
@apply bg-yellow-400 text-black
}
@@ -320,6 +326,7 @@ export default defineComponent({
"Map is not occupied by Elder Guardian": "Карта не захвачена Хранителем Древнего",
"Block: #%": "Блок: #%",
"variant": "вариант",
"corrupted": "осквернено",
"pseudo": "псевдо",
"Roll is not variable": "Ролл не варьируется",
"Elemental damage is not the main source of DPS": "Стихийный урон не основной источник ДПСа",
@@ -88,6 +88,7 @@ export function itemModToFilter (mod: ItemModifier, item: ParsedItem) {
text: mod.string,
type: mod.type,
option: mod.trade.option,
corrupted: mod.corrupted,
roll: undefined,
disabled: true,
min: undefined,
@@ -87,6 +87,7 @@ export interface StatFilter {
readonly boundMin?: number
readonly boundMax?: number
readonly variant?: true
readonly corrupted?: true
readonly hidden?: string
readonly invert?: boolean
disabled: boolean
+1 -1
View File
@@ -22,7 +22,7 @@ export function uniqueModFilterPartial (
filter.min = filter.defaultMin
filter.max = filter.defaultMax
filter.roll = mod.value
if (!filter.variant) {
if (!filter.variant && !filter.corrupted) {
filter.hidden = 'Roll is not variable'
}
} else {