let palEle = document.querySelector('#palTable');
let palTrs = [...palEle.querySelectorAll('tr')];
palTrs.map(palTr => {
let id = palTr.querySelector(`td:nth-child(2)`).textContent;
let firstCol = palTr.querySelector(`td:nth-child(1)`);
let img = firstCol.querySelector('img').src;
let name = firstCol.textContent.trim();
let element = palTr.querySelector(`td:nth-child(3)`).textContent;
let skill = palTr.querySelector(`td:nth-child(4)`).textContent;
let lifeStr = palTr.querySelector(`td:nth-child(5)`).textContent;
let lifeSkills = lifeStr.split(', ').map(skill => {
let result = /(?<sk>.+) Lv(?<lv>\d)/.exec(skill)
let lv = result.groups?.lv;
let sk = result.groups?.sk;
return {sk, lv};
});
let dropStr = palTr.querySelector(`td:nth-child(6)`).textContent;
let drops = dropStr.split(', ');
return {id, img, name, element, skill, lifeSkills, drops}
});
110B - 喚夜獸 (暗) | 精靈龍+滑水蛇
080B - 水靈龍 (龍) | 喚冬獸+雷冥鳥