diff --git a/game/game.js b/game/game.js index 9ef06116c..8e9409882 100644 --- a/game/game.js +++ b/game/game.js @@ -39743,11 +39743,12 @@ let tempname=get.translation(cardName); let cardTempNameConfig=lib.config.cardtempname; let node=getApplyNode._tempName||ui.create.div('.tempname',getApplyNode); + let datasetNature=''; getApplyNode._tempName=node; if(cardTempNameConfig!='image'){ //清空,避免和下面的image部分有冲突 node.innerHTML=''; - let datasetNature='fire'; + datasetNature='fire'; if(get.position(card)=='j'&&card.viewAs&&card.viewAs!=card.name) { datasetNature = 'wood'; tempname=get.translation(card.viewAs); @@ -39760,12 +39761,18 @@ } } if(cardTempNameConfig=='default') getApplyNode._tempName.classList.add('vertical'); - getApplyNode._tempName.dataset.nature=datasetNature; }else{ if(get.position(card)=='j'&&card.viewAs&&card.viewAs!=card.name) { cardName=card.viewAs; tempname=get.translation(card.viewAs); } + if(cardName=='sha'){ + if(cardNature) tempname=get.translation(cardNature)+tempname; + if(cardNature=='fire') datasetNature = 'fire'; + if(cardNature=='thunder') datasetNature='thunder'; + if(cardNature=='kami') datasetNature='kami'; + if(cardNature=='ice') datasetNature='ice'; + } let bg=node.querySelector('div'); if (bg) { Array.from(node.childNodes).filter(v=>v!=bg).forEach(v=>node.removeChild(v)); @@ -39854,8 +39861,13 @@ console.warn('卡牌图片解析失败'); } } - getApplyNode._tempName.innerHTML+=`${cardTempNameConfig=='default'?get.verticalStr(tempname):tempname}`; - getApplyNode._tempName.tempname=tempname; + if(datasetNature.length>0){ + node.dataset.nature=datasetNature; + }else{ + delete node.dataset.nature; + } + node.innerHTML+=`${cardTempNameConfig=='default'?get.verticalStr(tempname):tempname}`; + node.tempname=tempname; return node; }, connectRooms:function(list){ diff --git a/layout/default/layout.css b/layout/default/layout.css index 559d269a4..83ffe267a 100644 --- a/layout/default/layout.css +++ b/layout/default/layout.css @@ -4558,6 +4558,8 @@ div[data-decoration="bronze"]::after{ text-align: right; writing-mode: horizontal-tb; -webkit-writing-mode: horizontal-tb; +} +.tempname.tempimage:not([data-nature]) { color: black !important; text-shadow: white 0 0 2px, white 0 0 3px; } @@ -4573,6 +4575,7 @@ div[data-decoration="bronze"]::after{ .tempname.tempimage>span { position: relative; z-index: 1; + line-height: 25px; } .button>.tempname { font-size: 17px;