From 1ec302fd7e7410f8913120e1fec0aafca721f99e Mon Sep 17 00:00:00 2001 From: Spmario233 Date: Sun, 5 May 2024 11:06:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=A4=9A=E9=87=8D=E9=98=B5?= =?UTF-8?q?=E4=BA=A1=E5=8F=B0=E8=AF=8D=E7=9A=84UI=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/clan/voices.js | 4 +++- noname/ui/click/index.js | 26 +++++++++++++++----------- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/character/clan/voices.js b/character/clan/voices.js index dd6a012d4..ec928239a 100644 --- a/character/clan/voices.js +++ b/character/clan/voices.js @@ -94,7 +94,9 @@ export default { "#clanxieshu2": "我有佐国之术,可缚苍龙。", "#clanbaozu_clan_zhonghui1": "不为刀下脍,且做俎上刀。", "#clanbaozu_clan_zhonghui2": "吾族恒大,谁敢欺之?", - "#clan_zhonghui:die": "谋事在人,成事在天……", + "#clan_zhonghui:die": "兵来似欲作恶,当云何?", + "#clan_zhonghui2:die": "伯约误我!", + "#clan_zhonghui3:die": "谋事在人,成事在天……", "#clanjiejian1": "庙胜之策,不临矢石。", "#clanjiejian2": "王者之兵,有征无战。", "#clanhuanghan1": "居天子阶下,故诚惶诚恐。", diff --git a/noname/ui/click/index.js b/noname/ui/click/index.js index 97c59fd88..894037813 100644 --- a/noname/ui/click/index.js +++ b/noname/ui/click/index.js @@ -3633,19 +3633,20 @@ export class Click { htmlParser.innerHTML = get.characterIntro(name); Array.from(htmlParser.childNodes).forEach((value) => introduction.appendChild(value)); //添加技能语音部分 - const dieAudio = lib.translate[`#${name}:die`]; + const dieAudios = game.parseDieTextMap(name).filter(i => "text" in i); const skillAudioMap = new Map(); nameInfo.skills.forEach(skill => { const voiceMap = game.parseSkillText(skill, name, null, true); if(voiceMap.length) skillAudioMap.set(skill, voiceMap); }); - if (dieAudio || skillAudioMap.size > 0){ + if (dieAudios.length || skillAudioMap.size > 0){ introduction.appendChild(document.createElement("hr")); - const skillNameSpan = document.createElement("span"); - skillNameSpan.innerHTML = `技能台词
`; - introduction.appendChild(skillNameSpan); if(skillAudioMap.size > 0){ + const skillNameSpan = document.createElement("span"); + skillNameSpan.innerHTML = `技能台词
`; + introduction.appendChild(skillNameSpan); + skillAudioMap.forEach((texts, skill) => { const skillNameSpan = document.createElement("span"), skillNameSpanStyle = skillNameSpan.style; skillNameSpanStyle.fontWeight = "bold"; @@ -3658,15 +3659,18 @@ export class Click { }) }); } - if(dieAudio){ + + if(dieAudios.length > 0){ const skillNameSpan = document.createElement("span"), skillNameSpanStyle = skillNameSpan.style; skillNameSpanStyle.fontWeight = "bold"; - skillNameSpan.innerHTML = `
阵亡台词
`; + skillNameSpan.innerHTML = `
阵亡台词`; introduction.appendChild(skillNameSpan); - - const skillTextSpan = document.createElement("span"); - skillTextSpan.innerHTML = `${dieAudio}`; - introduction.appendChild(skillTextSpan); + + dieAudios.forEach((item, index) => { + const dieTextSpan = document.createElement("span"); + dieTextSpan.innerHTML = `
${dieAudios.length > 1 ? `${index + 1}. ` : ''}${item.text}`; + introduction.appendChild(dieTextSpan); + }) } } const introduction2 = ui.create.div(".characterintro.intro2", uiintro);