添加多重阵亡台词的UI显示
This commit is contained in:
parent
bb70745754
commit
1ec302fd7e
|
@ -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": "居天子阶下,故诚惶诚恐。",
|
||||
|
|
|
@ -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 = `技能台词<br>`;
|
||||
introduction.appendChild(skillNameSpan);
|
||||
|
||||
if(skillAudioMap.size > 0){
|
||||
const skillNameSpan = document.createElement("span");
|
||||
skillNameSpan.innerHTML = `技能台词<br>`;
|
||||
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 = `<br>阵亡台词<br>`;
|
||||
skillNameSpan.innerHTML = `<br>阵亡台词`;
|
||||
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 = `<br>${dieAudios.length > 1 ? `${index + 1}. ` : ''}${item.text}`;
|
||||
introduction.appendChild(dieTextSpan);
|
||||
})
|
||||
}
|
||||
}
|
||||
const introduction2 = ui.create.div(".characterintro.intro2", uiintro);
|
||||
|
|
Loading…
Reference in New Issue