Skip to content

Commit

Permalink
eldritch mods
Browse files Browse the repository at this point in the history
  • Loading branch information
SnosMe committed Feb 9, 2022
1 parent b45026d commit 0c93d56
Show file tree
Hide file tree
Showing 10 changed files with 911 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "awakened-poe-trade",
"version": "3.17.10002",
"version": "3.17.10003",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
Expand Down
8 changes: 8 additions & 0 deletions public/data/en/client_strings.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,14 @@ export default {
MODIFIER_INCREASED: /^(.+?)% Increased$/,
INCURSION_OPEN: 'Open Rooms:',
INCURSION_OBSTRUCTED: 'Obstructed Rooms:',
EATER_IMPLICIT: /^Eater of Worlds Implicit Modifier \((?<rank>.+)\)$/,
EXARCH_IMPLICIT: /^Searing Exarch Implicit Modifier \((?<rank>.+)\)$/,
ELDRITCH_MOD_R1: 'Lesser',
ELDRITCH_MOD_R2: 'Greater',
ELDRITCH_MOD_R3: 'Grand',
ELDRITCH_MOD_R4: 'Exceptional',
ELDRITCH_MOD_R5: 'Exquisite',
ELDRITCH_MOD_R6: 'Perfect',
// ---
CHAT_SYSTEM: /^: (?<body>.+)$/,
CHAT_TRADE: /^\$(?:<(?<guild_tag>.+?)> )?(?<char_name>.+?): (?<body>.+)$/,
Expand Down
432 changes: 432 additions & 0 deletions public/data/en/stats.ndjson

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions public/data/ru/client_strings.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,14 @@ export default {
MODIFIER_INCREASED: /^(.+?)% увеличение$/,
INCURSION_OPEN: 'Открытые комнаты:',
INCURSION_OBSTRUCTED: 'Отделённые комнаты:',
EATER_IMPLICIT: /^Собственное свойство Пожирателя миров \((?<rank>.+)\)$/,
EXARCH_IMPLICIT: /^Собственное свойство Пламенного экзарха \((?<rank>.+)\)$/,
ELDRITCH_MOD_R1: 'Мелкий',
ELDRITCH_MOD_R2: 'Крупный',
ELDRITCH_MOD_R3: 'Великий',
ELDRITCH_MOD_R4: 'Превосходный',
ELDRITCH_MOD_R5: 'Первоклассный',
ELDRITCH_MOD_R6: 'Безупречный',
// ---
CHAT_SYSTEM: /^: (?<body>.+)$/,
CHAT_TRADE: /^\$(?:<(?<guild_tag>.+?)> )?(?<char_name>.+?): (?<body>.+)$/,
Expand Down
432 changes: 432 additions & 0 deletions public/data/ru/stats.ndjson

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions src/assets/data/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,14 @@ export interface TranslationDict {
MODIFIER_INCREASED: RegExp
INCURSION_OPEN: string
INCURSION_OBSTRUCTED: string
EATER_IMPLICIT: RegExp
EXARCH_IMPLICIT: RegExp
ELDRITCH_MOD_R1: string
ELDRITCH_MOD_R2: string
ELDRITCH_MOD_R3: string
ELDRITCH_MOD_R4: string
ELDRITCH_MOD_R5: string
ELDRITCH_MOD_R6: string
// ---
CHAT_SYSTEM: RegExp
CHAT_TRADE: RegExp
Expand Down
16 changes: 14 additions & 2 deletions src/parser/advanced-mod-desc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export interface ParsedModifier {

export interface ModifierInfo {
type: ModifierType
generation?: 'suffix' | 'prefix' | 'corrupted'
generation?: 'suffix' | 'prefix' | 'corrupted' | 'eldritch'
name?: string
tier?: number
rank?: number
Expand All @@ -34,7 +34,19 @@ export function parseModInfoLine (line: string, type: ModifierType): ModifierInf
let name: ModifierInfo['name']
let tier: ModifierInfo['tier']
let rank: ModifierInfo['rank']
{

if (_$.EATER_IMPLICIT.test(modText) || _$.EXARCH_IMPLICIT.test(modText)) {
const match = modText.match(_$.EATER_IMPLICIT) ?? modText.match(_$.EXARCH_IMPLICIT)!
generation = 'eldritch'
switch (match.groups!.rank) {
case _$.ELDRITCH_MOD_R1: rank = 1; break
case _$.ELDRITCH_MOD_R2: rank = 2; break
case _$.ELDRITCH_MOD_R3: rank = 3; break
case _$.ELDRITCH_MOD_R4: rank = 4; break
case _$.ELDRITCH_MOD_R5: rank = 5; break
case _$.ELDRITCH_MOD_R6: rank = 6; break
}
} else {
const match = modText.match(_$.MODIFIER_LINE)
if (!match) {
throw new Error('Invalid regex for mod info line')
Expand Down
5 changes: 5 additions & 0 deletions src/web/price-check/filters/FilterModifier.vue
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,9 @@ export default defineComponent({
}
.tag-variant {
@apply bg-yellow-700 text-yellow-100; }
.tag-eldritch {
background: linear-gradient(to right, theme('colors.red.700'), theme('colors.blue.700'));
}
.tag-corrupted {
@apply bg-red-700 text-red-100; }
.tag-fractured {
Expand Down Expand Up @@ -394,6 +397,8 @@ export default defineComponent({
"Block: #%": "Блок: #%",
"variant": "вариант",
"corrupted": "осквернено",
"synthesised": "синтезирован",
"eldritch": "зловещий",
"pseudo": "псевдо",
"Roll is not variable": "Ролл не варьируется",
"Elemental damage is not the main source of DPS": "Стихийный урон не основной источник ДПСа",
Expand Down
2 changes: 2 additions & 0 deletions src/web/price-check/filters/create-stat-filters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ export function calculatedStatToFilter (
if (type === ModifierType.Implicit) {
if (sources.some(s => s.modifier.info.generation === 'corrupted')) {
filter.tag = FilterTag.Corrupted
} else if (sources.some(s => s.modifier.info.generation === 'eldritch')) {
filter.tag = FilterTag.Eldritch
} else if (item.isSynthesised) {
filter.tag = FilterTag.Synthesised
}
Expand Down
1 change: 1 addition & 0 deletions src/web/price-check/filters/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ export enum FilterTag {
Fractured = 'fractured',
Corrupted = 'corrupted',
Synthesised = 'synthesised',
Eldritch = 'eldritch',
Variant = 'variant',
Influence = 'influence',
Property = 'property',
Expand Down

0 comments on commit 0c93d56

Please sign in to comment.