mirror of
https://github.com/webxoss/wixoss-fetch.git
synced 2024-11-20 05:49:55 +01:00
handle mixed guard and timing
This commit is contained in:
parent
448d5556f3
commit
03a740b258
3 changed files with 20 additions and 3 deletions
11
dist/index.js
vendored
11
dist/index.js
vendored
|
@ -422,6 +422,7 @@ function toCardText(el) {
|
|||
}
|
||||
return node.textContent
|
||||
}).join('')
|
||||
return text
|
||||
}
|
||||
function toFaq(el) {
|
||||
let faq = {}
|
||||
|
@ -452,7 +453,15 @@ function toInfo(doc, id) {
|
|||
info.limit = trs[3].children[1].textContent
|
||||
info.power = trs[3].children[3].textContent
|
||||
info.limiting = trs[4].children[1].textContent
|
||||
info.guard = trs[4].children[3].textContent
|
||||
|
||||
// guard or limiting
|
||||
if (trs[4].children[2].textContent === 'ガード') {
|
||||
info.guard = trs[4].children[3].textContent
|
||||
info.timing = '-'
|
||||
} else {
|
||||
info.guard = '-'
|
||||
info.timing = trs[4].children[3].textContent
|
||||
}
|
||||
|
||||
let el = doc.querySelector('.card_skill')
|
||||
info.cardSkill = el? toCardText(el) : ''
|
||||
|
|
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
10
src/index.js
10
src/index.js
|
@ -84,7 +84,15 @@ function toInfo(doc, id) {
|
|||
info.limit = trs[3].children[1].textContent
|
||||
info.power = trs[3].children[3].textContent
|
||||
info.limiting = trs[4].children[1].textContent
|
||||
info.guard = trs[4].children[3].textContent
|
||||
|
||||
// guard or limiting
|
||||
if (trs[4].children[2].textContent === 'ガード') {
|
||||
info.guard = trs[4].children[3].textContent
|
||||
info.timing = '-'
|
||||
} else {
|
||||
info.guard = '-'
|
||||
info.timing = trs[4].children[3].textContent
|
||||
}
|
||||
|
||||
let el = doc.querySelector('.card_skill')
|
||||
info.cardSkill = el? toCardText(el) : ''
|
||||
|
|
Loading…
Reference in a new issue