From e8de26ff6084991226036cb2a8208feb3063847a Mon Sep 17 00:00:00 2001
From: shijian <2954700422@qq.com>
Date: Wed, 13 Sep 2023 19:09:12 +0800
Subject: [PATCH] =?UTF-8?q?=E8=A7=86=E4=B8=BA=E7=89=8C=E5=9B=BE=E7=89=87?=
=?UTF-8?q?=E6=A0=B7=E5=BC=8F=E5=B1=9E=E6=80=A7=E6=9D=80=E5=85=BC=E5=AE=B9?=
=?UTF-8?q?=EF=BC=8C=E8=AE=BE=E7=BD=AE=E8=A1=8C=E9=AB=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
game/game.js | 20 ++++++++++++++++----
layout/default/layout.css | 3 +++
2 files changed, 19 insertions(+), 4 deletions(-)
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;