mirror of
https://github.com/Kvan7/Exiled-Exchange-2.git
synced 2026-09-26 22:55:42 +00:00
fix multistat grant
This commit is contained in:
@@ -48,3 +48,5 @@ export const UNIDENTIFIED = 'Unidentified'
|
||||
export const FLASK_CHARGES = /^Currently has \d+ Charges$/
|
||||
export const SECTION_SYNTHESISED = 'Synthesised Item'
|
||||
export const PREFIX_SYNTHESISED = 'Synthesised '
|
||||
|
||||
export const CLUSTER_JEWEL_GRANT = 'Added Small Passive Skills grant: '
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { Mods, Mod, StatMatcher } from '../../data'
|
||||
import { CLUSTER_JEWEL_GRANT } from './constants'
|
||||
|
||||
export enum ModifierType {
|
||||
Pseudo = 'pseudo',
|
||||
@@ -22,7 +23,19 @@ export function * sectionToStatStrings (section: string[]) {
|
||||
let multi = (idx + 1) < section.length
|
||||
|
||||
while (idx < section.length) {
|
||||
const str = multi ? `${section[idx]}\n${section[idx + 1]}` : section[idx]
|
||||
let str: string
|
||||
if (multi) {
|
||||
const lines = [
|
||||
section[idx],
|
||||
section[idx + 1]
|
||||
]
|
||||
if (lines.every(l => l.startsWith(CLUSTER_JEWEL_GRANT))) {
|
||||
lines[1] = lines[1].substr(CLUSTER_JEWEL_GRANT.length)
|
||||
}
|
||||
str = lines.join('\n')
|
||||
} else {
|
||||
str = section[idx]
|
||||
}
|
||||
|
||||
const isParsed: boolean = yield str
|
||||
|
||||
|
||||
Reference in New Issue
Block a user