Showing
1 changed file
with
9 additions
and
6 deletions
... | @@ -33,6 +33,7 @@ const getCharacterInfo = async function(nickname, characterCode) { | ... | @@ -33,6 +33,7 @@ const getCharacterInfo = async function(nickname, characterCode) { |
33 | major: 0, | 33 | major: 0, |
34 | minor: 0, | 34 | minor: 0, |
35 | majorHyper: 0, | 35 | majorHyper: 0, |
36 | + damageHyper: 0, | ||
36 | criticalDamage: 0, | 37 | criticalDamage: 0, |
37 | bossAttackDamage: 0, | 38 | bossAttackDamage: 0, |
38 | ignoreGuard: 0, | 39 | ignoreGuard: 0, |
... | @@ -54,14 +55,16 @@ const getCharacterInfo = async function(nickname, characterCode) { | ... | @@ -54,14 +55,16 @@ const getCharacterInfo = async function(nickname, characterCode) { |
54 | if ($("th", this).length == 1) { | 55 | if ($("th", this).length == 1) { |
55 | if ($("th span", this).text() == "하이퍼스탯") { | 56 | if ($("th span", this).text() == "하이퍼스탯") { |
56 | const values = $("td span", this).html().split("<br>"); | 57 | const values = $("td span", this).html().split("<br>"); |
57 | - const regex = new RegExp(`${statModel[jobModel[character.job].major].korean} (\\d+) 증가`); | ||
58 | - for (let i = 0; i < values.length; i++) { | ||
59 | - const regexResult = regex.exec(values[i]); | ||
60 | 58 | ||
61 | - if (!regexResult) | 59 | + const regexMajor = new RegExp(`${statModel[jobModel[character.job].major].korean} (\\d+) 증가`); |
62 | - continue; | 60 | + const regexDamage = new RegExp(`^데미지 (\\d+)% 증가`); |
63 | 61 | ||
64 | - stats['majorHyper'] = parseInt(regexResult[1]); | 62 | + let regexResult; |
63 | + for (let i = 0; i < values.length; i++) { | ||
64 | + if (regexResult = regexMajor.exec(values[i])) | ||
65 | + stats['majorHyper'] = parseInt(regexResult[1]); | ||
66 | + else if (regexResult = regexDamage.exec(values[i])) | ||
67 | + stats['damageHyper'] = parseInt(regexResult[1]); | ||
65 | } | 68 | } |
66 | } | 69 | } |
67 | } else { | 70 | } else { | ... | ... |
-
Please register or login to post a comment