diff --git a/monsters-info/extractByNode.js b/monsters-info/extractByNode.js index e272cd3f..b83e8be4 100644 --- a/monsters-info/extractByNode.js +++ b/monsters-info/extractByNode.js @@ -37,12 +37,12 @@ function sameCard(m1,m2) */ officialAPI.forEach(function(lang) { console.log("正在读取官方 %s 信息",lang.code); - const cardJson = fs.readFileSync("official-API/" + lang.code +".json", 'utf-8'); //使用同步读取怪物 + const cardJson = fs.readFileSync("official-API/" + lang.code +"-card.json", 'utf-8'); //使用同步读取怪物 const cardJsonObj = JSON.parse(cardJson); const oCards = lang.cardOriginal = cardJsonObj.card;//将字符串转换为json对象 const monCards = lang.cards = []; - for (let cardIndex = 0; oCards[cardIndex][0] === maxCardIndex; cardIndex++) + for (let cardIndex = 0; oCards[cardIndex][0] === cardIndex; cardIndex++) { monCards.push(new Card(oCards[cardIndex])); } diff --git a/monsters-info/official-API/en.json b/monsters-info/official-API/en-card.json similarity index 100% rename from monsters-info/official-API/en.json rename to monsters-info/official-API/en-card.json diff --git a/monsters-info/official-API/ja.json b/monsters-info/official-API/ja-card.json similarity index 100% rename from monsters-info/official-API/ja.json rename to monsters-info/official-API/ja-card.json diff --git a/monsters-info/official-API/ko.json b/monsters-info/official-API/ko-card.json similarity index 100% rename from monsters-info/official-API/ko.json rename to monsters-info/official-API/ko-card.json diff --git a/monsters-info/official-API/test-mon.html b/monsters-info/official-API/test-mon.html index 61bec93c..091f7c20 100644 --- a/monsters-info/official-API/test-mon.html +++ b/monsters-info/official-API/test-mon.html @@ -30,6 +30,7 @@ var GM_xmlhttpRequest = function(GM_param) { function g(id) { + console.log("原始数组",m); console.log("已解析对象",pcards[id]); //输出人家大佬的格式 let m = cards[id]; @@ -72,25 +73,10 @@ function g(id) m[40], //可退化? m[41],m[42],m[43],m[44],m[45], //进化素材ID 1-5 ); - console.log("原始数组",m); - //if (m[57]>0) console.log("[57]="+m[57]); - /* - m[superAwokenIdx+1], //进化根编号 - m[superAwokenIdx+2], // - m[superAwokenIdx+3], //第三个type - m[superAwokenIdx+4], //卖MP - m[superAwokenIdx+5], // - m[superAwokenIdx+6], // - m[superAwokenIdx+7], //是否能当二技 - m[superAwokenIdx+8], //怀疑是区分怪物所属合作的文字 - m[superAwokenIdx+9], //110级增长 - m[superAwokenIdx+10], // - m[superAwokenIdx+11], // - */ } GM_xmlhttpRequest({ method: "GET", - url:"ja.json", + url:"ja-card.json", onload: function(response) { const originalJSON = JSON.parse(response.response); console.log(originalJSON) diff --git a/monsters-info/official-API/test-skill.html b/monsters-info/official-API/test-skill.html deleted file mode 100644 index ca7eb7c6..00000000 --- a/monsters-info/official-API/test-skill.html +++ /dev/null @@ -1,383 +0,0 @@ - - - - -技能代码测试 - - - - - - - - diff --git a/update-manifest.js b/update-manifest.js index a8b2b9b5..72c42a5f 100644 --- a/update-manifest.js +++ b/update-manifest.js @@ -56,15 +56,15 @@ cardsLang.forEach(lang=>{ files.forEach(function (filename) { if (new RegExp(cardsReg,"i").test(filename)) { - list.push(path.join(langPath, filename)) + list.push(path.join(langPath, filename)); } - }) + }); const newType = { typeName:lang.name, list:list, }; cacheList.push(newType); -}) +}); const outTextArray = cacheList.map(type=>{ const typeTextArray = [];