From b8120aba890087e65e133aee541031ae0d0eb6e3 Mon Sep 17 00:00:00 2001 From: MengXinZXZ <2223529500@qq.com> Date: Sat, 16 Nov 2024 05:32:14 +0800 Subject: [PATCH] =?UTF-8?q?bugfix+=E6=A0=BC=E5=BC=8F=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 对所有文件进行统一prettier格式化,修复css文件里面的报错属性 对lone的信息页和u的一将成名样式进行适配跟进 --- animation.css | 43 +- animation1.css | 44 +- component.css | 80 +- dialog.css | 249 ++-- effect.css | 128 +- equip.css | 111 +- equip_new.css | 205 ++- extension.css | 189 +-- extension.js | 55 +- icon.css | 47 +- menu.css | 81 +- player1.css | 1582 +++++++++++------------ player2.css | 1664 ++++++++++++------------- player3.css | 1516 +++++++++++----------- shoushaUI/KGMH/kaiguan.css | 27 +- shoushaUI/KGMH/kaiguan_new.css | 37 +- shoushaUI/character/main1.css | 544 ++++---- shoushaUI/character/main1.js | 1107 ++++++---------- shoushaUI/character/main2.js | 600 +++------ shoushaUI/character/main3.css | 286 +++-- shoushaUI/character/main3.js | 561 ++++----- shoushaUI/lbtn/main1.css | 849 +++++++------ shoushaUI/lbtn/main1.js | 2008 +++++++++++++----------------- shoushaUI/lbtn/main1_window.css | 795 ++++++------ shoushaUI/lbtn/main2.js | 1100 ++++++++-------- shoushaUI/lbtn/main3.css | 605 +++++---- shoushaUI/lbtn/main3.js | 1028 ++++++++------- shoushaUI/skill/main1.css | 636 +++++----- shoushaUI/skill/main1.js | 1591 +++++++++++------------ shoushaUI/skill/main1_window.css | 659 +++++----- shoushaUI/skill/main2.js | 990 +++++++-------- shoushaUI/skill/main3.js | 990 +++++++-------- skill.js | 6 +- 33 files changed, 9540 insertions(+), 10873 deletions(-) diff --git a/animation.css b/animation.css index afc118d..db003b5 100644 --- a/animation.css +++ b/animation.css @@ -58,22 +58,33 @@ } @keyframes player-died { - 5%, 15%, 25%, 35%, 55%, 65% { + 5%, + 15%, + 25%, + 35%, + 55%, + 65% { transform: translateX(5px) rotate(0deg); } - 10%, 30%, 40%, 50%, 70% { + 10%, + 30%, + 40%, + 50%, + 70% { transform: translateX(-5px) rotate(0deg); } - 20%, 60% {; + 20%, + 60% { transform: translate(-1px) rotate(0deg); } - 45%, 85% { + 45%, + 85% { transform: translateX(1px) rotate(0deg); } - + 95% { transform: translateX(-2px) rotate(0deg); } @@ -88,12 +99,12 @@ transform: scale(4); opacity: 1; } - + 20% { transform: scale(1); opacity: 1; } - + 100% { transform: scale(1); opacity: 0; @@ -104,11 +115,11 @@ 0% { transform: rotateY(0deg); } - + 50% { transform: rotateY(90deg); } - + 100% { transform: rotateY(0deg); } @@ -119,17 +130,17 @@ opacity: 0; transform: scale(0.7); } - + 40% { opacity: 1; transform: scale(1); } - + 60% { opacity: 1; transform: scale(1); } - + 100% { opacity: 0; transform: scale(1); @@ -140,11 +151,11 @@ 0% { transform: translateX(0px); } - + 4% { transform: translateX(1px); } - + 50% { transform: translateX(-14px); } @@ -155,7 +166,7 @@ } @keyframes fade-in-out-selectable { - 0 { + 0% { opacity: 0; } 50% { @@ -214,7 +225,7 @@ 80.00% { background-position: -1840px 0px; } - + 90.00%, 100% { background-size: 2300px 100%; diff --git a/animation1.css b/animation1.css index 5b7b6c2..8e4d61d 100644 --- a/animation1.css +++ b/animation1.css @@ -7,7 +7,6 @@ } } - @keyframes open { from { transform: scale(0); @@ -49,22 +48,33 @@ } @keyframes player-died { - 5%, 15%, 25%, 35%, 55%, 65% { + 5%, + 15%, + 25%, + 35%, + 55%, + 65% { transform: translateX(5px) rotate(0deg); } - 10%, 30%, 40%, 50%, 70% { + 10%, + 30%, + 40%, + 50%, + 70% { transform: translateX(-5px) rotate(0deg); } - 20%, 60% {; + 20%, + 60% { transform: translate(-1px) rotate(0deg); } - 45%, 85% { + 45%, + 85% { transform: translateX(1px) rotate(0deg); } - + 95% { transform: translateX(-2px) rotate(0deg); } @@ -79,12 +89,12 @@ transform: scale(4); opacity: 1; } - + 20% { transform: scale(1); opacity: 1; } - + 100% { transform: scale(1); opacity: 0; @@ -95,11 +105,11 @@ 0% { transform: rotateY(0deg); } - + 50% { transform: rotateY(90deg); } - + 100% { transform: rotateY(0deg); } @@ -110,17 +120,17 @@ opacity: 0; transform: scale(0.7); } - + 40% { opacity: 1; transform: scale(1); } - + 60% { opacity: 1; transform: scale(1); } - + 100% { opacity: 0; transform: scale(1); @@ -131,11 +141,11 @@ 0% { transform: translateX(0px); } - + 4% { transform: translateX(1px); } - + 50% { transform: translateX(-14px); } @@ -146,7 +156,7 @@ } @keyframes fade-in-out-selectable { - 0 { + 0% { opacity: 0; } 50% { @@ -205,7 +215,7 @@ 80.00% { background-position: -1920px 0px; } - + 90.00%, 100% { background-size: 2400px 100%; diff --git a/component.css b/component.css index 419c34b..8c2f945 100644 --- a/component.css +++ b/component.css @@ -1,40 +1,38 @@ -input[type=range].slider { +input[type="range"].slider { position: relative; height: 5px; border-radius: 5px; - background: linear-gradient(rgba(240,240,255,0.8), rgba(240,240,255,0.8)) no-repeat rgba(200,200,200,0.5); + background: linear-gradient(rgba(240, 240, 255, 0.8), rgba(240, 240, 255, 0.8)) no-repeat rgba(200, 200, 200, 0.5); background-size: 50% 100%; -webkit-appearance: none; } -input[type=range].slider:focus { +input[type="range"].slider:focus { outline: none; } -input[type=range].slider::-webkit-slider-thumb { +input[type="range"].slider::-webkit-slider-thumb { -webkit-appearance: none; height: 13px; width: 13px; - background: white; + background: white; border-radius: 50%; - border: solid 1px rgba(0,0,0,0.1); + border: solid 1px rgba(0, 0, 0, 0.1); } - - .chat-box { display: inline-flex; flex-flow: column; width: auto; height: 200px; - background: rgba(0,0,0,0.66); + background: rgba(0, 0, 0, 0.66); border-radius: 0 0 4px 4px; } -#arena>.chat-box { +#arena > .chat-box { z-index: 5; - left: -15px; - bottom: calc(1% + 185px); + left: -15px; + bottom: calc(1% + 185px); } .chat-box.folded { @@ -43,26 +41,26 @@ input[type=range].slider::-webkit-slider-thumb { opacity: 0.66; } -.chat-box.folded>div:not(.operation) { +.chat-box.folded > div:not(.operation) { display: none; } -.chat-box.folded>.operation>input, -.chat-box.folded>.operation>button:not(.fold-button) { +.chat-box.folded > .operation > input, +.chat-box.folded > .operation > button:not(.fold-button) { display: none; } -.chat-box.folded>.operation>button.fold-button { - background: rgba(255,255,255,0.2); +.chat-box.folded > .operation > button.fold-button { + background: rgba(255, 255, 255, 0.2); } -.chat-box>div { +.chat-box > div { position: static; width: auto; height: auto; } -.chat-box>.container { +.chat-box > .container { flex: 1; position: relative; padding: 4px; @@ -70,28 +68,27 @@ input[type=range].slider::-webkit-slider-thumb { box-shadow: 0 0 6px rgb(200, 150, 80) inset; } -.chat-box>.container>.content { +.chat-box > .container > .content { position: absolute; width: calc(100% - 8px); height: calc(100% - 8px); overflow-y: auto; } -.chat-box>.container>.content>div { +.chat-box > .container > .content > div { display: block; position: static; margin: 0; height: auto; word-wrap: break-word; word-break: break-all; - -} +} -.chat-box>.container>.content>div>.sender { +.chat-box > .container > .content > div > .sender { color: #02ff02; } -.chat-box>.operation { +.chat-box > .operation { display: flex; flex-flow: row; padding: 2px; @@ -100,46 +97,45 @@ input[type=range].slider::-webkit-slider-thumb { max-height: 32px; } -.chat-box>.operation>div, -.chat-box>.operation>input, -.chat-box>.operation>button { +.chat-box > .operation > div, +.chat-box > .operation > input, +.chat-box > .operation > button { position: static; } -.chat-box>.operation>.chat-input { +.chat-box > .operation > .chat-input { flex: 1; padding: 4px 2px; margin: 0px 2px; outline: none; - border: 1px solid rgb(120,120,50); + border: 1px solid rgb(120, 120, 50); color: #ffffff; font-size: 16px; line-height: 18px; background: transparent; } -.chat-box>.operation>.chat-input::-webkit-input-placeholder { - color: rgba(255,255,255,0.3); +.chat-box > .operation > .chat-input::-webkit-input-placeholder { + color: rgba(255, 255, 255, 0.3); line-height: 18px; - } -.chat-box>.operation>input { +.chat-box > .operation > input { font-family: inherit; } -.chat-box>.operation>button { +.chat-box > .operation > button { font-family: inherit; text-shadow: 0 0 2px black; } -.chat-box>.operation>button:active { - background: rgb(188,120,24); +.chat-box > .operation > button:active { + background: rgb(188, 120, 24); } -.chat-box>.operation>.fold-button, -.chat-box>.operation>.send-button, -.chat-box>.operation>.sticker-button { +.chat-box > .operation > .fold-button, +.chat-box > .operation > .send-button, +.chat-box > .operation > .sticker-button { padding: 4px; line-height: 18px; border: 1px solid transparent; @@ -148,11 +144,11 @@ input[type=range].slider::-webkit-slider-thumb { color: #ffffff; font-size: 16px; white-space: nowrap; - background: rgb(236,151,31); + background: rgb(236, 151, 31); transition-duration: 0.2s; transition-property: background, transform, opacity; } -.chat-box>.operation>.send-button { +.chat-box > .operation > .send-button { margin-left: 2px; } diff --git a/dialog.css b/dialog.css index 3fff964..c3ddf6e 100644 --- a/dialog.css +++ b/dialog.css @@ -1,34 +1,33 @@ - /*基本对话框*/ -#arena.decadeUI>.dialog { +#arena.decadeUI > .dialog { bottom: calc(20% + 85px); } -#arena.decadeUI.dui-mobile>.dialog { +#arena.decadeUI.dui-mobile > .dialog { bottom: calc(23% + 86px); /* font-family: 'shousha' !important; */ } -#arena.decadeUI[data-loading-style='othersOn']>.dialog { +#arena.decadeUI[data-loading-style="othersOn"] > .dialog { bottom: calc(23% + 86px); - font-family: 'shousha' !important; + font-family: "shousha" !important; color: rgb(255, 255, 150); } /*boss显示*/ -#bosslist>.player>.identity{ +#bosslist > .player > .identity { height: 100%; position: absolute; z-index: 9999; } -#bosslist>.player>.identity>div{ +#bosslist > .player > .identity > div { text-align: left; } /*-----------------分割线-----------------*/ /*选项光标*/ -#arena.decadeUI[data-loading-style='on']>.dialog .tdnode { +#arena.decadeUI[data-loading-style="on"] > .dialog .tdnode { --h: 30px; --w: calc(var(--h) * 77 / 44); width: auto; @@ -37,17 +36,16 @@ min-height: var(--h); padding: 0 !important; border-radius: 0 !important; - background-image: url('assets/image/tnode-A1.png'); + background-image: url("assets/image/tnode-A1.png"); background-size: 100% 100%; line-height: var(--h); text-align: center; } -#arena.decadeUI[data-loading-style='on']>.dialog .tdnode.bluebg { - background-image: url('assets/image/tnode-A2.png') !important; +#arena.decadeUI[data-loading-style="on"] > .dialog .tdnode.bluebg { + background-image: url("assets/image/tnode-A2.png") !important; } - -#arena.decadeUI[data-loading-style='On']>.dialog .tdnode { +#arena.decadeUI[data-loading-style="On"] > .dialog .tdnode { --h: 35px; --w: calc(var(--h) * 100 / 70); width: auto; @@ -56,18 +54,17 @@ min-height: var(--h); padding: 0 !important; border-radius: 3px !important; - background-image: url('assets/image/tnode-B1.png'); + background-image: url("assets/image/tnode-B1.png"); background-size: 110% 115% !important; background-position: center; line-height: var(--h); text-align: center; } -#arena.decadeUI[data-loading-style='On']>.dialog .tdnode.bluebg { - background-image: url('assets/image/tnode-B3.png') !important; +#arena.decadeUI[data-loading-style="On"] > .dialog .tdnode.bluebg { + background-image: url("assets/image/tnode-B3.png") !important; } - -#arena.decadeUI[data-loading-style='othersOn']>.dialog .tdnode { +#arena.decadeUI[data-loading-style="othersOn"] > .dialog .tdnode { --h: 30px; --w: calc(var(--h) * 77 / 44); width: auto; @@ -76,43 +73,42 @@ min-height: var(--h); padding: 0 !important; border-radius: 0 !important; - background-image: url('assets/image/tnode-C1.png'); + background-image: url("assets/image/tnode-C1.png"); background-size: 100% 100%; line-height: var(--h); text-align: center; } -#arena.decadeUI[data-loading-style='othersOn']>.dialog .tdnode.bluebg { - background-image: url('assets/image/tnode-C2.png') !important; +#arena.decadeUI[data-loading-style="othersOn"] > .dialog .tdnode.bluebg { + background-image: url("assets/image/tnode-C2.png") !important; } /*-----------------分割线-----------------*/ - - - - /*-----------------分割线-----------------*/ -#arena.decadeUI[data-loading-style='On']>.dialog.scroll1:not(.dclieqiong), -#arena.decadeUI[data-loading-style='On']>.dialog.scroll2:not(.dclieqiong), -#arena.decadeUI[data-loading-style='On']>.dialog.addNewRow:not(.dclieqiong) { /*所有选项框*/ +#arena.decadeUI[data-loading-style="On"] > .dialog.scroll1:not(.dclieqiong), +#arena.decadeUI[data-loading-style="On"] > .dialog.scroll2:not(.dclieqiong), +#arena.decadeUI[data-loading-style="On"] > .dialog.addNewRow:not(.dclieqiong) { + /*所有选项框*/ background-position: center; - background-image: url('assets/image/dialog1.png') !important; + background-image: url("assets/image/dialog1.png") !important; background-size: 100% 100% !important; background-repeat: no-repeat !important; } -#arena.decadeUI[data-loading-style='on']>.dialog.scroll1:not(.dclieqiong), -#arena.decadeUI[data-loading-style='on']>.dialog.scroll2:not(.dclieqiong), -#arena.decadeUI[data-loading-style='on']>.dialog.addNewRow:not(.dclieqiong) { /*所有选项框*/ +#arena.decadeUI[data-loading-style="on"] > .dialog.scroll1:not(.dclieqiong), +#arena.decadeUI[data-loading-style="on"] > .dialog.scroll2:not(.dclieqiong), +#arena.decadeUI[data-loading-style="on"] > .dialog.addNewRow:not(.dclieqiong) { + /*所有选项框*/ background-position: center; - background-image: url('assets/image/dialog2.png') !important; + background-image: url("assets/image/dialog2.png") !important; background-size: 104% 100% !important; background-repeat: no-repeat !important; /* padding: 10px 50px; /*高度 + 宽度*/ } -#arena.decadeUI[data-loading-style='othersOn']>.dialog.scroll1:not(.dclieqiong), -#arena.decadeUI[data-loading-style='othersOn']>.dialog.scroll2:not(.dclieqiong), -#arena.decadeUI[data-loading-style='othersOn']>.dialog.addNewRow:not(.dclieqiong) { /*所有选项框*/ +#arena.decadeUI[data-loading-style="othersOn"] > .dialog.scroll1:not(.dclieqiong), +#arena.decadeUI[data-loading-style="othersOn"] > .dialog.scroll2:not(.dclieqiong), +#arena.decadeUI[data-loading-style="othersOn"] > .dialog.addNewRow:not(.dclieqiong) { + /*所有选项框*/ background-position: center; - background-image: url('assets/image/dialog3.png') !important; + background-image: url("assets/image/dialog3.png") !important; background-size: 102% 100% !important; background-repeat: no-repeat !important; /*padding: -10px 120px !important; /*高度 + 宽度*/ @@ -141,20 +137,18 @@ } /*-----------------分割线-----------------*/ - - /*选将界面*/ -#arena.decadeUI.choose-character>.dialog, -#arena.decadeUI.choose-character.dui-mobile>.dialog { +#arena.decadeUI.choose-character > .dialog, +#arena.decadeUI.choose-character.dui-mobile > .dialog { bottom: 70px; } -#window>.dialog.bosscharacter { +#window > .dialog.bosscharacter { bottom: calc(1% + 70px); } /*出牌响应提示*/ -#arena>.hand-tip { +#arena > .hand-tip { left: 150px; right: 150px; bottom: calc(20% + 14px); @@ -170,11 +164,11 @@ pointer-events: none; } -#arena.dui-mobile>.hand-tip { +#arena.dui-mobile > .hand-tip { bottom: calc(23% + 18px); /*提示条高度*/ } -#arena>.hand-tip::before { +#arena > .hand-tip::before { color: transparent; content: attr(data-text); height: 100%; @@ -187,24 +181,23 @@ z-index: -1; } - -#arena>.hand-tip>span[data-type='phase'] { +#arena > .hand-tip > span[data-type="phase"] { color: rgb(245, 145, 5); } -#arena>.hand-tip>span[data-type='player'] { +#arena > .hand-tip > span[data-type="player"] { color: rgb(200, 140, 75); } -#arena>.hand-tip>span[data-type='number'] { +#arena > .hand-tip > span[data-type="number"] { color: rgb(255, 155, 0); } -#arena>.hand-tip>span[data-type='card'] { +#arena > .hand-tip > span[data-type="card"] { color: rgb(255, 150, 0); } -#arena>.hand-tip-info { +#arena > .hand-tip-info { left: 150px; right: 150px; bottom: calc(20% + 85px); @@ -213,40 +206,40 @@ margin-bottom: 0; padding-top: 3px; padding-bottom: 3px; - background: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.2) 10%, rgba(0,0,0,0.2) 90%, transparent 100%); + background: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.2) 10%, rgba(0, 0, 0, 0.2) 90%, transparent 100%); color: rgb(250, 250, 200); font-family: shousha; text-align: center; - text-shadow: 0 0 1px black, 0 0 1px black, 0 0 1px rgb(51,51,51); + text-shadow: 0 0 1px black, 0 0 1px black, 0 0 1px rgb(51, 51, 51); transition: opacity 0.1s linear; pointer-events: none; z-index: 6; } -#arena.dui-mobile>.hand-tip-info { +#arena.dui-mobile > .hand-tip-info { bottom: calc(23% + 86px); } -#arena>.hand-tip-info:empty { +#arena > .hand-tip-info:empty { visibility: hidden; } /*界面文本提示框*/ -#arena.decadeUI>.dialog.prompt { +#arena.decadeUI > .dialog.prompt { top: auto; height: auto; background: none; transform: none; box-shadow: none; - bottom: calc(23% + 75px);/*技能描述框高度*/ + bottom: calc(23% + 75px); /*技能描述框高度*/ } -#arena.decadeUI>.dialog.prompt>.content-container, -#arena.decadeUI>.dialog.prompt>.content-container>.content { +#arena.decadeUI > .dialog.prompt > .content-container, +#arena.decadeUI > .dialog.prompt > .content-container > .content { position: relative; } -#arena.decadeUI>.dialog.prompt:not(.addNewRow)>.content-container>.content>.caption { +#arena.decadeUI > .dialog.prompt:not(.addNewRow) > .content-container > .content > .caption { border: none; bottom: 0; height: auto; @@ -255,17 +248,17 @@ padding-top: 3px; padding-bottom: 3px; color: rgb(250, 250, 200); - background: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.2) 10%, rgba(0,0,0,0.2) 90%, transparent 100%); + background: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.2) 10%, rgba(0, 0, 0, 0.2) 90%, transparent 100%); font-family: shousha; - text-shadow: rgb(51,51,51) 1px 0 0, rgb(51,51,51) 0 1px 0, rgb(51,51,51) -1px 0 0, rgb(51,51,51) 0 -1px 0; + text-shadow: rgb(51, 51, 51) 1px 0 0, rgb(51, 51, 51) 0 1px 0, rgb(51, 51, 51) -1px 0 0, rgb(51, 51, 51) 0 -1px 0; } /* #arena.decadeUI>.dialog:not(.prompt)>.dui-container>.dui-content>.caption:last-child { */ - /* margin-bottom: 10px; */ +/* margin-bottom: 10px; */ /* } */ /* #arena.decadeUI>.dialog.prompt>.dui-container>.dui-content>.caption>.text { */ - /* text-align: center; */ +/* text-align: center; */ /* } */ /*基本技能框*/ @@ -278,24 +271,24 @@ border-width: 46px 59px 28px 59px; border-style: solid; border-color: transparent; - border-image-source: url('image/decoration/dialog.png'); + border-image-source: url("image/decoration/dialog.png"); border-image-slice: 46 59 28 59 fill; transition: opacity, background, transform 0.5s; z-index: 6; } -#arena>.skill-dialog { +#arena > .skill-dialog { left: 18%; top: auto; right: 18%; bottom: calc(20% + 85px); } -#arena.dui-mobile>.skill-dialog { +#arena.dui-mobile > .skill-dialog { bottom: calc(23% + 86px); } -.skill-dialog>.caption { +.skill-dialog > .caption { position: absolute; left: auto; top: -45px; @@ -305,50 +298,50 @@ line-height: 36px; font-size: 20px; font-family: shousha; /*拼点框顶部字体*/ - color: rgb(255,255,200); + color: rgb(255, 255, 200); text-align: center; pointer-events: auto; } -.skill-dialog>div { +.skill-dialog > div { position: relative; width: 100%; height: auto; } -.skill-dialog>.content { +.skill-dialog > .content { flex-grow: 1; } -.skill-dialog>.content>div { +.skill-dialog > .content > div { margin: 0; flex: 0 0 auto; } -.skill-dialog>.tip:not(:empty) { +.skill-dialog > .tip:not(:empty) { height: 24px; line-height: 24px; - color: rgb(50,25,0); + color: rgb(50, 25, 0); font-size: 20px; font-family: shousha; text-align: center; text-shadow: none; } -.skill-dialog>.controls { +.skill-dialog > .controls { display: flex; justify-content: center; height: 40px; } -.skill-dialog>.controls:empty { +.skill-dialog > .controls:empty { display: none; } -.skill-dialog>.controls>.control-button { +.skill-dialog > .controls > .control-button { position: static; line-height: 28px; - color: rgb(40,30,20); + color: rgb(40, 30, 20); font-size: 28px; font-family: xingkai; text-align: center; @@ -357,7 +350,7 @@ border-width: 6px 36px 6px 36px; border-style: solid; border-color: transparent; - border-image-source: url('image/decoration/button.png'); + border-image-source: url("image/decoration/button.png"); border-image-slice: 6 36 6 36 fill; box-shadow: none; border-radius: 0; @@ -365,56 +358,54 @@ transition: opacity, background, transform 0.5s; } -.skill-dialog>.controls>.control-button.disable { +.skill-dialog > .controls > .control-button.disable { cursor: default; filter: grayscale(1); -webkit-filter: grayscale(1); } -.skill-dialog>.controls>.control-button:not(.disable):hover { +.skill-dialog > .controls > .control-button:not(.disable):hover { filter: brightness(1.1); -webkit-filter: brightness(1.1); } -.skill-dialog>.controls>.control-button:not(.disable):active { +.skill-dialog > .controls > .control-button:not(.disable):active { filter: brightness(0.8); -webkit-filter: brightness(0.8); } - - /*拼点框*/ -.skill-dialog.compare>.content { +.skill-dialog.compare > .content { display: flex; align-items: center; justify-content: center; } -.skill-dialog.compare>.content>div { +.skill-dialog.compare > .content > div { position: relative; margin-left: 4px; margin-right: 4px; } -.skill-dialog.compare>.content>.player-character { +.skill-dialog.compare > .content > .player-character { width: 120px; height: 180px; - background: rgba(0,0,0,0.4); + background: rgba(0, 0, 0, 0.4); box-shadow: 0px -1px 5px black, 0px 3px 15px black; border-radius: 8px; } -.skill-dialog.compare>.content>.player-character.player1 { +.skill-dialog.compare > .content > .player-character.player1 { order: 1; margin-left: 6px; } -.skill-dialog.compare>.content>.player-character.player2 { +.skill-dialog.compare > .content > .player-character.player2 { order: 5; margin-right: 6px; } -.skill-dialog.compare>.content>.player-character>.image { +.skill-dialog.compare > .content > .player-character > .image { position: absolute; left: 0; bottom: 0; @@ -426,43 +417,43 @@ border-radius: 8px; } -#arena[data-outcrop-skin='on']>.skill-dialog.compare>.content>.player-character>.image { +#arena[data-outcrop-skin="on"] > .skill-dialog.compare > .content > .player-character > .image { height: 192px; clip-path: url(#solo-clip); -webkit-clip-path: url(#solo-clip); } -.skill-dialog.compare>.content>.vs { +.skill-dialog.compare > .content > .vs { order: 3; width: 70px; height: 70px; margin: 0; - background: url('image/decoration/vs.png'); + background: url("image/decoration/vs.png"); } -.skill-dialog.compare>.content>.player-card { +.skill-dialog.compare > .content > .player-card { order: 2; } -.skill-dialog.compare>.content>.target-card { +.skill-dialog.compare > .content > .target-card { order: 4; } -.skill-dialog.compare>.content>.player-card, -.skill-dialog.compare>.content>.target-card { +.skill-dialog.compare > .content > .player-card, +.skill-dialog.compare > .content > .target-card { width: 108px; height: 150px; - background: rgb(141,125,103); - box-shadow: 1px 1px 4px rgb(66,66,66) inset + background: rgb(141, 125, 103); + box-shadow: 1px 1px 4px rgb(66, 66, 66) inset; } -.skill-dialog.compare>.content>.player-card>div, -.skill-dialog.compare>.content>.target-card>div { +.skill-dialog.compare > .content > .player-card > div, +.skill-dialog.compare > .content > .target-card > div { margin: 0; } -.skill-dialog.compare>.content>.player-card::before, -.skill-dialog.compare>.content>.target-card::before { +.skill-dialog.compare > .content > .player-card::before, +.skill-dialog.compare > .content > .target-card::before { content: attr(data-text); position: absolute; left: 0; @@ -476,7 +467,7 @@ text-shadow: none; } -.skill-dialog.compare>.content>.player-card::after { +.skill-dialog.compare > .content > .player-card::after { content: attr(data-result); position: absolute; display: flex; @@ -492,24 +483,18 @@ font-family: xingkai; text-align: center; text-shadow: 0 0 5px black, 0 0 7px black, 0 0 10px black; - } -.skill-dialog.compare>.content>.player-card[data-result='赢']::after { +.skill-dialog.compare > .content > .player-card[data-result="赢"]::after { color: red; animation: open 0.2s; } -.skill-dialog.compare>.content>.player-card[data-result='没赢']::after { +.skill-dialog.compare > .content > .player-card[data-result="没赢"]::after { color: white; animation: open 0.2s; } - - - - - .confirm-box { display: block; position: absolute; @@ -523,7 +508,7 @@ border-width: 46px 59px 28px 59px; border-style: solid; border-color: transparent; - border-image-source: url('image/decoration/dialog.png'); + border-image-source: url("image/decoration/dialog.png"); border-image-slice: 46 61 28 59 fill; pointer-events: auto; z-index: 5; @@ -531,7 +516,7 @@ -webkit-animation: open 0.4s; } -.confirm-box>.caption { +.confirm-box > .caption { position: absolute; left: auto; top: -45px; @@ -541,18 +526,18 @@ line-height: 36px; font-size: 20px; font-family: shousha; - color: rgb(255,255,200); + color: rgb(255, 255, 200); text-align: center; pointer-events: auto; } -.confirm-box>.tip { +.confirm-box > .tip { position: relative; display: block; width: 100%; height: auto; line-height: 24px; - color: rgb(50,25,0); + color: rgb(50, 25, 0); font-size: 20px; font-family: shousha; text-align: center; @@ -560,7 +545,7 @@ pointer-events: auto; } -.confirm-box.guan-xing>.button.ok { +.confirm-box.guan-xing > .button.ok { position: relative; cursor: pointer; left: calc(50% - 66px); @@ -578,23 +563,23 @@ border-width: 6px 36px 6px 36px; border-style: solid; border-color: transparent; - border-image-source: url('image/decoration/button.png'); + border-image-source: url("image/decoration/button.png"); border-image-slice: 6 36 6 36 fill; box-shadow: none; border-radius: 0; } -.confirm-box.guan-xing.ok-disable>.button.ok { +.confirm-box.guan-xing.ok-disable > .button.ok { cursor: default; filter: grayscale(1); -webkit-filter: grayscale(1); } -.confirm-box.guan-xing:not(.ok-disable)>.button.ok:hover { +.confirm-box.guan-xing:not(.ok-disable) > .button.ok:hover { color: white; } -.confirm-box.guan-xing>.content { +.confirm-box.guan-xing > .content { position: relative; width: 100%; height: 80%; @@ -602,7 +587,7 @@ transition: none; } -.confirm-box.guan-xing>.content>.card { +.confirm-box.guan-xing > .content > .card { cursor: pointer; left: 35px; margin: 0; @@ -610,7 +595,7 @@ width: 108px; } -.confirm-box.guan-xing>.content>.header { +.confirm-box.guan-xing > .content > .header { display: flex; align-items: center; justify-content: center; @@ -631,20 +616,20 @@ background: rgb(194, 164, 131); } -.confirm-box.guan-xing>.content>.header:last-of-type { +.confirm-box.guan-xing > .content > .header:last-of-type { bottom: 0; } -.confirm-box.guan-xing>.content>.card.selected::after { +.confirm-box.guan-xing > .content > .card.selected::after { opacity: 0; } -.confirm-box.guan-xing>.content>.card.selected>.card-mask { +.confirm-box.guan-xing > .content > .card.selected > .card-mask { display: block !important; opacity: 1; } -.player .tipContainer>.tip { - width: 100%; - left: 0%; -} \ No newline at end of file +.player .tipContainer > .tip { + width: 100%; + left: 0%; +} diff --git a/effect.css b/effect.css index 81f1b51..5b745a2 100644 --- a/effect.css +++ b/effect.css @@ -12,12 +12,12 @@ } /*击杀特效*/ -.effect-window>.killer-warpper { +.effect-window > .killer-warpper { display: block; - left: 100%; - top: calc(50% - 180px); - width: 240px; - height: 360px; + left: 100%; + top: calc(50% - 180px); + width: 240px; + height: 360px; animation-name: moveout-left-killer; animation-delay: 0.2s; animation-duration: 2.6s; @@ -25,8 +25,8 @@ z-index: 2; } -.effect-window>.killer-warpper::before { - content: ''; +.effect-window > .killer-warpper::before { + content: ""; display: block; position: absolute; left: -40%; @@ -39,7 +39,7 @@ z-index: -1; } -.effect-window>.killer-warpper>.killer { +.effect-window > .killer-warpper > .killer { display: block; position: absolute; left: 0; @@ -47,16 +47,16 @@ width: 100%; height: 100%; background-size: cover; - background-repeat: no-repeat; - background-position: top; + background-repeat: no-repeat; + background-position: top; /* filter: drop-shadow(0 0 30px yellow); */ /* -webkit-filter: drop-shadow(0 0 30px yellow); */ } -.effect-window>.victim { +.effect-window > .victim { display: block; left: 100%; - top: calc(50% - 135px); + top: calc(50% - 135px); width: 180px; height: 270px; animation-name: moveout-left-victim; @@ -66,13 +66,12 @@ z-index: 1; } -.effect-window>.victim>div { +.effect-window > .victim > div { filter: drop-shadow(0 0 3px black) grayscale(1); -webkit-filter: drop-shadow(0 0 3px black) grayscale(1); } - -.effect-window>.victim>.back { +.effect-window > .victim > .back { display: block; position: absolute; left: 0; @@ -81,8 +80,8 @@ height: 100%; } -.effect-window>.victim>.back>.part1, -.effect-window>.victim>.back>.part2 { +.effect-window > .victim > .back > .part1, +.effect-window > .victim > .back > .part2 { display: block; position: absolute; left: 0; @@ -90,35 +89,35 @@ width: 100%; height: 100%; background-size: cover; - background-repeat: no-repeat; - background-position: top; + background-repeat: no-repeat; + background-position: top; animation-delay: 1s; animation-duration: 0.6s; animation-fill-mode: forwards; } -.effect-window>.victim>.back>.part1 { +.effect-window > .victim > .back > .part1 { animation-name: split-part1; clip-path: polygon(0 0, 100% 0, 100% 70%, 0 30%); -webkit-clip-path: polygon(0 0, 100% 0, 100% 70%, 0 30%); } -.effect-window>.victim>.back>.part2 { +.effect-window > .victim > .back > .part2 { animation-name: split-part2; clip-path: polygon(0 30%, 100% 70%, 100% 100%, 0 100%); -webkit-clip-path: polygon(0 30%, 100% 70%, 100% 100%, 0 100%); } -.effect-window>.victim>.rout { +.effect-window > .victim > .rout { display: flex; - align-items: center; - align-content: center; - justify-content: center; + align-items: center; + align-content: center; + justify-content: center; left: 0; top: 0; width: 100%; height: 100%; - color: rgb(70,15,15); + color: rgb(70, 15, 15); font-size: 100px; font-family: xinwei; text-align: center; @@ -130,36 +129,36 @@ -webkit-filter: none; } -.effect-window>.victim>.rout.shadow { +.effect-window > .victim > .rout.shadow { animation: scale-rout-shadow 1s forwards; animation-delay: 0.8s; } -.effect-window>.li { +.effect-window > .li { display: block; - left: 100%; - top: calc(50% - 5px); - width: 300px; - height: 10px; - border-radius: 50% / 50%; - background-image: radial-gradient(white, rgb(250,250,100)); - box-shadow: 0 0 10px rgb(250,250,100), 0 0 20px rgb(250,250,100), 0 0 30px rgb(250,250,100); + left: 100%; + top: calc(50% - 5px); + width: 300px; + height: 10px; + border-radius: 50% / 50%; + background-image: radial-gradient(white, rgb(250, 250, 100)); + box-shadow: 0 0 10px rgb(250, 250, 100), 0 0 20px rgb(250, 250, 100), 0 0 30px rgb(250, 250, 100); filter: blur(1px); - -webkit-filter: blur(1px); + -webkit-filter: blur(1px); animation: moveout-left 0.4s forwards; animation-iteration-count: 2; } -.effect-window>.li-big { +.effect-window > .li-big { display: block; - left: 100%; - top: calc(50% - 70px); - width: 120%; - height: 120px; + left: 100%; + top: calc(50% - 70px); + width: 120%; + height: 120px; background: linear-gradient(to right, white, white 70%, transparent); - border-radius: 15% / 50%; - -webkit-filter: blur(10px) drop-shadow(0 0 50px yellow); - animation: moveout-left-li-big 0.8s linear forwards; + border-radius: 15% / 50%; + -webkit-filter: blur(10px) drop-shadow(0 0 50px yellow); + animation: moveout-left-li-big 0.8s linear forwards; } .skill-name { @@ -172,25 +171,24 @@ font-family: xingkai; text-shadow: 0 0 5px rgb(77, 60, 51), 0 0 4px rgb(77, 60, 51); transform: translateX(-50%); - z-index: 99!important; + z-index: 99 !important; animation: scale-skill-name 2.18s linear forwards; } - @keyframes moveout-left-killer { 0% { left: 100%; } - + 10% { left: calc(32% - 120px); } - + 60% { left: calc(32% - 120px); opacity: 1; } - + 100% { left: calc(32% - 120px); opacity: 0; @@ -201,16 +199,16 @@ 0% { left: 100%; } - + 6% { left: calc(67% - 90px); } - + 60% { left: calc(67% - 90px); opacity: 1; } - + 100% { left: calc(67% - 90px); opacity: 0; @@ -231,7 +229,7 @@ 0% { transform: translateZ(0); } - + 100% { transform: translate(20px, -20px); } @@ -241,7 +239,7 @@ 0% { transform: translateZ(0); } - + 100% { transform: translate(-20px, 20px); } @@ -274,44 +272,34 @@ opacity: 0; transform: translateX(-50%) scale(5); } - + 18% { opacity: 0; transform: translateX(-50%) scale(5); } - + 20% { opacity: 1; transform: translateX(-50%) scale(4.5); } - + 23% { opacity: 1; transform: translateX(-50%) scale(0.95); } - + 27% { opacity: 1; transform: translateX(-50%) scale(1); } - + 92% { opacity: 1; transform: translateX(-50%) scale(1); } - + 100% { opacity: 0; transform: translateX(-50%) scale(1); } } - - - - - - - - - - diff --git a/equip.css b/equip.css index f3e426d..1d2f562 100644 --- a/equip.css +++ b/equip.css @@ -1,4 +1,4 @@ -#arena>.equips-wrap { +#arena > .equips-wrap { bottom: 1%; height: 100%; left: auto; @@ -7,17 +7,18 @@ top: auto; } -#arena[data-right-layout='on']>.equips-wrap {/*右手布局*/ +#arena[data-right-layout="on"] > .equips-wrap { + /*右手布局*/ left: 90px; right: auto; } -#arena[data-alone-equip='off']>.equips-wrap { +#arena[data-alone-equip="off"] > .equips-wrap { opacity: 0; left: auto; } -.equips-wrap>.equips-back { +.equips-wrap > .equips-back { align-content: center; align-items: center; display: flex; @@ -29,7 +30,7 @@ width: 100%; } -.equips-wrap>.equips { +.equips-wrap > .equips { align-items: center; bottom: 0px; display: flex; @@ -44,7 +45,7 @@ width: 100%; } -.equips-wrap>.equips-back>div { +.equips-wrap > .equips-back > div { /*background: rgba(0, 0, 0, 0.4); box-shadow: 0 0 6px rgb(200, 150, 80) inset;*/ height: 27px; @@ -54,27 +55,27 @@ width: 100%; } -.equips-wrap>.equips-back>div[data-type='0']{ +.equips-wrap > .equips-back > div[data-type="0"] { background-image: url("image/decoration/equip1.png"); } -.equips-wrap>.equips-back>div[data-type='1']{ +.equips-wrap > .equips-back > div[data-type="1"] { background-image: url("image/decoration/equip2.png"); } -.equips-wrap>.equips-back>div[data-type='2']{ +.equips-wrap > .equips-back > div[data-type="2"] { background-image: url("image/decoration/equip3.png"); } -.equips-wrap>.equips-back>div[data-type='3']{ +.equips-wrap > .equips-back > div[data-type="3"] { background-image: url("image/decoration/equip4.png"); } -.equips-wrap>.equips-back>div[data-type='4']{ +.equips-wrap > .equips-back > div[data-type="4"] { background-image: url("image/decoration/equip5.png"); } -.equips-wrap>.equips>div { +.equips-wrap > .equips > div { left: 3px; right: 3px; height: 27px; @@ -91,7 +92,7 @@ z-index: 1; } -.equips-wrap>.equips>div::before { +.equips-wrap > .equips > div::before { border: initial; height: inherit; left: auto; @@ -99,16 +100,8 @@ width: inherit; } -.equips-wrap>.equips>div::after { - background: - linear-gradient(to left, yellow, yellow) left top no-repeat, - linear-gradient(to bottom, yellow, yellow) left top no-repeat, - linear-gradient(to left, yellow, yellow) right top no-repeat, - linear-gradient(to bottom, yellow, yellow) right top no-repeat, - linear-gradient(to left, yellow, yellow) left bottom no-repeat, - linear-gradient(to bottom, yellow, yellow) left bottom no-repeat, - linear-gradient(to left, yellow, yellow) right bottom no-repeat, - linear-gradient(to left, yellow, yellow) right bottom no-repeat !important; +.equips-wrap > .equips > div::after { + background: linear-gradient(to left, yellow, yellow) left top no-repeat, linear-gradient(to bottom, yellow, yellow) left top no-repeat, linear-gradient(to left, yellow, yellow) right top no-repeat, linear-gradient(to bottom, yellow, yellow) right top no-repeat, linear-gradient(to left, yellow, yellow) left bottom no-repeat, linear-gradient(to bottom, yellow, yellow) left bottom no-repeat, linear-gradient(to left, yellow, yellow) right bottom no-repeat, linear-gradient(to left, yellow, yellow) right bottom no-repeat !important; background-size: 2px 8px, 10px 2px, 2px 8px, 10px 2px !important; border-radius: 0px; box-shadow: none; @@ -121,33 +114,33 @@ z-index: auto; } -.equips-wrap>.equips>div.selected { +.equips-wrap > .equips > div.selected { box-shadow: 0 0 10px yellow; } -.equips-wrap>.equips>div.selectable { +.equips-wrap > .equips > div.selectable { cursor: pointer; transform: translateX(-10px); } -.equips-wrap>.equips>div.selectable::before { +.equips-wrap > .equips > div.selectable::before { animation: fade-in-out-selectable 1s infinite; } -#arena[data-right-layout='on']>.equips-wrap>.equips>div.selectable { +#arena[data-right-layout="on"] > .equips-wrap > .equips > div.selectable { transform: translateX(10px); } -.mobile-phone .equips-wrap>.equips>div.selected { +.mobile-phone .equips-wrap > .equips > div.selected { box-shadow: 0 0 2px yellow, 0 0 4px yellow, 0 0 8px yellow; } -.equips-wrap .equips>div[data-card-subype='equip5'] .equips-wrap>.equips-back>div.equip0 { +.equips-wrap .equips > div[data-card-subype="equip5"] .equips-wrap > .equips-back > div.equip0 { opacity: 1; } -.equips-wrap>.equips-back>div>.icon, -.equips-wrap>.equips>div>.icon { +.equips-wrap > .equips-back > div > .icon, +.equips-wrap > .equips > div > .icon { display: block; top: 4px; left: 2px; @@ -156,12 +149,12 @@ transition: opacity 0.5s; } -.equips-wrap>.equips>.card>div { +.equips-wrap > .equips > .card > div { position: absolute; text-shadow: none; } -.equips-wrap>.equips>.card>.name2 { +.equips-wrap > .equips > .card > .name2 { display: flex; align-items: center; align-content: center; @@ -185,30 +178,30 @@ } /*红色装备牌颜色显示*/ -.equips-wrap>.equips>.card[data-suit='heart']>.name2, -.equips-wrap>.equips>.card[data-suit='diamond']>.name2 { - color: #8B0000; +.equips-wrap > .equips > .card[data-suit="heart"] > .name2, +.equips-wrap > .equips > .card[data-suit="diamond"] > .name2 { + color: #8b0000; } /*黑色装备牌颜色显示*/ -.equips-wrap>.equips>.card[data-suit='spade']>.name2, -.equips-wrap>.equips>.card[data-suit='club']>.name2 { +.equips-wrap > .equips > .card[data-suit="spade"] > .name2, +.equips-wrap > .equips > .card[data-suit="club"] > .name2 { color: #181818; } /*无色装备牌颜色显示*/ -.equips-wrap>.equips>.card[data-suit='none']>.name2 { +.equips-wrap > .equips > .card[data-suit="none"] > .name2 { background-color: black; color: white; } -.equips-wrap>.equips>.card.feichu>.name2 { +.equips-wrap > .equips > .card.feichu > .name2 { background-color: rgb(57, 48, 33); color: white; font-weight: normal; } -.equips-wrap>.equips>.card>.image { +.equips-wrap > .equips > .card > .image { bottom: auto; display: block; height: 20px; @@ -219,13 +212,13 @@ z-index: 2; } -.equips-wrap>.equips>.card:not(.fullskin)>.image { +.equips-wrap > .equips > .card:not(.fullskin) > .image { display: block !important; } /*其他玩家装备栏*/ -.player>.equips, -#arena>.player:not(.minskin)>.equips { +.player > .equips, +#arena > .player:not(.minskin) > .equips { left: 10%; right: 16%; width: auto; @@ -287,9 +280,9 @@ box-shadow: none; } -.player>.equips>.card, -.player.unseen>.equips>.card, -.player.unseen2>.equips>.card { +.player > .equips > .card, +.player.unseen > .equips > .card, +.player.unseen2 > .equips > .card { display: flex; align-items: center; align-content: center; @@ -304,23 +297,23 @@ text-shadow: none; } -#arena.decadeUI:not(.long).mobile:not(.oldlayout) .player.unseen:not([data-position="0"]) .equips:not(*:empty)>.card, -#arena.decadeUI:not(.long):not(.mobile):not(.oldlayout) .player.unseen .equips:not(*:empty)>.card:not(.selected), -#arena.decadeUI.long.mobile:not(.oldlayout) .player.unseen2:not([data-position="0"]) .equips:not(*:empty)>.card, -#arena.decadeUI.long:not(.mobile):not(.oldlayout) .player.unseen2 .equips:not(*:empty)>.card:not(.selected) { +#arena.decadeUI:not(.long).mobile:not(.oldlayout) .player.unseen:not([data-position="0"]) .equips:not(*:empty) > .card, +#arena.decadeUI:not(.long):not(.mobile):not(.oldlayout) .player.unseen .equips:not(*:empty) > .card:not(.selected), +#arena.decadeUI.long.mobile:not(.oldlayout) .player.unseen2:not([data-position="0"]) .equips:not(*:empty) > .card, +#arena.decadeUI.long:not(.mobile):not(.oldlayout) .player.unseen2 .equips:not(*:empty) > .card:not(.selected) { background: rgba(228, 207, 166, 0.8) !important; } -.player:not(.selectable)>.equips>.card, -.player:not(.selectable)>.equips>.card>div { +.player:not(.selectable) > .equips > .card, +.player:not(.selectable) > .equips > .card > div { pointer-events: auto; } -.player>.equips>.card>div { +.player > .equips > .card > div { position: static; } -.player>.equips>.card>.name2 { +.player > .equips > .card > .name2 { position: absolute; left: 0; top: 0; @@ -344,7 +337,7 @@ pointer-events: none; } -.player>.equips>.card[data-suit='heart']>.name2, -.player>.equips>.card[data-suit='diamond']>.name2 { - color: #8B0000; -} \ No newline at end of file +.player > .equips > .card[data-suit="heart"] > .name2, +.player > .equips > .card[data-suit="diamond"] > .name2 { + color: #8b0000; +} diff --git a/equip_new.css b/equip_new.css index 5abcb00..75d5eb2 100644 --- a/equip_new.css +++ b/equip_new.css @@ -1,4 +1,4 @@ -#arena>.equips-wrap { +#arena > .equips-wrap { bottom: 1%; height: 100%; left: auto; @@ -7,17 +7,18 @@ top: auto; } -#arena[data-right-layout='on']>.equips-wrap {/*右手布局*/ +#arena[data-right-layout="on"] > .equips-wrap { + /*右手布局*/ left: 90px; right: auto; } -#arena[data-alone-equip='off']>.equips-wrap { +#arena[data-alone-equip="off"] > .equips-wrap { opacity: 0; left: auto; } -.equips-wrap>.equips-back { +.equips-wrap > .equips-back { align-content: center; align-items: center; display: flex; @@ -29,7 +30,7 @@ width: 100%; } -.equips-wrap>.equips { +.equips-wrap > .equips { align-items: center; bottom: 0px; display: flex; @@ -44,7 +45,7 @@ width: 100%; } -.equips-wrap>.equips-back>div { +.equips-wrap > .equips-back > div { /*background: rgba(0, 0, 0, 0.4); box-shadow: 0 0 6px rgb(200, 150, 80) inset;*/ height: 27px; @@ -54,27 +55,27 @@ width: 100%; } -.equips-wrap>.equips-back>div[data-type='0']{ +.equips-wrap > .equips-back > div[data-type="0"] { background-image: url("image/decoration/equip1.png"); } -.equips-wrap>.equips-back>div[data-type='1']{ +.equips-wrap > .equips-back > div[data-type="1"] { background-image: url("image/decoration/equip2.png"); } -.equips-wrap>.equips-back>div[data-type='2']{ +.equips-wrap > .equips-back > div[data-type="2"] { background-image: url("image/decoration/equip3.png"); } -.equips-wrap>.equips-back>div[data-type='3']{ +.equips-wrap > .equips-back > div[data-type="3"] { background-image: url("image/decoration/equip4.png"); } -.equips-wrap>.equips-back>div[data-type='4']{ +.equips-wrap > .equips-back > div[data-type="4"] { background-image: url("image/decoration/equip5.png"); } -.equips-wrap>.equips>div { +.equips-wrap > .equips > div { left: 3px; right: 3px; height: 27px; @@ -91,7 +92,7 @@ z-index: 1; } -.equips-wrap>.equips>div::before { +.equips-wrap > .equips > div::before { border: initial; height: inherit; left: auto; @@ -99,7 +100,7 @@ width: inherit; } -.equips-wrap>.equips>div::after { +.equips-wrap > .equips > div::after { background: /* linear-gradient(to left, red, red) left top no-repeat, @@ -110,85 +111,78 @@ linear-gradient(to bottom, red, red) left bottom no-repeat, linear-gradient(to left, red, red) right bottom no-repeat, linear-gradient(to left, red, red) right bottom no-repeat !important; - */ - linear-gradient(to left, yellow, yellow) left top no-repeat, - linear-gradient(to bottom, yellow, yellow) left top no-repeat, - linear-gradient(to left, yellow, yellow) right top no-repeat, - linear-gradient(to bottom, yellow, yellow) right top no-repeat, - linear-gradient(to left, yellow, yellow) left bottom no-repeat, - linear-gradient(to bottom, yellow, yellow) left bottom no-repeat, - linear-gradient(to left, yellow, yellow) right bottom no-repeat, - linear-gradient(to left, yellow, yellow) right bottom no-repeat !important; - /*个人独立装备栏配色改黄色*/ - background-size: 2px 8px, 10px 2px, 2px 8px, 10px 2px !important; - border-radius: 0px; - box-shadow: none; - display: block; - height: inherit; - left: auto; - opacity: 1; - top: auto; - width: inherit; - z-index: auto; -} - -.equips-wrap>.equips>div.selected { + */ linear-gradient(to left, yellow, yellow) left top no-repeat, linear-gradient(to bottom, yellow, yellow) left top no-repeat, linear-gradient(to left, yellow, yellow) right top no-repeat, linear-gradient(to bottom, yellow, yellow) right top no-repeat, linear-gradient(to left, yellow, yellow) left bottom no-repeat, linear-gradient(to bottom, yellow, yellow) left bottom no-repeat, linear-gradient(to left, yellow, yellow) right bottom no-repeat, linear-gradient(to left, yellow, yellow) right bottom no-repeat !important; + /*个人独立装备栏配色改黄色*/ + background-size: 2px 8px, 10px 2px, 2px 8px, 10px 2px !important; + border-radius: 0px; + box-shadow: none; + display: block; + height: inherit; + left: auto; + opacity: 1; + top: auto; + width: inherit; + z-index: auto; +} + +.equips-wrap > .equips > div.selected { box-shadow: 0 0 10px yellow; } -.equips-wrap>.equips>div.selectable { +.equips-wrap > .equips > div.selectable { cursor: pointer; transform: translateX(-10px); } -.equips-wrap>.equips>div.selectable::before { +.equips-wrap > .equips > div.selectable::before { animation: fade-in-out-selectable 1s infinite; } -#arena[data-right-layout='on']>.equips-wrap>.equips>div.selectable { +#arena[data-right-layout="on"] > .equips-wrap > .equips > div.selectable { transform: translateX(10px); } -.mobile-phone .equips-wrap>.equips>div.selected { +.mobile-phone .equips-wrap > .equips > div.selected { box-shadow: 0 0 2px yellow, 0 0 4px yellow, 0 0 8px yellow; } -.equips-wrap .equips>div[data-card-subype='equip5'] .equips-wrap>.equips-back>div.equip0 { +.equips-wrap .equips > div[data-card-subype="equip5"] .equips-wrap > .equips-back > div.equip0 { opacity: 1; } -.equips-wrap>.equips>.card { +.equips-wrap > .equips > .card { top: 0px; } -.equips-wrap>.equips-back>div.equip0, -.equips-wrap>.equips>div.equip5{ +.equips-wrap > .equips-back > div.equip0, +.equips-wrap > .equips > div.equip5 { top: 27px; } -.equips-wrap>.equips-back>div.equip1, -.equips-wrap>.equips>div.equip1{ +.equips-wrap > .equips-back > div.equip1, +.equips-wrap > .equips > div.equip1 { top: 51px; } -.equips-wrap>.equips-back>div.equip2, -.equips-wrap>.equips>div.equip2{ +.equips-wrap > .equips-back > div.equip2, +.equips-wrap > .equips > div.equip2 { top: 75px; } -.equips-wrap>.equips-back>div.equip3, -.equips-wrap>.equips>div.equip3, -.equips-wrap>.equips>div.equip6 { +.equips-wrap > .equips-back > div.equip3, +.equips-wrap > .equips > div.equip3, +.equips-wrap > .equips > div.equip6 { top: 99px; } -.equips-wrap>.equips-back>div.equip4, -.equips-wrap>.equips>div.equip4{ +.equips-wrap > .equips-back > div.equip4, +.equips-wrap > .equips > div.equip4 { top: 123px; } -.equips-wrap>.equips-back>div>.icon, -.equips-wrap>.equips>div>.icon { /*装备类型标识*/ +.equips-wrap > .equips-back > div > .icon, +.equips-wrap > .equips > div > .icon { + /*装备类型标识*/ display: block; top: 2px; left: 2px; @@ -197,12 +191,12 @@ transition: opacity 0.5s; } -.equips-wrap>.equips>.card>div { +.equips-wrap > .equips > .card > div { text-shadow: none; position: absolute; } -.equips-wrap>.equips>.card>.name2 { +.equips-wrap > .equips > .card > .name2 { display: flex; align-items: center; align-content: center; @@ -226,30 +220,30 @@ } /*红色装备牌颜色显示*/ -.equips-wrap>.equips>.card[data-suit='heart']>.name2, -.equips-wrap>.equips>.card[data-suit='diamond']>.name2 { - color: #8B0000; +.equips-wrap > .equips > .card[data-suit="heart"] > .name2, +.equips-wrap > .equips > .card[data-suit="diamond"] > .name2 { + color: #8b0000; } /*黑色装备牌颜色显示*/ -.equips-wrap>.equips>.card[data-suit='spade']>.name2, -.equips-wrap>.equips>.card[data-suit='club']>.name2 { +.equips-wrap > .equips > .card[data-suit="spade"] > .name2, +.equips-wrap > .equips > .card[data-suit="club"] > .name2 { color: #181818; } /*无色装备牌颜色显示*/ -.equips-wrap>.equips>.card[data-suit='none']>.name2 { +.equips-wrap > .equips > .card[data-suit="none"] > .name2 { background-color: black; color: white; } -.equips-wrap>.equips>.card.feichu>.name2 { +.equips-wrap > .equips > .card.feichu > .name2 { background-color: rgb(57, 48, 33); color: white; font-weight: normal; } -.equips-wrap>.equips>.card>.image { +.equips-wrap > .equips > .card > .image { bottom: auto; display: block; height: 20px; @@ -260,19 +254,18 @@ z-index: 2; } -.equips-wrap>.equips>.card:not(.fullskin)>.image { +.equips-wrap > .equips > .card:not(.fullskin) > .image { display: block !important; } - /*其他玩家装备栏*/ -.player>.equips, -#arena>.player:not(.minskin)>.equips { - left: 8%;/*右边距*/ - right: 13.8%;/*左边距*/ - width: auto;/*宽度,自动匹配*/ - height: 80px;/*高度*/ - bottom: 3%;/*整体上移*/ +.player > .equips, +#arena > .player:not(.minskin) > .equips { + left: 8%; /*右边距*/ + right: 13.8%; /*左边距*/ + width: auto; /*宽度,自动匹配*/ + height: 80px; /*高度*/ + bottom: 3%; /*整体上移*/ box-shadow: none; background: none; background-image: none; @@ -287,20 +280,20 @@ /* flex-wrap: wrap-reverse; */ } -#arena[data-new-decade-style='on']>.player>.equips, -#arena[data-new-decade-style='on']>.player:not(.minskin)>.equips { +#arena[data-new-decade-style="on"] > .player > .equips, +#arena[data-new-decade-style="on"] > .player:not(.minskin) > .equips { left: 8%; right: 13.8%; } -#arena[data-new-decade-style='off']>.player>.equips, -#arena[data-new-decade-style='off']>.player:not(.minskin)>.equips { +#arena[data-new-decade-style="off"] > .player > .equips, +#arena[data-new-decade-style="off"] > .player:not(.minskin) > .equips { left: 17.5%; right: 0.5%; } -#arena[data-new-decade-style='othersOn']>.player>.equips, -#arena[data-new-decade-style='othersOn']>.player:not(.minskin)>.equips { +#arena[data-new-decade-style="othersOn"] > .player > .equips, +#arena[data-new-decade-style="othersOn"] > .player:not(.minskin) > .equips { left: 13.8%; right: 0.4%; } @@ -341,52 +334,52 @@ #arena.decadeUI:not(.long).mobile:not(.oldlayout) .player.unseen:not([data-position="0"]) .equips:not(*:empty), #arena.decadeUI:not(.long):not(.mobile):not(.oldlayout) .player.unseen .equips:not(*:empty), #arena.decadeUI.long.mobile:not(.oldlayout) .player.unseen2:not([data-position="0"]) .equips:not(*:empty), -#arena.decadeUI.long:not(.mobile):not(.oldlayout) .player.unseen2 .equips:not(*:empty){ +#arena.decadeUI.long:not(.mobile):not(.oldlayout) .player.unseen2 .equips:not(*:empty) { background: none; border-radius: 0; overflow: hidden; box-shadow: none; } -.player>.equips>.card, -.player.unseen>.equips>.card, -.player.unseen2>.equips>.card {/*AI装备栏*/ +.player > .equips > .card, +.player.unseen > .equips > .card, +.player.unseen2 > .equips > .card { + /*AI装备栏*/ display: flex; align-items: center; align-content: flex-start; justify-content: center; /* background: rgba(228, 207, 166, 0.8) !important;/*底色*/ - border-image:linear-gradient(to right, rgba(0, 0, 0,0.4) 70%,transparent) 100% 0 0; - background:linear-gradient(to right,rgba(0, 0, 0,0.3),transparent), - linear-gradient(135deg,rgba(0, 0, 0,0.5) ,transparent 100%,transparent) !important; - box-shadow:none; + border-image: linear-gradient(to right, rgba(0, 0, 0, 0.4) 70%, transparent) 100% 0 0; + background: linear-gradient(to right, rgba(0, 0, 0, 0.3), transparent), linear-gradient(135deg, rgba(0, 0, 0, 0.5), transparent 100%, transparent) !important; + box-shadow: none; border: 0px solid rgb(95, 55, 45); /*边框*/ /*border-image: none !important;*/ box-sizing: border-box; - border-radius: 1px;/*圆角*/ + border-radius: 1px; /*圆角*/ width: 100%; height: 16px; text-shadow: none; } -#arena.decadeUI:not(.long).mobile:not(.oldlayout) .player.unseen:not([data-position="0"]) .equips:not(*:empty)>.card, -#arena.decadeUI:not(.long):not(.mobile):not(.oldlayout) .player.unseen .equips:not(*:empty)>.card:not(.selected), -#arena.decadeUI.long.mobile:not(.oldlayout) .player.unseen2:not([data-position="0"]) .equips:not(*:empty)>.card, -#arena.decadeUI.long:not(.mobile):not(.oldlayout) .player.unseen2 .equips:not(*:empty)>.card:not(.selected){ - background: rgba(228, 207, 166, 0.8) !important;/*玩家装备栏底色*/ +#arena.decadeUI:not(.long).mobile:not(.oldlayout) .player.unseen:not([data-position="0"]) .equips:not(*:empty) > .card, +#arena.decadeUI:not(.long):not(.mobile):not(.oldlayout) .player.unseen .equips:not(*:empty) > .card:not(.selected), +#arena.decadeUI.long.mobile:not(.oldlayout) .player.unseen2:not([data-position="0"]) .equips:not(*:empty) > .card, +#arena.decadeUI.long:not(.mobile):not(.oldlayout) .player.unseen2 .equips:not(*:empty) > .card:not(.selected) { + background: rgba(228, 207, 166, 0.8) !important; /*玩家装备栏底色*/ } - -.player:not(.selectable)>.equips>.card, -.player:not(.selectable)>.equips>.card>div { +.player:not(.selectable) > .equips > .card, +.player:not(.selectable) > .equips > .card > div { pointer-events: auto; } -.player>.equips>.card>div { +.player > .equips > .card > div { position: static; } -.player>.equips>.card>.name2 {/*AI装备名*/ +.player > .equips > .card > .name2 { + /*AI装备名*/ position: absolute; left: 5px; top: 0; @@ -397,9 +390,9 @@ width: 100%; height: 100%; line-height: 15px; - color: #E9E8E3;/*颜色*/ - font-size: 14px;/*字体大小*/ - font-weight: bolder;/*加粗*/ + color: #e9e8e3; /*颜色*/ + font-size: 14px; /*字体大小*/ + font-weight: bolder; /*加粗*/ font-family: shousha, xinwei, xinkai !important; text-shadow: none; text-align: center; @@ -410,7 +403,7 @@ pointer-events: none; } -.player>.equips>.card[data-suit='heart']>.name2, -.player>.equips>.card[data-suit='diamond']>.name2 { - color: #8B0000; +.player > .equips > .card[data-suit="heart"] > .name2, +.player > .equips > .card[data-suit="diamond"] > .name2 { + color: #8b0000; } diff --git a/extension.css b/extension.css index 55ddf9f..1c8fd9d 100644 --- a/extension.css +++ b/extension.css @@ -1,38 +1,38 @@ /* 用于技能和身份的字体 */ @font-face { - font-family: 'HYZLSJ'; - src: url("./shoushaUI/fonts/HYZLSJ.TTF"); + font-family: "HYZLSJ"; + src: url("./shoushaUI/fonts/HYZLSJ.TTF"); } /* 用于武将字体 */ @font-face { - font-family: 'WDZLFT'; - src: url("./shoushaUI/fonts/WDZLFT.TTF"); + font-family: "WDZLFT"; + src: url("./shoushaUI/fonts/WDZLFT.TTF"); } @font-face { - font-family: 'FZLBJW'; - src: url("./shoushaUI/fonts/FZLBJW.TTF"); + font-family: "FZLBJW"; + src: url("./shoushaUI/fonts/FZLBJW.TTF"); } /* 用于角色弹框标题的字体 */ @font-face { - font-family: 'ATLL'; - src: url("./shoushaUI/fonts/ATLL.OTF"); + font-family: "ATLL"; + src: url("./shoushaUI/fonts/ATLL.OTF"); } @font-face { - font-family: 'FZLSFT'; - src: url("./shoushaUI/fonts/FZLSFT.TTF"); + font-family: "FZLSFT"; + src: url("./shoushaUI/fonts/FZLSFT.TTF"); } .menu-container > .menu.main.cxy-import-dialog { - top: 50% !important; - left: 50% !important; - width: 420px; - height: 130px; - padding: 15px; - transform: translate(-50%, -50%); + top: 50% !important; + left: 50% !important; + width: 420px; + height: 130px; + padding: 15px; + transform: translate(-50%, -50%); } .menu.main.cxy-import-dialog > .caption { - padding-top: 0; - padding-bottom: 8px; + padding-top: 0; + padding-bottom: 8px; } /*--------(去除按钮虚化)--------*/ @@ -42,18 +42,18 @@ top: calc(200% / 3); left: calc(5% + 240px); width: calc(90% - 480px); - pointer-events: none + pointer-events: none; } -#control>* { +#control > * { pointer-events: auto; } -#window:not(.nopointer) #control{ - cursor:pointer; +#window:not(.nopointer) #control { + cursor: pointer; } -#control.nozoom>div { +#control.nozoom > div { transition-property: opacity; } -#control>div.stayleft{ +#control > div.stayleft { transition-property: opacity !important; } .control { @@ -66,21 +66,21 @@ font-size: 18px; white-space: nowrap; overflow: hidden; - opacity: 0 + opacity: 0; } .control.removing.removing2 { - transform: scale(0.2) + transform: scale(0.2); } -.control>div { +.control > div { position: relative; padding: 3px; - margin: 0 + margin: 0; } -.control.disabled{ +.control.disabled { opacity: 1 !important; cursor: default !important; } -#control>div { +#control > div { position: absolute; left: 50%; } @@ -98,11 +98,11 @@ */ /*-----更改无懈蓝框-------*/ -.glow:not(.button):not(.card){ +.glow:not(.button):not(.card) { box-shadow: none !important; -webkit-filter: grayscale(100%); background-size: 100% 100%; - z-index:89; + z-index: 89; pointer-events: none; } @@ -145,75 +145,82 @@ */ .shousha_menu { - width:100%; - border-radius: 3px; - background-color: rgba(134,200,241,0.5); - font-family:yuanli; - padding: 0.5px; - /*cursor: pointer;*/ + width: 100%; + border-radius: 3px; + background-color: rgba(134, 200, 241, 0.5); + font-family: yuanli; + padding: 0.5px; + /*cursor: pointer;*/ } -.KZJS,.JDTSM,.JDTSSM,.GTBBSM,.JMYSSM,.QTMHSM>.shousha_text { - text-align: left; - font-size:14px; - width:250px; - word-wrap:break-word; +.KZJS, +.JDTSM, +.JDTSSM, +.GTBBSM, +.JMYSSM, +.QTMHSM > .shousha_text { + text-align: left; + font-size: 14px; + width: 250px; + word-wrap: break-word; } .shousha_update { - z-index:999; - background-size: cover; + z-index: 999; + background-size: cover; } -.shousha_update>.shousha_update_close{ - z-index:999; - position:fixed; - overflow: hidden; - --w: 76px; - --h: calc(var(--w) * 64/76); +.shousha_update > .shousha_update_close { + z-index: 999; + position: fixed; + overflow: hidden; + --w: 76px; + --h: calc(var(--w) * 64 / 76); width: var(--w); height: var(--h); - top:0px; - right:0px; - margin:23px; - background-size: 100% 100%; - background-image: url("./shoushaUI/shousha_close.png"); + top: 0px; + right: 0px; + margin: 23px; + background-size: 100% 100%; + background-image: url("./shoushaUI/shousha_close.png"); } - /*细节美化*/ -.nmscore1{/*手牌分十位*/ -display: block; -position: absolute; -width:30px; -left:16px; -bottom:25px; -height:30px; -background-repeat:no-repeat; -background-size:contain; -z-index:1; -} -.nmscore2{/*手牌分个位*/ -display: block; -position: absolute; -width:30px; -right:26px; -bottom:25px; -height:30px; -background-repeat:no-repeat; -background-size:contain; -z-index:1; -} -.nmcardscore{/*手牌分背景*/ -display: block; -position: absolute; -width:90px; -background-image: url('./shoushaUI/MH/score.png'); -right:36%; -bottom:20px; -height:90px; -background-repeat:no-repeat; -background-size:contain; -border-radius:16px; -z-index:-1; +.nmscore1 { + /*手牌分十位*/ + display: block; + position: absolute; + width: 30px; + left: 16px; + bottom: 25px; + height: 30px; + background-repeat: no-repeat; + background-size: contain; + z-index: 1; +} +.nmscore2 { + /*手牌分个位*/ + display: block; + position: absolute; + width: 30px; + right: 26px; + bottom: 25px; + height: 30px; + background-repeat: no-repeat; + background-size: contain; + z-index: 1; +} +.nmcardscore { + /*手牌分背景*/ + display: block; + position: absolute; + width: 90px; + background-image: url("./shoushaUI/MH/score.png"); + right: 36%; + bottom: 20px; + height: 90px; + background-repeat: no-repeat; + background-size: contain; + border-radius: 16px; + z-index: -1; } diff --git a/extension.js b/extension.js index ce12a8f..a7cc629 100644 --- a/extension.js +++ b/extension.js @@ -829,7 +829,9 @@ game.import("extension", function (lib, game, ui, get, ai, _status) { if (!this.node.dieidentity) this.node.dieidentity = ui.create.div("died-identity", this); this.node.dieidentity.classList.add("died-identity"); - var that = this, image = new Image(), identity = decadeUI.getPlayerIdentity(this); + var that = this, + image = new Image(), + identity = decadeUI.getPlayerIdentity(this); const goon = decadeUI.config.newDecadeStyle === "on" || decadeUI.config.newDecadeStyle === "othersOff"; var url = decadeUIPath + "image/decoration" + (goon ? "/dead" : "s/dead2") + "_" + identity + ".png"; image.onerror = function () { @@ -2404,7 +2406,7 @@ game.import("extension", function (lib, game, ui, get, ai, _status) { } }, - updatem: function (player) { }, + updatem: function (player) {}, updatez: function () { window.documentZoom = game.documentZoom; @@ -3188,7 +3190,7 @@ game.import("extension", function (lib, game, ui, get, ai, _status) { lib.hooks["checkEnd"].push(function decadeUI_UIconfirm() { if (ui.confirm && ui.confirm.lastChild.link == "cancel") { if (_status.event.type == "phase") { - const innerHTML = (lib.config["extension_十周年UI_newDecadeStyle"] != "othersOff" || decadeUI.config.newDecadeStyle == "on") ? "回合结束" : "结束出牌"; + const innerHTML = lib.config["extension_十周年UI_newDecadeStyle"] != "othersOff" || decadeUI.config.newDecadeStyle == "on" ? "回合结束" : "结束出牌"; ui.confirm.lastChild.innerHTML = _status.event.skill ? "取消" : innerHTML; } } @@ -7185,7 +7187,7 @@ game.import("extension", function (lib, game, ui, get, ai, _status) { return element; }, - clone: function (element) { }, + clone: function (element) {}, }; decadeUI.game = { @@ -9325,7 +9327,7 @@ game.import("extension", function (lib, game, ui, get, ai, _status) { decadeModule.init = function () { //原十周年UI内容加载 - this.css(decadeUIPath + "extension.css") + this.css(decadeUIPath + "extension.css"); this.css(decadeUIPath + "decadeLayout.css"); this.css(decadeUIPath + "card.css"); // 当且仅当初次载入时,newDecadeStyle == void 0 @@ -9337,7 +9339,7 @@ game.import("extension", function (lib, game, ui, get, ai, _status) { } if (lib.config["extension_十周年UI_newDecadeStyle"] == "othersOff") { this.css(decadeUIPath + "equip_new_new.css"); - this.css(decadeUIPath + "layout_new.css") + this.css(decadeUIPath + "layout_new.css"); } else { this.css(decadeUIPath + (lib.config.extension_十周年UI_newDecadeStyle == "on" ? "equip.css" : "equip_new.css")); this.css(decadeUIPath + "layout.css"); @@ -9367,8 +9369,8 @@ game.import("extension", function (lib, game, ui, get, ai, _status) { on: 2, off: 1, othersOn: 1, - othersOff: 3 - } + othersOff: 3, + }; if (!(get.mode() == "chess" || get.mode() == "tafang")) { var list = ["character", "lbtn", "skill"]; list.forEach(pack => { @@ -9384,10 +9386,10 @@ game.import("extension", function (lib, game, ui, get, ai, _status) { } //js加载 this.js( - layoutPath + pack + "/" + pack + "/main" + listmap[lib.config["extension_十周年UI_newDecadeStyle"]] + '.js', + layoutPath + pack + "/" + pack + "/main" + listmap[lib.config["extension_十周年UI_newDecadeStyle"]] + ".js", null, - function () { }, - function () { } + function () {}, + function () {} ); }); } @@ -9548,8 +9550,8 @@ game.import("extension", function (lib, game, ui, get, ai, _status) { var listens = app.listens[event] || []; var filters = listen ? listens.filter(function (item) { - return item === listen || item.listen === listen; - }) + return item === listen || item.listen === listen; + }) : listens.slice(0); filters.forEach(function (item) { listens.remove(item); @@ -9584,7 +9586,7 @@ game.import("extension", function (lib, game, ui, get, ai, _status) { }); return; } - setText = typeof setText === "function" ? setText : function () { }; + setText = typeof setText === "function" ? setText : function () {}; var zip = new JSZip(data); var dirList = [], fileList = []; @@ -9698,7 +9700,6 @@ game.import("extension", function (lib, game, ui, get, ai, _status) { ); break; } - }); }); }, @@ -9875,16 +9876,15 @@ game.import("extension", function (lib, game, ui, get, ai, _status) { on: 2, off: 1, othersOn: 1, - othersOff: 3 - } + othersOff: 3, + }; lib.init.js( layoutPath + pack + "/main" + listmap[lib.config["extension_十周年UI_newDecadeStyle"]] + ".js", null, - function () { }, - function () { } + function () {}, + function () {} ); switch (pack) { - case "character": lib.init.css(layoutPath + pack + "/main" + listmap[lib.config["extension_十周年UI_newDecadeStyle"]] + ".css"); @@ -10491,7 +10491,7 @@ game.import("extension", function (lib, game, ui, get, ai, _status) { lib.setScroll(window.qicai); clickFK(window.qicai); //-----7---小酒-------// - game.open_xiaojiu = function () { }; + game.open_xiaojiu = function () {}; window.xiaojiu = ui.create.div("hidden", "", game.open_xiaojiu); window.xiaojiu.style.cssText = "display: block;--w: 63px;--h: calc(var(--w) * 50/50);width: var(--w);height: var(--h);left:-230px;bottom:36px;transition:none;background-size:100% 100%"; @@ -11292,7 +11292,7 @@ game.import("extension", function (lib, game, ui, get, ai, _status) { on: "十周年", off: "新手杀", othersOn: "旧手杀", - othersOff: '一将成名', + othersOff: "一将成名", }, onclick: function (control) { const origin = lib.config["extension_十周年UI_newDecadeStyle"]; @@ -11304,7 +11304,7 @@ game.import("extension", function (lib, game, ui, get, ai, _status) { update: function () { if (window.decadeUI) { ui.arena.dataset.newDecadeStyle = lib.config["extension_十周年UI_newDecadeStyle"]; - ui.arena.dataset.decadeLayout = (lib.config["extension_十周年UI_newDecadeStyle"] == "on" || lib.config["extension_十周年UI_newDecadeStyle"] == "othersOff") ? "on" : "off"; + ui.arena.dataset.decadeLayout = lib.config["extension_十周年UI_newDecadeStyle"] == "on" || lib.config["extension_十周年UI_newDecadeStyle"] == "othersOff" ? "on" : "off"; } }, }, @@ -11371,7 +11371,6 @@ game.import("extension", function (lib, game, ui, get, ai, _status) { on: '
', On: '
', othersOn: '
', - }, update: function () { if (window.decadeUI) ui.arena.dataset.loadingStyle = lib.config["extension_十周年UI_loadingStyle"]; @@ -11649,9 +11648,11 @@ game.import("extension", function (lib, game, ui, get, ai, _status) { "魔改十周年 萌修 " + pack.version, "最低适配:v1.10.17 - 待定", "新版适配", - '整合u的“一将成名”样式', - '大幅简化手杀样式技能剩余次数的写法', - '挑战模式boss名称显示位置优化(by - 幻翼幽冥)', + "对所有文件进行统一prettier格式化,修复css文件里面的报错属性", + "整合lone的信息页美化并做适配跟进", + "整合u的“一将成名”样式并做适配跟进", + "大幅简化手杀样式技能剩余次数的写法", + "挑战模式boss名称显示位置优化(by - 幻翼幽冥)", ]; return '点击前往萌修十周年Github仓库

' + log.join("
•") + "

"; })(pack); diff --git a/icon.css b/icon.css index 65c49fa..8f407bd 100644 --- a/icon.css +++ b/icon.css @@ -1,35 +1,35 @@ /*所以图标均为正方形素材*/ .icon.feichu, -.icon.feichu:before, .icon.feichu:after { +.icon.feichu:before, +.icon.feichu:after { opacity: 0.8; background: white; } .icon-background { width: 50px; - height:50px; + height: 50px; border: solid 1px gray; } .icon-treasure { position: relative; width: 100%; - height:100%; + height: 100%; background: transparent !important; } - .icon-treasure:before { content: ""; position: absolute; display: block; top: 10%; - left:10%; + left: 10%; width: 80%; - height:60%; + height: 60%; border-radius: 20% 20% 0 0; - background: linear-gradient(to right, #ED6E6E 0%, #ec8c69 100%) top no-repeat, linear-gradient(to right, #ED6E6E 0%, #ec8c69 100%) bottom no-repeat; + background: linear-gradient(to right, #ed6e6e 0%, #ec8c69 100%) top no-repeat, linear-gradient(to right, #ed6e6e 0%, #ec8c69 100%) bottom no-repeat; background-size: 100% 60%, 100% 30% !important; clip-path: polygon(0 0, 100% 0, 100% 70%, 62% 70%, 62% 100%, 38% 100%, 38% 70%, 0 70%); -webkit-clip-path: polygon(0 0, 100% 0, 100% 70%, 62% 70%, 62% 100%, 38% 100%, 38% 70%, 0 70%); @@ -44,34 +44,33 @@ position: absolute; display: block; top: 50%; - left:10%; + left: 10%; width: 80%; - height:40%; + height: 40%; border-radius: 0 0 25% 25%; - background: linear-gradient(to right, #ED6E6E 0%, #ec8c69 100%); + background: linear-gradient(to right, #ed6e6e 0%, #ec8c69 100%); clip-path: polygon(0 0, 29% 0, 29% 60%, 71% 60%, 71% 0, 100% 0, 100% 100%, 0 100%); -webkit-clip-path: polygon(0 0, 29% 0, 29% 60%, 71% 60%, 71% 0, 100% 0, 100% 100%, 0 100%); } - - .icon-saber { width: 100%; - height:100%; - background: linear-gradient(to right, #ED6E6E 0%, #ec8c69 100%); - transform:rotate(-45deg); + height: 100%; + background: linear-gradient(to right, #ed6e6e 0%, #ec8c69 100%); + transform: rotate(-45deg); clip-path: polygon(50% 0, 65% 15%, 60% 70%, 75% 70%, 72% 80%, 56% 82%, 56% 100%, 44% 100%, 44% 82%, 28% 80%, 25% 70%, 40% 70%, 35% 15%, 50% 0); -webkit-clip-path: polygon(50% 0, 65% 15%, 60% 70%, 75% 70%, 72% 80%, 56% 82%, 56% 100%, 44% 100%, 44% 82%, 28% 80%, 25% 70%, 40% 70%, 35% 15%, 50% 0); } .icon-shield { - position: relative; - width: 100%; - height: 100%; + position: relative; + width: 100%; + height: 100%; background: transparent !important; } -.icon-shield:before, .icon-shield:after { +.icon-shield:before, +.icon-shield:after { content: ""; position: absolute; display: block; @@ -79,10 +78,9 @@ left: 15%; width: 70%; height: 70%; - background: linear-gradient(to right, #ED6E6E 0%, #ec8c69 100%); + background: linear-gradient(to right, #ed6e6e 0%, #ec8c69 100%); } - .icon-shield:before { border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%; } @@ -95,11 +93,10 @@ -webkit-clip-path: polygon(0 0, 100% 0, 100% 30%, 82% 72%, 50% 100%, 18% 72%, 0 30%, 0 0); } - .icon-mount { width: 100%; - height:100%; - background: linear-gradient(to right, #ED6E6E 0%, #ec8c69 100%); + height: 100%; + background: linear-gradient(to right, #ed6e6e 0%, #ec8c69 100%); clip-path: polygon(50% 5%, 55% 20%, 80% 60%, 75% 65%, 75% 75%, 80% 90%, 15% 90%, 50% 70%, 50% 55%, 45% 50%, 22% 65%, 10% 50%, 45% 20%, 50% 5%); -webkit-clip-path: polygon(50% 5%, 55% 20%, 80% 60%, 75% 65%, 75% 75%, 80% 90%, 15% 90%, 50% 70%, 50% 55%, 45% 50%, 22% 65%, 10% 50%, 45% 20%, 50% 5%); -} \ No newline at end of file +} diff --git a/menu.css b/menu.css index 41d9fbf..17fe402 100644 --- a/menu.css +++ b/menu.css @@ -1,4 +1,4 @@ -.menu-container>.menu.main { +.menu-container > .menu.main { /*框整体*/ width: 80%; margin-left: 9%; @@ -6,12 +6,12 @@ margin-top: 2%; transition: all 0.3s; transform-origin: 2px -35px; - background-image: url('image/button/background.png'); + background-image: url("image/button/background.png"); background-size: 100% 100%; - border: 3px solid #5C4033; + border: 3px solid #5c4033; } -.menu.main>.menu-tab>div { +.menu.main > .menu-tab > div { /*标题栏文字显示*/ display: inline-block; height: 27.5px; @@ -19,25 +19,25 @@ line-height: 30px; padding-top: 0px; width: 60px; - color: #FFFFFF; + color: #ffffff; margin-left: 5px; margin-right: 5px; transition: color 0.5s; - background-image: url('image/button/selected_light.png'); + background-image: url("image/button/selected_light.png"); background-size: 100% 100%; } -.menu.main>.menu-tab>div:hover { - background-image: url('image/button/selected_light.png'); +.menu.main > .menu-tab > div:hover { + background-image: url("image/button/selected_light.png"); } -.menu.main>.menu-tab>div:not(.active):not(*:hover), -.menu.main>.menu-tab>.disabled { - color: #FFFFFF; - background-image: url('image/button/selected.png'); +.menu.main > .menu-tab > div:not(.active):not(*:hover), +.menu.main > .menu-tab > .disabled { + color: #ffffff; + background-image: url("image/button/selected.png"); } -.menu.main>.menu-content>div>.left.pane>div { +.menu.main > .menu-content > div > .left.pane > div { width: calc(100% - 45px); top: 25px; margin-top: -3px; @@ -45,35 +45,35 @@ transition: all 0.3s; height: 20px; font-size: 22.5px; - font-family: 'shousha'; - color: #FFFFFF; + font-family: "shousha"; + color: #ffffff; text-align: center; padding-top: 27.5px; line-height: 1px; white-space: nowrap; - background-image: url('image/button/selected_light.png') !important; + background-image: url("image/button/selected_light.png") !important; background-size: 100% 100%; box-shadow: none; } -.menu.main>.menu-content>div>.left.pane>div:hover { - background-image: url('image/button/selected_light.png') !important; +.menu.main > .menu-content > div > .left.pane > div:hover { + background-image: url("image/button/selected_light.png") !important; } -.menu.main>.menu-content>div>.left.pane>div:not(.active):not(*:hover), -.menu.main>.menu-content>div>.left.pane>.disabled { - color: #FFFFFF; - background-image: url('image/button/selected.png') !important; +.menu.main > .menu-content > div > .left.pane > div:not(.active):not(*:hover), +.menu.main > .menu-content > div > .left.pane > .disabled { + color: #ffffff; + background-image: url("image/button/selected.png") !important; } -.menu.main>.menu-content>div>.left.pane>div { +.menu.main > .menu-content > div > .left.pane > div { overflow: hidden; /* 隐藏超出的内容 */ position: relative; /* 设置相对定位 */ } -.menu.main>.menu-content>div>.left.pane>div.no-scroll { +.menu.main > .menu-content > div > .left.pane > div.no-scroll { -webkit-overflow-scrolling: disabled; /* 在iOS设备上禁止滑动 */ scroll-behavior: block; @@ -87,7 +87,7 @@ font-size: 35px; transition: color 0.3s; position: absolute; - background: #5C3000; + background: #5c3000; background-repeat: no-repeat; text-align: center; border: 1px solid #000000; @@ -102,7 +102,7 @@ line-height: 40px; } -.menu.main>.menu-tab { +.menu.main > .menu-tab { /*菜单顶部标题栏*/ height: 40px; left: -60px; @@ -118,18 +118,18 @@ border-style: solid; } -.menu.main>.menu-content>div>.left.pane>.lefttext { +.menu.main > .menu-content > div > .left.pane > .lefttext { /*全部开启和恢复默认*/ font-size: 15px; margin-left: 8px; } -.menu.main>.menu-tab-bar { +.menu.main > .menu-tab-bar { /*标题栏进度条*/ display: none; } -.menu.main>.menu-content>div>.right.pane { +.menu.main > .menu-content > div > .right.pane { /*右侧内容栏*/ left: 22%; width: 70%; @@ -137,7 +137,7 @@ top: 3%; } -.menu.main>.menu-content>div>.left.pane { +.menu.main > .menu-content > div > .left.pane { /*菜单栏左侧标题*/ width: 20%; left: 2%; @@ -145,7 +145,7 @@ overflow: scroll; } -.menu.main>.menu-content { +.menu.main > .menu-content { /*菜单具体内容*/ height: calc(100% - 38px); position: relative; @@ -154,7 +154,7 @@ font-size: 18px; } -.popup-container>.menu { +.popup-container > .menu { /*可选内容位置*/ position: absolute; overflow: scroll; @@ -162,18 +162,18 @@ max-height: auto; bottom: 10px; transition-property: opacity; - background-color: #FFDAB9; + background-color: #ffdab9; border: 2px solid #000000; } -.config.config.toggle>div { +.config.config.toggle > div { /*开关按钮-关闭*/ --w: 60px; - --h: calc(var(--w) * 83/158); + --h: calc(var(--w) * 83 / 158); width: var(--w); height: var(--h); background-color: rgba(0, 0, 0, 0); - background-image: url('image/button/kg_off.png'); + background-image: url("image/button/kg_off.png"); background-position: center center; background-repeat: no-repeat; background-size: 100% 100%; @@ -181,13 +181,12 @@ box-shadow: none; } -.config.config.toggle.on>div { +.config.config.toggle.on > div { /*开关按钮-开启*/ - background-image: url('image/button/kg_on.png'); + background-image: url("image/button/kg_on.png"); box-shadow: none; - } -.config.config.toggle>div>div { +.config.config.toggle > div > div { visibility: hidden; -} \ No newline at end of file +} diff --git a/player1.css b/player1.css index 1f71849..212fdb8 100644 --- a/player1.css +++ b/player1.css @@ -1,107 +1,107 @@ @import "animation.css"; /*角色基本外观*/ .player { - height: 180px; - width: 120px; - border-radius: 8px; - box-shadow: 0px -1px 3px black, 0px 3px 8px black; - background-image: linear-gradient(rgb(53, 38, 32), rgb(53, 38, 32)); - transition-property: transform, opacity, left, top, right, bottom; + height: 180px; + width: 120px; + border-radius: 8px; + box-shadow: 0px -1px 3px black, 0px 3px 8px black; + background-image: linear-gradient(rgb(53, 38, 32), rgb(53, 38, 32)); + transition-property: transform, opacity, left, top, right, bottom; } .dui-mobile .player { - box-shadow: 0px -1px 2px black, 0px 1px 5px black; + box-shadow: 0px -1px 2px black, 0px 1px 5px black; } .player.dead { - animation: player-died 0.5s linear; - -webkit-animation: player-died 0.5s linear; - animation-iteration-count: 1; + animation: player-died 0.5s linear; + -webkit-animation: player-died 0.5s linear; + animation-iteration-count: 1; } .player::before { - left: -55px; - top: -42px; - width: 230px; - height: 262px; - opacity: 0; - background-image: url("assets/image/sprites_glow_blue.png"); - background-repeat: no-repeat; - animation-name: kf-sprites-glow; - animation-duration: 0s; - animation-delay: 0s; - animation-iteration-count: infinite; - animation-fill-mode: forwards; - animation-timing-function: steps(1); - pointer-events: none; - box-shadow: none; - transition: opacity 0.1s linear; + left: -55px; + top: -42px; + width: 230px; + height: 262px; + opacity: 0; + background-image: url("assets/image/sprites_glow_blue.png"); + background-repeat: no-repeat; + animation-name: kf-sprites-glow; + animation-duration: 0s; + animation-delay: 0s; + animation-iteration-count: infinite; + animation-fill-mode: forwards; + animation-timing-function: steps(1); + pointer-events: none; + box-shadow: none; + transition: opacity 0.1s linear; } .player.selected:not(.target):before, .player.glow_phase:not(.selectable):not(*[data-position="0"])::before { - animation-duration: 0.9s; /*新增*/ - background-image: url("assets/image/sprites_glow_orange.png"); - opacity: 1; + animation-duration: 0.9s; /*新增*/ + background-image: url("assets/image/sprites_glow_orange.png"); + opacity: 1; } .player.selectable:not(.selected):not(.target)::before { - animation-duration: 0.9s; /*新增*/ - opacity: 1; + animation-duration: 0.9s; /*新增*/ + opacity: 1; } .player::after, .player.selected::after, .player.selectable::after { - left: -55px; - top: -42px; - width: 230px; - height: 262px; - opacity: 0; - background-image: url("assets/image/sprites_glow_red.png"); - background-repeat: no-repeat; - animation-name: kf-sprites-glow; - animation-duration: 0s; - animation-delay: 0s; - animation-iteration-count: infinite; - animation-fill-mode: forwards; - animation-timing-function: steps(1); - pointer-events: none; - box-shadow: none; - transition: opacity 0.1s linear; + left: -55px; + top: -42px; + width: 230px; + height: 262px; + opacity: 0; + background-image: url("assets/image/sprites_glow_red.png"); + background-repeat: no-repeat; + animation-name: kf-sprites-glow; + animation-duration: 0s; + animation-delay: 0s; + animation-iteration-count: infinite; + animation-fill-mode: forwards; + animation-timing-function: steps(1); + pointer-events: none; + box-shadow: none; + transition: opacity 0.1s linear; } .player.target:not(.glow_phase):not(.selectable):not(.selected)::after { - animation-duration: 0.9s; /*新增*/ - opacity: 1; + animation-duration: 0.9s; /*新增*/ + opacity: 1; } #arena > .player { - z-index: 4; + z-index: 4; } .player > .mask { - position: absolute; - left: 0; - top: 0; - width: 100%; - height: 100%; - border-radius: inherit; - background: rgba(0, 0, 0, 0.65); - opacity: 0; - transition: opacity 0.3s ease-in-out; - pointer-events: none; - z-index: 66; + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + border-radius: inherit; + background: rgba(0, 0, 0, 0.65); + opacity: 0; + transition: opacity 0.3s ease-in-out; + pointer-events: none; + z-index: 66; } .player.un-selectable:not(.selectable) > .mask { - opacity: 1; - transition: opacity 0.3s linear; + opacity: 1; + transition: opacity 0.3s linear; } #arena/*.dui-mobile>*/:not(.fewplayer)>.player:not(.minskin), #arena/*.dui-mobile>*/:not(.fewplayer):not(*[data-player_height=''])>.player:not(.minskin) { - height: 180px !important; + height: 180px !important; } /* @@ -114,20 +114,20 @@ /*玩家锁链*/ .player > .chain { - top: 40%; - height: 24px; - visibility: hidden; - background-size: cover; - background-position-x: -120px; - background-repeat: no-repeat; - background-image: url("assets/image/tie_suo.png"); - transition-duration: 0.4s; - z-index: 86; + top: 40%; + height: 24px; + visibility: hidden; + background-size: cover; + background-position-x: -120px; + background-repeat: no-repeat; + background-image: url("assets/image/tie_suo.png"); + transition-duration: 0.4s; + z-index: 86; } .player.linked2 > .chain { - visibility: visible; - background-position-x: center; + visibility: visible; + background-position-x: center; } /*隐藏玩家手牌显示以及降低玩家血量标记位置—咸鱼大佬的代码*/ @@ -137,7 +137,7 @@ }*/ .player[data-position="0"] > .card-count { - visibility: hidden; + visibility: hidden; } /*主玩家位置*/ @@ -146,351 +146,351 @@ #arena > .player[data-position="0"]:not(.minskin), #arena:not(*[data-player_height=""]) > .player[data-position="0"], #arena:not(*[data-player_height=""]) > .player[data-position="0"]:not(.miniskin) { - left: 25px; - top: auto; - right: auto; - bottom: 1%; + left: 25px; + top: auto; + right: auto; + bottom: 1%; } #arena[data-right-layout="on"] > .player[data-position="0"], #arena[data-right-layout="on"] > .player[data-position="0"]:not(.miniskin) { - left: auto; - right: 25px; + left: auto; + right: 25px; } /*玩家姓名阵营*/ .player > .camp-wrap { - display: block; - left: -19px; - top: -9px; - width: 37px; - height: 128px; - transition: none; - z-index: 88; + display: block; + left: -19px; + top: -9px; + width: 37px; + height: 128px; + transition: none; + z-index: 88; } .player.connect > div:not(.avatar):not(.name):not(.nameol):not(.hp):not(.room):not(.gaming):not(.identity).camp-wrap { - display: block !important; + display: block !important; } /*新增*/ .player.connect > div:not(.avatar):not(.name):not(.nameol):not(.hp):not(.room):not(.gaming):not(.identity).primary-avatar { - display: block !important; + display: block !important; } .player > .camp-wrap div { - transition: none; + transition: none; } .player > .camp-wrap > .camp-back { - background: linear-gradient(to bottom, rgb(155, 129, 108), rgb(73, 71, 58)); - clip-path: polygon(0 0, 100% 0, 100% 90%, 50% 100%, 0% 90%); /*新增*/ - -webkit-clip-path: polygon(0 0, 100% 0, 100% 90%, 50% 100%, 0% 90%); + background: linear-gradient(to bottom, rgb(155, 129, 108), rgb(73, 71, 58)); + clip-path: polygon(0 0, 100% 0, 100% 90%, 50% 100%, 0% 90%); /*新增*/ + -webkit-clip-path: polygon(0 0, 100% 0, 100% 90%, 50% 100%, 0% 90%); } .player.unseen > .camp-wrap > .camp-back { - background: linear-gradient(to bottom, rgb(92, 35, 22), rgb(50, 27, 26)); + background: linear-gradient(to bottom, rgb(92, 35, 22), rgb(50, 27, 26)); } .player > .camp-wrap[data-camp="wei"] > .camp-back { - background: linear-gradient(to bottom, rgb(45, 103, 153), rgb(19, 45, 78)); + background: linear-gradient(to bottom, rgb(45, 103, 153), rgb(19, 45, 78)); } .player > .camp-wrap[data-camp="shu"] > .camp-back { - background: linear-gradient(to bottom, rgb(153, 28, 34), rgb(57, 12, 17)); + background: linear-gradient(to bottom, rgb(153, 28, 34), rgb(57, 12, 17)); } .player > .camp-wrap[data-camp="wu"] > .camp-back { - background: linear-gradient(to bottom, rgb(29, 114, 29), rgb(34, 42, 27)); + background: linear-gradient(to bottom, rgb(29, 114, 29), rgb(34, 42, 27)); } .player > .camp-wrap[data-camp="qun"] > .camp-back { - background: linear-gradient(to bottom, rgb(154, 148, 122), rgb(74, 72, 57)); + background: linear-gradient(to bottom, rgb(154, 148, 122), rgb(74, 72, 57)); } .player > .camp-wrap[data-camp="shen"] > .camp-back { - background: linear-gradient(to bottom, rgb(97, 87, 15), rgb(65, 50, 9), rgb(67, 52, 9)); + background: linear-gradient(to bottom, rgb(97, 87, 15), rgb(65, 50, 9), rgb(67, 52, 9)); } .player > .camp-wrap[data-camp="shen2"] > .camp-back { - background: linear-gradient(to bottom, rgb(112, 52, 126), rgb(52, 18, 55)); + background: linear-gradient(to bottom, rgb(112, 52, 126), rgb(52, 18, 55)); } .player > .camp-wrap[data-camp="ye"] > .camp-back { - background: linear-gradient(to bottom, rgb(112, 52, 126), rgb(52, 18, 55)); + background: linear-gradient(to bottom, rgb(112, 52, 126), rgb(52, 18, 55)); } .player > .camp-wrap[data-camp="key"] > .camp-back { - background: linear-gradient(to bottom, rgb(147, 132, 183), rgb(130, 120, 160), rgb(120, 115, 154)); + background: linear-gradient(to bottom, rgb(147, 132, 183), rgb(130, 120, 160), rgb(120, 115, 154)); } .player > .camp-wrap[data-camp="western"] > .camp-back { - background: linear-gradient(to bottom, rgb(93, 44, 105), rgb(54, 18, 58)); + background: linear-gradient(to bottom, rgb(93, 44, 105), rgb(54, 18, 58)); } .player > .camp-wrap[data-camp="jin"] > .camp-back { - background: linear-gradient(to bottom, rgb(112, 52, 126), rgb(52, 18, 55)); + background: linear-gradient(to bottom, rgb(112, 52, 126), rgb(52, 18, 55)); } .player > .camp-wrap[data-camp="daqin"] > .camp-back { - background: linear-gradient(to bottom, rgb(100, 100, 100), rgb(0, 0, 0)); + background: linear-gradient(to bottom, rgb(100, 100, 100), rgb(0, 0, 0)); } .player > .camp-wrap > .camp-border { - display: block; - left: 0px; - top: 0px; - width: 100%; - height: 100%; - position: absolute; - background-image: url("image/decoration/border_camp.png"); - background-size: 100% 100%; - background-repeat: no-repeat; + display: block; + left: 0px; + top: 0px; + width: 100%; + height: 100%; + position: absolute; + background-image: url("image/decoration/border_camp.png"); + background-size: 100% 100%; + background-repeat: no-repeat; } #arena.decadeUI[data-border-level="one"] .player > .camp-wrap > .camp-border { - background-image: url("image/decoration/border_camp1.png"); + background-image: url("image/decoration/border_camp1.png"); } #arena.decadeUI[data-border-level="two"] .player > .camp-wrap > .camp-border { - background-image: url("image/decoration/border_camp2.png"); + background-image: url("image/decoration/border_camp2.png"); } #arena.decadeUI[data-border-level="three"] .player > .camp-wrap > .camp-border { - background-image: url("image/decoration/border_camp3.png"); + background-image: url("image/decoration/border_camp3.png"); } #arena.decadeUI[data-border-level="four"] .player > .camp-wrap > .camp-border { - background-image: url("image/decoration/border_camp4.png"); + background-image: url("image/decoration/border_camp4.png"); } .player>.camp-wrap>.avatar-name, /*主将名,根据部分群友需要,添加定位代码*/ #arena>.player:not(.minskin)>.name.name { - display: flex; - align-items: center; - align-content: center; - justify-content: center; - left: 25% !important; - right: auto; - top: 30px; - width: 18px; - height: 96px; - font-size: 16px; - line-height: 15px; /*字体间距*/ - text-shadow: none; - z-index: 89; + display: flex; + align-items: center; + align-content: center; + justify-content: center; + left: 25% !important; + right: auto; + top: 30px; + width: 18px; + height: 96px; + font-size: 16px; + line-height: 15px; /*字体间距*/ + text-shadow: none; + z-index: 89; } .player > .camp-wrap > .avatar-name, .player > .camp-wrap > .avatar-name-default, .player > .camp-wrap > .camp-back { - display: flex; - align-items: center; - align-content: center; - justify-content: center; - font-size: 16px; - text-align: center; - text-shadow: none; /*#000 1px 0 0, #000 0 1px 0, #000 -1px 0 0, #000 0 -1px 0;*/ - left: 26%; - top: 24%; - right: 26%; - bottom: 1%; - position: absolute; - white-space: nowrap; - writing-mode: vertical-rl; - -webkit-writing-mode: vertical-rl; + display: flex; + align-items: center; + align-content: center; + justify-content: center; + font-size: 16px; + text-align: center; + text-shadow: none; /*#000 1px 0 0, #000 0 1px 0, #000 -1px 0 0, #000 0 -1px 0;*/ + left: 26%; + top: 24%; + right: 26%; + bottom: 1%; + position: absolute; + white-space: nowrap; + writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; } .player.unseen > .camp-wrap > .avatar-name, .player:not(.unseen) > .camp-wrap > .avatar-name-default, .player:not(.unseen2) > .camp-wrap > .avatar2-name-default { - visibility: hidden; + visibility: hidden; } .player > .unseen_show > .primary-avatar, .player > .unseen2_show > .deputy-avatar { - opacity: 0; + opacity: 0; } #arena:not(.observe) .player:not([data-position="0"]).unseen_show > .primary-avatar, #arena:not(.observe) .player:not([data-position="0"]).unseen2_show > .deputy-avatar { - opacity: 1 !important; - background-image: url("../../image/character/hidden_image.jpg") !important; + opacity: 1 !important; + background-image: url("../../image/character/hidden_image.jpg") !important; } .player > .camp-wrap > .camp-name { - font-family: xinwei, xingkai; - font-display: swap; - font-size: 26px; - width: 100%; - height: 33.5%; - display: flex; - text-align: center; - align-items: center; - align-content: center; - justify-content: center; - background-size: contain; - background-repeat: no-repeat; - background-position: center; - transition: none; + font-family: xinwei, xingkai; + font-display: swap; + font-size: 26px; + width: 100%; + height: 33.5%; + display: flex; + text-align: center; + align-items: center; + align-content: center; + justify-content: center; + background-size: contain; + background-repeat: no-repeat; + background-position: center; + transition: none; } .player > .camp-wrap[data-camp="wei"] > .camp-name { - text-shadow: 0 0 5px rgb(50, 50, 255), 0 0 10px rgb(120, 120, 255), 0 0 15px rgb(100, 100, 255); + text-shadow: 0 0 5px rgb(50, 50, 255), 0 0 10px rgb(120, 120, 255), 0 0 15px rgb(100, 100, 255); } .player > .camp-wrap[data-camp="shu"] > .camp-name { - text-shadow: 0 0 5px rgb(255, 100, 100), 0 0 10px rgb(255, 50, 50), 0 0 15px rgb(255, 50, 50); + text-shadow: 0 0 5px rgb(255, 100, 100), 0 0 10px rgb(255, 50, 50), 0 0 15px rgb(255, 50, 50); } .player > .camp-wrap[data-camp="wu"] > .camp-name { - text-shadow: 0 0 5px rgb(100, 233, 100), 0 0 10px rgb(50, 255, 50), 0 0 15px rgb(50, 255, 50); + text-shadow: 0 0 5px rgb(100, 233, 100), 0 0 10px rgb(50, 255, 50), 0 0 15px rgb(50, 255, 50); } .player > .camp-wrap[data-camp="qun"] > .camp-name { - text-shadow: 0 0 5px rgb(170, 170, 170), 0 0 10px rgb(118, 118, 118), 0 0 15px rgb(118, 118, 118); + text-shadow: 0 0 5px rgb(170, 170, 170), 0 0 10px rgb(118, 118, 118), 0 0 15px rgb(118, 118, 118); } .player > .camp-wrap[data-camp="shen"] > .camp-name { - text-shadow: 0 0 5px rgb(255, 200, 0), 0 0 10px rgb(255, 200, 0), 0 0 15px rgb(255, 200, 0); + text-shadow: 0 0 5px rgb(255, 200, 0), 0 0 10px rgb(255, 200, 0), 0 0 15px rgb(255, 200, 0); } .player > .camp-wrap > .camp-name { - text-shadow: 0 0 5px #e0ea33, 0 0 15px #e0ea33, 0 0 25px #e0ea33; + text-shadow: 0 0 5px #e0ea33, 0 0 15px #e0ea33, 0 0 25px #e0ea33; } /*副将名*/ .player > .name.name2, #arena > .player:not(.minskin) > .name.name2 { - display: flex; - align-items: center; - align-content: center; - justify-content: center; - left: 50% !important; - right: auto; - top: 22px; - width: 18px; - height: 96px; - font-size: 16px; - text-shadow: none; /*#000 1px 0 0, #000 0 1px 0, #000 -1px 0 0, #000 0 -1px 0;*/ - background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.4) 20%, rgba(0, 0, 0, 0.5) 50%, rgba(0, 0, 0, 0.4) 80%, transparent 100%); - z-index: 89; + display: flex; + align-items: center; + align-content: center; + justify-content: center; + left: 50% !important; + right: auto; + top: 22px; + width: 18px; + height: 96px; + font-size: 16px; + text-shadow: none; /*#000 1px 0 0, #000 0 1px 0, #000 -1px 0 0, #000 0 -1px 0;*/ + background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.4) 20%, rgba(0, 0, 0, 0.5) 50%, rgba(0, 0, 0, 0.4) 80%, transparent 100%); + z-index: 89; } .player > .name.name2:empty, #arena > .player:not(.minskin) > .name.name2:empty { - display: none; + display: none; } .player.fullskin.fullskin2 > .name.name2:empty::before { - content: "副将"; + content: "副将"; } /*联机名称显示*/ .player > .nameol { - top: 5px; - font-size: 16px; - font-family: "shousha"; - text-shadow: 0 0 2px black; - background: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.4) 40%, rgba(0, 0, 0, 0.4) 60%, transparent 100%); - z-index: 89; - pointer-events: none; + top: 5px; + font-size: 16px; + font-family: "shousha"; + text-shadow: 0 0 2px black; + background: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.4) 40%, rgba(0, 0, 0, 0.4) 60%, transparent 100%); + z-index: 89; + pointer-events: none; } /*玩家血量显示*/ .player > .hp-wrap { - display: block; - right: -2px; - bottom: -5px; - width: 12px; - height: 50px; - border-width: 24px 5px 21px 82px; - border-style: solid; - border-color: transparent; - border-image-source: url("image/decoration/border_hp.png"); - border-image-slice: 32 6 25 113 fill; - pointer-events: none; - transition-property: transform, opacity, height; - transition-duration: 0.1s; - transition-timing-function: linear; - z-index: 88; + display: block; + right: -2px; + bottom: -5px; + width: 12px; + height: 50px; + border-width: 24px 5px 21px 82px; + border-style: solid; + border-color: transparent; + border-image-source: url("image/decoration/border_hp.png"); + border-image-slice: 32 6 25 113 fill; + pointer-events: none; + transition-property: transform, opacity, height; + transition-duration: 0.1s; + transition-timing-function: linear; + z-index: 88; } .player[data-max-hp="1"] > .hp-wrap { - height: 5px; + height: 5px; } .player[data-max-hp="2"] > .hp-wrap { - height: 20px; + height: 20px; } .player[data-max-hp="3"] > .hp-wrap { - height: 35px; + height: 35px; } .player[data-max-hp="4"] > .hp-wrap { - height: 50px; + height: 50px; } .player[data-max-hp="5"] > .hp-wrap { - height: 65px; + height: 65px; } .player[data-max-hp="hujia"] > .hp-wrap { - height: 78px; + height: 78px; } .hujia { - top: auto; - bottom: 43px; - left: -5px; - background-image: url("image/decoration/shield_decade.png"); - background-size: 100% 100%; - background-repeat: no-repeat; - width: 20.25px; - text-align: center; - color: white; - font-size: 17px; - font-family: "yuanli"; - line-height: 24px; - height: 22.5px; - position: relative; - text-shadow: 0.3px 0px 1.8px #332c18, 0.3px 0px 1.8px #332c18, 0.3px 0px 1.8px #332c18, 0.3px 0px 1.8px #332c18, 0.3px 0px 1.8px #332c18, 0.3px 0px 1.8px #332c18, 0.3px 0px 1.8px #332c18, 0.3px 0px 1.8px #332c18, 0.3px 0px 1.8px #332c18, 0.3px 0px 1.8px #332c18, 0.3px 0px 1.8px #332c18, 0.3px 0px 1.8px #332c18, 0.3px 0px 1.8px #332c18, 0.3px 0px 1.8px #332c18, 0.3px 0px 1.8px #332c18, 0.3px 0px 1.8px #332c18, 0.3px 0px 1.8px #332c18, 0.3px 0px 1.8px #332c18, 0.3px 0px 1.8px #332c18, 0.3px 0px 1.8px #332c18, 0.3px 0px 1.8px #332c18, 0.3px 0px 1.8px #332c18, 0.3px 0px 1.8px #332c18, 0.3px 0px 1.8px #332c18, 0.3px 0px 1.8px #332c18, 0.3px 0px 1.8px #332c18, 0.3px 0px 1.8px #332c18; - z-index: 100; + top: auto; + bottom: 43px; + left: -5px; + background-image: url("image/decoration/shield_decade.png"); + background-size: 100% 100%; + background-repeat: no-repeat; + width: 20.25px; + text-align: center; + color: white; + font-size: 17px; + font-family: "yuanli"; + line-height: 24px; + height: 22.5px; + position: relative; + text-shadow: 0.3px 0px 1.8px #332c18, 0.3px 0px 1.8px #332c18, 0.3px 0px 1.8px #332c18, 0.3px 0px 1.8px #332c18, 0.3px 0px 1.8px #332c18, 0.3px 0px 1.8px #332c18, 0.3px 0px 1.8px #332c18, 0.3px 0px 1.8px #332c18, 0.3px 0px 1.8px #332c18, 0.3px 0px 1.8px #332c18, 0.3px 0px 1.8px #332c18, 0.3px 0px 1.8px #332c18, 0.3px 0px 1.8px #332c18, 0.3px 0px 1.8px #332c18, 0.3px 0px 1.8px #332c18, 0.3px 0px 1.8px #332c18, 0.3px 0px 1.8px #332c18, 0.3px 0px 1.8px #332c18, 0.3px 0px 1.8px #332c18, 0.3px 0px 1.8px #332c18, 0.3px 0px 1.8px #332c18, 0.3px 0px 1.8px #332c18, 0.3px 0px 1.8px #332c18, 0.3px 0px 1.8px #332c18, 0.3px 0px 1.8px #332c18, 0.3px 0px 1.8px #332c18, 0.3px 0px 1.8px #332c18; + z-index: 100; } .player.connect > div:not(.avatar):not(.name):not(.nameol):not(.hp):not(.room):not(.gaming):not(.identity).hp-wrap { - display: block !important; + display: block !important; } #arena.decadeUI[data-border-level="one"] .player > .hp-wrap { - border-image-source: url("image/decoration/border_hp1.png"); + border-image-source: url("image/decoration/border_hp1.png"); } #arena.decadeUI[data-border-level="two"] .player > .hp-wrap { - border-image-source: url("image/decoration/border_hp2.png"); + border-image-source: url("image/decoration/border_hp2.png"); } #arena.decadeUI[data-border-level="three"] .player > .hp-wrap { - border-image-source: url("image/decoration/border_hp3.png"); + border-image-source: url("image/decoration/border_hp3.png"); } #arena.decadeUI[data-border-level="four"] .player > .hp-wrap { - border-image-source: url("image/decoration/border_hp4.png"); + border-image-source: url("image/decoration/border_hp4.png"); } .player > .hp-wrap > .hp, #arena.slim_player .player .hp, #window > .player:not(.minskin) .hp { - display: flex; - left: 0; - right: 0; - width: 12px; - bottom: -8px; - font-size: 13px; - line-height: 14px; - flex-direction: column; + display: flex; + left: 0; + right: 0; + width: 12px; + bottom: -8px; + font-size: 13px; + line-height: 14px; + flex-direction: column; } /* .player>.hp-wrap>.hp.textstyle { @@ -499,602 +499,602 @@ */ .player > .hp-wrap > .hp.hidden { - opacity: 1 !important; + opacity: 1 !important; } .player > .hp-wrap > .hp > div { - position: static; - margin-top: 3px; - width: 12px; - height: 12px; - line-height: 100%; - border: none; + position: static; + margin-top: 3px; + width: 12px; + height: 12px; + line-height: 100%; + border: none; } .hp:not(.text):not(.actcount):not(.treasure) > .lost, .hp:not(.text):not(.actcount):not(.treasure)[data-condition="mid"] > div:not(.lost), .hp:not(.text):not(.actcount):not(.treasure)[data-condition="high"] > div:not(.lost), .hp:not(.text):not(.actcount):not(.treasure)[data-condition="low"] > div:not(.lost) { - transform: none !important; + transform: none !important; } /*武将牌显示*/ .player > .primary-avatar { - left: 0; - top: auto; - bottom: 0; - width: 100%; - height: 100%; - opacity: 1; - background-size: cover; - background-repeat: no-repeat; - background-position: top; - border-radius: 8px; - transition-property: opacity, transform; + left: 0; + top: auto; + bottom: 0; + width: 100%; + height: 100%; + opacity: 1; + background-size: cover; + background-repeat: no-repeat; + background-position: top; + border-radius: 8px; + transition-property: opacity, transform; } .player.fullskin2 > .primary-avatar { - width: 50%; - border-radius: 8px 0 0 8px; + width: 50%; + border-radius: 8px 0 0 8px; } .player.bossplayer > .primary-avatar:not(.hp):not(.identity):not(.avatar):not(.framebg) { - display: block !important; + display: block !important; } .player > .deputy-avatar { - left: 50%; - top: auto; - bottom: 0; - width: 50%; - height: 100%; - opacity: 1; - background-size: cover; - background-repeat: no-repeat; - background-position: top; - border-radius: 0 8px 8px 0; - transition-property: opacity, transform; + left: 50%; + top: auto; + bottom: 0; + width: 50%; + height: 100%; + opacity: 1; + background-size: cover; + background-repeat: no-repeat; + background-position: top; + border-radius: 0 8px 8px 0; + transition-property: opacity, transform; } .player.unseen > .primary-avatar, .player.unseen2 > .deputy-avatar, .player.d-skin > .primary-avatar, .player.d-skin2 > .deputy-avatar { - opacity: 0; + opacity: 0; } #arena:not(.observe) > .player[data-position="0"].unseen > .primary-avatar, #arena:not(.observe) > .player[data-position="0"].unseen2 > .deputy-avatar { - opacity: 0.3; + opacity: 0.3; } #arena[data-outcrop-skin="on"] > .player > .primary-avatar { - height: 192px; - clip-path: url(#solo-clip); /*新增*/ - -webkit-clip-path: url(#solo-clip); + height: 192px; + clip-path: url(#solo-clip); /*新增*/ + -webkit-clip-path: url(#solo-clip); } #arena[data-outcrop-skin="on"] > .player > .deputy-avatar { - height: 192px; - clip-path: url(#duor-clip); /*新增*/ - -webkit-clip-path: url(#duor-clip); + height: 192px; + clip-path: url(#duor-clip); /*新增*/ + -webkit-clip-path: url(#duor-clip); } #arena[data-outcrop-skin="on"] > .player.fullskin2 > .primary-avatar { - clip-path: url(#doul-clip); /*新增*/ - -webkit-clip-path: url(#duol-clip); + clip-path: url(#doul-clip); /*新增*/ + -webkit-clip-path: url(#duol-clip); } /*武将牌动皮显示*/ .player > .dynamic-wrap { - display: block; - position: absolute; - left: 0; - bottom: 0; - width: 100%; - height: 100%; - border-radius: 8px; - background-size: cover; - background-repeat: no-repeat; - pointer-events: none; - z-index: 60; + display: block; + position: absolute; + left: 0; + bottom: 0; + width: 100%; + height: 100%; + border-radius: 8px; + background-size: cover; + background-repeat: no-repeat; + pointer-events: none; + z-index: 60; } .player > .dynamic-wrap > .animation-player { - display: block; - position: absolute; - left: 0; - bottom: 0; - width: 100%; - height: 100%; - border-radius: inherit; - pointer-events: none; - clip-path: inset(0 0 0 0 round 8px); /*新增*/ - -webkit-clip-path: inset(0 0 0 0 round 8px); + display: block; + position: absolute; + left: 0; + bottom: 0; + width: 100%; + height: 100%; + border-radius: inherit; + pointer-events: none; + clip-path: inset(0 0 0 0 round 8px); /*新增*/ + -webkit-clip-path: inset(0 0 0 0 round 8px); } #arena[data-dynamic-skin-outcrop="on"] > .player > .dynamic-wrap > .animation-player { - clip-path: url(#dskin-clip); /*新增*/ - -webkit-clip-path: url(#dskin-clip); - height: 200px; + clip-path: url(#dskin-clip); /*新增*/ + -webkit-clip-path: url(#dskin-clip); + height: 200px; } .player > .dynamic-wrap > .primary-bg, .player > .dynamic-wrap > .deputy-bg { - left: 0; - top: auto; - bottom: 0; - width: 50%; - height: 100%; - opacity: 0; - background-size: cover; - background-repeat: no-repeat; - background-position: top; - border-radius: 8px 0 0 8px; - transition-property: opacity, transform; + left: 0; + top: auto; + bottom: 0; + width: 50%; + height: 100%; + opacity: 0; + background-size: cover; + background-repeat: no-repeat; + background-position: top; + border-radius: 8px 0 0 8px; + transition-property: opacity, transform; } .player > .dynamic-wrap > .deputy-bg { - left: 50%; + left: 50%; } .player.d-skin > .dynamic-wrap > .primary-bg, .player.d-skin2 > .dynamic-wrap > .deputy-bg { - opacity: 1; + opacity: 1; } #arena:not(.observe) > .player[data-position="0"].unseen.d-skin > .dynamic-wrap > .primary-bg, #arena:not(.observe) > .player[data-position="0"].unseen2.d-skin2 > .dynamic-wrap > .deputy-bg { - opacity: 0.3; + opacity: 0.3; } #window:not(*[data-radius_size=""]) .player { - border-radius: 8px; + border-radius: 8px; } /*行动*/ .player > .primary-avatar > .action { - display: block; - position: absolute; - left: 0; - top: auto; - right: 0; - bottom: 0; - width: 100%; - margin: 0; - text-align: center; + display: block; + position: absolute; + left: 0; + top: auto; + right: 0; + bottom: 0; + width: 100%; + margin: 0; + text-align: center; } /*玩家标记显示-灯笼*/ .player > .dui-marks { - display: flex; - flex-direction: column; - left: auto; - top: 1px; - right: -20px; - width: 18px; - height: auto; - padding-bottom: 0; - z-index: 88; - transition-property: opacity, transform, background; + display: flex; + flex-direction: column; + left: auto; + top: 1px; + right: -20px; + width: 18px; + height: auto; + padding-bottom: 0; + z-index: 88; + transition-property: opacity, transform, background; } .player > .dui-marks > .mark { - display: flex; - align-items: center; - align-content: center; - justify-content: center; - position: relative; - margin-top: 0; - margin-left: 0; - margin-right: 0; - margin-bottom: 5px; - width: 18px; - height: auto; - border-radius: 0; - font-family: xinwei, xingkai; - box-shadow: none; - background: none; - overflow: visible; - animation: open 0.5s; + display: flex; + align-items: center; + align-content: center; + justify-content: center; + position: relative; + margin-top: 0; + margin-left: 0; + margin-right: 0; + margin-bottom: 5px; + width: 18px; + height: auto; + border-radius: 0; + font-family: xinwei, xingkai; + box-shadow: none; + background: none; + overflow: visible; + animation: open 0.5s; } .player > .dui-marks > .mark:before, .player > .dui-marks > .mark:after { - display: none; + display: none; } .player > .dui-marks > .mark > .mark-text { - display: flex; - align-items: center; - align-content: center; - justify-content: center; - position: relative; - padding-top: 3px; - padding-bottom: 3px; - width: 17px; - height: auto; - min-height: 16px; - line-height: 16px; - text-align: center; - font-size: 20px; - font-family: xinwei, xingkai; - color: rgb(77, 60, 51); - border-radius: 5px; - background-image: radial-gradient(rgb(255, 255, 200) 0, rgb(255, 255, 120) 50%, rgb(255, 255, 10) 80%, yellow 100%); - box-shadow: 0 0 1px yellow; - text-shadow: none; - animation: swing 1.5s alternate infinite ease-in-out; + display: flex; + align-items: center; + align-content: center; + justify-content: center; + position: relative; + padding-top: 3px; + padding-bottom: 3px; + width: 17px; + height: auto; + min-height: 16px; + line-height: 16px; + text-align: center; + font-size: 20px; + font-family: xinwei, xingkai; + color: rgb(77, 60, 51); + border-radius: 5px; + background-image: radial-gradient(rgb(255, 255, 200) 0, rgb(255, 255, 120) 50%, rgb(255, 255, 10) 80%, yellow 100%); + box-shadow: 0 0 1px yellow; + text-shadow: none; + animation: swing 1.5s alternate infinite ease-in-out; } .player > .dui-marks > .mark > .mark-text.small-text { - font-size: 14px; - line-height: 11px; + font-size: 14px; + line-height: 11px; } .player > .dui-marks > .mark > .mark-text::before { - content: ""; - display: block; - position: absolute; - left: 30%; - top: -1px; - width: 40%; - height: calc(100% + 3px); - border-top: 1px solid black; - border-bottom: 2px solid #ff9900; - box-sizing: border-box; + content: ""; + display: block; + position: absolute; + left: 30%; + top: -1px; + width: 40%; + height: calc(100% + 3px); + border-top: 1px solid black; + border-bottom: 2px solid #ff9900; + box-sizing: border-box; } .player > .dui-marks > .mark > .mark-count { - position: absolute; - left: auto; - top: -2px; - right: -5px; - bottom: auto; - height: 10px; - width: 10px; - line-height: 11px; - font-size: 11px; - font-weight: bold; - text-shadow: none; - text-align: center; - border-radius: 100%; - background: yellow; - box-shadow: 0 0 1px black inset; + position: absolute; + left: auto; + top: -2px; + right: -5px; + bottom: auto; + height: 10px; + width: 10px; + line-height: 11px; + font-size: 11px; + font-weight: bold; + text-shadow: none; + text-align: center; + border-radius: 100%; + background: yellow; + box-shadow: 0 0 1px black inset; } .player > .dui-marks > .mark > .image { - display: none; + display: none; } #arena[data-player-mark-style="red"] > .player > .dui-marks > .mark > .mark-text { - color: yellow; - text-shadow: 0 0 1px black, 0 0 1px black; - box-shadow: 0 0 1px yellow; - background-image: radial-gradient(rgb(100, 255, 100), rgb(255, 120, 0), rgb(255, 0, 0)); + color: yellow; + text-shadow: 0 0 1px black, 0 0 1px black; + box-shadow: 0 0 1px yellow; + background-image: radial-gradient(rgb(100, 255, 100), rgb(255, 120, 0), rgb(255, 0, 0)); } #arena[data-player-mark-style="red"] > .player > .dui-marks > .mark > .mark-count { - color: #c86400; - background: #ffdc00; + color: #c86400; + background: #ffdc00; } /*玩家标记显示-新样式*/ #arena[data-player-mark-style="decade"] > .player > .dui-marks { - left: auto; - top: 34px; /*下移*/ - right: -3px; /*左移*/ - width: auto; - max-width: 80px; /*最大宽度*/ + left: auto; + top: 34px; /*下移*/ + right: -3px; /*左移*/ + width: auto; + max-width: 80px; /*最大宽度*/ } #arena[data-player-mark-style="decade"] > .player > .dui-marks > .mark { - display: flex; - width: 40px; /*宽度*/ - height: 18px; /*高度*/ - white-space: nowrap; - background-image: url("assets/image/player_mark.png"); - animation: fade-in 0.5s; - margin-bottom: 1px; /*标记纵向间隔*/ + display: flex; + width: 40px; /*宽度*/ + height: 18px; /*高度*/ + white-space: nowrap; + background-image: url("assets/image/player_mark.png"); + animation: fade-in 0.5s; + margin-bottom: 1px; /*标记纵向间隔*/ } /*文字文本显示*/ #arena[data-player-mark-style="decade"] > .player > .dui-marks > .mark > .mark-text { - display: inline; - position: static; - border-radius: 0; - width: auto; - height: auto; - line-height: 18px; /*换行高度*/ - font-size: 11px; /*字体大小*/ - color: white; /*字体颜色*/ - background-image: none; - box-shadow: none; - animation: none; + display: inline; + position: static; + border-radius: 0; + width: auto; + height: auto; + line-height: 18px; /*换行高度*/ + font-size: 11px; /*字体大小*/ + color: white; /*字体颜色*/ + background-image: none; + box-shadow: none; + animation: none; } #arena[data-player-mark-style="decade"] > .player > .dui-marks > .mark > .mark-text::before { - display: none; + display: none; } /*数字文本显示*/ #arena[data-player-mark-style="decade"] > .player > .dui-marks > .mark > .mark-count { - display: inline; - position: static; - padding-top: 3px; - padding-bottom: 3px; - width: auto; - height: auto; - line-height: 18px; - border-radius: 0; - font-size: 11px; /*字体大小*/ - font-weight: inherit; - color: white; - text-shadow: none; - background: none; - box-shadow: none; + display: inline; + position: static; + padding-top: 3px; + padding-bottom: 3px; + width: auto; + height: auto; + line-height: 18px; + border-radius: 0; + font-size: 11px; /*字体大小*/ + font-weight: inherit; + color: white; + text-shadow: none; + background: none; + box-shadow: none; } .mark-container.marks > .mark { - overflow: visible; + overflow: visible; } .mark-container.marks > .mark > .mark-text { - display: flex; - position: absolute; - justify-content: center; - align-items: center; - top: 0; - left: 0; - width: 100%; - height: 100%; - color: black; - font-size: 20px; + display: flex; + position: absolute; + justify-content: center; + align-items: center; + top: 0; + left: 0; + width: 100%; + height: 100%; + color: black; + font-size: 20px; } .mark-container.marks > .mark > .mark-count { - display: block; - position: absolute; - right: -5px; - width: 15px; - background: white; - border-radius: 4px; + display: block; + position: absolute; + right: -5px; + width: 15px; + background: white; + border-radius: 4px; } /*玩家判断标记显示*/ .player > .judges, #arena > .player:not(.minskin) > .judges { - display: flex; - justify-content: flex-end; - left: auto; - right: -1%; - top: auto; - bottom: -1%; - width: auto; - height: 0; - padding-bottom: 0; - z-index: 88; + display: flex; + justify-content: flex-end; + left: auto; + right: -1%; + top: auto; + bottom: -1%; + width: auto; + height: 0; + padding-bottom: 0; + z-index: 88; } .player[data-position="0"] > .judges, #arena > .player[data-position="0"]:not(.minskin) > .judges { - top: -24px; - bottom: auto; + top: -24px; + bottom: auto; } .player > .judges > .card, #window:not(.nopointer) .player .judges > .card { - position: static; - left: auto; - top: auto; - right: auto; - bottom: auto; - margin: 4px; - width: 16px; - height: 16px; - opacity: 1; - box-shadow: none; - background: none !important; - transform: none; - overflow: visible; + position: static; + left: auto; + top: auto; + right: auto; + bottom: auto; + margin: 4px; + width: 16px; + height: 16px; + opacity: 1; + box-shadow: none; + background: none !important; + transform: none; + overflow: visible; } .player > .judges > .card > .image { - display: none; + display: none; } .player > .judges > .card > .judge-mark { - display: block; - position: relative; - width: 100%; - height: 100%; + display: block; + position: relative; + width: 100%; + height: 100%; } .player > .judges > .card > .judge-mark > .back { - display: block; - position: absolute; - left: 0; - top: 0; - width: 100%; - height: 100%; - background: rgb(240, 220, 160); - transition: none; - transform: rotate(45deg); - border-radius: 4px; - box-shadow: 0 0 1px rgba(0, 0, 0, 0.4), 0 0 8px rgba(0, 0, 0, 0.8); - z-index: -1; + display: block; + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + background: rgb(240, 220, 160); + transition: none; + transform: rotate(45deg); + border-radius: 4px; + box-shadow: 0 0 1px rgba(0, 0, 0, 0.4), 0 0 8px rgba(0, 0, 0, 0.8); + z-index: -1; } .player > .judges > .card > .judge-mark > .back::before { - display: block; - position: absolute; - content: ""; - background: rgb(240, 220, 160); - left: 12%; - top: 12%; - right: 12%; - bottom: 12%; - border-radius: 2px; - box-shadow: 0 0 1px black; - z-index: -1; + display: block; + position: absolute; + content: ""; + background: rgb(240, 220, 160); + left: 12%; + top: 12%; + right: 12%; + bottom: 12%; + border-radius: 2px; + box-shadow: 0 0 1px black; + z-index: -1; } .player > .judges > .card > .judge-mark > div:not(.back) .player > .judges > .card > .judge-mark > div:not(.judge) { - display: none; + display: none; } .player > .judges > .card > .judge-mark > .judge { - display: flex; - align-items: center; - align-content: center; - justify-content: center; - text-align: center; - position: absolute; - left: 0; - top: 0; - width: 100%; - height: 100%; - font-family: xinwei, xingkai; - font-size: 16px; - color: white; - text-shadow: #000 1px 0 0, #000 0 1px 0, #000 -1px 0 0, #000 0 -1px 0, 0 0 8px #000; + display: flex; + align-items: center; + align-content: center; + justify-content: center; + text-align: center; + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + font-family: xinwei, xingkai; + font-size: 16px; + color: white; + text-shadow: #000 1px 0 0, #000 0 1px 0, #000 -1px 0 0, #000 0 -1px 0, 0 0 8px #000; } .player > .judges > .card > .background, .judges > .card.fakejudge.fullskin > .background, .judges > .card.fakejudge.fullborder > .background { - display: none !important; + display: none !important; } /*玩家号位显示*/ .player > .seat { - display: block; - position: absolute; - bottom: -16px; - width: 100%; - line-height: 16px; - color: rgb(255, 165, 0); - font-family: "yuanli"; - font-weight: bold; /*字体加粗*/ - font-size: 22px; - text-align: center; - text-shadow: 0 0 2px black, 0 0 1px black; - white-space: nowrap; - z-index: 89; - pointer-events: none; + display: block; + position: absolute; + bottom: -16px; + width: 100%; + line-height: 16px; + color: rgb(255, 165, 0); + font-family: "yuanli"; + font-weight: bold; /*字体加粗*/ + font-size: 22px; + text-align: center; + text-shadow: 0 0 2px black, 0 0 1px black; + white-space: nowrap; + z-index: 89; + pointer-events: none; } .player[data-position="0"] > .seat { - bottom: -10px; + bottom: -10px; } .player > .name_seat { - display: none !important; + display: none !important; } /*玩家手牌数显示*/ .player > .card-count { - position: absolute; - top: auto; - right: auto; - left: -12px; - bottom: -6px; - line-height: 28px; - height: 28px; - width: 28px; - background: url("image/decoration/card_count5.png"); - background-repeat: no-repeat; - background-size: 100% 100%; - background-position: 0 -1px; - border: none; - box-shadow: none; - font-size: 19px; - font-family: xinwei, xingkai; - color: white; - text-align: center; - text-shadow: none; - border-radius: 0px; - z-index: 89; - transition: transform, opacity; + position: absolute; + top: auto; + right: auto; + left: -12px; + bottom: -6px; + line-height: 28px; + height: 28px; + width: 28px; + background: url("image/decoration/card_count5.png"); + background-repeat: no-repeat; + background-size: 100% 100%; + background-position: 0 -1px; + border: none; + box-shadow: none; + font-size: 19px; + font-family: xinwei, xingkai; + color: white; + text-align: center; + text-shadow: none; + border-radius: 0px; + z-index: 89; + transition: transform, opacity; } .player > .card-count::before { - color: transparent; - content: attr(data-text); - height: 100%; - left: 0; - line-height: 28px; - position: absolute; - -webkit-text-stroke: 2px black; - top: 0; - white-space: pre; - width: 100%; - z-index: -1; + color: transparent; + content: attr(data-text); + height: 100%; + left: 0; + line-height: 28px; + position: absolute; + -webkit-text-stroke: 2px black; + top: 0; + white-space: pre; + width: 100%; + z-index: -1; } /*玩家身份标记*/ .player > .identity, #arena > .player:not(.minskin) > .identity { - left: auto; - top: 1px; - right: 1px; - width: 29px; - height: 31px; - line-height: 31px; - font-size: 31px; - background-size: 100% 100%; - background-repeat: no-repeat; - background-position: center; - z-index: 89; - transform: none; - transition: none; + left: auto; + top: 1px; + right: 1px; + width: 29px; + height: 31px; + line-height: 31px; + font-size: 31px; + background-size: 100% 100%; + background-repeat: no-repeat; + background-position: center; + z-index: 89; + transform: none; + transition: none; } .player > .identity[data-color="rYe"] { - text-shadow: rgba(255, 120, 0, 1) 0 0 2px, rgba(255, 120, 0, 1) 0 0 5px, rgba(255, 120, 0, 1) 0 0 10px, rgba(255, 120, 0, 1) 0 0 10px, rgba(255, 120, 0, 1) 0 0 20px, rgba(255, 120, 0, 1) 0 0 20px, black 0 0 1px; + text-shadow: rgba(255, 120, 0, 1) 0 0 2px, rgba(255, 120, 0, 1) 0 0 5px, rgba(255, 120, 0, 1) 0 0 10px, rgba(255, 120, 0, 1) 0 0 10px, rgba(255, 120, 0, 1) 0 0 20px, rgba(255, 120, 0, 1) 0 0 20px, black 0 0 1px; } .player > .identity[data-color="bYe"], .player.opposite-camp > .identity { - text-shadow: 0 0 1px black, 0 0 5px blue, 0 0 10px rgb(100, 100, 250), 0 0 20px rgb(100, 100, 250), 0 0 20px white; + text-shadow: 0 0 1px black, 0 0 5px blue, 0 0 10px rgb(100, 100, 250), 0 0 20px rgb(100, 100, 250), 0 0 20px white; } .player > .identity > div:first-child { - position: absolute; - left: 25px; - top: 0; - width: 100%; - height: 100%; - font-size: 31px; - line-height: 31px; - background-size: 100% 100%; - background-repeat: no-repeat; - background-position: center; + position: absolute; + left: 25px; + top: 0; + width: 100%; + height: 100%; + font-size: 31px; + line-height: 31px; + background-size: 100% 100%; + background-repeat: no-repeat; + background-position: center; } .player > .identity.guozhan-mode, #arena > .player:not(.minskin) > .identity.guozhan-mode { - left: -20px; - top: -9px; - width: 37px; - height: 42px; + left: -20px; + top: -9px; + width: 37px; + height: 42px; } /*人物弹出文字*/ .player > .damage { - width: 100%; - text-shadow: none; - transition: none; - z-index: 91; + width: 100%; + text-shadow: none; + transition: none; + z-index: 91; } .player > .damage::before { - content: attr(data-text); - position: absolute; - left: 0; - top: 0; - width: 100%; - color: transparent; - -webkit-text-stroke: 4px #803b02; - z-index: -1; + content: attr(data-text); + position: absolute; + left: 0; + top: 0; + width: 100%; + color: transparent; + -webkit-text-stroke: 4px #803b02; + z-index: -1; } /* .player>.damage[data-nature='metal']::before { */ @@ -1118,244 +1118,244 @@ /*联机用牌时限*/ .player > .timerbar { - display: block; - position: absolute; - left: 0; - top: auto; - bottom: -10px; - width: 100%; - z-index: 88; + display: block; + position: absolute; + left: 0; + top: auto; + bottom: -10px; + width: 100%; + z-index: 88; } .player[data-position="0"] > .timerbar { - top: -15px; - bottom: auto; + top: -15px; + bottom: auto; } .player > .timerbar > div, #arena .timerbar > div { - position: absolute; - left: calc(50% - 50px); - top: auto !important; - right: auto; - width: 100px; - height: 5px; + position: absolute; + left: calc(50% - 50px); + top: auto !important; + right: auto; + width: 100px; + height: 5px; } .player > .timerbar > div:first-child { - box-shadow: 0 0 4px yellow; - background: rgb(100, 0, 0); + box-shadow: 0 0 4px yellow; + background: rgb(100, 0, 0); } /*联机游戏等待中*/ .player.connect > .gaming { - display: block; - position: absolute; - left: 0; - top: calc(50% - 16px); - width: 100%; - height: 32px; - font-size: 32px; - font-family: "xinwei"; - text-align: center; - z-index: 89; + display: block; + position: absolute; + left: 0; + top: calc(50% - 16px); + width: 100%; + height: 32px; + font-size: 32px; + font-family: "xinwei"; + text-align: center; + z-index: 89; } /*玩家死亡变灰*/ .player.dead { - opacity: 1; - filter: none; - -webkit-filter: none; + opacity: 1; + filter: none; + -webkit-filter: none; } .player.dead > div { - filter: grayscale(1); /*新增*/ - -webkit-filter: grayscale(1); + filter: grayscale(1); /*新增*/ + -webkit-filter: grayscale(1); } /*玩家死亡文字*/ .player > .died-identity { - display: flex; - align-items: center; - align-content: center; - justify-content: center; - left: calc(50% - 47px); - top: auto; - bottom: 15px; - width: 88px; - height: 88px; - line-height: 38px; - color: rgb(210, 50, 50); - font-size: 38px; - font-family: xingkai, huangcao, xinwei; - font-display: swap; - text-shadow: 0 0 5px black, 0 0 10px black, 0 0 15px black; - background-size: contain; - background-repeat: no-repeat; - background-position: center; - transform: none; - opacity: 0; + display: flex; + align-items: center; + align-content: center; + justify-content: center; + left: calc(50% - 47px); + top: auto; + bottom: 15px; + width: 88px; + height: 88px; + line-height: 38px; + color: rgb(210, 50, 50); + font-size: 38px; + font-family: xingkai, huangcao, xinwei; + font-display: swap; + text-shadow: 0 0 5px black, 0 0 10px black, 0 0 15px black; + background-size: contain; + background-repeat: no-repeat; + background-position: center; + transform: none; + opacity: 0; } .player.opposite-camp > .died-identity { - color: rgb(50, 50, 210); + color: rgb(50, 50, 210); } .player.dead > .died-identity { - filter: none; - -webkit-filter: none; - animation: fade-in 0.5s forwards; - animation-delay: 0.5s; - -webkit-animation: fade-in 0.5s forwards; - -webkit-animation-delay: 0.5s; + filter: none; + -webkit-filter: none; + animation: fade-in 0.5s forwards; + animation-delay: 0.5s; + -webkit-animation: fade-in 0.5s forwards; + -webkit-animation-delay: 0.5s; } /*玩家获得的技能显示*/ .player > .gain-skill { - position: absolute; - left: 15px; - right: 15px; - max-height: calc(97% - 81px); - bottom: calc(3% + 81px); - color: rgb(255, 255, 200); - font-size: 13px; - text-align: center; - background: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.4) 40%, rgba(0, 0, 0, 0.4) 60%, transparent 100%); - z-index: 87; + position: absolute; + left: 15px; + right: 15px; + max-height: calc(97% - 81px); + bottom: calc(3% + 81px); + color: rgb(255, 255, 200); + font-size: 13px; + text-align: center; + background: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.4) 40%, rgba(0, 0, 0, 0.4) 60%, transparent 100%); + z-index: 87; } #arena.decadeUI[data-gain-skills-visible="off"] > .player > .gain-skill, #arena.decadeUI[data-gain-skills-visible="othersOn"] > .player[data-position="0"] > .gain-skill { - display: none; + display: none; } /*角色翻面背景*/ .player > .turned-over { - position: absolute; - left: 0; - top: 0; - width: 100%; - height: 100%; - opacity: 0; - background-image: url("assets/image/turn_over_mask.png"); - background-size: cover; - pointer-events: none; - z-index: 62; + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + opacity: 0; + background-image: url("assets/image/turn_over_mask.png"); + background-size: cover; + pointer-events: none; + z-index: 62; } .player.turnedover > .turned-over { - opacity: 0.8; + opacity: 0.8; } .turnedover > div { - opacity: initial; + opacity: initial; } /*角色边框*/ .player > .framebg { - z-index: 63; + z-index: 63; } /*身份标记框*/ .player > .identity-mark-box { - display: flex; - position: absolute; - justify-content: center; - flex-wrap: wrap; - top: 20%; - left: 16%; - width: 68%; - height: auto; - z-index: 99; + display: flex; + position: absolute; + justify-content: center; + flex-wrap: wrap; + top: 20%; + left: 16%; + width: 68%; + height: auto; + z-index: 99; } .player > .identity-mark-box > .identity-mark-item { - position: static; - width: auto; - height: auto; - min-width: 20px; - line-height: 20px; - border-style: solid; - border-width: 10px; - border-image-width: 18px; - border-image-slice: 31 31 fill; - border-image-source: url("assets/image/item_bg.png"); - cursor: pointer; - color: rgb(77, 60, 51); - font-family: shousha; - font-weight: bold; - font-size: 20px; - text-shadow: none; - transition: opacity, background, transform 0.3s; + position: static; + width: auto; + height: auto; + min-width: 20px; + line-height: 20px; + border-style: solid; + border-width: 10px; + border-image-width: 18px; + border-image-slice: 31 31 fill; + border-image-source: url("assets/image/item_bg.png"); + cursor: pointer; + color: rgb(77, 60, 51); + font-family: shousha; + font-weight: bold; + font-size: 20px; + text-shadow: none; + transition: opacity, background, transform 0.3s; } .player > .identity-mark-box > .identity-mark-item:active { - transform: scale(0.9); + transform: scale(0.9); } /*说话泡泡框*/ .player > .chat-bubble { - left: 0; - top: 20px; - width: 100%; - height: auto; - border-style: solid; - border-width: 6px 6px 14px 6px; - border-image-slice: 6 6 14 6 fill; - border-image-source: url("assets/image/chat_bubble.png"); - box-sizing: border-box; - word-break: break-all; - z-index: 99; + left: 0; + top: 20px; + width: 100%; + height: auto; + border-style: solid; + border-width: 6px 6px 14px 6px; + border-image-slice: 6 6 14 6 fill; + border-image-source: url("assets/image/chat_bubble.png"); + box-sizing: border-box; + word-break: break-all; + z-index: 99; } .player > .jie-mark { - position: absolute; - top: 108px; - left: -11px; - width: 22px; - height: 34px; - background-image: url("assets/image/mark_jie.png"); - background-size: 100% 100%; - pointer-events: none; - z-index: 87; + position: absolute; + top: 108px; + left: -11px; + width: 22px; + height: 34px; + background-image: url("assets/image/mark_jie.png"); + background-size: 100% 100%; + pointer-events: none; + z-index: 87; } .player > .shen-mark { - position: absolute; - top: 108px; - left: -11px; - width: 22px; - height: 34px; - background-image: url("assets/image/mark_shen.png"); - background-size: 100% 100%; - pointer-events: none; - z-index: 87; + position: absolute; + top: 108px; + left: -11px; + width: 22px; + height: 34px; + background-image: url("assets/image/mark_shen.png"); + background-size: 100% 100%; + pointer-events: none; + z-index: 87; } .player > .sp-mark { - position: absolute; - top: 108px; - left: -11px; - width: 22px; - height: 34px; - background-image: url("assets/image/mark_sp.png"); - background-size: 100% 100%; - pointer-events: none; - z-index: 87; + position: absolute; + top: 108px; + left: -11px; + width: 22px; + height: 34px; + background-image: url("assets/image/mark_sp.png"); + background-size: 100% 100%; + pointer-events: none; + z-index: 87; } .player > .tw-mark { - position: absolute; - top: 108px; - left: -11px; - width: 22px; - height: 34px; - background-image: url("assets/image/mark_tw.png"); - background-size: 100% 100%; - pointer-events: none; - z-index: 87; + position: absolute; + top: 108px; + left: -11px; + width: 22px; + height: 34px; + background-image: url("assets/image/mark_tw.png"); + background-size: 100% 100%; + pointer-events: none; + z-index: 87; } .player .tipContainer { - width: 93% !important; - right: 0; - z-index: 87; + width: 93% !important; + right: 0; + z-index: 87; } diff --git a/player2.css b/player2.css index 064a848..7245961 100644 --- a/player2.css +++ b/player2.css @@ -1,234 +1,234 @@ @import "animation1.css"; /*角色基本外观*/ .player { - height: 180px; - width: 120px; - border-radius: 8px; - box-shadow: 0px -1px 3px black, 0px 3px 8px black; - background-image: linear-gradient(rgb(53, 38, 32), rgb(53, 38, 32)); - transition-property: transform, opacity, left, top, right, bottom; + height: 180px; + width: 120px; + border-radius: 8px; + box-shadow: 0px -1px 3px black, 0px 3px 8px black; + background-image: linear-gradient(rgb(53, 38, 32), rgb(53, 38, 32)); + transition-property: transform, opacity, left, top, right, bottom; } .dui-mobile .player { - box-shadow: 0px -1px 2px black, 0px 1px 5px black; + box-shadow: 0px -1px 2px black, 0px 1px 5px black; } .player.dead { - animation: player-died 0.5s linear; - -webkit-animation: player-died 0.5s linear; - animation-iteration-count: 1; + animation: player-died 0.5s linear; + -webkit-animation: player-died 0.5s linear; + animation-iteration-count: 1; } /*护甲*/ .hujia { - top: auto; - /*上下*/ - bottom: 22px; - /*左右*/ - left: -4px; - /*指向护甲图片放的位置*/ - background-image: url("image/decoration/shield.png"); - background-size: 100% 100%; - background-repeat: no-repeat; - /*图片宽*/ - width: 21px; - /*图片高*/ - height: 21px; - /*字体*/ - text-align: center; - color: white; - font-family: "shousha"; - -webkit-text-stroke: 0.9px black; - text-shadow: 0 0 1.5px #ffded4, 0 0 1.5px #ffded4, 0 0 1.5px #ffded4, 0 0 1.5px #ffded4 !important; - font-size: 18px; - font-weight: 900; - /*其他*/ - position: relative; - z-index: 100; + top: auto; + /*上下*/ + bottom: 22px; + /*左右*/ + left: -4px; + /*指向护甲图片放的位置*/ + background-image: url("image/decoration/shield.png"); + background-size: 100% 100%; + background-repeat: no-repeat; + /*图片宽*/ + width: 21px; + /*图片高*/ + height: 21px; + /*字体*/ + text-align: center; + color: white; + font-family: "shousha"; + -webkit-text-stroke: 0.9px black; + text-shadow: 0 0 1.5px #ffded4, 0 0 1.5px #ffded4, 0 0 1.5px #ffded4, 0 0 1.5px #ffded4 !important; + font-size: 18px; + font-weight: 900; + /*其他*/ + position: relative; + z-index: 100; } /*-----------------分割线-----------------*/ /*新样式*/ #arena[data-shadow-style="off"] > .player::before { - left: -55px; - top: -40px; - width: 228px; - height: 228px; - opacity: 0; - background-image: url("assets/image/sprites_shadow_green.png"); - background-repeat: no-repeat; - animation-name: kf-sprites-glow; - animation-duration: 0s; - animation-delay: 0s; - animation-iteration-count: infinite; - animation-fill-mode: forwards; - animation-timing-function: steps(1); - pointer-events: none; - box-shadow: none; - transition: opacity 0.1s linear; + left: -55px; + top: -40px; + width: 228px; + height: 228px; + opacity: 0; + background-image: url("assets/image/sprites_shadow_green.png"); + background-repeat: no-repeat; + animation-name: kf-sprites-glow; + animation-duration: 0s; + animation-delay: 0s; + animation-iteration-count: infinite; + animation-fill-mode: forwards; + animation-timing-function: steps(1); + pointer-events: none; + box-shadow: none; + transition: opacity 0.1s linear; } #arena[data-shadow-style="off"] > .player.selected:not(.target):before, #arena[data-shadow-style="off"] > .player.glow_phase:not(.selectable)::before { - animation-duration: 0.9s; - background-image: url("assets/image/sprites_shadow_green.png"); - opacity: 1; - z-index: 89; + animation-duration: 0.9s; + background-image: url("assets/image/sprites_shadow_green.png"); + opacity: 1; + z-index: 89; } #arena[data-shadow-style="off"] > .player.selectable:not(.selected):not(.target)::before { - animation-duration: 0.9s; - background-image: url("assets/image/sprites_shadow_red.png"); - opacity: 1; - z-index: 89; - top: -38.4px; - left: -55px; + animation-duration: 0.9s; + background-image: url("assets/image/sprites_shadow_red.png"); + opacity: 1; + z-index: 89; + top: -38.4px; + left: -55px; } #arena[data-shadow-style="off"] > .player::after, #arena[data-shadow-style="off"] > .player.selected::after, #arena[data-shadow-style="off"] > .player.selectable::after { - left: -55px; - top: -40px; - width: 228px; - height: 228px; - opacity: 0; - background-image: url("assets/image/sprites_shadow_green.png"); - background-repeat: no-repeat; - animation-name: kf-sprites-glow; - animation-duration: 0s; - animation-delay: 0s; - animation-iteration-count: infinite; - animation-fill-mode: forwards; - animation-timing-function: steps(1); - pointer-events: none; - box-shadow: none; - transition: opacity 0.1s linear; + left: -55px; + top: -40px; + width: 228px; + height: 228px; + opacity: 0; + background-image: url("assets/image/sprites_shadow_green.png"); + background-repeat: no-repeat; + animation-name: kf-sprites-glow; + animation-duration: 0s; + animation-delay: 0s; + animation-iteration-count: infinite; + animation-fill-mode: forwards; + animation-timing-function: steps(1); + pointer-events: none; + box-shadow: none; + transition: opacity 0.1s linear; } #arena[data-shadow-style="off"] > .player.target:not(.glow_phase):not(.selectable):not(.selected)::after { - animation-duration: 0.9s; - opacity: 1; + animation-duration: 0.9s; + opacity: 1; } /*-----------------分割线-----------------*/ /*原样式*/ #arena[data-shadow-style="on"] > .player::before { - left: -56px; - top: -42px; - width: 223px; - height: 254px; - opacity: 0; - background-image: url("assets/image/sprites_glow_blue.png"); - background-repeat: no-repeat; - animation-name: kf-sprites-glow; - animation-duration: 0s; - animation-delay: 0s; - animation-iteration-count: infinite; - animation-fill-mode: forwards; - animation-timing-function: steps(1); - pointer-events: none; - box-shadow: none; - transition: opacity 0.1s linear; + left: -56px; + top: -42px; + width: 223px; + height: 254px; + opacity: 0; + background-image: url("assets/image/sprites_glow_blue.png"); + background-repeat: no-repeat; + animation-name: kf-sprites-glow; + animation-duration: 0s; + animation-delay: 0s; + animation-iteration-count: infinite; + animation-fill-mode: forwards; + animation-timing-function: steps(1); + pointer-events: none; + box-shadow: none; + transition: opacity 0.1s linear; } #arena[data-shadow-style="on"] > .player.selected:not(.target):before, #arena[data-shadow-style="on"] > .player.glow_phase:not(.selectable):not(*[data-position="0"])::before { - animation-duration: 0.9s; - background-image: url("assets/image/sprites_glow_orange.png"); - opacity: 1; + animation-duration: 0.9s; + background-image: url("assets/image/sprites_glow_orange.png"); + opacity: 1; } #arena[data-shadow-style="on"] > .player.selectable:not(.selected):not(.target)::before { - animation-duration: 0.9s; - opacity: 1; + animation-duration: 0.9s; + opacity: 1; } #arena[data-shadow-style="on"] > .player::after, #arena[data-shadow-style="on"] > .player.selected::after, #arena[data-shadow-style="on"] > .player.selectable::after { - left: -56px; - top: -42px; - width: 223px; - height: 254px; - opacity: 0; - background-image: url("assets/image/sprites_glow_red.png"); - background-repeat: no-repeat; - animation-name: kf-sprites-glow; - animation-duration: 0s; - animation-delay: 0s; - animation-iteration-count: infinite; - animation-fill-mode: forwards; - animation-timing-function: steps(1); - pointer-events: none; - box-shadow: none; - transition: opacity 0.1s linear; + left: -56px; + top: -42px; + width: 223px; + height: 254px; + opacity: 0; + background-image: url("assets/image/sprites_glow_red.png"); + background-repeat: no-repeat; + animation-name: kf-sprites-glow; + animation-duration: 0s; + animation-delay: 0s; + animation-iteration-count: infinite; + animation-fill-mode: forwards; + animation-timing-function: steps(1); + pointer-events: none; + box-shadow: none; + transition: opacity 0.1s linear; } #arena[data-shadow-style="on"] > .player.target:not(.glow_phase):not(.selectable):not(.selected)::after { - animation-duration: 0.9s; - opacity: 1; + animation-duration: 0.9s; + opacity: 1; } /*-----------------分割线-----------------*/ #arena > .player { - z-index: 4; + z-index: 4; } .player > .mask { - position: absolute; - left: 0; - top: 0; - width: 100%; - height: 100%; - border-radius: inherit; - background: rgba(0, 0, 0, 0.65); - opacity: 0; - transition: opacity 0.3s ease-in-out; - pointer-events: none; - z-index: 66; + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + border-radius: inherit; + background: rgba(0, 0, 0, 0.65); + opacity: 0; + transition: opacity 0.3s ease-in-out; + pointer-events: none; + z-index: 66; } .player.un-selectable:not(.selectable) > .mask { - opacity: 1; - transition: opacity 0.3s linear; + opacity: 1; + transition: opacity 0.3s linear; } #arena:not(.fewplayer) > .player:not(.minskin), #arena:not(.fewplayer):not(*[data-player_height=""]) > .player:not(.minskin) { - height: 171.5px !important; - width: 128px !important; + height: 171.5px !important; + width: 128px !important; } /*玩家锁链*/ .player > .chain { - top: 30%; - left: -15px; - width: 158px; - height: 32px; - visibility: hidden; - background-size: cover; - background-position-x: -120px; - background-repeat: no-repeat; - background-image: url("assets/image/tie_suo1.png"); - transition-duration: 0.4s; - z-index: 86; + top: 30%; + left: -15px; + width: 158px; + height: 32px; + visibility: hidden; + background-size: cover; + background-position-x: -120px; + background-repeat: no-repeat; + background-image: url("assets/image/tie_suo1.png"); + transition-duration: 0.4s; + z-index: 86; } .player.linked2 > .chain { - visibility: visible; - background-position-x: center; + visibility: visible; + background-position-x: center; } /*隐藏玩家手牌显示以及降低玩家血量标记位置—咸鱼大佬的代码*/ /*需要配合扩展手杀ui使用,如果不开启手杀ui,需要把以下两段代码注释掉*/ .player[data-position="0"] > .hp-wrap { - bottom: -6px; + bottom: -6px; } .player[data-position="0"] > .card-count { - visibility: hidden; + visibility: hidden; } /*主玩家位置*/ @@ -237,40 +237,40 @@ #arena > .player[data-position="0"]:not(.minskin), #arena:not(*[data-player_height=""]) > .player[data-position="0"], #arena:not(*[data-player_height=""]) > .player[data-position="0"]:not(.miniskin) { - left: 25px; - top: auto; - right: auto; - bottom: 1%; + left: 25px; + top: auto; + right: auto; + bottom: 1%; } #arena[data-right-layout="on"] > .player[data-position="0"], #arena[data-right-layout="on"] > .player[data-position="0"]:not(.miniskin) { - left: auto; - right: 25px; + left: auto; + right: 25px; } /*玩家姓名阵营*/ .player > .camp-wrap { - display: block; - left: -19px; - top: -9px; - width: 34px; - height: 128px; - transition: none; - z-index: 1; - pointer-events: none; + display: block; + left: -19px; + top: -9px; + width: 34px; + height: 128px; + transition: none; + z-index: 1; + pointer-events: none; } .player.connect > div:not(.avatar):not(.name):not(.nameol):not(.hp):not(.room):not(.gaming):not(.identity).camp-wrap { - display: block !important; + display: block !important; } /*新增*/ .player.connect > div:not(.avatar):not(.name):not(.nameol):not(.hp):not(.room):not(.gaming):not(.identity).primary-avatar { - display: block !important; + display: block !important; } .player > .camp-wrap div { - transition: none; + transition: none; } /* @@ -282,216 +282,216 @@ */ .player.unseen > .camp-wrap > .camp-back { - background: linear-gradient(to bottom, rgb(92, 35, 22), rgb(50, 27, 26)); + background: linear-gradient(to bottom, rgb(92, 35, 22), rgb(50, 27, 26)); } .player > .camp-wrap[data-camp="wei"] > .camp-back { - background: linear-gradient(to bottom, rgb(45, 103, 153), rgb(19, 45, 78)); + background: linear-gradient(to bottom, rgb(45, 103, 153), rgb(19, 45, 78)); } .player > .camp-wrap[data-camp="shu"] > .camp-back { - background: linear-gradient(to bottom, rgb(153, 28, 34), rgb(57, 12, 17)); + background: linear-gradient(to bottom, rgb(153, 28, 34), rgb(57, 12, 17)); } .player > .camp-wrap[data-camp="wu"] > .camp-back { - background: linear-gradient(to bottom, rgb(29, 114, 29), rgb(34, 42, 27)); + background: linear-gradient(to bottom, rgb(29, 114, 29), rgb(34, 42, 27)); } .player > .camp-wrap[data-camp="qun"] > .camp-back { - background: linear-gradient(to bottom, rgb(154, 148, 122), rgb(74, 72, 57)); + background: linear-gradient(to bottom, rgb(154, 148, 122), rgb(74, 72, 57)); } .player > .camp-wrap[data-camp="shen"] > .camp-back { - background: linear-gradient(to bottom, rgb(97, 87, 15), rgb(65, 50, 9), rgb(67, 52, 9)); + background: linear-gradient(to bottom, rgb(97, 87, 15), rgb(65, 50, 9), rgb(67, 52, 9)); } .player > .camp-wrap[data-camp="shen2"] > .camp-back { - background: linear-gradient(to bottom, rgb(112, 52, 126), rgb(52, 18, 55)); + background: linear-gradient(to bottom, rgb(112, 52, 126), rgb(52, 18, 55)); } .player > .camp-wrap[data-camp="ye"] > .camp-back { - background: linear-gradient(to bottom, rgb(112, 52, 126), rgb(52, 18, 55)); + background: linear-gradient(to bottom, rgb(112, 52, 126), rgb(52, 18, 55)); } .player > .camp-wrap[data-camp="key"] > .camp-back { - background: linear-gradient(to bottom, rgb(147, 132, 183), rgb(130, 120, 160), rgb(120, 115, 154)); + background: linear-gradient(to bottom, rgb(147, 132, 183), rgb(130, 120, 160), rgb(120, 115, 154)); } .player > .camp-wrap[data-camp="western"] > .camp-back { - background: linear-gradient(to bottom, rgb(93, 44, 105), rgb(54, 18, 58)); + background: linear-gradient(to bottom, rgb(93, 44, 105), rgb(54, 18, 58)); } .player > .camp-wrap[data-camp="jin"] > .camp-back { - background: linear-gradient(to bottom, rgb(112, 52, 126), rgb(52, 18, 55)); + background: linear-gradient(to bottom, rgb(112, 52, 126), rgb(52, 18, 55)); } .player > .camp-wrap[data-camp="daqin"] > .camp-back { - background: linear-gradient(to bottom, rgb(100, 100, 100), rgb(0, 0, 0)); + background: linear-gradient(to bottom, rgb(100, 100, 100), rgb(0, 0, 0)); } .player > .camp-wrap > .avatar-name, .player > .camp-wrap > .avatar-name-default, #arena > .player:not(.minskin) > .name.name { - top: 30px; - left: 29px; - transform: translateX(-50%); - line-height: -3px; - font-family: "shousha" !important; - font-size: 15px; - white-space: nowrap; - writing-mode: vertical-rl; - -webkit-writing-mode: vertical-rl; + top: 30px; + left: 29px; + transform: translateX(-50%); + line-height: -3px; + font-family: "shousha" !important; + font-size: 15px; + white-space: nowrap; + writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; } /*隐匿状态“主将”显示*/ .player > .camp-wrap > .avatar-name-default > .camp-back { - left: 21px !important; - top: 30px !important; - font-family: "shousha" !important; - line-height: 14px; + left: 21px !important; + top: 30px !important; + font-family: "shousha" !important; + line-height: 14px; } .player > .camp-wrap > .camp-back { - /*武将图层,原版十周年武将名背后颜色图层*/ - display: flex; - align-items: flex-start; - align-content: center; - justify-content: flex-start; - font-size: 16px; - line-height: 14px; - font-family: "shousha"; - text-align: center; - text-shadow: none; /*#000 1px 0 0, #000 0 1px 0, #000 -1px 0 0, #000 0 -1px 0;*/ - left: 21px; - top: 9.2px; - width: 127px; - height: 171px; - bottom: 0%; - border-radius: 8px; - position: absolute; - white-space: nowrap; - writing-mode: vertical-rl; - -webkit-writing-mode: vertical-rl; + /*武将图层,原版十周年武将名背后颜色图层*/ + display: flex; + align-items: flex-start; + align-content: center; + justify-content: flex-start; + font-size: 16px; + line-height: 14px; + font-family: "shousha"; + text-align: center; + text-shadow: none; /*#000 1px 0 0, #000 0 1px 0, #000 -1px 0 0, #000 0 -1px 0;*/ + left: 21px; + top: 9.2px; + width: 127px; + height: 171px; + bottom: 0%; + border-radius: 8px; + position: absolute; + white-space: nowrap; + writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; } .player.unseen > .camp-wrap > .avatar-name, .player:not(.unseen) > .camp-wrap > .avatar-name-default, .player:not(.unseen2) > .camp-wrap > .avatar2-name-default { - visibility: hidden; + visibility: hidden; } .player > .unseen_show > .primary-avatar, .player > .unseen2_show > .deputy-avatar { - opacity: 0; + opacity: 0; } #arena:not(.observe) .player:not([data-position="0"]).unseen_show > .primary-avatar, #arena:not(.observe) .player:not([data-position="0"]).unseen2_show > .deputy-avatar { - opacity: 1 !important; - background-image: url("../../image/character/hidden_image.jpg") !important; + opacity: 1 !important; + background-image: url("../../image/character/hidden_image.jpg") !important; } .player > .camp-wrap > .camp-name { - /*势力图片,手杀样式已修改*/ - font-family: shousha; - font-display: swap; - top: 7px; - left: -8.5px; - font-size: 14px; - width: 183px; - height: 175px; - display: flex; - text-align: center; - align-items: center; - align-content: center; - justify-content: center; - background-size: contain; - background-repeat: no-repeat; - background-position: center; - transition: none; + /*势力图片,手杀样式已修改*/ + font-family: shousha; + font-display: swap; + top: 7px; + left: -8.5px; + font-size: 14px; + width: 183px; + height: 175px; + display: flex; + text-align: center; + align-items: center; + align-content: center; + justify-content: center; + background-size: contain; + background-repeat: no-repeat; + background-position: center; + transition: none; } .player > .camp-wrap[data-camp="wei"] > .camp-name { - text-shadow: 0 0 5px rgb(50, 50, 255), 0 0 10px rgb(120, 120, 255), 0 0 15px rgb(100, 100, 255); + text-shadow: 0 0 5px rgb(50, 50, 255), 0 0 10px rgb(120, 120, 255), 0 0 15px rgb(100, 100, 255); } .player > .camp-wrap[data-camp="shu"] > .camp-name { - text-shadow: 0 0 5px rgb(255, 100, 100), 0 0 10px rgb(255, 50, 50), 0 0 15px rgb(255, 50, 50); + text-shadow: 0 0 5px rgb(255, 100, 100), 0 0 10px rgb(255, 50, 50), 0 0 15px rgb(255, 50, 50); } .player > .camp-wrap[data-camp="wu"] > .camp-name { - text-shadow: 0 0 5px rgb(100, 233, 100), 0 0 10px rgb(50, 255, 50), 0 0 15px rgb(50, 255, 50); + text-shadow: 0 0 5px rgb(100, 233, 100), 0 0 10px rgb(50, 255, 50), 0 0 15px rgb(50, 255, 50); } .player > .camp-wrap[data-camp="qun"] > .camp-name { - text-shadow: 0 0 5px rgb(170, 170, 170), 0 0 10px rgb(118, 118, 118), 0 0 15px rgb(118, 118, 118); + text-shadow: 0 0 5px rgb(170, 170, 170), 0 0 10px rgb(118, 118, 118), 0 0 15px rgb(118, 118, 118); } .player > .camp-wrap[data-camp="shen"] > .camp-name { - text-shadow: 0 0 5px rgb(255, 200, 0), 0 0 10px rgb(255, 200, 0), 0 0 15px rgb(255, 200, 0); + text-shadow: 0 0 5px rgb(255, 200, 0), 0 0 10px rgb(255, 200, 0), 0 0 15px rgb(255, 200, 0); } .player > .camp-wrap > .camp-name { - text-shadow: 0 0 5px #e0ea33, 0 0 15px #e0ea33, 0 0 25px #e0ea33; + text-shadow: 0 0 5px #e0ea33, 0 0 15px #e0ea33, 0 0 25px #e0ea33; } /*副将名*/ .player > .name.name2, #arena > .player:not(.minskin) > .name.name2 { - display: flex; - align-items: flex-start; - align-content: center; - justify-content: center; - left: 50% !important; - right: auto; - top: 22px; - width: 18px; - height: 96px; - font-size: 16px; /*字体大小*/ - line-height: 15px; /*字体间隔*/ - font-family: "shousha" !important; /*字体样式*/ - text-shadow: none; /*#000 1px 0 0, #000 0 1px 0, #000 -1px 0 0, #000 0 -1px 0;*/ - background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.4) 20%, rgba(0, 0, 0, 0.5) 50%, rgba(0, 0, 0, 0.4) 80%, transparent 100%); - z-index: 89; + display: flex; + align-items: flex-start; + align-content: center; + justify-content: center; + left: 50% !important; + right: auto; + top: 22px; + width: 18px; + height: 96px; + font-size: 16px; /*字体大小*/ + line-height: 15px; /*字体间隔*/ + font-family: "shousha" !important; /*字体样式*/ + text-shadow: none; /*#000 1px 0 0, #000 0 1px 0, #000 -1px 0 0, #000 0 -1px 0;*/ + background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.4) 20%, rgba(0, 0, 0, 0.5) 50%, rgba(0, 0, 0, 0.4) 80%, transparent 100%); + z-index: 89; } .player > .name.name2:empty, #arena > .player:not(.minskin) > .name.name2:empty { - display: none; + display: none; } .player.fullskin.fullskin2 > .name.name2:empty::before { - content: "副将"; + content: "副将"; } /*联机名称显示*/ .player > .nameol { - top: 5px; - font-size: 16px; - font-family: "shousha"; - text-shadow: 0 0 2px black; - background: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.4) 40%, rgba(0, 0, 0, 0.4) 60%, transparent 100%); - z-index: 89; - pointer-events: none; + top: 5px; + font-size: 16px; + font-family: "shousha"; + text-shadow: 0 0 2px black; + background: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.4) 40%, rgba(0, 0, 0, 0.4) 60%, transparent 100%); + z-index: 89; + pointer-events: none; } /*玩家血量显示*/ .player > .hp-wrap { - display: block; - right: 106.6px; /*左移*/ - bottom: 9px; /*上移*/ - width: 12px; - height: 50px; - border-width: 24px 5px 21px 82px; - border-style: solid; - border-color: transparent; - /* border-image-source: url('image/decoration/border_hp.png');*/ - border-image-slice: 32 6 25 113 fill; - pointer-events: none; - transition-property: transform, opacity, height; - transition-duration: 0.1s; - transition-timing-function: linear; - z-index: 88; + display: block; + right: 106.6px; /*左移*/ + bottom: 9px; /*上移*/ + width: 12px; + height: 50px; + border-width: 24px 5px 21px 82px; + border-style: solid; + border-color: transparent; + /* border-image-source: url('image/decoration/border_hp.png');*/ + border-image-slice: 32 6 25 113 fill; + pointer-events: none; + transition-property: transform, opacity, height; + transition-duration: 0.1s; + transition-timing-function: linear; + z-index: 88; } /* @@ -533,21 +533,21 @@ */ .player[data-max-hp="hujia"] > .hp-wrap { - height: 78px; + height: 78px; } .player > .hp-wrap > .hp, #arena.slim_player .player .hp, #window > .player:not(.minskin) .hp { - /*Hp>5(数值)*/ - display: flex; - left: 0; - right: 0; - width: 12px; /*右移*/ - bottom: -8px; /*上移*/ - font-size: 15px; /*字体大小*/ - line-height: 13px; /*纵向间隔*/ - flex-direction: column; + /*Hp>5(数值)*/ + display: flex; + left: 0; + right: 0; + width: 12px; /*右移*/ + bottom: -8px; /*上移*/ + font-size: 15px; /*字体大小*/ + line-height: 13px; /*纵向间隔*/ + flex-direction: column; } /* .player>.hp-wrap>.hp.textstyle { @@ -555,636 +555,636 @@ } */ .player > .hp-wrap > .hp.hidden { - opacity: 1 !important; + opacity: 1 !important; } .player > .hp-wrap > .hp > div { - /*Hp<=5(勾玉)*/ - position: static; - margin-top: 1px; /*纵向间隔*/ - width: 13px; /*宽度*/ - height: 13px; /*高度*/ - line-height: 100%; - border: none; + /*Hp<=5(勾玉)*/ + position: static; + margin-top: 1px; /*纵向间隔*/ + width: 13px; /*宽度*/ + height: 13px; /*高度*/ + line-height: 100%; + border: none; } .hp:not(.text):not(.actcount):not(.treasure) > .lost, .hp:not(.text):not(.actcount):not(.treasure)[data-condition="mid"] > div:not(.lost), .hp:not(.text):not(.actcount):not(.treasure)[data-condition="high"] > div:not(.lost), .hp:not(.text):not(.actcount):not(.treasure)[data-condition="low"] > div:not(.lost) { - transform: none !important; + transform: none !important; } /*武将牌显示*/ .player > .primary-avatar { - left: 22.4px; - top: auto; - bottom: 0; - width: 81%; - height: 100%; - opacity: 1; - background-size: cover; - background-repeat: no-repeat; - background-position: top; - border-radius: 8px; - transition-property: opacity, transform; + left: 22.4px; + top: auto; + bottom: 0; + width: 81%; + height: 100%; + opacity: 1; + background-size: cover; + background-repeat: no-repeat; + background-position: top; + border-radius: 8px; + transition-property: opacity, transform; } .player.fullskin2 > .primary-avatar { - width: 41%; - border-radius: 8px 0 0 8px; + width: 41%; + border-radius: 8px 0 0 8px; } .player.bossplayer > .primary-avatar:not(.hp):not(.identity):not(.avatar):not(.framebg) { - display: block !important; + display: block !important; } .player > .deputy-avatar { - left: 58.5%; - top: auto; - bottom: 0; - width: 40.5%; - height: 100%; - opacity: 1; - background-size: cover; - background-repeat: no-repeat; - background-position: top; - border-radius: 0 8px 8px 0; - transition-property: opacity, transform; + left: 58.5%; + top: auto; + bottom: 0; + width: 40.5%; + height: 100%; + opacity: 1; + background-size: cover; + background-repeat: no-repeat; + background-position: top; + border-radius: 0 8px 8px 0; + transition-property: opacity, transform; } .player.unseen > .primary-avatar, .player.unseen2 > .deputy-avatar, .player.d-skin > .primary-avatar, .player.d-skin2 > .deputy-avatar { - opacity: 0; + opacity: 0; } #arena:not(.observe) > .player[data-position="0"].unseen > .primary-avatar, #arena:not(.observe) > .player[data-position="0"].unseen2 > .deputy-avatar { - opacity: 0.3; + opacity: 0.3; } #arena[data-outcrop-skin="on"] > .player > .primary-avatar { - height: 183px; - clip-path: url(#solo-clip); /*新增*/ - -webkit-clip-path: url(#solo-clip); + height: 183px; + clip-path: url(#solo-clip); /*新增*/ + -webkit-clip-path: url(#solo-clip); } #arena[data-outcrop-skin="on"] > .player > .deputy-avatar { - height: 183px; - clip-path: url(#duor-clip); /*新增*/ - -webkit-clip-path: url(#duor-clip); + height: 183px; + clip-path: url(#duor-clip); /*新增*/ + -webkit-clip-path: url(#duor-clip); } #arena[data-outcrop-skin="on"] > .player.fullskin2 > .primary-avatar { - clip-path: url(#duol-clip); /*新增*/ - -webkit-clip-path: url(#duol-clip); + clip-path: url(#duol-clip); /*新增*/ + -webkit-clip-path: url(#duol-clip); } /*武将牌动皮显示*/ .player > .dynamic-wrap { - display: block; - position: absolute; - left: 22.4px; - bottom: 0; - width: 81%; - height: 108%; - border-radius: 8px; - background-size: cover; - background-repeat: no-repeat; - pointer-events: none; - z-index: 60; + display: block; + position: absolute; + left: 22.4px; + bottom: 0; + width: 81%; + height: 108%; + border-radius: 8px; + background-size: cover; + background-repeat: no-repeat; + pointer-events: none; + z-index: 60; } .player > .dynamic-wrap > .animation-player { - display: block; - position: absolute; - left: 0; - bottom: 0; - width: 100%; - height: 100%; - border-radius: inherit; - pointer-events: none; - clip-path: inset(0 0 0 0 round 8px); /*新增*/ - -webkit-clip-path: inset(0 0 0 0 round 8px); + display: block; + position: absolute; + left: 0; + bottom: 0; + width: 100%; + height: 100%; + border-radius: inherit; + pointer-events: none; + clip-path: inset(0 0 0 0 round 8px); /*新增*/ + -webkit-clip-path: inset(0 0 0 0 round 8px); } #arena[data-dynamic-skin-outcrop="on"] > .player > .dynamic-wrap > .animation-player { - clip-path: url(#dskin-clip); /*新增*/ - -webkit-clip-path: url(#dskin-clip); - height: 188px; + clip-path: url(#dskin-clip); /*新增*/ + -webkit-clip-path: url(#dskin-clip); + height: 188px; } .player > .dynamic-wrap > .primary-bg, .player > .dynamic-wrap > .deputy-bg { - left: 22.4px; - top: auto; - bottom: 0; - width: 41%; - height: 100%; - opacity: 0; - background-size: cover; - background-repeat: no-repeat; - background-position: top; - border-radius: 8px 0 0 8px; - transition-property: opacity, transform; + left: 22.4px; + top: auto; + bottom: 0; + width: 41%; + height: 100%; + opacity: 0; + background-size: cover; + background-repeat: no-repeat; + background-position: top; + border-radius: 8px 0 0 8px; + transition-property: opacity, transform; } .player > .dynamic-wrap > .deputy-bg { - left: 40.5%; + left: 40.5%; } .player.d-skin > .dynamic-wrap > .primary-bg, .player.d-skin2 > .dynamic-wrap > .deputy-bg { - opacity: 1; + opacity: 1; } #arena:not(.observe) > .player[data-position="0"].unseen.d-skin > .dynamic-wrap > .primary-bg, #arena:not(.observe) > .player[data-position="0"].unseen2.d-skin2 > .dynamic-wrap > .deputy-bg { - opacity: 0.3; + opacity: 0.3; } #window:not(*[data-radius_size=""]) .player { - border-radius: 8px; + border-radius: 8px; } /*行动*/ .player > .primary-avatar > .action { - display: block; - position: absolute; - left: 0; - top: auto; - right: 0; - bottom: 0; - width: 100%; - margin: 0; - text-align: center; + display: block; + position: absolute; + left: 0; + top: auto; + right: 0; + bottom: 0; + width: 100%; + margin: 0; + text-align: center; } /*玩家标记显示-灯笼*/ .player > .dui-marks { - display: flex; - flex-direction: column; - left: auto; - top: 1px; - right: -20px; - width: 18px; - height: auto; - padding-bottom: 0; - z-index: 90; - transition-property: opacity, transform, background; + display: flex; + flex-direction: column; + left: auto; + top: 1px; + right: -20px; + width: 18px; + height: auto; + padding-bottom: 0; + z-index: 90; + transition-property: opacity, transform, background; } .player > .dui-marks > .mark { - display: flex; - align-items: center; - align-content: center; - justify-content: center; - position: relative; - margin-top: 0; - margin-left: 0; - margin-right: 0; - margin-bottom: 5px; - width: 18px; - height: auto; - border-radius: 0; - font-family: xinwei, xingkai; - box-shadow: none; - background: none; - overflow: visible; - animation: open 0.5s; + display: flex; + align-items: center; + align-content: center; + justify-content: center; + position: relative; + margin-top: 0; + margin-left: 0; + margin-right: 0; + margin-bottom: 5px; + width: 18px; + height: auto; + border-radius: 0; + font-family: xinwei, xingkai; + box-shadow: none; + background: none; + overflow: visible; + animation: open 0.5s; } .player > .dui-marks > .mark:before, .player > .dui-marks > .mark:after { - display: none; + display: none; } .player > .dui-marks > .mark > .mark-text { - display: flex; - align-items: center; - align-content: center; - justify-content: center; - position: relative; - padding-top: 3px; - padding-bottom: 3px; - width: 17px; - height: auto; - min-height: 16px; - line-height: 16px; - text-align: center; - font-size: 20px; - font-family: xinwei, xingkai; - color: rgb(77, 60, 51); - border-radius: 5px; - background-image: radial-gradient(rgb(255, 255, 200) 0, rgb(255, 255, 120) 50%, rgb(255, 255, 10) 80%, yellow 100%); - box-shadow: 0 0 1px yellow; - text-shadow: none; - animation: swing 1.5s alternate infinite ease-in-out; + display: flex; + align-items: center; + align-content: center; + justify-content: center; + position: relative; + padding-top: 3px; + padding-bottom: 3px; + width: 17px; + height: auto; + min-height: 16px; + line-height: 16px; + text-align: center; + font-size: 20px; + font-family: xinwei, xingkai; + color: rgb(77, 60, 51); + border-radius: 5px; + background-image: radial-gradient(rgb(255, 255, 200) 0, rgb(255, 255, 120) 50%, rgb(255, 255, 10) 80%, yellow 100%); + box-shadow: 0 0 1px yellow; + text-shadow: none; + animation: swing 1.5s alternate infinite ease-in-out; } .player > .dui-marks > .mark > .mark-text.small-text { - font-size: 14px; - line-height: 11px; + font-size: 14px; + line-height: 11px; } .player > .dui-marks > .mark > .mark-text::before { - content: ""; - display: block; - position: absolute; - left: 30%; - top: -1px; - width: 40%; - height: calc(100% + 3px); - border-top: 1px solid black; - border-bottom: 2px solid #ff9900; - box-sizing: border-box; + content: ""; + display: block; + position: absolute; + left: 30%; + top: -1px; + width: 40%; + height: calc(100% + 3px); + border-top: 1px solid black; + border-bottom: 2px solid #ff9900; + box-sizing: border-box; } .player > .dui-marks > .mark > .mark-count { - position: absolute; - left: auto; - top: -2px; - right: -5px; - bottom: auto; - height: 10px; - width: 10px; - line-height: 11px; - font-size: 11px; - font-weight: bold; - text-shadow: none; - text-align: center; - border-radius: 100%; - background: yellow; - box-shadow: 0 0 1px black inset; + position: absolute; + left: auto; + top: -2px; + right: -5px; + bottom: auto; + height: 10px; + width: 10px; + line-height: 11px; + font-size: 11px; + font-weight: bold; + text-shadow: none; + text-align: center; + border-radius: 100%; + background: yellow; + box-shadow: 0 0 1px black inset; } .player > .dui-marks > .mark > .image { - display: none; + display: none; } #arena[data-player-mark-style="red"] > .player > .dui-marks > .mark > .mark-text { - color: yellow; - text-shadow: 0 0 1px black, 0 0 1px black; - box-shadow: 0 0 1px yellow; - background-image: radial-gradient(rgb(100, 255, 100), rgb(255, 120, 0), rgb(255, 0, 0)); + color: yellow; + text-shadow: 0 0 1px black, 0 0 1px black; + box-shadow: 0 0 1px yellow; + background-image: radial-gradient(rgb(100, 255, 100), rgb(255, 120, 0), rgb(255, 0, 0)); } #arena[data-player-mark-style="red"] > .player > .dui-marks > .mark > .mark-count { - color: #c86400; - background: #ffdc00; + color: #c86400; + background: #ffdc00; } /*玩家标记显示-新样式*/ #arena[data-player-mark-style="decade"] > .player > .dui-marks { - left: auto; - top: 30px; - right: -13px; - width: auto; - max-width: 80px; + left: auto; + top: 30px; + right: -13px; + width: auto; + max-width: 80px; } #arena[data-player-mark-style="decade"] > .player > .dui-marks > .mark { - display: flex; - width: 45px; - height: 20px; - white-space: nowrap; - background-image: url("assets/image/player_mark1.png"); - animation: fade-in 0.5s; - margin-bottom: 1px; /*标记纵向间隔*/ + display: flex; + width: 45px; + height: 20px; + white-space: nowrap; + background-image: url("assets/image/player_mark1.png"); + animation: fade-in 0.5s; + margin-bottom: 1px; /*标记纵向间隔*/ } #arena[data-player-mark-style="decade"] > .player > .dui-marks > .mark > .mark-text { - /*标记文本*/ - display: inline; - position: static; - border-radius: 0; - width: auto; - height: auto; - line-height: 18px; /*换行间距*/ - font-size: 14px; /*字体大小*/ - font-family: "xinwei" !important; /*字体样式*/ - color: white; - background-image: none; - box-shadow: none; - animation: none; + /*标记文本*/ + display: inline; + position: static; + border-radius: 0; + width: auto; + height: auto; + line-height: 18px; /*换行间距*/ + font-size: 14px; /*字体大小*/ + font-family: "xinwei" !important; /*字体样式*/ + color: white; + background-image: none; + box-shadow: none; + animation: none; } #arena[data-player-mark-style="decade"] > .player > .dui-marks > .mark > .mark-text::before { - display: none; + display: none; } #arena[data-player-mark-style="decade"] > .player > .dui-marks > .mark > .mark-count { - /*标记数量*/ - display: inline; - position: static; - padding-top: 3px; - padding-bottom: 3px; - width: auto; - height: auto; - line-height: 18px; /*换行间距*/ - border-radius: 0; - font-size: 14px; /*字体大小*/ - font-family: "xinwei" !important; /*字体样式*/ - font-weight: inherit; - color: white; - text-shadow: none; - background: none; - box-shadow: none; + /*标记数量*/ + display: inline; + position: static; + padding-top: 3px; + padding-bottom: 3px; + width: auto; + height: auto; + line-height: 18px; /*换行间距*/ + border-radius: 0; + font-size: 14px; /*字体大小*/ + font-family: "xinwei" !important; /*字体样式*/ + font-weight: inherit; + color: white; + text-shadow: none; + background: none; + box-shadow: none; } .mark-container.marks > .mark { - overflow: visible; + overflow: visible; } .mark-container.marks > .mark > .mark-text { - display: flex; - position: absolute; - justify-content: center; - align-items: center; - top: 0; - left: 0; - width: 100%; - height: 100%; - color: black; - font-size: 20px; + display: flex; + position: absolute; + justify-content: center; + align-items: center; + top: 0; + left: 0; + width: 100%; + height: 100%; + color: black; + font-size: 20px; } .mark-container.marks > .mark > .mark-count { - display: block; - position: absolute; - right: -5px; - width: 15px; - background: white; - border-radius: 4px; + display: block; + position: absolute; + right: -5px; + width: 15px; + background: white; + border-radius: 4px; } /*玩家判断标记显示*/ .player > .judges, #arena > .player:not(.minskin) > .judges { - display: flex; - justify-content: flex-end; - left: auto; - right: -1%; - top: auto; - bottom: -1%; - width: auto; - height: 0; - padding-bottom: 0; - z-index: 88; + display: flex; + justify-content: flex-end; + left: auto; + right: -1%; + top: auto; + bottom: -1%; + width: auto; + height: 0; + padding-bottom: 0; + z-index: 88; } .player[data-position="0"] > .judges, #arena > .player[data-position="0"]:not(.minskin) > .judges { - top: -24px; - bottom: auto; + top: -24px; + bottom: auto; } .player > .judges > .card, #window:not(.nopointer) .player .judges > .card { - position: static; - left: auto; - top: auto; - right: auto; - bottom: auto; - margin: 4px; - width: 16px; - height: 16px; - opacity: 1; - box-shadow: none; - background: none !important; - transform: none; - overflow: visible; + position: static; + left: auto; + top: auto; + right: auto; + bottom: auto; + margin: 4px; + width: 16px; + height: 16px; + opacity: 1; + box-shadow: none; + background: none !important; + transform: none; + overflow: visible; } .player > .judges > .card > .image { - display: none; + display: none; } .player > .judges > .card > .judge-mark { - display: block; - position: relative; - width: 100%; - height: 100%; + display: block; + position: relative; + width: 100%; + height: 100%; } .player > .judges > .card > .judge-mark > .back { - display: block; - position: absolute; - left: 0; - top: 0; - width: 100%; - height: 100%; - background: rgb(240, 220, 160); - transition: none; - transform: rotate(45deg); - border-radius: 4px; - box-shadow: 0 0 1px rgba(0, 0, 0, 0.4), 0 0 8px rgba(0, 0, 0, 0.8); - z-index: -1; + display: block; + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + background: rgb(240, 220, 160); + transition: none; + transform: rotate(45deg); + border-radius: 4px; + box-shadow: 0 0 1px rgba(0, 0, 0, 0.4), 0 0 8px rgba(0, 0, 0, 0.8); + z-index: -1; } .player > .judges > .card > .judge-mark > .back::before { - display: block; - position: absolute; - content: ""; - background: rgb(240, 220, 160); - left: 12%; - top: 12%; - right: 12%; - bottom: 12%; - border-radius: 2px; - box-shadow: 0 0 1px black; - z-index: -1; + display: block; + position: absolute; + content: ""; + background: rgb(240, 220, 160); + left: 12%; + top: 12%; + right: 12%; + bottom: 12%; + border-radius: 2px; + box-shadow: 0 0 1px black; + z-index: -1; } .player > .judges > .card > .judge-mark > div:not(.back) .player > .judges > .card > .judge-mark > div:not(.judge) { - display: none; + display: none; } .player > .judges > .card > .judge-mark > .judge { - display: flex; - align-items: center; - align-content: center; - justify-content: center; - text-align: center; - position: absolute; - left: 0; - top: 0; - width: 100%; - height: 100%; - font-family: xinwei, xingkai; - font-size: 16px; - color: white; - text-shadow: #000 1px 0 0, #000 0 1px 0, #000 -1px 0 0, #000 0 -1px 0, 0 0 8px #000; + display: flex; + align-items: center; + align-content: center; + justify-content: center; + text-align: center; + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + font-family: xinwei, xingkai; + font-size: 16px; + color: white; + text-shadow: #000 1px 0 0, #000 0 1px 0, #000 -1px 0 0, #000 0 -1px 0, 0 0 8px #000; } .player > .judges > .card > .background, .judges > .card.fakejudge.fullskin > .background, .judges > .card.fakejudge.fullborder > .background { - display: none !important; + display: none !important; } /*玩家号位显示*/ .player > .seat { - display: block; - position: absolute; - bottom: -16px; - width: 100%; - line-height: 16px; - color: rgb(5, 5, 5); - font-family: "shousha"; - font-size: 22px; - font-weight: bold; /*字体加粗*/ - text-align: center; - text-shadow: 0 0 2px white, 0 0 1px white; - white-space: nowrap; - z-index: 89; - pointer-events: none; + display: block; + position: absolute; + bottom: -16px; + width: 100%; + line-height: 16px; + color: rgb(5, 5, 5); + font-family: "shousha"; + font-size: 22px; + font-weight: bold; /*字体加粗*/ + text-align: center; + text-shadow: 0 0 2px white, 0 0 1px white; + white-space: nowrap; + z-index: 89; + pointer-events: none; } .player[data-position="0"] > .seat { - bottom: -10px; + bottom: -10px; } .player > .name_seat { - display: none !important; + display: none !important; } /*玩家手牌数显示*/ .player > .card-count { - position: absolute; - top: auto; - right: auto; - left: -6.5px; - bottom: -7px; - line-height: 28px; - height: 28px; - width: 36px; - background: url("image/decoration/card_count7.png"); - background-repeat: no-repeat; - background-size: 100% 100%; - background-position: 0 -1px; - border: none; - box-shadow: none; - font-size: 19px; - font-family: xinwei, xingkai; - color: white; - text-align: center; - text-shadow: none; - border-radius: 0px; - z-index: 89; - transition: transform, opacity; + position: absolute; + top: auto; + right: auto; + left: -6.5px; + bottom: -7px; + line-height: 28px; + height: 28px; + width: 36px; + background: url("image/decoration/card_count7.png"); + background-repeat: no-repeat; + background-size: 100% 100%; + background-position: 0 -1px; + border: none; + box-shadow: none; + font-size: 19px; + font-family: xinwei, xingkai; + color: white; + text-align: center; + text-shadow: none; + border-radius: 0px; + z-index: 89; + transition: transform, opacity; } .player > .card-count::before { - content: attr(data-text); - position: absolute; - left: 0; - top: 0; - height: 100%; - width: 100%; - line-height: 28px; - color: transparent; - -webkit-text-stroke: 2px black; - z-index: -1; + content: attr(data-text); + position: absolute; + left: 0; + top: 0; + height: 100%; + width: 100%; + line-height: 28px; + color: transparent; + -webkit-text-stroke: 2px black; + z-index: -1; } /*玩家身份标记*/ .player > .identity, #arena > .player:not(.minskin) > .identity { - left: auto; - top: -8px; - right: -8px; - width: 35px; - height: 35px; - line-height: 31px; - font-size: 31px; - background-size: 100% 100%; - background-repeat: no-repeat; - background-position: center; - z-index: 89; - transform: none; - transition: none; + left: auto; + top: -8px; + right: -8px; + width: 35px; + height: 35px; + line-height: 31px; + font-size: 31px; + background-size: 100% 100%; + background-repeat: no-repeat; + background-position: center; + z-index: 89; + transform: none; + transition: none; } .player > .identity[data-color="rYe"] { - text-shadow: rgba(255, 120, 0, 1) 0 0 2px, rgba(255, 120, 0, 1) 0 0 5px, rgba(255, 120, 0, 1) 0 0 10px, rgba(255, 120, 0, 1) 0 0 10px, rgba(255, 120, 0, 1) 0 0 20px, rgba(255, 120, 0, 1) 0 0 20px, black 0 0 1px; + text-shadow: rgba(255, 120, 0, 1) 0 0 2px, rgba(255, 120, 0, 1) 0 0 5px, rgba(255, 120, 0, 1) 0 0 10px, rgba(255, 120, 0, 1) 0 0 10px, rgba(255, 120, 0, 1) 0 0 20px, rgba(255, 120, 0, 1) 0 0 20px, black 0 0 1px; } .player > .identity[data-color="bYe"], .player.opposite-camp > .identity { - text-shadow: 0 0 1px black, 0 0 5px blue, 0 0 10px rgb(100, 100, 250), 0 0 20px rgb(100, 100, 250), 0 0 20px white; + text-shadow: 0 0 1px black, 0 0 5px blue, 0 0 10px rgb(100, 100, 250), 0 0 20px rgb(100, 100, 250), 0 0 20px white; } .player > .identity > div:first-child { - position: absolute; - left: 25px; - top: 0; - width: 100%; - height: 100%; - font-size: 31px; - line-height: 31px; - background-size: 100% 100%; - background-repeat: no-repeat; - background-position: center; + position: absolute; + left: 25px; + top: 0; + width: 100%; + height: 100%; + font-size: 31px; + line-height: 31px; + background-size: 100% 100%; + background-repeat: no-repeat; + background-position: center; } .player > .identity.guozhan-mode, #arena > .player:not(.minskin) > .identity.guozhan-mode { - left: -20px; - top: -9px; - width: 37px; - height: 42px; + left: -20px; + top: -9px; + width: 37px; + height: 42px; } /*人物弹出文字*/ /*新样式*/ /*代码来自Empty city*/ #arena[data-shadow-style="off"] > .player > .damage { - width: 100%; - transition: none; - color: transparent; - font-family: "HYZLSJ"; - text-align: center; - white-space: nowrap; - font-weight: bold; - -webkit-text-stroke: 0.2px #3e362a; - text-shadow: none; - background: linear-gradient(180deg, #f5df88 16%, #ab8d35 60%); - /*-webkit-background-clip: text;*/ - -webkit-text-fill-color: transparent; - font-size: 28.5px; - z-index: 91; + width: 100%; + transition: none; + color: transparent; + font-family: "HYZLSJ"; + text-align: center; + white-space: nowrap; + font-weight: bold; + -webkit-text-stroke: 0.2px #3e362a; + text-shadow: none; + background: linear-gradient(180deg, #f5df88 16%, #ab8d35 60%); + /*-webkit-background-clip: text;*/ + -webkit-text-fill-color: transparent; + font-size: 28.5px; + z-index: 91; } #arena[data-shadow-style="off"] > .player > .damage::before { - content: attr(data-text); - position: absolute; - left: 0; - top: 0; - width: 100%; - color: #ff1300; - z-index: -1; + content: attr(data-text); + position: absolute; + left: 0; + top: 0; + width: 100%; + color: #ff1300; + z-index: -1; } /*原样式*/ #arena[data-shadow-style="on"] > .player > .damage { - width: 100%; - text-shadow: none; - transition: none; - z-index: 91; + width: 100%; + text-shadow: none; + transition: none; + z-index: 91; } #arena[data-shadow-style="on"] > .player > .damage::before { - content: attr(data-text); - position: absolute; - left: 0; - top: 0; - width: 100%; - color: transparent; - -webkit-text-stroke: 4px #803b02; - z-index: -1; + content: attr(data-text); + position: absolute; + left: 0; + top: 0; + width: 100%; + color: transparent; + -webkit-text-stroke: 4px #803b02; + z-index: -1; } /* .player>.damage[data-nature='metal']::before { */ @@ -1208,206 +1208,206 @@ /*联机用牌时限*/ .player > .timerbar { - display: block; - position: absolute; - left: 0; - top: auto; - bottom: -10px; - width: 100%; - z-index: 88; + display: block; + position: absolute; + left: 0; + top: auto; + bottom: -10px; + width: 100%; + z-index: 88; } .player[data-position="0"] > .timerbar { - top: -15px; - bottom: auto; + top: -15px; + bottom: auto; } .player > .timerbar > div, #arena .timerbar > div { - position: absolute; - left: calc(50% - 50px); - top: auto !important; - right: auto; - width: 100px; - height: 5px; + position: absolute; + left: calc(50% - 50px); + top: auto !important; + right: auto; + width: 100px; + height: 5px; } .player > .timerbar > div:first-child { - box-shadow: 0 0 4px yellow; - background: rgb(100, 0, 0); + box-shadow: 0 0 4px yellow; + background: rgb(100, 0, 0); } /*联机游戏等待中*/ .player.connect > .gaming { - display: block; - position: absolute; - left: 0; - top: calc(50% - 16px); - width: 100%; - height: 32px; - font-size: 32px; - font-family: "xinwei"; - text-align: center; - z-index: 89; + display: block; + position: absolute; + left: 0; + top: calc(50% - 16px); + width: 100%; + height: 32px; + font-size: 32px; + font-family: "xinwei"; + text-align: center; + z-index: 89; } /*玩家死亡变灰*/ .player.dead { - opacity: 1; - filter: none; - -webkit-filter: none; + opacity: 1; + filter: none; + -webkit-filter: none; } .player.dead > div { - filter: grayscale(1); /*新增*/ - -webkit-filter: grayscale(1); + filter: grayscale(1); /*新增*/ + -webkit-filter: grayscale(1); } /*玩家死亡文字*/ .player > .died-identity { - display: flex; - align-items: center; - align-content: center; - justify-content: center; - left: calc(50% - 65px); - top: auto; - bottom: 10px; - width: 150px; - height: 150px; - line-height: 38px; - color: rgb(210, 50, 50); - font-size: 38px; - font-family: xingkai, huangcao, xinwei; - pointer-events: none; - font-display: swap; - text-shadow: 0 0 5px black, 0 0 10px black, 0 0 15px black; - background-size: contain; - background-repeat: no-repeat; - background-position: center; - transform: none; - opacity: 0; + display: flex; + align-items: center; + align-content: center; + justify-content: center; + left: calc(50% - 65px); + top: auto; + bottom: 10px; + width: 150px; + height: 150px; + line-height: 38px; + color: rgb(210, 50, 50); + font-size: 38px; + font-family: xingkai, huangcao, xinwei; + pointer-events: none; + font-display: swap; + text-shadow: 0 0 5px black, 0 0 10px black, 0 0 15px black; + background-size: contain; + background-repeat: no-repeat; + background-position: center; + transform: none; + opacity: 0; } .player.opposite-camp > .died-identity { - color: rgb(50, 50, 210); + color: rgb(50, 50, 210); } .player.dead > .died-identity { - filter: none; - -webkit-filter: none; - animation: fade-in 0.5s forwards; - animation-delay: 0.5s; - -webkit-animation: fade-in 0.5s forwards; - -webkit-animation-delay: 0.5s; + filter: none; + -webkit-filter: none; + animation: fade-in 0.5s forwards; + animation-delay: 0.5s; + -webkit-animation: fade-in 0.5s forwards; + -webkit-animation-delay: 0.5s; } /*玩家获得的技能显示*/ .player > .gain-skill { - position: absolute; - left: 22.7px; - right: 15px; - width: 84%; - /*max-height: calc(97% - 81px);*/ - bottom: calc(3% + 81px); - color: white; - font-size: 16.3px; - font-weight: bold; - -webkit-text-stroke: 0.7px rgba(0, 0, 0, 0.5); - text-shadow: -1.3px 0px 2.2px #000, 0px -1.3px 2.2px #000, 1.3px 0px 2.2px #000, 0px 1.3px 2.2px #000; - font-family: "shousha"; - text-align: left; - background-size: 100% 100%; - box-shadow: -13px -2px 16px rgba(0, 0, 0, 0.7), -13px 5px 16px rgba(0, 0, 0, 0.2); - border-radius: 2px; - background-image: url("assets/image/update_bg.png"); - /*text-align: center; + position: absolute; + left: 22.7px; + right: 15px; + width: 84%; + /*max-height: calc(97% - 81px);*/ + bottom: calc(3% + 81px); + color: white; + font-size: 16.3px; + font-weight: bold; + -webkit-text-stroke: 0.7px rgba(0, 0, 0, 0.5); + text-shadow: -1.3px 0px 2.2px #000, 0px -1.3px 2.2px #000, 1.3px 0px 2.2px #000, 0px 1.3px 2.2px #000; + font-family: "shousha"; + text-align: left; + background-size: 100% 100%; + box-shadow: -13px -2px 16px rgba(0, 0, 0, 0.7), -13px 5px 16px rgba(0, 0, 0, 0.2); + border-radius: 2px; + background-image: url("assets/image/update_bg.png"); + /*text-align: center; background: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.4) 40%, rgba(0,0,0,0.4) 60%, transparent 100%);*/ - z-index: 87; + z-index: 87; } #arena.decadeUI[data-gain-skills-visible="off"] > .player > .gain-skill, #arena.decadeUI[data-gain-skills-visible="othersOn"] > .player[data-position="0"] > .gain-skill { - display: none; + display: none; } /*角色翻面背景*/ .player > .turned-over { - position: absolute; - left: 0; - top: 0; - width: 100%; - height: 100%; - opacity: 0; - background-image: url("assets/image/turn_over_mask.png"); - background-size: cover; - pointer-events: none; - z-index: 62; + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + opacity: 0; + background-image: url("assets/image/turn_over_mask.png"); + background-size: cover; + pointer-events: none; + z-index: 62; } .player.turnedover > .turned-over { - opacity: 0.8; + opacity: 0.8; } .turnedover > div { - opacity: initial; + opacity: initial; } /*角色边框*/ .player > .framebg { - z-index: 63; + z-index: 63; } /*身份标记框*/ .player > .identity-mark-box { - display: flex; - position: absolute; - justify-content: center; - flex-wrap: wrap; - top: 20%; - left: 16%; - width: 68%; - height: auto; - z-index: 99; + display: flex; + position: absolute; + justify-content: center; + flex-wrap: wrap; + top: 20%; + left: 16%; + width: 68%; + height: auto; + z-index: 99; } .player > .identity-mark-box > .identity-mark-item { - position: static; - width: auto; - height: auto; - min-width: 20px; - line-height: 20px; - border-style: solid; - border-width: 10px; - border-image-width: 18px; - border-image-slice: 31 31 fill; - border-image-source: url("assets/image/item_bg.png"); - cursor: pointer; - color: rgb(77, 60, 51); - font-family: shousha; - font-weight: bold; - font-size: 20px; - text-shadow: none; - transition: opacity, background, transform 0.3s; + position: static; + width: auto; + height: auto; + min-width: 20px; + line-height: 20px; + border-style: solid; + border-width: 10px; + border-image-width: 18px; + border-image-slice: 31 31 fill; + border-image-source: url("assets/image/item_bg.png"); + cursor: pointer; + color: rgb(77, 60, 51); + font-family: shousha; + font-weight: bold; + font-size: 20px; + text-shadow: none; + transition: opacity, background, transform 0.3s; } .player > .identity-mark-box > .identity-mark-item:active { - transform: scale(0.9); + transform: scale(0.9); } /*说话泡泡框*/ .player > .chat-bubble { - left: 0; - top: 20px; - width: 100%; - height: auto; - font-family: "shousha" !important; - border-style: solid; - border-width: 6px 6px 14px 6px; - border-image-slice: 6 6 14 6 fill; - border-image-source: url("assets/image/chat_bubble.png"); - box-sizing: border-box; - word-break: break-all; - z-index: 99; + left: 0; + top: 20px; + width: 100%; + height: auto; + font-family: "shousha" !important; + border-style: solid; + border-width: 6px 6px 14px 6px; + border-image-slice: 6 6 14 6 fill; + border-image-source: url("assets/image/chat_bubble.png"); + box-sizing: border-box; + word-break: break-all; + z-index: 99; } /* @@ -1426,6 +1426,6 @@ /*玩家tip标记显示*/ .player .tipContainer { - width: 83% !important; - right: 0; + width: 83% !important; + right: 0; } diff --git a/player3.css b/player3.css index afd7e44..a49c655 100644 --- a/player3.css +++ b/player3.css @@ -1,170 +1,170 @@ @import "animation1.css"; /*角色基本外观*/ .player { - height: 180px; - width: 120px; - border-radius: 8px; - box-shadow: 0px -1px 3px black, 0px 3px 8px black; - background-image: linear-gradient(rgb(53, 38, 32), rgb(53, 38, 32)); - transition-property: transform, opacity, left, top, right, bottom; + height: 180px; + width: 120px; + border-radius: 8px; + box-shadow: 0px -1px 3px black, 0px 3px 8px black; + background-image: linear-gradient(rgb(53, 38, 32), rgb(53, 38, 32)); + transition-property: transform, opacity, left, top, right, bottom; } .dui-mobile .player { - box-shadow: 0px -1px 2px black, 0px 1px 5px black; + box-shadow: 0px -1px 2px black, 0px 1px 5px black; } .player.dead { - animation: player-died 0.5s linear; - -webkit-animation: player-died 0.5s linear; - animation-iteration-count: 1; + animation: player-died 0.5s linear; + -webkit-animation: player-died 0.5s linear; + animation-iteration-count: 1; } .player[data-max-hp="hujia"] > .hp-wrap { - height: 78px; + height: 78px; } /*护甲*/ .hujia { - top: auto; - /*上下*/ - bottom: 22px; - /*左右*/ - left: -4px; - /*指向护甲图片放的位置*/ - background-image: url("image/decoration/shield.png"); - background-size: 100% 100%; - background-repeat: no-repeat; - /*图片宽*/ - width: 21px; - /*图片高*/ - height: 21px; - /*字体*/ - text-align: center; - color: white; - font-family: "shousha"; - -webkit-text-stroke: 0.9px black; - text-shadow: 0 0 1.5px #ffded4, 0 0 1.5px #ffded4, 0 0 1.5px #ffded4, 0 0 1.5px #ffded4 !important; - font-size: 18px; - font-weight: 900; - /*其他*/ - position: relative; - z-index: 100; + top: auto; + /*上下*/ + bottom: 22px; + /*左右*/ + left: -4px; + /*指向护甲图片放的位置*/ + background-image: url("image/decoration/shield.png"); + background-size: 100% 100%; + background-repeat: no-repeat; + /*图片宽*/ + width: 21px; + /*图片高*/ + height: 21px; + /*字体*/ + text-align: center; + color: white; + font-family: "shousha"; + -webkit-text-stroke: 0.9px black; + text-shadow: 0 0 1.5px #ffded4, 0 0 1.5px #ffded4, 0 0 1.5px #ffded4, 0 0 1.5px #ffded4 !important; + font-size: 18px; + font-weight: 900; + /*其他*/ + position: relative; + z-index: 100; } .player::before { - left: -56px; - top: -42px; - width: 223px; - height: 254px; - opacity: 0; - background-image: url("assets/image/sprites_glow_blue.png"); - background-repeat: no-repeat; - animation-name: kf-sprites-glow; - animation-duration: 0s; - animation-delay: 0s; - animation-iteration-count: infinite; - animation-fill-mode: forwards; - animation-timing-function: steps(1); - pointer-events: none; - box-shadow: none; - transition: opacity 0.1s linear; + left: -56px; + top: -42px; + width: 223px; + height: 254px; + opacity: 0; + background-image: url("assets/image/sprites_glow_blue.png"); + background-repeat: no-repeat; + animation-name: kf-sprites-glow; + animation-duration: 0s; + animation-delay: 0s; + animation-iteration-count: infinite; + animation-fill-mode: forwards; + animation-timing-function: steps(1); + pointer-events: none; + box-shadow: none; + transition: opacity 0.1s linear; } .player.selected:not(.target):before, .player.glow_phase:not(.selectable):not(*[data-position="0"])::before { - animation-duration: 0.9s; - background-image: url("assets/image/sprites_glow_orange.png"); - opacity: 1; + animation-duration: 0.9s; + background-image: url("assets/image/sprites_glow_orange.png"); + opacity: 1; } .player.selectable:not(.selected):not(.target)::before { - animation-duration: 0.9s; - opacity: 1; + animation-duration: 0.9s; + opacity: 1; } .player::after, .player.selected::after, .player.selectable::after { - left: -56px; - top: -42px; - width: 223px; - height: 254px; - opacity: 0; - background-image: url("assets/image/sprites_glow_red.png"); - background-repeat: no-repeat; - animation-name: kf-sprites-glow; - animation-duration: 0s; - animation-delay: 0s; - animation-iteration-count: infinite; - animation-fill-mode: forwards; - animation-timing-function: steps(1); - pointer-events: none; - box-shadow: none; - transition: opacity 0.1s linear; + left: -56px; + top: -42px; + width: 223px; + height: 254px; + opacity: 0; + background-image: url("assets/image/sprites_glow_red.png"); + background-repeat: no-repeat; + animation-name: kf-sprites-glow; + animation-duration: 0s; + animation-delay: 0s; + animation-iteration-count: infinite; + animation-fill-mode: forwards; + animation-timing-function: steps(1); + pointer-events: none; + box-shadow: none; + transition: opacity 0.1s linear; } .player.target:not(.glow_phase):not(.selectable):not(.selected)::after { - animation-duration: 0.9s; - opacity: 1; + animation-duration: 0.9s; + opacity: 1; } #arena > .player { - z-index: 4; + z-index: 4; } .player > .mask { - position: absolute; - left: 0; - top: 0; - width: 100%; - height: 100%; - border-radius: inherit; - background: rgba(0, 0, 0, 0.65); - opacity: 0; - transition: opacity 0.3s ease-in-out; - pointer-events: none; - z-index: 66; + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + border-radius: inherit; + background: rgba(0, 0, 0, 0.65); + opacity: 0; + transition: opacity 0.3s ease-in-out; + pointer-events: none; + z-index: 66; } .player.un-selectable:not(.selectable) > .mask { - opacity: 1; - transition: opacity 0.3s linear; + opacity: 1; + transition: opacity 0.3s linear; } #arena:not(.fewplayer) > .player:not(.minskin), #arena:not(.fewplayer):not(*[data-player_height=""]) > .player:not(.minskin) { - height: 171.5px !important; - width: 128px !important; + height: 171.5px !important; + width: 128px !important; } /*玩家锁链*/ .player > .chain { - top: 30%; - left: -15px; - width: 158px; - height: 32px; - visibility: hidden; - background-size: cover; - background-position-x: -120px; - background-repeat: no-repeat; - background-image: url("assets/image/tie_suo1.png"); - transition-duration: 0.4s; - z-index: 86; + top: 30%; + left: -15px; + width: 158px; + height: 32px; + visibility: hidden; + background-size: cover; + background-position-x: -120px; + background-repeat: no-repeat; + background-image: url("assets/image/tie_suo1.png"); + transition-duration: 0.4s; + z-index: 86; } .player.linked2 > .chain { - visibility: visible; - background-position-x: center; + visibility: visible; + background-position-x: center; } /*隐藏玩家手牌显示以及降低玩家血量标记位置—咸鱼大佬的代码*/ /*需要配合扩展手杀ui使用,如果不开启手杀ui,需要把以下两段代码注释掉*/ .player[data-position="0"] > .hp-wrap { - bottom: -6px; + bottom: -6px; } .player[data-position="0"] > .card-count { - visibility: hidden; + visibility: hidden; } /*主玩家位置*/ @@ -173,39 +173,39 @@ #arena > .player[data-position="0"]:not(.minskin), #arena:not(*[data-player_height=""]) > .player[data-position="0"], #arena:not(*[data-player_height=""]) > .player[data-position="0"]:not(.miniskin) { - left: 25px; - top: auto; - right: auto; - bottom: 1%; + left: 25px; + top: auto; + right: auto; + bottom: 1%; } #arena[data-right-layout="on"] > .player[data-position="0"], #arena[data-right-layout="on"] > .player[data-position="0"]:not(.miniskin) { - left: auto; - right: 25px; + left: auto; + right: 25px; } /*玩家姓名阵营*/ .player > .camp-wrap { - display: block; - left: -19px; - top: -9px; - width: 37px; - height: 125px; - transition: none; - z-index: 1; - pointer-events: none; + display: block; + left: -19px; + top: -9px; + width: 37px; + height: 125px; + transition: none; + z-index: 1; + pointer-events: none; } .player.connect > div:not(.avatar):not(.name):not(.nameol):not(.hp):not(.room):not(.gaming):not(.identity).camp-wrap { - display: block !important; + display: block !important; } /*新增*/ .player.connect > div:not(.avatar):not(.name):not(.nameol):not(.hp):not(.room):not(.gaming):not(.identity).primary-avatar { - display: block !important; + display: block !important; } .player > .camp-wrap div { - transition: none; + transition: none; } /* @@ -217,51 +217,51 @@ */ .player.unseen > .camp-wrap > .camp-back { - background: linear-gradient(to bottom, rgb(92, 35, 22), rgb(50, 27, 26)); + background: linear-gradient(to bottom, rgb(92, 35, 22), rgb(50, 27, 26)); } .player > .camp-wrap[data-camp="wei"] > .camp-back { - background: linear-gradient(to bottom, rgb(45, 103, 153), rgb(19, 45, 78)); + background: linear-gradient(to bottom, rgb(45, 103, 153), rgb(19, 45, 78)); } .player > .camp-wrap[data-camp="shu"] > .camp-back { - background: linear-gradient(to bottom, rgb(153, 28, 34), rgb(57, 12, 17)); + background: linear-gradient(to bottom, rgb(153, 28, 34), rgb(57, 12, 17)); } .player > .camp-wrap[data-camp="wu"] > .camp-back { - background: linear-gradient(to bottom, rgb(29, 114, 29), rgb(34, 42, 27)); + background: linear-gradient(to bottom, rgb(29, 114, 29), rgb(34, 42, 27)); } .player > .camp-wrap[data-camp="qun"] > .camp-back { - background: linear-gradient(to bottom, rgb(154, 148, 122), rgb(74, 72, 57)); + background: linear-gradient(to bottom, rgb(154, 148, 122), rgb(74, 72, 57)); } .player > .camp-wrap[data-camp="shen"] > .camp-back { - background: linear-gradient(to bottom, rgb(97, 87, 15), rgb(65, 50, 9), rgb(67, 52, 9)); + background: linear-gradient(to bottom, rgb(97, 87, 15), rgb(65, 50, 9), rgb(67, 52, 9)); } .player > .camp-wrap[data-camp="shen2"] > .camp-back { - background: linear-gradient(to bottom, rgb(112, 52, 126), rgb(52, 18, 55)); + background: linear-gradient(to bottom, rgb(112, 52, 126), rgb(52, 18, 55)); } .player > .camp-wrap[data-camp="ye"] > .camp-back { - background: linear-gradient(to bottom, rgb(112, 52, 126), rgb(52, 18, 55)); + background: linear-gradient(to bottom, rgb(112, 52, 126), rgb(52, 18, 55)); } .player > .camp-wrap[data-camp="key"] > .camp-back { - background: linear-gradient(to bottom, rgb(147, 132, 183), rgb(130, 120, 160), rgb(120, 115, 154)); + background: linear-gradient(to bottom, rgb(147, 132, 183), rgb(130, 120, 160), rgb(120, 115, 154)); } .player > .camp-wrap[data-camp="western"] > .camp-back { - background: linear-gradient(to bottom, rgb(93, 44, 105), rgb(54, 18, 58)); + background: linear-gradient(to bottom, rgb(93, 44, 105), rgb(54, 18, 58)); } .player > .camp-wrap[data-camp="jin"] > .camp-back { - background: linear-gradient(to bottom, rgb(112, 52, 126), rgb(52, 18, 55)); + background: linear-gradient(to bottom, rgb(112, 52, 126), rgb(52, 18, 55)); } .player > .camp-wrap[data-camp="daqin"] > .camp-back { - background: linear-gradient(to bottom, rgb(100, 100, 100), rgb(0, 0, 0)); + background: linear-gradient(to bottom, rgb(100, 100, 100), rgb(0, 0, 0)); } /*十周年调用边框代码,不需要*/ @@ -298,167 +298,167 @@ .player > .camp-wrap > .avatar-name, .player > .camp-wrap > .avatar-name-default, #arena > .player:not(.minskin) > .name.name { - top: 30px; - left: 27px; - transform: translateX(-50%); - line-height: -3px; - font-family: "shousha" !important; - font-size: 15px; - white-space: nowrap; - writing-mode: vertical-rl; - -webkit-writing-mode: vertical-rl; + top: 30px; + left: 27px; + transform: translateX(-50%); + line-height: -3px; + font-family: "shousha" !important; + font-size: 15px; + white-space: nowrap; + writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; } /*隐匿状态“主将”显示*/ .player > .camp-wrap > .avatar-name-default > .camp-back { - left: 18.5px !important; - top: 31px !important; - font-family: "shousha" !important; - line-height: 14px; + left: 18.5px !important; + top: 31px !important; + font-family: "shousha" !important; + line-height: 14px; } .player > .camp-wrap > .camp-back { - /*武将图层,原版十周年武将名背后颜色图层*/ - display: flex; - align-items: flex-start; - align-content: center; - justify-content: flex-start; - font-size: 16px; - line-height: 14px; - font-family: "shousha"; - text-align: center; - text-shadow: none; /*#000 1px 0 0, #000 0 1px 0, #000 -1px 0 0, #000 0 -1px 0;*/ - left: 51.5%; - top: 7.2%; - right: auto; - height: 172px; - width: 128px; - bottom: 0%; - border-radius: 8px; - position: absolute; - white-space: nowrap; - writing-mode: vertical-rl; - -webkit-writing-mode: vertical-rl; + /*武将图层,原版十周年武将名背后颜色图层*/ + display: flex; + align-items: flex-start; + align-content: center; + justify-content: flex-start; + font-size: 16px; + line-height: 14px; + font-family: "shousha"; + text-align: center; + text-shadow: none; /*#000 1px 0 0, #000 0 1px 0, #000 -1px 0 0, #000 0 -1px 0;*/ + left: 51.5%; + top: 7.2%; + right: auto; + height: 172px; + width: 128px; + bottom: 0%; + border-radius: 8px; + position: absolute; + white-space: nowrap; + writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; } .player.unseen > .camp-wrap > .avatar-name, .player:not(.unseen) > .camp-wrap > .avatar-name-default, .player:not(.unseen2) > .camp-wrap > .avatar2-name-default { - visibility: hidden; + visibility: hidden; } .player > .unseen_show > .primary-avatar, .player > .unseen2_show > .deputy-avatar { - opacity: 0; + opacity: 0; } #arena:not(.observe) .player:not([data-position="0"]).unseen_show > .primary-avatar, #arena:not(.observe) .player:not([data-position="0"]).unseen2_show > .deputy-avatar { - opacity: 1 !important; - background-image: url("../../image/character/hidden_image.jpg") !important; + opacity: 1 !important; + background-image: url("../../image/character/hidden_image.jpg") !important; } .player > .camp-wrap > .camp-name { - /*势力图片,手杀样式已修改*/ - font-family: shousha; - font-display: swap; - top: 6.5px; - left: 13.5px; - font-size: 18px; - width: 27px; - height: 27px; - display: flex; - text-align: center; - align-items: center; - align-content: center; - justify-content: center; - background-size: contain; - background-repeat: no-repeat; - background-position: center; - transition: none; + /*势力图片,手杀样式已修改*/ + font-family: shousha; + font-display: swap; + top: 6.5px; + left: 13.5px; + font-size: 18px; + width: 27px; + height: 27px; + display: flex; + text-align: center; + align-items: center; + align-content: center; + justify-content: center; + background-size: contain; + background-repeat: no-repeat; + background-position: center; + transition: none; } .player > .camp-wrap[data-camp="wei"] > .camp-name { - text-shadow: 0 0 5px rgb(50, 50, 255), 0 0 10px rgb(120, 120, 255), 0 0 15px rgb(100, 100, 255); + text-shadow: 0 0 5px rgb(50, 50, 255), 0 0 10px rgb(120, 120, 255), 0 0 15px rgb(100, 100, 255); } .player > .camp-wrap[data-camp="shu"] > .camp-name { - text-shadow: 0 0 5px rgb(255, 100, 100), 0 0 10px rgb(255, 50, 50), 0 0 15px rgb(255, 50, 50); + text-shadow: 0 0 5px rgb(255, 100, 100), 0 0 10px rgb(255, 50, 50), 0 0 15px rgb(255, 50, 50); } .player > .camp-wrap[data-camp="wu"] > .camp-name { - text-shadow: 0 0 5px rgb(100, 233, 100), 0 0 10px rgb(50, 255, 50), 0 0 15px rgb(50, 255, 50); + text-shadow: 0 0 5px rgb(100, 233, 100), 0 0 10px rgb(50, 255, 50), 0 0 15px rgb(50, 255, 50); } .player > .camp-wrap[data-camp="qun"] > .camp-name { - text-shadow: 0 0 5px rgb(170, 170, 170), 0 0 10px rgb(118, 118, 118), 0 0 15px rgb(118, 118, 118); + text-shadow: 0 0 5px rgb(170, 170, 170), 0 0 10px rgb(118, 118, 118), 0 0 15px rgb(118, 118, 118); } .player > .camp-wrap[data-camp="shen"] > .camp-name { - text-shadow: 0 0 5px rgb(255, 200, 0), 0 0 10px rgb(255, 200, 0), 0 0 15px rgb(255, 200, 0); + text-shadow: 0 0 5px rgb(255, 200, 0), 0 0 10px rgb(255, 200, 0), 0 0 15px rgb(255, 200, 0); } .player > .camp-wrap > .camp-name { - text-shadow: 0 0 5px #e0ea33, 0 0 15px #e0ea33, 0 0 25px #e0ea33; + text-shadow: 0 0 5px #e0ea33, 0 0 15px #e0ea33, 0 0 25px #e0ea33; } /*副将名*/ .player > .name.name2, #arena > .player:not(.minskin) > .name.name2 { - display: flex; - align-items: flex-start; - align-content: center; - justify-content: center; - left: 50% !important; - right: auto; - top: 22px; - width: 18px; - height: 96px; - font-size: 16px; /*字体大小*/ - line-height: 15px; /*字体间隔*/ - font-family: "shousha" !important; /*字体样式*/ - text-shadow: none; /*#000 1px 0 0, #000 0 1px 0, #000 -1px 0 0, #000 0 -1px 0;*/ - background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.4) 20%, rgba(0, 0, 0, 0.5) 50%, rgba(0, 0, 0, 0.4) 80%, transparent 100%); - z-index: 89; + display: flex; + align-items: flex-start; + align-content: center; + justify-content: center; + left: 50% !important; + right: auto; + top: 22px; + width: 18px; + height: 96px; + font-size: 16px; /*字体大小*/ + line-height: 15px; /*字体间隔*/ + font-family: "shousha" !important; /*字体样式*/ + text-shadow: none; /*#000 1px 0 0, #000 0 1px 0, #000 -1px 0 0, #000 0 -1px 0;*/ + background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.4) 20%, rgba(0, 0, 0, 0.5) 50%, rgba(0, 0, 0, 0.4) 80%, transparent 100%); + z-index: 89; } .player > .name.name2:empty, #arena > .player:not(.minskin) > .name.name2:empty { - display: none; + display: none; } .player.fullskin.fullskin2 > .name.name2:empty::before { - content: "副将"; + content: "副将"; } /*联机名称显示*/ .player > .nameol { - top: 5px; - font-size: 16px; - font-family: "shousha"; - text-shadow: 0 0 2px black; - background: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.4) 40%, rgba(0, 0, 0, 0.4) 60%, transparent 100%); - z-index: 89; - pointer-events: none; + top: 5px; + font-size: 16px; + font-family: "shousha"; + text-shadow: 0 0 2px black; + background: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.4) 40%, rgba(0, 0, 0, 0.4) 60%, transparent 100%); + z-index: 89; + pointer-events: none; } /*玩家血量显示*/ .player > .hp-wrap { - display: block; - right: 108.8px; /*左移*/ - bottom: 9px; /*上移*/ - width: 12px; - height: 50px; - border-width: 24px 5px 21px 82px; - border-style: solid; - border-color: transparent; - /* border-image-source: url('image/decoration/border_hp.png');*/ - border-image-slice: 32 6 25 113 fill; - pointer-events: none; - transition-property: transform, opacity, height; - transition-duration: 0.1s; - transition-timing-function: linear; - z-index: 88; + display: block; + right: 108.8px; /*左移*/ + bottom: 9px; /*上移*/ + width: 12px; + height: 50px; + border-width: 24px 5px 21px 82px; + border-style: solid; + border-color: transparent; + /* border-image-source: url('image/decoration/border_hp.png');*/ + border-image-slice: 32 6 25 113 fill; + pointer-events: none; + transition-property: transform, opacity, height; + transition-duration: 0.1s; + transition-timing-function: linear; + z-index: 88; } /* @@ -502,15 +502,15 @@ .player > .hp-wrap > .hp, #arena.slim_player .player .hp, #window > .player:not(.minskin) .hp { - /*Hp>5(数值)*/ - display: flex; - left: 0; - right: 0; - width: 12px; /*宽度*/ - bottom: -8px; /*上移*/ - font-size: 13px; /*字体大小*/ - line-height: 14px; /*纵向间隔*/ - flex-direction: column; + /*Hp>5(数值)*/ + display: flex; + left: 0; + right: 0; + width: 12px; /*宽度*/ + bottom: -8px; /*上移*/ + font-size: 13px; /*字体大小*/ + line-height: 14px; /*纵向间隔*/ + flex-direction: column; } /* .player>.hp-wrap>.hp.textstyle { @@ -518,606 +518,606 @@ } */ .player > .hp-wrap > .hp.hidden { - opacity: 1 !important; + opacity: 1 !important; } .player > .hp-wrap > .hp > div { - /*Hp<=5(勾玉)*/ - position: static; - margin-top: 1px; /*纵向间距*/ - width: 12px; /*宽度*/ - height: 12px; /*高度*/ - line-height: 100%; - border: none; + /*Hp<=5(勾玉)*/ + position: static; + margin-top: 1px; /*纵向间距*/ + width: 12px; /*宽度*/ + height: 12px; /*高度*/ + line-height: 100%; + border: none; } .hp:not(.text):not(.actcount):not(.treasure) > .lost, .hp:not(.text):not(.actcount):not(.treasure)[data-condition="mid"] > div:not(.lost), .hp:not(.text):not(.actcount):not(.treasure)[data-condition="high"] > div:not(.lost), .hp:not(.text):not(.actcount):not(.treasure)[data-condition="low"] > div:not(.lost) { - transform: none !important; + transform: none !important; } /*武将牌显示*/ .player > .primary-avatar { - left: 17.4px; - top: auto; - bottom: 0px; - width: 86%; - height: 100%; - opacity: 1; - background-size: cover; - background-repeat: no-repeat; - background-position: top; - border-radius: 8px; - transition-property: opacity, transform; + left: 17.4px; + top: auto; + bottom: 0px; + width: 86%; + height: 100%; + opacity: 1; + background-size: cover; + background-repeat: no-repeat; + background-position: top; + border-radius: 8px; + transition-property: opacity, transform; } .player.fullskin2 > .primary-avatar { - width: 43%; - border-radius: 8px 0 0 8px; + width: 43%; + border-radius: 8px 0 0 8px; } .player.bossplayer > .primary-avatar:not(.hp):not(.identity):not(.avatar):not(.framebg) { - display: block !important; + display: block !important; } .player > .deputy-avatar { - left: 56.5%; - top: auto; - bottom: 0; - width: 43%; - height: 100%; - opacity: 1; - background-size: cover; - background-repeat: no-repeat; - background-position: top; - border-radius: 0 8px 8px 0; - transition-property: opacity, transform; + left: 56.5%; + top: auto; + bottom: 0; + width: 43%; + height: 100%; + opacity: 1; + background-size: cover; + background-repeat: no-repeat; + background-position: top; + border-radius: 0 8px 8px 0; + transition-property: opacity, transform; } .player.unseen > .primary-avatar, .player.unseen2 > .deputy-avatar, .player.d-skin > .primary-avatar, .player.d-skin2 > .deputy-avatar { - opacity: 0; + opacity: 0; } #arena:not(.observe) > .player[data-position="0"].unseen > .primary-avatar, #arena:not(.observe) > .player[data-position="0"].unseen2 > .deputy-avatar { - opacity: 0.3; + opacity: 0.3; } #arena[data-outcrop-skin="on"] > .player > .primary-avatar { - height: 183px; - clip-path: url(#solo-clip); /*新增*/ - -webkit-clip-path: url(#solo-clip); + height: 183px; + clip-path: url(#solo-clip); /*新增*/ + -webkit-clip-path: url(#solo-clip); } #arena[data-outcrop-skin="on"] > .player > .deputy-avatar { - height: 183px; - clip-path: url(#duor-clip); /*新增*/ - -webkit-clip-path: url(#duor-clip); + height: 183px; + clip-path: url(#duor-clip); /*新增*/ + -webkit-clip-path: url(#duor-clip); } #arena[data-outcrop-skin="on"] > .player.fullskin2 > .primary-avatar { - clip-path: url(#duol-clip); /*新增*/ - -webkit-clip-path: url(#duol-clip); + clip-path: url(#duol-clip); /*新增*/ + -webkit-clip-path: url(#duol-clip); } /*武将牌动皮显示*/ .player > .dynamic-wrap { - display: block; - position: absolute; - left: 17.4px; - bottom: 0; - width: 86%; - height: 100%; - border-radius: 8px; - background-size: cover; - background-repeat: no-repeat; - pointer-events: none; - z-index: 60; + display: block; + position: absolute; + left: 17.4px; + bottom: 0; + width: 86%; + height: 100%; + border-radius: 8px; + background-size: cover; + background-repeat: no-repeat; + pointer-events: none; + z-index: 60; } .player > .dynamic-wrap > .animation-player { - display: block; - position: absolute; - left: 0; - bottom: 0; - width: 100%; - height: 100%; - border-radius: inherit; - pointer-events: none; - clip-path: inset(0 0 0 0 round 8px); /*新增*/ - -webkit-clip-path: inset(0 0 0 0 round 8px); + display: block; + position: absolute; + left: 0; + bottom: 0; + width: 100%; + height: 100%; + border-radius: inherit; + pointer-events: none; + clip-path: inset(0 0 0 0 round 8px); /*新增*/ + -webkit-clip-path: inset(0 0 0 0 round 8px); } #arena[data-dynamic-skin-outcrop="on"] > .player > .dynamic-wrap > .animation-player { - clip-path: url(#dskin-clip); /*新增*/ - -webkit-clip-path: url(#dskin-clip); - height: 190px; + clip-path: url(#dskin-clip); /*新增*/ + -webkit-clip-path: url(#dskin-clip); + height: 190px; } .player > .dynamic-wrap > .primary-bg, .player > .dynamic-wrap > .deputy-bg { - left: 17.4px; - top: auto; - bottom: 0; - width: 43%; - height: 100%; - opacity: 0; - background-size: cover; - background-repeat: no-repeat; - background-position: top; - border-radius: 8px 0 0 8px; - transition-property: opacity, transform; + left: 17.4px; + top: auto; + bottom: 0; + width: 43%; + height: 100%; + opacity: 0; + background-size: cover; + background-repeat: no-repeat; + background-position: top; + border-radius: 8px 0 0 8px; + transition-property: opacity, transform; } .player > .dynamic-wrap > .deputy-bg { - left: 43%; + left: 43%; } .player.d-skin > .dynamic-wrap > .primary-bg, .player.d-skin2 > .dynamic-wrap > .deputy-bg { - opacity: 1; + opacity: 1; } #arena:not(.observe) > .player[data-position="0"].unseen.d-skin > .dynamic-wrap > .primary-bg, #arena:not(.observe) > .player[data-position="0"].unseen2.d-skin2 > .dynamic-wrap > .deputy-bg { - opacity: 0.3; + opacity: 0.3; } #window:not(*[data-radius_size=""]) .player { - border-radius: 8px; + border-radius: 8px; } /*行动*/ .player > .primary-avatar > .action { - display: block; - position: absolute; - left: 0; - top: auto; - right: 0; - bottom: 0; - width: 100%; - margin: 0; - text-align: center; + display: block; + position: absolute; + left: 0; + top: auto; + right: 0; + bottom: 0; + width: 100%; + margin: 0; + text-align: center; } /*玩家标记显示-灯笼*/ .player > .dui-marks { - display: flex; - flex-direction: column; - left: auto; - top: 1px; - right: -20px; - width: 18px; - height: auto; - padding-bottom: 0; - z-index: 88; - transition-property: opacity, transform, background; + display: flex; + flex-direction: column; + left: auto; + top: 1px; + right: -20px; + width: 18px; + height: auto; + padding-bottom: 0; + z-index: 88; + transition-property: opacity, transform, background; } .player > .dui-marks > .mark { - display: flex; - align-items: center; - align-content: center; - justify-content: center; - position: relative; - margin-top: 0; - margin-left: 0; - margin-right: 0; - margin-bottom: 5px; - width: 18px; - height: auto; - border-radius: 0; - font-family: xinwei, xingkai; - box-shadow: none; - background: none; - overflow: visible; - animation: open 0.5s; + display: flex; + align-items: center; + align-content: center; + justify-content: center; + position: relative; + margin-top: 0; + margin-left: 0; + margin-right: 0; + margin-bottom: 5px; + width: 18px; + height: auto; + border-radius: 0; + font-family: xinwei, xingkai; + box-shadow: none; + background: none; + overflow: visible; + animation: open 0.5s; } .player > .dui-marks > .mark:before, .player > .dui-marks > .mark:after { - display: none; + display: none; } .player > .dui-marks > .mark > .mark-text { - display: flex; - align-items: center; - align-content: center; - justify-content: center; - position: relative; - padding-top: 3px; - padding-bottom: 3px; - width: 17px; - height: auto; - min-height: 16px; - line-height: 16px; - text-align: center; - font-size: 20px; - font-family: xinwei, xingkai; - color: rgb(77, 60, 51); - border-radius: 5px; - background-image: radial-gradient(rgb(255, 255, 200) 0, rgb(255, 255, 120) 50%, rgb(255, 255, 10) 80%, yellow 100%); - box-shadow: 0 0 1px yellow; - text-shadow: none; - animation: swing 1.5s alternate infinite ease-in-out; + display: flex; + align-items: center; + align-content: center; + justify-content: center; + position: relative; + padding-top: 3px; + padding-bottom: 3px; + width: 17px; + height: auto; + min-height: 16px; + line-height: 16px; + text-align: center; + font-size: 20px; + font-family: xinwei, xingkai; + color: rgb(77, 60, 51); + border-radius: 5px; + background-image: radial-gradient(rgb(255, 255, 200) 0, rgb(255, 255, 120) 50%, rgb(255, 255, 10) 80%, yellow 100%); + box-shadow: 0 0 1px yellow; + text-shadow: none; + animation: swing 1.5s alternate infinite ease-in-out; } .player > .dui-marks > .mark > .mark-text.small-text { - font-size: 14px; - line-height: 11px; + font-size: 14px; + line-height: 11px; } .player > .dui-marks > .mark > .mark-text::before { - content: ""; - display: block; - position: absolute; - left: 30%; - top: -1px; - width: 40%; - height: calc(100% + 3px); - border-top: 1px solid black; - border-bottom: 2px solid #ff9900; - box-sizing: border-box; + content: ""; + display: block; + position: absolute; + left: 30%; + top: -1px; + width: 40%; + height: calc(100% + 3px); + border-top: 1px solid black; + border-bottom: 2px solid #ff9900; + box-sizing: border-box; } .player > .dui-marks > .mark > .mark-count { - position: absolute; - left: auto; - top: -2px; - right: -5px; - bottom: auto; - height: 10px; - width: 10px; - line-height: 11px; - font-size: 11px; - font-weight: bold; - text-shadow: none; - text-align: center; - border-radius: 100%; - background: yellow; - box-shadow: 0 0 1px black inset; + position: absolute; + left: auto; + top: -2px; + right: -5px; + bottom: auto; + height: 10px; + width: 10px; + line-height: 11px; + font-size: 11px; + font-weight: bold; + text-shadow: none; + text-align: center; + border-radius: 100%; + background: yellow; + box-shadow: 0 0 1px black inset; } .player > .dui-marks > .mark > .image { - display: none; + display: none; } #arena[data-player-mark-style="red"] > .player > .dui-marks > .mark > .mark-text { - color: yellow; - text-shadow: 0 0 1px black, 0 0 1px black; - box-shadow: 0 0 1px yellow; - background-image: radial-gradient(rgb(100, 255, 100), rgb(255, 120, 0), rgb(255, 0, 0)); + color: yellow; + text-shadow: 0 0 1px black, 0 0 1px black; + box-shadow: 0 0 1px yellow; + background-image: radial-gradient(rgb(100, 255, 100), rgb(255, 120, 0), rgb(255, 0, 0)); } #arena[data-player-mark-style="red"] > .player > .dui-marks > .mark > .mark-count { - color: #c86400; - background: #ffdc00; + color: #c86400; + background: #ffdc00; } /*玩家标记显示-新样式*/ #arena[data-player-mark-style="decade"] > .player > .dui-marks { - left: auto; - top: 30px; - right: -13px; - width: auto; - max-width: 80px; + left: auto; + top: 30px; + right: -13px; + width: auto; + max-width: 80px; } #arena[data-player-mark-style="decade"] > .player > .dui-marks > .mark { - display: flex; - width: 45px; - height: 20px; - white-space: nowrap; - background-image: url("assets/image/player_mark1.png"); - animation: fade-in 0.5s; - margin-bottom: 1px; /*标记纵向间隔*/ + display: flex; + width: 45px; + height: 20px; + white-space: nowrap; + background-image: url("assets/image/player_mark1.png"); + animation: fade-in 0.5s; + margin-bottom: 1px; /*标记纵向间隔*/ } #arena[data-player-mark-style="decade"] > .player > .dui-marks > .mark > .mark-text { - /*标记文本*/ - display: inline; - position: static; - border-radius: 0; - width: auto; - height: auto; - line-height: 18px; /*换行间距*/ - font-size: 14px; /*字体大小*/ - font-family: "xinwei" !important; /*字体样式*/ - color: white; - background-image: none; - box-shadow: none; - animation: none; + /*标记文本*/ + display: inline; + position: static; + border-radius: 0; + width: auto; + height: auto; + line-height: 18px; /*换行间距*/ + font-size: 14px; /*字体大小*/ + font-family: "xinwei" !important; /*字体样式*/ + color: white; + background-image: none; + box-shadow: none; + animation: none; } #arena[data-player-mark-style="decade"] > .player > .dui-marks > .mark > .mark-text::before { - display: none; + display: none; } #arena[data-player-mark-style="decade"] > .player > .dui-marks > .mark > .mark-count { - /*标记数量*/ - display: inline; - position: static; - padding-top: 3px; - padding-bottom: 3px; - width: auto; - height: auto; - line-height: 18px; /*换行间距*/ - border-radius: 0; - font-size: 14px; /*字体大小*/ - font-family: "xinwei" !important; /*字体样式*/ - font-weight: inherit; - color: white; - text-shadow: none; - background: none; - box-shadow: none; + /*标记数量*/ + display: inline; + position: static; + padding-top: 3px; + padding-bottom: 3px; + width: auto; + height: auto; + line-height: 18px; /*换行间距*/ + border-radius: 0; + font-size: 14px; /*字体大小*/ + font-family: "xinwei" !important; /*字体样式*/ + font-weight: inherit; + color: white; + text-shadow: none; + background: none; + box-shadow: none; } .mark-container.marks > .mark { - overflow: visible; + overflow: visible; } .mark-container.marks > .mark > .mark-text { - display: flex; - position: absolute; - justify-content: center; - align-items: center; - top: 0; - left: 0; - width: 100%; - height: 100%; - color: black; - font-size: 20px; + display: flex; + position: absolute; + justify-content: center; + align-items: center; + top: 0; + left: 0; + width: 100%; + height: 100%; + color: black; + font-size: 20px; } .mark-container.marks > .mark > .mark-count { - display: block; - position: absolute; - right: -5px; - width: 15px; - background: white; - border-radius: 4px; + display: block; + position: absolute; + right: -5px; + width: 15px; + background: white; + border-radius: 4px; } /*玩家判断标记显示*/ .player > .judges, #arena > .player:not(.minskin) > .judges { - display: flex; - justify-content: flex-end; - left: auto; - right: -1%; - top: auto; - bottom: -1%; - width: auto; - height: 0; - padding-bottom: 0; - z-index: 88; + display: flex; + justify-content: flex-end; + left: auto; + right: -1%; + top: auto; + bottom: -1%; + width: auto; + height: 0; + padding-bottom: 0; + z-index: 88; } .player[data-position="0"] > .judges, #arena > .player[data-position="0"]:not(.minskin) > .judges { - top: -24px; - bottom: auto; + top: -24px; + bottom: auto; } .player > .judges > .card, #window:not(.nopointer) .player .judges > .card { - position: static; - left: auto; - top: auto; - right: auto; - bottom: auto; - margin: 4px; - width: 16px; - height: 16px; - opacity: 1; - box-shadow: none; - background: none !important; - transform: none; - overflow: visible; + position: static; + left: auto; + top: auto; + right: auto; + bottom: auto; + margin: 4px; + width: 16px; + height: 16px; + opacity: 1; + box-shadow: none; + background: none !important; + transform: none; + overflow: visible; } .player > .judges > .card > .image { - display: none; + display: none; } .player > .judges > .card > .judge-mark { - display: block; - position: relative; - width: 100%; - height: 100%; + display: block; + position: relative; + width: 100%; + height: 100%; } .player > .judges > .card > .judge-mark > .back { - display: block; - position: absolute; - left: 0; - top: 0; - width: 100%; - height: 100%; - background: rgb(240, 220, 160); - transition: none; - transform: rotate(45deg); - border-radius: 4px; - box-shadow: 0 0 1px rgba(0, 0, 0, 0.4), 0 0 8px rgba(0, 0, 0, 0.8); - z-index: -1; + display: block; + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + background: rgb(240, 220, 160); + transition: none; + transform: rotate(45deg); + border-radius: 4px; + box-shadow: 0 0 1px rgba(0, 0, 0, 0.4), 0 0 8px rgba(0, 0, 0, 0.8); + z-index: -1; } .player > .judges > .card > .judge-mark > .back::before { - display: block; - position: absolute; - content: ""; - background: rgb(240, 220, 160); - left: 12%; - top: 12%; - right: 12%; - bottom: 12%; - border-radius: 2px; - box-shadow: 0 0 1px black; - z-index: -1; + display: block; + position: absolute; + content: ""; + background: rgb(240, 220, 160); + left: 12%; + top: 12%; + right: 12%; + bottom: 12%; + border-radius: 2px; + box-shadow: 0 0 1px black; + z-index: -1; } .player > .judges > .card > .judge-mark > div:not(.back) .player > .judges > .card > .judge-mark > div:not(.judge) { - display: none; + display: none; } .player > .judges > .card > .judge-mark > .judge { - display: flex; - align-items: center; - align-content: center; - justify-content: center; - text-align: center; - position: absolute; - left: 0; - top: 0; - width: 100%; - height: 100%; - font-family: xinwei, xingkai; - font-size: 16px; - color: white; - text-shadow: #000 1px 0 0, #000 0 1px 0, #000 -1px 0 0, #000 0 -1px 0, 0 0 8px #000; + display: flex; + align-items: center; + align-content: center; + justify-content: center; + text-align: center; + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + font-family: xinwei, xingkai; + font-size: 16px; + color: white; + text-shadow: #000 1px 0 0, #000 0 1px 0, #000 -1px 0 0, #000 0 -1px 0, 0 0 8px #000; } .player > .judges > .card > .background, .judges > .card.fakejudge.fullskin > .background, .judges > .card.fakejudge.fullborder > .background { - display: none !important; + display: none !important; } /*玩家号位显示*/ .player > .seat { - display: block; - position: absolute; - bottom: -16px; - width: 100%; - line-height: 16px; - color: rgb(5, 5, 5); - font-family: "shousha"; - font-size: 22px; - font-weight: bold; /*字体加粗*/ - text-align: center; - text-shadow: 0 0 2px white, 0 0 1px white; - white-space: nowrap; - z-index: 89; - pointer-events: none; + display: block; + position: absolute; + bottom: -16px; + width: 100%; + line-height: 16px; + color: rgb(5, 5, 5); + font-family: "shousha"; + font-size: 22px; + font-weight: bold; /*字体加粗*/ + text-align: center; + text-shadow: 0 0 2px white, 0 0 1px white; + white-space: nowrap; + z-index: 89; + pointer-events: none; } .player[data-position="0"] > .seat { - bottom: -10px; + bottom: -10px; } .player > .name_seat { - display: none !important; + display: none !important; } /*玩家手牌数显示*/ .player > .card-count { - position: absolute; - top: auto; - right: auto; - left: -8.5px; - bottom: -7px; - line-height: 28px; - height: 28px; - width: 36px; - background: url("image/decoration/card_count7.png"); - background-repeat: no-repeat; - background-size: 100% 100%; - background-position: 0 -1px; - border: none; - box-shadow: none; - font-size: 19px; - font-family: xinwei, xingkai; - color: white; - text-align: center; - text-shadow: none; - border-radius: 0px; - z-index: 89; - transition: transform, opacity; + position: absolute; + top: auto; + right: auto; + left: -8.5px; + bottom: -7px; + line-height: 28px; + height: 28px; + width: 36px; + background: url("image/decoration/card_count7.png"); + background-repeat: no-repeat; + background-size: 100% 100%; + background-position: 0 -1px; + border: none; + box-shadow: none; + font-size: 19px; + font-family: xinwei, xingkai; + color: white; + text-align: center; + text-shadow: none; + border-radius: 0px; + z-index: 89; + transition: transform, opacity; } .player > .card-count::before { - content: attr(data-text); - position: absolute; - left: 0; - top: 0; - height: 100%; - width: 100%; - line-height: 28px; - color: transparent; - -webkit-text-stroke: 2px black; - z-index: -1; + content: attr(data-text); + position: absolute; + left: 0; + top: 0; + height: 100%; + width: 100%; + line-height: 28px; + color: transparent; + -webkit-text-stroke: 2px black; + z-index: -1; } /*玩家身份标记*/ .player > .identity, #arena > .player:not(.minskin) > .identity { - left: auto; - top: -5px; - right: -5px; - width: 31px; - height: 31px; - line-height: 31px; - font-size: 31px; - background-size: 100% 100%; - background-repeat: no-repeat; - background-position: center; - z-index: 89; - transform: none; - transition: none; + left: auto; + top: -5px; + right: -5px; + width: 31px; + height: 31px; + line-height: 31px; + font-size: 31px; + background-size: 100% 100%; + background-repeat: no-repeat; + background-position: center; + z-index: 89; + transform: none; + transition: none; } .player > .identity[data-color="rYe"] { - text-shadow: rgba(255, 120, 0, 1) 0 0 2px, rgba(255, 120, 0, 1) 0 0 5px, rgba(255, 120, 0, 1) 0 0 10px, rgba(255, 120, 0, 1) 0 0 10px, rgba(255, 120, 0, 1) 0 0 20px, rgba(255, 120, 0, 1) 0 0 20px, black 0 0 1px; + text-shadow: rgba(255, 120, 0, 1) 0 0 2px, rgba(255, 120, 0, 1) 0 0 5px, rgba(255, 120, 0, 1) 0 0 10px, rgba(255, 120, 0, 1) 0 0 10px, rgba(255, 120, 0, 1) 0 0 20px, rgba(255, 120, 0, 1) 0 0 20px, black 0 0 1px; } .player > .identity[data-color="bYe"], .player.opposite-camp > .identity { - text-shadow: 0 0 1px black, 0 0 5px blue, 0 0 10px rgb(100, 100, 250), 0 0 20px rgb(100, 100, 250), 0 0 20px white; + text-shadow: 0 0 1px black, 0 0 5px blue, 0 0 10px rgb(100, 100, 250), 0 0 20px rgb(100, 100, 250), 0 0 20px white; } .player > .identity > div:first-child { - position: absolute; - left: 25px; - top: 0; - width: 100%; - height: 100%; - font-size: 31px; - line-height: 31px; - background-size: 100% 100%; - background-repeat: no-repeat; - background-position: center; + position: absolute; + left: 25px; + top: 0; + width: 100%; + height: 100%; + font-size: 31px; + line-height: 31px; + background-size: 100% 100%; + background-repeat: no-repeat; + background-position: center; } .player > .identity.guozhan-mode, #arena > .player:not(.minskin) > .identity.guozhan-mode { - left: -20px; - top: -9px; - width: 37px; - height: 42px; + left: -20px; + top: -9px; + width: 37px; + height: 42px; } /*人物弹出文字*/ .player > .damage { - width: 100%; - text-shadow: none; - transition: none; - z-index: 91; + width: 100%; + text-shadow: none; + transition: none; + z-index: 91; } .player > .damage::before { - content: attr(data-text); - position: absolute; - left: 0; - top: 0; - width: 100%; - color: transparent; - -webkit-text-stroke: 4px #803b02; - z-index: -1; + content: attr(data-text); + position: absolute; + left: 0; + top: 0; + width: 100%; + color: transparent; + -webkit-text-stroke: 4px #803b02; + z-index: -1; } /* .player>.damage[data-nature='metal']::before { */ @@ -1141,195 +1141,195 @@ /*联机用牌时限*/ .player > .timerbar { - display: block; - position: absolute; - left: 0; - top: auto; - bottom: -10px; - width: 100%; - z-index: 88; + display: block; + position: absolute; + left: 0; + top: auto; + bottom: -10px; + width: 100%; + z-index: 88; } .player[data-position="0"] > .timerbar { - top: -15px; - bottom: auto; + top: -15px; + bottom: auto; } .player > .timerbar > div, #arena .timerbar > div { - position: absolute; - left: calc(50% - 50px); - top: auto !important; - right: auto; - width: 100px; - height: 5px; + position: absolute; + left: calc(50% - 50px); + top: auto !important; + right: auto; + width: 100px; + height: 5px; } .player > .timerbar > div:first-child { - box-shadow: 0 0 4px yellow; - background: rgb(100, 0, 0); + box-shadow: 0 0 4px yellow; + background: rgb(100, 0, 0); } /*联机游戏等待中*/ .player.connect > .gaming { - display: block; - position: absolute; - left: 0; - top: calc(50% - 16px); - width: 100%; - height: 32px; - font-size: 32px; - font-family: "xinwei"; - text-align: center; - z-index: 89; + display: block; + position: absolute; + left: 0; + top: calc(50% - 16px); + width: 100%; + height: 32px; + font-size: 32px; + font-family: "xinwei"; + text-align: center; + z-index: 89; } /*玩家死亡变灰*/ .player.dead { - opacity: 1; - filter: none; - -webkit-filter: none; + opacity: 1; + filter: none; + -webkit-filter: none; } .player.dead > div { - filter: grayscale(1); /*新增*/ - -webkit-filter: grayscale(1); + filter: grayscale(1); /*新增*/ + -webkit-filter: grayscale(1); } /*玩家死亡文字*/ .player > .died-identity { - display: flex; - align-items: center; - align-content: center; - justify-content: center; - left: calc(50% - 65px); - top: auto; - bottom: 10px; - width: 150px; - height: 150px; - line-height: 38px; - color: rgb(210, 50, 50); - font-size: 38px; - font-family: xingkai, huangcao, xinwei; - font-display: swap; - text-shadow: 0 0 5px black, 0 0 10px black, 0 0 15px black; - background-size: contain; - background-repeat: no-repeat; - background-position: center; - transform: none; - opacity: 0; + display: flex; + align-items: center; + align-content: center; + justify-content: center; + left: calc(50% - 65px); + top: auto; + bottom: 10px; + width: 150px; + height: 150px; + line-height: 38px; + color: rgb(210, 50, 50); + font-size: 38px; + font-family: xingkai, huangcao, xinwei; + font-display: swap; + text-shadow: 0 0 5px black, 0 0 10px black, 0 0 15px black; + background-size: contain; + background-repeat: no-repeat; + background-position: center; + transform: none; + opacity: 0; } .player.opposite-camp > .died-identity { - color: rgb(50, 50, 210); + color: rgb(50, 50, 210); } .player.dead > .died-identity { - filter: none; - -webkit-filter: none; - animation: fade-in 0.5s forwards; - animation-delay: 0.5s; - -webkit-animation: fade-in 0.5s forwards; - -webkit-animation-delay: 0.5s; + filter: none; + -webkit-filter: none; + animation: fade-in 0.5s forwards; + animation-delay: 0.5s; + -webkit-animation: fade-in 0.5s forwards; + -webkit-animation-delay: 0.5s; } /*玩家获得的技能显示*/ .player > .gain-skill { - position: absolute; - left: 15px; - right: 15px; - max-height: calc(97% - 81px); - bottom: calc(3% + 81px); - color: rgb(255, 255, 200); - font-size: 13px; - text-align: center; - background: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.4) 40%, rgba(0, 0, 0, 0.4) 60%, transparent 100%); - z-index: 87; + position: absolute; + left: 15px; + right: 15px; + max-height: calc(97% - 81px); + bottom: calc(3% + 81px); + color: rgb(255, 255, 200); + font-size: 13px; + text-align: center; + background: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.4) 40%, rgba(0, 0, 0, 0.4) 60%, transparent 100%); + z-index: 87; } #arena.decadeUI[data-gain-skills-visible="off"] > .player > .gain-skill, #arena.decadeUI[data-gain-skills-visible="othersOn"] > .player[data-position="0"] > .gain-skill { - display: none; + display: none; } /*角色翻面背景*/ .player > .turned-over { - position: absolute; - left: 0; - top: 0; - width: 100%; - height: 100%; - opacity: 0; - background-image: url("assets/image/turn_over_mask.png"); - background-size: cover; - pointer-events: none; - z-index: 62; + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + opacity: 0; + background-image: url("assets/image/turn_over_mask.png"); + background-size: cover; + pointer-events: none; + z-index: 62; } .player.turnedover > .turned-over { - opacity: 0.8; + opacity: 0.8; } .turnedover > div { - opacity: initial; + opacity: initial; } /*角色边框*/ .player > .framebg { - z-index: 63; + z-index: 63; } /*身份标记框*/ .player > .identity-mark-box { - display: flex; - position: absolute; - justify-content: center; - flex-wrap: wrap; - top: 20%; - left: 16%; - width: 68%; - height: auto; - z-index: 99; + display: flex; + position: absolute; + justify-content: center; + flex-wrap: wrap; + top: 20%; + left: 16%; + width: 68%; + height: auto; + z-index: 99; } .player > .identity-mark-box > .identity-mark-item { - position: static; - width: auto; - height: auto; - min-width: 20px; - line-height: 20px; - border-style: solid; - border-width: 10px; - border-image-width: 18px; - border-image-slice: 31 31 fill; - border-image-source: url("assets/image/item_bg.png"); - cursor: pointer; - color: rgb(77, 60, 51); - font-family: shousha; - font-weight: bold; - font-size: 20px; - text-shadow: none; - transition: opacity, background, transform 0.3s; + position: static; + width: auto; + height: auto; + min-width: 20px; + line-height: 20px; + border-style: solid; + border-width: 10px; + border-image-width: 18px; + border-image-slice: 31 31 fill; + border-image-source: url("assets/image/item_bg.png"); + cursor: pointer; + color: rgb(77, 60, 51); + font-family: shousha; + font-weight: bold; + font-size: 20px; + text-shadow: none; + transition: opacity, background, transform 0.3s; } .player > .identity-mark-box > .identity-mark-item:active { - transform: scale(0.9); + transform: scale(0.9); } /*说话泡泡框*/ .player > .chat-bubble { - left: 0; - top: 20px; - width: 100%; - height: auto; - font-family: "shousha" !important; - border-style: solid; - border-width: 6px 6px 14px 6px; - border-image-slice: 6 6 14 6 fill; - border-image-source: url("assets/image/chat_bubble.png"); - box-sizing: border-box; - word-break: break-all; - z-index: 99; + left: 0; + top: 20px; + width: 100%; + height: auto; + font-family: "shousha" !important; + border-style: solid; + border-width: 6px 6px 14px 6px; + border-image-slice: 6 6 14 6 fill; + border-image-source: url("assets/image/chat_bubble.png"); + box-sizing: border-box; + word-break: break-all; + z-index: 99; } /* @@ -1348,6 +1348,6 @@ /*玩家tip标记显示*/ .player .tipContainer { - width: 83% !important; - right: 0; + width: 83% !important; + right: 0; } diff --git a/shoushaUI/KGMH/kaiguan.css b/shoushaUI/KGMH/kaiguan.css index 9e7aeab..af7fe3f 100644 --- a/shoushaUI/KGMH/kaiguan.css +++ b/shoushaUI/KGMH/kaiguan.css @@ -1,20 +1,19 @@ /*手杀样式*/ -.config.config.toggle>div{ - background-color: rgba(0,0,0,0); - background-image: url("./pub_btn_check_001_b.png"); - background-position: center center; - background-repeat: no-repeat; - background-size: 100% 100%; - border-radius:0px; - box-shadow: none; +.config.config.toggle > div { + background-color: rgba(0, 0, 0, 0); + background-image: url("./pub_btn_check_001_b.png"); + background-position: center center; + background-repeat: no-repeat; + background-size: 100% 100%; + border-radius: 0px; + box-shadow: none; } -.config.config.toggle.on>div{ - background-image: url("./pub_btn_check_001_a.png"); - box-shadow: none;/*去除透明框*/ - +.config.config.toggle.on > div { + background-image: url("./pub_btn_check_001_a.png"); + box-shadow: none; /*去除透明框*/ } -.config.config.toggle>div>div{ - visibility:hidden; +.config.config.toggle > div > div { + visibility: hidden; } diff --git a/shoushaUI/KGMH/kaiguan_new.css b/shoushaUI/KGMH/kaiguan_new.css index a6435e7..bb06876 100644 --- a/shoushaUI/KGMH/kaiguan_new.css +++ b/shoushaUI/KGMH/kaiguan_new.css @@ -1,24 +1,23 @@ /*十周年样式*/ -.config.config.toggle>div{ - --w: 60px; - --h: calc(var(--w) * 83/158);/*高和长*/ - width: var(--w);/*比例调节*/ - height: var(--h);/*同上*/ - background-color: rgba(0,0,0,0); - background-image: url("./switch_off.png"); - background-position: center center; - background-repeat: no-repeat; - background-size: 100% 100%; - border-radius:0px; - box-shadow: none; +.config.config.toggle > div { + --w: 60px; + --h: calc(var(--w) * 83 / 158); /*高和长*/ + width: var(--w); /*比例调节*/ + height: var(--h); /*同上*/ + background-color: rgba(0, 0, 0, 0); + background-image: url("./switch_off.png"); + background-position: center center; + background-repeat: no-repeat; + background-size: 100% 100%; + border-radius: 0px; + box-shadow: none; } -.config.config.toggle.on>div{ - background-image: url("./switch_on.png"); - box-shadow: none; - +.config.config.toggle.on > div { + background-image: url("./switch_on.png"); + box-shadow: none; } -.config.config.toggle>div>div{ - visibility:hidden; -} \ No newline at end of file +.config.config.toggle > div > div { + visibility: hidden; +} diff --git a/shoushaUI/character/main1.css b/shoushaUI/character/main1.css index 827bb26..a70564e 100644 --- a/shoushaUI/character/main1.css +++ b/shoushaUI/character/main1.css @@ -1,143 +1,135 @@ .button.character, - - #arena > .player.xplayer { - --width: 120px; + --width: 120px; } - - .popup-container > .character-dialog { - top: calc(50% - var(--h) / 2 + var(--bt)); - left: calc(50% - var(--w) / 2 + var(--bl)); + top: calc(50% - var(--h) / 2 + var(--bt)); + left: calc(50% - var(--w) / 2 + var(--bl)); } .character-dialog { - --w: 660px; - --h: 450px; - --bt: calc(var(--h) * 40 / 290); - --bl: calc(var(--w) * 38 / 497); - --bb: calc(var(--h) * 17 / 290); - --dw: calc(var(--w) - 2 * var(--bl)); - --dh: calc(var(--h) - var(--bt) - var(--bb)); - - width: var(--dw); - height: var(--dh); - position: absolute; - box-sizing: border-box; - padding: 10px; - z-index:13; + --w: 660px; + --h: 450px; + --bt: calc(var(--h) * 40 / 290); + --bl: calc(var(--w) * 38 / 497); + --bb: calc(var(--h) * 17 / 290); + --dw: calc(var(--w) - 2 * var(--bl)); + --dh: calc(var(--h) - var(--bt) - var(--bb)); + + width: var(--dw); + height: var(--dh); + position: absolute; + box-sizing: border-box; + padding: 10px; + z-index: 13; } .character-dialog.dialog2 { - --bt: calc(var(--h) * 10 / 280); - --bl: calc(var(--w) * 12 / 287); - --bb: calc(var(--h) * 20 / 280); + --bt: calc(var(--h) * 10 / 280); + --bl: calc(var(--w) * 12 / 287); + --bb: calc(var(--h) * 20 / 280); } .character-dialog.popped { - animation: dialog_start2 0.3s; - -webkit-animation: dialog_start2 0.3s; + animation: dialog_start2 0.3s; + -webkit-animation: dialog_start2 0.3s; } .character-dialog::before { - content: ''; - top: calc(0% - var(--bt)); - left: calc(0% - var(--bl)); - width: var(--w); - height: var(--h); - position: absolute; - background-image: url("./images/dialog2.png"); - background-size: 100% 100%; - + content: ""; + top: calc(0% - var(--bt)); + left: calc(0% - var(--bl)); + width: var(--w); + height: var(--h); + position: absolute; + background-image: url("./images/dialog2.png"); + background-size: 100% 100%; } .character-dialog.dialog2::before { - background-image: url("./images/dialog2.png"); - + background-image: url("./images/dialog2.png"); } .character-dialog > div { - top: 0; - height: 100%; - position: absolute; -} - -.character-dialog > div.biankuang{ - width: 21%; - height: 40%; - top: 47%; - left: 3.6%; - background-size: 100% 100%; - z-index: 68; - position: relative; -} - -.character-dialog > div.biankuang2{ - width: 21%; - height: 40%; - top: 47%; - left: 3.6%; - background-size: 100% 100%; - z-index: 68; - position: relative; -} - - - -.xing{ - position: relative; - width: 15px; - height: 24%; - left: 4.5%; - z-index: 99; - display: inline-flex; - flex-direction: column-reverse; -} -.xing > .item{ - position: relative; - background: url("./images/xing.png"); - background-size: cover; - width: 15px; - height: 15px; - left: 60%; - top: -16%; - z-index: 99; -} - -.xing2{ - position: relative; - width: 15px; - height: 24%; - left: 4.5%; - z-index: 99; - display: inline-flex; - flex-direction: column-reverse; -} -.xing2 > .item{ - position: relative; - background: url("./images/xing.png"); - background-size: cover; - width: 15px; - height: 15px; - left: 60%; - top: -16%; - z-index: 99; + top: 0; + height: 100%; + position: absolute; +} + +.character-dialog > div.biankuang { + width: 21%; + height: 40%; + top: 47%; + left: 3.6%; + background-size: 100% 100%; + z-index: 68; + position: relative; +} + +.character-dialog > div.biankuang2 { + width: 21%; + height: 40%; + top: 47%; + left: 3.6%; + background-size: 100% 100%; + z-index: 68; + position: relative; +} + +.xing { + position: relative; + width: 15px; + height: 24%; + left: 4.5%; + z-index: 99; + display: inline-flex; + flex-direction: column-reverse; +} +.xing > .item { + position: relative; + background: url("./images/xing.png"); + background-size: cover; + width: 15px; + height: 15px; + left: 60%; + top: -16%; + z-index: 99; +} + +.xing2 { + position: relative; + width: 15px; + height: 24%; + left: 4.5%; + z-index: 99; + display: inline-flex; + flex-direction: column-reverse; +} +.xing2 > .item { + position: relative; + background: url("./images/xing.png"); + background-size: cover; + width: 15px; + height: 15px; + left: 60%; + top: -16%; + z-index: 99; } -.bigdialog{ - position: relative; - background: url("./images/bigdialog.png"); - background-size: 100% 100%; - width: 80%; - height: 100%; - left: 10%; - top: 0; - z-index: 99; +.bigdialog { + position: relative; + background: url("./images/bigdialog.png"); + background-size: 100% 100%; + width: 80%; + height: 100%; + left: 10%; + top: 0; + z-index: 99; } .shanchang1 { - left: 30.5%; - top: 42.6%; - height: 30.4%; - width: 13.5%; - opacity: 1; + left: 30.5%; + top: 42.6%; + height: 30.4%; + width: 13.5%; + opacity: 1; background-size: cover; background-repeat: no-repeat; background-position: top; @@ -147,11 +139,11 @@ } .shanchang2 { - left: 45%; - top: 42.6%; - height: 30.4%; - width: 13.5%; - opacity: 1; + left: 45%; + top: 42.6%; + height: 30.4%; + width: 13.5%; + opacity: 1; background-size: cover; background-repeat: no-repeat; background-position: top; @@ -161,11 +153,11 @@ } .shanchang3 { - left: 59.5%; - top: 42.6%; - height: 30.4%; - width: 13.5%; - opacity: 1; + left: 59.5%; + top: 42.6%; + height: 30.4%; + width: 13.5%; + opacity: 1; background-size: cover; background-repeat: no-repeat; background-position: top; @@ -175,11 +167,11 @@ } .shanchang4 { - left: 74%; - top: 42.6%; - height: 30.4%; - width: 13.5%; - opacity: 1; + left: 74%; + top: 42.6%; + height: 30.4%; + width: 13.5%; + opacity: 1; background-size: cover; background-repeat: no-repeat; background-position: top; @@ -189,34 +181,34 @@ } .useless { - left: 40%; - top: 80%; - height: 10%; - width: 15%; - background-size: 100% 100%; - z-index: 69; + left: 40%; + top: 80%; + height: 10%; + width: 15%; + background-size: 100% 100%; + z-index: 69; } .useless2 { - left: 65%; - top: 80%; - height: 10%; - width: 15%; - background-size: 100% 100%; - z-index: 69; + left: 65%; + top: 80%; + height: 10%; + width: 15%; + background-size: 100% 100%; + z-index: 69; } /*玩家头像*/ .minixingxiang { - /*left:calc(100% - 1000px); + /*left:calc(100% - 1000px); top: auto; bottom: 53%; width: 11%; height: 32%;*/ opacity: 1; left: 9.7%; - top: 15%; - height: 32%; - width: 16%; + top: 15%; + height: 32%; + width: 16%; /*position:fixed;*/ background-size: cover; background-repeat: no-repeat; @@ -227,121 +219,121 @@ } .xingbie { - left: 9.5%; - top: 48%; - height: 5%; - width: 3.5%; - background-size: 100% 100%; - z-index: 69; + left: 9.5%; + top: 48%; + height: 5%; + width: 3.5%; + background-size: 100% 100%; + z-index: 69; } .jingji { - left: 9.7%; - top: 57%; - height: 32%; - width: 16%; - background-size: 100% 100%; - z-index: 69; + left: 9.7%; + top: 57%; + height: 32%; + width: 16%; + background-size: 100% 100%; + z-index: 69; } /*大资料页名称*/ -.wanjiaming{ - font-size: 22px; - top: 49%; - left: 13%; - color: white; - text-align: left; - -webkit-text-stroke: 0.15px rgba(0,0,0,1); - text-shadow: 0.1px 0.1px 0.25px rgba(0, 0, 0, 0.1); - z-index: 99; +.wanjiaming { + font-size: 22px; + top: 49%; + left: 13%; + color: white; + text-align: left; + -webkit-text-stroke: 0.15px rgba(0, 0, 0, 1); + text-shadow: 0.1px 0.1px 0.25px rgba(0, 0, 0, 0.1); + z-index: 99; } /*分享*/ -.fenxiang{ - font-size: 18px; - top: 82.5%; - left: 45%; - color: white; - text-align: center; - -webkit-text-stroke: 0.15px rgba(0,0,0,1); - text-shadow: 0.1px 0.1px 0.25px rgba(0, 0, 0, 0.1); - z-index: 99; +.fenxiang { + font-size: 18px; + top: 82.5%; + left: 45%; + color: white; + text-align: center; + -webkit-text-stroke: 0.15px rgba(0, 0, 0, 1); + text-shadow: 0.1px 0.1px 0.25px rgba(0, 0, 0, 0.1); + z-index: 99; } /*展示*/ -.zhanshi{ - font-size: 18px; - top: 82.9%; - left: 66.6%; - color: white; - text-align: center; - -webkit-text-stroke: 0.15px rgba(0,0,0,1); - text-shadow: 0.1px 0.1px 0.25px rgba(0, 0, 0, 0.1); - z-index: 99; +.zhanshi { + font-size: 18px; + top: 82.9%; + left: 66.6%; + color: white; + text-align: center; + -webkit-text-stroke: 0.15px rgba(0, 0, 0, 1); + text-shadow: 0.1px 0.1px 0.25px rgba(0, 0, 0, 0.1); + z-index: 99; } /*公会*/ -.gonghui{ - font-size: 15px; - top: 54%; - left: 10%; - color: orange; - text-align: left; - -webkit-text-stroke: 0.15px rgba(0,0,0,1); - text-shadow: 0.1px 0.1px 0.25px rgba(0, 0, 0, 0.1); - z-index: 99; +.gonghui { + font-size: 15px; + top: 54%; + left: 10%; + color: orange; + text-align: left; + -webkit-text-stroke: 0.15px rgba(0, 0, 0, 1); + text-shadow: 0.1px 0.1px 0.25px rgba(0, 0, 0, 0.1); + z-index: 99; } /*鲜花*/ -.xianhua{ - font-size: 10px !important; - top: 90.5%; - left: 13%; - color: white; - text-align: left; - -webkit-text-stroke: 0.15px rgba(0,0,0,1); - text-shadow: 0.1px 0.1px 0.25px rgba(0, 0, 0, 0.1); - z-index: 99; +.xianhua { + font-size: 10px !important; + top: 90.5%; + left: 13%; + color: white; + text-align: left; + -webkit-text-stroke: 0.15px rgba(0, 0, 0, 1); + text-shadow: 0.1px 0.1px 0.25px rgba(0, 0, 0, 0.1); + z-index: 99; } /*鸡蛋*/ -.jidan{ - font-size: 10px; - top: 90.5%; - left: 22.5%; - color: white; - text-align: left; - -webkit-text-stroke: 0.15px rgba(0,0,0,1); - text-shadow: 0.1px 0.1px 0.25px rgba(0, 0, 0, 0.1); - z-index: 99; +.jidan { + font-size: 10px; + top: 90.5%; + left: 22.5%; + color: white; + text-align: left; + -webkit-text-stroke: 0.15px rgba(0, 0, 0, 1); + text-shadow: 0.1px 0.1px 0.25px rgba(0, 0, 0, 0.1); + z-index: 99; } /*武将名字*/ -.character-dialog > div.biankuangname{ - position: absolute; - width: 15px; - left: 5.8%; - top: 52%; - font-size: 14px; - font-family: shousha; - z-index: 99; +.character-dialog > div.biankuangname { + position: absolute; + width: 15px; + left: 5.8%; + top: 52%; + font-size: 14px; + font-family: shousha; + z-index: 99; } -.character-dialog > div.biankuangname2{ - position: absolute; - width: 15px; - left: 5.8%; - top: 52%; - font-size: 1.8vw; - font-family: shousha; - z-index: 99; +.character-dialog > div.biankuangname2 { + position: absolute; + width: 15px; + left: 5.8%; + top: 52%; + font-size: 1.8vw; + font-family: shousha; + z-index: 99; } -.character-dialog > div.dengji{ - z-index: 68; +.character-dialog > div.dengji { + z-index: 68; } /*武将牌露头*/ .character-dialog > div.left { - left: 50px; + left: 50px; top: auto; bottom: 15.4%; width: 16.5%; @@ -358,7 +350,7 @@ /*武将牌不露头*/ .character-dialog > div.left2 { - left: 50px; + left: 50px; top: auto; bottom: 15.4%; width: 16.5%; @@ -370,8 +362,8 @@ border-radius: 7px; transition-property: opacity, transform; z-index: 69; - - /*left: 8.7%; + + /*left: 8.7%; top: 48%; height: 36.8%; width: 16.5%; @@ -382,71 +374,71 @@ } .character-dialog > div.right { - left: 50%; - width: 50%; - box-sizing: border-box; - padding: 20px 15px 20px 0; - overflow: auto; + left: 50%; + width: 50%; + box-sizing: border-box; + padding: 20px 15px 20px 0; + overflow: auto; } .character-dialog.single > div.right { - left: calc(50% - 105px); - width: calc(50% + 105px); + left: calc(50% - 105px); + width: calc(50% + 105px); } .character-dialog > div.left > div { - top: 65%; - right: 30px; - width: 210px; - text-align: center; - transform: translateY(-50%); - position: absolute; - white-space: nowrap; + top: 65%; + right: 30px; + width: 210px; + text-align: center; + transform: translateY(-50%); + position: absolute; + white-space: nowrap; } .character-dialog.single > div.left > div { - width: 105px; - position: absolute; + width: 105px; + position: absolute; } .character-dialog > div.right > div { - width: 100%; - height: 60%; - overflow: auto; + width: 100%; + height: 60%; + overflow: auto; } .character-dialog > div.right div { - position: relative; - bottom: -35%; + position: relative; + bottom: -35%; } .character-dialog > div.right .xcaption { - width: 100%; - bottom: 0%; - color:#C8A82C;/*技能名称*/ - text-align: center; - font-size: 18px; - font-weight: bold; - padding: 10px 0; - font-family: 'ATLL'; + width: 100%; + bottom: 0%; + color: #c8a82c; /*技能名称*/ + text-align: center; + font-size: 18px; + font-weight: bold; + padding: 10px 0; + font-family: "ATLL"; } .character-dialog > div.right .xskill { - width: 100%; - bottom: 0%; + width: 100%; + bottom: 0%; } .character-dialog > div.right .xskill > div { - display: inline; - color: #4B3B30;/*技能文描述颜色*/ - text-shadow: none; - font-size: 16px; - font-weight:bold; - font-family: 'FZLBJW'; + display: inline; + color: #4b3b30; /*技能文描述颜色*/ + text-shadow: none; + font-size: 16px; + font-weight: bold; + font-family: "FZLBJW"; } .character-dialog > div.right .xskill > div[data-color] { - color: #F0DB1E; + color: #f0db1e; } .character-dialog > div.right .xskill > div[data-color="red"] { - color: #F0DB1E; + color: #f0db1e; } .character-dialog > div.right .xskill > div[data-color="black"] { - color: #F0DB1E; + color: #f0db1e; } .character-dialog > div.right .xskill + .xskill { - margin-top: 15px; + margin-top: 15px; } diff --git a/shoushaUI/character/main1.js b/shoushaUI/character/main1.js index bf1103d..10aecd3 100644 --- a/shoushaUI/character/main1.js +++ b/shoushaUI/character/main1.js @@ -1,758 +1,415 @@ app.import(function (lib, game, ui, get, ai, _status, app) { - var plugin = { - name: "character", - filter: function () { - return !["chess", "tafang"].includes(get.mode()); - }, - content: function (next) {}, - precontent: function () { - app.reWriteFunction(lib, { - setIntro: [ - function (args, node) { - if (get.itemtype(node) === "player") { - if (lib.config.touchscreen) { - lib.setLongPress(node, plugin.click.playerIntro); - } else { - if (lib.config.right_info) { - node.oncontextmenu = plugin.click.playerIntro; - } - } - return node; - } - }, - ], - }); - }, + var plugin = { + name: "character", + filter: function () { + return !["chess", "tafang"].includes(get.mode()); + }, + content: function (next) {}, + precontent: function () { + app.reWriteFunction(lib, { + setIntro: [ + function (args, node) { + if (get.itemtype(node) === "player") { + if (lib.config.touchscreen) { + lib.setLongPress(node, plugin.click.playerIntro); + } else { + if (lib.config.right_info) { + node.oncontextmenu = plugin.click.playerIntro; + } + } + return node; + } + }, + ], + }); + }, - click: { - identity: function (e) { - e.stopPropagation(); - var player = this.parentNode; - if (!game.getIdentityList) return; - if (player.node.guessDialog) { - player.node.guessDialog.classList.toggle("hidden"); - } else { - var list = game.getIdentityList(player); - if (!list) return; - var guessDialog = ui.create.div(".guessDialog", player); - var container = ui.create.div(guessDialog); + click: { + identity: function (e) { + e.stopPropagation(); + var player = this.parentNode; + if (!game.getIdentityList) return; + if (player.node.guessDialog) { + player.node.guessDialog.classList.toggle("hidden"); + } else { + var list = game.getIdentityList(player); + if (!list) return; + var guessDialog = ui.create.div(".guessDialog", player); + var container = ui.create.div(guessDialog); - lib.setScroll(guessDialog); - player.node.guessDialog = guessDialog; - } - }, - playerIntro: function (e) { - e.stopPropagation(); + lib.setScroll(guessDialog); + player.node.guessDialog = guessDialog; + } + }, + playerIntro: function (e) { + e.stopPropagation(); - if (plugin.playerDialog) { - return plugin.playerDialog.show(this); - } + if (plugin.playerDialog) { + return plugin.playerDialog.show(this); + } - var container = ui.create.div( - ".popup-container.hidden", - ui.window, - function (e) { - if (e.target === container) { - container.hide(); - game.resume2(); - } - } - ); - var dialog = ui.create.div(".character-dialog.popped", container); - var xinxi = ui.create.div(".xinxi", dialog); - var rightPane = ui.create.div(".right", dialog); + var container = ui.create.div(".popup-container.hidden", ui.window, function (e) { + if (e.target === container) { + container.hide(); + game.resume2(); + } + }); + var dialog = ui.create.div(".character-dialog.popped", container); + var xinxi = ui.create.div(".xinxi", dialog); + var rightPane = ui.create.div(".right", dialog); - var xing = ui.create.div(".xing", dialog); - var biankuangname = ui.create.div(".biankuangname", dialog); - var mingcheng = ui.create.div(".mingcheng", dialog); + var xing = ui.create.div(".xing", dialog); + var biankuangname = ui.create.div(".biankuangname", dialog); + var mingcheng = ui.create.div(".mingcheng", dialog); - var dengji = ui.create.div(".dengji", dialog); + var dengji = ui.create.div(".dengji", dialog); - //胜率 - var shenglv = ui.create.div(".shenglv", dialog); + //胜率 + var shenglv = ui.create.div(".shenglv", dialog); - //逃率 - var taolv = ui.create.div(".taolv", dialog); + //逃率 + var taolv = ui.create.div(".taolv", dialog); - var createButton = function (name, parent) { - if (!name) return; - if (!lib.character[name]) return; - var button = ui.create.button(name, "character", parent, true); - }; + var createButton = function (name, parent) { + if (!name) return; + if (!lib.character[name]) return; + var button = ui.create.button(name, "character", parent, true); + }; - container.show = function (player) { - var name = player.name1 || player.name; - var name2 = player.name2; - if (player.classList.contains("unseen") && player !== game.me) { - name = "unknown"; - } - if (player.classList.contains("unseen2") && player !== game.me) { - name2 = "unknown"; - } + container.show = function (player) { + var name = player.name1 || player.name; + var name2 = player.name2; + if (player.classList.contains("unseen") && player !== game.me) { + name = "unknown"; + } + if (player.classList.contains("unseen2") && player !== game.me) { + name2 = "unknown"; + } - //var url = extensionPath + 'character/images/name2_' + value + '.png'; - if (lib.config.extension_十周年UI_ZLLT == true) { - var biankuang = ui.create.div(".biankuang", dialog); - } else { - var biankuang = ui.create.div(".biankuang2", dialog); - } + //var url = extensionPath + 'character/images/name2_' + value + '.png'; + if (lib.config.extension_十周年UI_ZLLT == true) { + var biankuang = ui.create.div(".biankuang", dialog); + } else { + var biankuang = ui.create.div(".biankuang2", dialog); + } - biankuang.setBackgroundImage( - `extension/十周年UI/shoushaUI/character/images/name2_${player.group}.png` - ); + biankuang.setBackgroundImage(`extension/十周年UI/shoushaUI/character/images/name2_${player.group}.png`); - var num = 1, - rarity = game.getRarity(player.name); - switch (rarity) { - case "legend": - num = 5; - break; - case "epic": - num = 4; - break; - case "rare": - num = 3; - break; - case "junk": - num = 2; - break; - default: - num = 1; - break; - } - for (var numKey = 0; numKey < num; numKey++) - ui.create.div(".item", xing); + var num = 1, + rarity = game.getRarity(player.name); + switch (rarity) { + case "legend": + num = 5; + break; + case "epic": + num = 4; + break; + case "rare": + num = 3; + break; + case "junk": + num = 2; + break; + default: + num = 1; + break; + } + for (var numKey = 0; numKey < num; numKey++) ui.create.div(".item", xing); - //角色名-资料页 - biankuangname.innerText = get.translation(player.name); + //角色名-资料页 + biankuangname.innerText = get.translation(player.name); - mingcheng.innerText = get.translation(player.name); - mingcheng.style.cssText = - "display: block;position: absolute;top: -15px;right: 423px;font-size:20px;color:#4B3B30;text-shadow:none;font-weight:bold;font-family: 'FZLBJW';z-index:68"; + mingcheng.innerText = get.translation(player.name); + mingcheng.style.cssText = "display: block;position: absolute;top: -15px;right: 423px;font-size:20px;color:#4B3B30;text-shadow:none;font-weight:bold;font-family: 'FZLBJW';z-index:68"; - //角色等级 - dengji.innerText = num = Math.floor( - Math.random() * (200 - 1 + 1) + 1 - ); - dengji.style.cssText = - "display: block;position: absolute;top: -13px;right: 325px;font-size:21px;font-family:'shousha';color: white; !important; z-index:68"; + //角色等级 + dengji.innerText = num = Math.floor(Math.random() * (200 - 1 + 1) + 1); + dengji.style.cssText = "display: block;position: absolute;top: -13px;right: 325px;font-size:21px;font-family:'shousha';color: white; !important; z-index:68"; - shenglv.innerText = - (num = Math.floor(Math.random() * (99 - 0 + 1) + 0)) + - "." + - (num = Math.floor(Math.random() * (99 - 0 + 1) + 0)) + - "%"; - shenglv.style.cssText = - "display: block;position: absolute;top: 68px;right: 383px;font-size:28px;font-family:'shousha';color: white; webkit-text-stroke:0.5px black !important; z-index:68"; + shenglv.innerText = (num = Math.floor(Math.random() * (99 - 0 + 1) + 0)) + "." + (num = Math.floor(Math.random() * (99 - 0 + 1) + 0)) + "%"; + shenglv.style.cssText = "display: block;position: absolute;top: 68px;right: 383px;font-size:28px;font-family:'shousha';color: white; webkit-text-stroke:0.5px black !important; z-index:68"; - taolv.innerText = - (num = Math.floor(Math.random() * (99 - 0 + 1) + 0)) + - "." + - (num = Math.floor(Math.random() * (99 - 0 + 1) + 0)) + - "%"; - taolv.style.cssText = - "display: block;position: absolute;top: 68px;right: 170px;font-size:28px;font-family:'shousha';color: white; webkit-text-stroke:0.5px black !important; z-index:68"; + taolv.innerText = (num = Math.floor(Math.random() * (99 - 0 + 1) + 0)) + "." + (num = Math.floor(Math.random() * (99 - 0 + 1) + 0)) + "%"; + taolv.style.cssText = "display: block;position: absolute;top: 68px;right: 170px;font-size:28px;font-family:'shousha';color: white; webkit-text-stroke:0.5px black !important; z-index:68"; - var shanchang = get.config("recentCharacter"); - if (lib.config.extension_十周年UI_ZLLT == true) { - var leftPane = ui.create.div(".left", dialog); - } else { - var leftPane = ui.create.div(".left2", dialog); - } + var shanchang = get.config("recentCharacter"); + if (lib.config.extension_十周年UI_ZLLT == true) { + var leftPane = ui.create.div(".left", dialog); + } else { + var leftPane = ui.create.div(".left2", dialog); + } - leftPane.style.backgroundImage = - player.node.avatar.style.backgroundImage; - createButton(name, leftPane.firstChild); - createButton(name2, leftPane.firstChild); - dialog.classList.add("single"); + leftPane.style.backgroundImage = player.node.avatar.style.backgroundImage; + createButton(name, leftPane.firstChild); + createButton(name2, leftPane.firstChild); + dialog.classList.add("single"); - dialog.onclick = function () { - var popuperContainer = ui.create.div( - ".popup-container", - { background: "rgb(0,0,0,0)" }, - ui.window - ); - popuperContainer.addEventListener("click", (event) => { - event.stopPropagation(); - popuperContainer.delete(200); - }); - var bigdialog = ui.create.div(".bigdialog", popuperContainer); + dialog.onclick = function () { + var popuperContainer = ui.create.div(".popup-container", { background: "rgb(0,0,0,0)" }, ui.window); + popuperContainer.addEventListener("click", event => { + event.stopPropagation(); + popuperContainer.delete(200); + }); + var bigdialog = ui.create.div(".bigdialog", popuperContainer); - var kuangkuang1 = ui.create.div(".kuangkuang1", bigdialog); - var kuangkuang2 = ui.create.div(".kuangkuang2", bigdialog); - var kuangkuang3 = ui.create.div(".kuangkuang3", bigdialog); - var kuangkuang4 = ui.create.div(".kuangkuang4", bigdialog); + var kuangkuang1 = ui.create.div(".kuangkuang1", bigdialog); + var kuangkuang2 = ui.create.div(".kuangkuang2", bigdialog); + var kuangkuang3 = ui.create.div(".kuangkuang3", bigdialog); + var kuangkuang4 = ui.create.div(".kuangkuang4", bigdialog); - var shanchang1 = ui.create.div(".shanchang1", bigdialog); - var shanchang2 = ui.create.div(".shanchang2", bigdialog); - var shanchang3 = ui.create.div(".shanchang3", bigdialog); - var shanchang4 = ui.create.div(".shanchang4", bigdialog); - var minixingxiang = ui.create.div(".minixingxiang", bigdialog); - var jingji = ui.create.div(".jingji", bigdialog); - var xingbie = ui.create.div(".xingbie", bigdialog); - var useless = ui.create.div(".useless", bigdialog); - var useless2 = ui.create.div(".useless2", bigdialog); - var wanjiaming = ui.create.div( - ".wanjiaming", - bigdialog, - player === game.me - ? lib.config.connect_nickname - : get.translation( - (innerText = num = - [ - "氪金抽66", - "卡宝真可爱", - "蒸蒸日上", - "√卡视我如父", - "麒麟弓免疫枸杞", - "坏可宣(老坏批)", - "六千大败而归", - "开局酒古锭", - "遇事不决刷个乐", - "见面两刀喜相逢", - "改名出66", - "时代的六万五", - "韩旭", - "司马长衫", - "ogx", - "狗卡不如无名杀", - "王八万", - "一拳兀突骨", - "开局送神将", - "丈八二桃", - "装甲车车", - "等我喝口酒", - "Samuri", - "马", - "Log-Frunki", - "aoe银钱豹", - "没有丈八就托管", - "无中yyds", - "给咸鱼鸽鸽打call", - "小零二哟~", - "长歌最帅了", - "大猫有侠者之风", - "布灵布灵❤️", - "我爱~摸鱼🐠~", - "小寻寻真棒", - "呲牙哥超爱笑", - "是俺杀哒", - "阿七阿七", - "祖安·灰晖是龙王", - "吃颗桃桃好遗计", - "好可宣✓良民", - "藏海表锅好", - "金乎?木乎?水乎!!", - "无法也无天", - "西风不识相", - "神秘喵酱", - "星城在干嘛?", - "子鱼今天摸鱼了吗?", - "阳光苞里有阳光", - "诗笺的小裙裙", - "轮回中的消逝", - "乱踢jb的云野", - "小一是不是...是不是...", - "美羊羊爱瑟瑟", - "化梦的星辰", - "杰哥带你登dua郎", - "世中君子人", - "叹年华未央", - "短咕咕", - "洛天依?!", - "黄老板是好人~", - "来点瑟瑟文和", - "鲨鱼配辣椒", - "萝卜~好萝卜", - "废城君", - "E佬细节鬼才", - "感到棘手要怀念谁?", - "半价小薯片", - "JK欧拉欧拉欧拉", - "新年快乐", - "乔姐带你飞", - "12345678?", - "缘之空", - "小小恐龙", - "教主:杀我!", - "才思泉涌的司马", - "我是好人", - "喜怒无常的大宝", - "黄赌毒", - "阴间杀~秋", - "敢于劈瓜的关羽", - "暮暮子", - ].randomGet(1)) - ) - ); - var gonghui = ui.create.div( - ".gonghui", - bigdialog, - get.translation( - (innerText = - "(" + - (num = [ - "无名杀会员", - "手机三国杀会员", - "三国杀ol会员", - "三国杀十周年会员", - "怒焰三国杀会员", - "欢乐三国杀会员", - "阵面对决会员", - ]).randomGet(1) + - ")") - ) - ); - var xianhua = ui.create.div( - ".xianhua", - bigdialog, - get.translation( - (innerText = - "鲜花" + - (num = Math.floor(Math.random() * (999 - 1 + 1) + 1))) - ) - ); - var jidan = ui.create.div( - ".jidan", - bigdialog, - get.translation( - (innerText = - "鸡蛋" + - (num = Math.floor(Math.random() * (999 - 1 + 1) + 1))) - ) - ); - var fenxiang = ui.create.div( - ".fenxiang", - bigdialog, - get.translation((innerText = "分享")) - ); - var zhanshi = ui.create.div( - ".zhanshi", - bigdialog, - get.translation((innerText = "展示(诏令-1)")) - ); + var shanchang1 = ui.create.div(".shanchang1", bigdialog); + var shanchang2 = ui.create.div(".shanchang2", bigdialog); + var shanchang3 = ui.create.div(".shanchang3", bigdialog); + var shanchang4 = ui.create.div(".shanchang4", bigdialog); + var minixingxiang = ui.create.div(".minixingxiang", bigdialog); + var jingji = ui.create.div(".jingji", bigdialog); + var xingbie = ui.create.div(".xingbie", bigdialog); + var useless = ui.create.div(".useless", bigdialog); + var useless2 = ui.create.div(".useless2", bigdialog); + var wanjiaming = ui.create.div( + ".wanjiaming", + bigdialog, + player === game.me + ? lib.config.connect_nickname + : get.translation( + (innerText = num = + [ + "氪金抽66", + "卡宝真可爱", + "蒸蒸日上", + "√卡视我如父", + "麒麟弓免疫枸杞", + "坏可宣(老坏批)", + "六千大败而归", + "开局酒古锭", + "遇事不决刷个乐", + "见面两刀喜相逢", + "改名出66", + "时代的六万五", + "韩旭", + "司马长衫", + "ogx", + "狗卡不如无名杀", + "王八万", + "一拳兀突骨", + "开局送神将", + "丈八二桃", + "装甲车车", + "等我喝口酒", + "Samuri", + "马", + "Log-Frunki", + "aoe银钱豹", + "没有丈八就托管", + "无中yyds", + "给咸鱼鸽鸽打call", + "小零二哟~", + "长歌最帅了", + "大猫有侠者之风", + "布灵布灵❤️", + "我爱~摸鱼🐠~", + "小寻寻真棒", + "呲牙哥超爱笑", + "是俺杀哒", + "阿七阿七", + "祖安·灰晖是龙王", + "吃颗桃桃好遗计", + "好可宣✓良民", + "藏海表锅好", + "金乎?木乎?水乎!!", + "无法也无天", + "西风不识相", + "神秘喵酱", + "星城在干嘛?", + "子鱼今天摸鱼了吗?", + "阳光苞里有阳光", + "诗笺的小裙裙", + "轮回中的消逝", + "乱踢jb的云野", + "小一是不是...是不是...", + "美羊羊爱瑟瑟", + "化梦的星辰", + "杰哥带你登dua郎", + "世中君子人", + "叹年华未央", + "短咕咕", + "洛天依?!", + "黄老板是好人~", + "来点瑟瑟文和", + "鲨鱼配辣椒", + "萝卜~好萝卜", + "废城君", + "E佬细节鬼才", + "感到棘手要怀念谁?", + "半价小薯片", + "JK欧拉欧拉欧拉", + "新年快乐", + "乔姐带你飞", + "12345678?", + "缘之空", + "小小恐龙", + "教主:杀我!", + "才思泉涌的司马", + "我是好人", + "喜怒无常的大宝", + "黄赌毒", + "阴间杀~秋", + "敢于劈瓜的关羽", + "暮暮子", + ].randomGet(1)) + ) + ); + var gonghui = ui.create.div(".gonghui", bigdialog, get.translation((innerText = "(" + (num = ["无名杀会员", "手机三国杀会员", "三国杀ol会员", "三国杀十周年会员", "怒焰三国杀会员", "欢乐三国杀会员", "阵面对决会员"]).randomGet(1) + ")"))); + var xianhua = ui.create.div(".xianhua", bigdialog, get.translation((innerText = "鲜花" + (num = Math.floor(Math.random() * (999 - 1 + 1) + 1))))); + var jidan = ui.create.div(".jidan", bigdialog, get.translation((innerText = "鸡蛋" + (num = Math.floor(Math.random() * (999 - 1 + 1) + 1))))); + var fenxiang = ui.create.div(".fenxiang", bigdialog, get.translation((innerText = "分享"))); + var zhanshi = ui.create.div(".zhanshi", bigdialog, get.translation((innerText = "展示(诏令-1)"))); - //var shanchang = get.config('recentCharacter'); - var shanchang = [ - "sp_diaochan", - "sp_zhaoyun", - "sp_sunshangxiang", - "sp_caoren", - "sp_jiangwei", - "sp_machao", - "sp_caiwenji", - "jsp_guanyu", - "jsp_huangyueying", - "sp_pangde", - "sp_jiaxu", - "yuanshu", - "sp_zhangliao", - "sp_ol_zhanghe", - "wulan", - "leitong", - "huaman", - "wangshuang", - "wenyang", - "re_liuzan", - "caobuxing", - "re_maliang", - "xin_baosanniang", - "re_xinxianying", - "dongxie", - "guozhao", - "fanyufeng", - "ruanyu", - "liangxing", - "re_dongzhao", - "yangwan", - "re_panshu", - "dufuren", - "zhouyi", - "lvlingqi", - "re_kanze", - "caojinyu", - "caocao", - "simayi", - "xiahoudun", - "zhangliao", - "xuzhu", - "guojia", - "zhenji", - "liubei", - "guanyu", - "zhangfei", - "zhugeliang", - "zhaoyun", - "machao", - "huangyueying", - "sunquan", - "ganning", - "lvmeng", - "huanggai", - "zhouyu", - "daqiao", - "luxun", - "sunshangxiang", - "huatuo", - "lvbu", - "diaochan", - ]; - var jingjitu = ["jingji1", "jingji2", "jingji3", "jingji4"]; - var xingbietu = ["xingbie1", "xingbie2"]; + //var shanchang = get.config('recentCharacter'); + var shanchang = ["sp_diaochan", "sp_zhaoyun", "sp_sunshangxiang", "sp_caoren", "sp_jiangwei", "sp_machao", "sp_caiwenji", "jsp_guanyu", "jsp_huangyueying", "sp_pangde", "sp_jiaxu", "yuanshu", "sp_zhangliao", "sp_ol_zhanghe", "wulan", "leitong", "huaman", "wangshuang", "wenyang", "re_liuzan", "caobuxing", "re_maliang", "xin_baosanniang", "re_xinxianying", "dongxie", "guozhao", "fanyufeng", "ruanyu", "liangxing", "re_dongzhao", "yangwan", "re_panshu", "dufuren", "zhouyi", "lvlingqi", "re_kanze", "caojinyu", "caocao", "simayi", "xiahoudun", "zhangliao", "xuzhu", "guojia", "zhenji", "liubei", "guanyu", "zhangfei", "zhugeliang", "zhaoyun", "machao", "huangyueying", "sunquan", "ganning", "lvmeng", "huanggai", "zhouyu", "daqiao", "luxun", "sunshangxiang", "huatuo", "lvbu", "diaochan"]; + var jingjitu = ["jingji1", "jingji2", "jingji3", "jingji4"]; + var xingbietu = ["xingbie1", "xingbie2"]; - shanchang1.setBackgroundImage( - "image/character/" + shanchang.randomGet() + ".jpg" - ); - shanchang2.setBackgroundImage( - "image/character/" + shanchang.randomGet() + ".jpg" - ); - shanchang3.setBackgroundImage( - "image/character/" + shanchang.randomGet() + ".jpg" - ); - shanchang4.setBackgroundImage( - "image/character/" + shanchang.randomGet() + ".jpg" - ); - useless.setBackgroundImage( - "extension/十周年UI/shoushaUI/character/images/useless.png" - ); - useless2.setBackgroundImage( - "extension/十周年UI/shoushaUI/character/images/useless2.png" - ); - minixingxiang.style.backgroundImage = - player.node.avatar.style.backgroundImage; - jingji.setBackgroundImage( - "extension/十周年UI/shoushaUI/character/images/" + - jingjitu.randomGet() + - ".png" - ); - xingbie.setBackgroundImage( - "extension/十周年UI/shoushaUI/character/images/" + - xingbietu.randomGet() + - ".png" - ); - }; + shanchang1.setBackgroundImage("image/character/" + shanchang.randomGet() + ".jpg"); + shanchang2.setBackgroundImage("image/character/" + shanchang.randomGet() + ".jpg"); + shanchang3.setBackgroundImage("image/character/" + shanchang.randomGet() + ".jpg"); + shanchang4.setBackgroundImage("image/character/" + shanchang.randomGet() + ".jpg"); + useless.setBackgroundImage("extension/十周年UI/shoushaUI/character/images/useless.png"); + useless2.setBackgroundImage("extension/十周年UI/shoushaUI/character/images/useless2.png"); + minixingxiang.style.backgroundImage = player.node.avatar.style.backgroundImage; + jingji.setBackgroundImage("extension/十周年UI/shoushaUI/character/images/" + jingjitu.randomGet() + ".png"); + xingbie.setBackgroundImage("extension/十周年UI/shoushaUI/character/images/" + xingbietu.randomGet() + ".png"); + }; - rightPane.innerHTML = "
"; - lib.setScroll(rightPane.firstChild); - var oSkills = player.getSkills(null, false, false).slice(0); - oSkills = oSkills.filter(function (skill) { - if (!lib.skill[skill] || skill == "jiu") return false; - if (lib.skill[skill].nopop || lib.skill[skill].equipSkill) - return false; - return ( - lib.translate[skill + "_info"] && - lib.translate[skill + "_info"] != "" - ); - }); - if (player == game.me && player.hiddenSkills.length) - oSkills.addArray(player.hiddenSkills); + rightPane.innerHTML = "
"; + lib.setScroll(rightPane.firstChild); + var oSkills = player.getSkills(null, false, false).slice(0); + oSkills = oSkills.filter(function (skill) { + if (!lib.skill[skill] || skill == "jiu") return false; + if (lib.skill[skill].nopop || lib.skill[skill].equipSkill) return false; + return lib.translate[skill + "_info"] && lib.translate[skill + "_info"] != ""; + }); + if (player == game.me && player.hiddenSkills.length) oSkills.addArray(player.hiddenSkills); - var allShown = - player.isUnderControl() || - (!game.observe && - game.me && - game.me.hasSkillTag("viewHandcard", null, player, true)); - var shownHs = player.getShownCards(); - if (shownHs.length) { - ui.create.div( - ".xcaption", - player.getCards("h").some((card) => !shownHs.includes(card)) - ? "明置的手牌" - : "手牌区域", - rightPane.firstChild - ); - shownHs.forEach(function (item) { - var card = game.createCard( - get.name(item, false), - get.suit(item, false), - get.number(item, false), - get.nature(item, false) - ); - card.style.zoom = "0.6"; - rightPane.firstChild.appendChild(card); - }); - if (allShown) { - var hs = player.getCards("h"); - hs.removeArray(shownHs); - if (hs.length) { - ui.create.div(".xcaption", "其他手牌", rightPane.firstChild); - hs.forEach(function (item) { - var card = game.createCard( - get.name(item, false), - get.suit(item, false), - get.number(item, false), - get.nature(item, false) - ); - card.style.zoom = "0.6"; - rightPane.firstChild.appendChild(card); - }); - } - } - } else if (allShown) { - var hs = player.getCards("h"); - if (hs.length) { - ui.create.div(".xcaption", "手牌区域", rightPane.firstChild); - hs.forEach(function (item) { - var card = game.createCard( - get.name(item, false), - get.suit(item, false), - get.number(item, false), - get.nature(item, false) - ); - card.style.zoom = "0.6"; - rightPane.firstChild.appendChild(card); - }); - } - } + var allShown = player.isUnderControl() || (!game.observe && game.me && game.me.hasSkillTag("viewHandcard", null, player, true)); + var shownHs = player.getShownCards(); + if (shownHs.length) { + ui.create.div(".xcaption", player.getCards("h").some(card => !shownHs.includes(card)) ? "明置的手牌" : "手牌区域", rightPane.firstChild); + shownHs.forEach(function (item) { + var card = game.createCard(get.name(item, false), get.suit(item, false), get.number(item, false), get.nature(item, false)); + card.style.zoom = "0.6"; + rightPane.firstChild.appendChild(card); + }); + if (allShown) { + var hs = player.getCards("h"); + hs.removeArray(shownHs); + if (hs.length) { + ui.create.div(".xcaption", "其他手牌", rightPane.firstChild); + hs.forEach(function (item) { + var card = game.createCard(get.name(item, false), get.suit(item, false), get.number(item, false), get.nature(item, false)); + card.style.zoom = "0.6"; + rightPane.firstChild.appendChild(card); + }); + } + } + } else if (allShown) { + var hs = player.getCards("h"); + if (hs.length) { + ui.create.div(".xcaption", "手牌区域", rightPane.firstChild); + hs.forEach(function (item) { + var card = game.createCard(get.name(item, false), get.suit(item, false), get.number(item, false), get.nature(item, false)); + card.style.zoom = "0.6"; + rightPane.firstChild.appendChild(card); + }); + } + } - if (oSkills.length) { - ui.create.div(".xcaption", "武将技能", rightPane.firstChild); - oSkills.forEach(function (name) { - if (player.forbiddenSkills[name]) { - if (player.forbiddenSkills[name].length) - ui.create.div( - ".xskill", - "
" + - '' + - "【" + - lib.translate[name] + - "】" + - "" + - "
" + - "
" + - '' + - "(与" + - get.translation(player.forbiddenSkills[name]) + - "冲突)" + - get.skillInfoTranslation(name, player) + - "" + - "
", - rightPane.firstChild - ); - else - ui.create.div( - ".xskill", - "
" + - '' + - "【" + - lib.translate[name] + - "】" + - "" + - "
" + - "
" + - '' + - "(双将禁用)" + - get.skillInfoTranslation(name, player) + - "" + - "
", - rightPane.firstChild - ); - } else if (player.hiddenSkills.includes(name)) { - if (lib.skill[name].preHidden && get.mode() == "guozhan") { - var id = name + "_idx"; - id = ui.create.div( - ".xskill", - "
" + - '' + - "【" + - lib.translate[name] + - "】" + - "" + - "
" + - "
" + - '' + - get.skillInfoTranslation(name, player) + - "" + - '
预亮技能
' + - "
", - rightPane.firstChild - ); - var underlinenode = id.querySelector(".underlinenode"); - if (_status.prehidden_skills.includes(name)) - underlinenode.classList.remove("on"); - underlinenode.link = name; - underlinenode.listen(ui.click.hiddenskill); - } else - ui.create.div( - ".xskill", - "
" + - '' + - "【" + - lib.translate[name] + - "】" + - "" + - "
" + - "
" + - '' + - get.skillInfoTranslation(name, player) + - "" + - "
", - rightPane.firstChild - ); - } else if ( - !player.getSkills().includes(name) || - player.awakenedSkills.includes(name) - ) - ui.create.div( - ".xskill", - "
" + - '' + - "【" + - lib.translate[name] + - "】" + - "" + - "
" + - "
" + - '' + - get.skillInfoTranslation(name, player) + - "" + - "
", - rightPane.firstChild - ); - else if ( - lib.skill[name].frequent || - lib.skill[name].subfrequent - ) { - var id = name + "_id"; - id = ui.create.div( - ".xskill", - "
" + - "【" + - lib.translate[name] + - "】" + - "
" + - "
" + - get.skillInfoTranslation(name, player) + - '
自动发动
' + - "
", - rightPane.firstChild - ); - var underlinenode = id.querySelector(".underlinenode"); - if (lib.skill[name].frequent) { - if (lib.config.autoskilllist.includes(name)) { - underlinenode.classList.remove("on"); - } - } - if (lib.skill[name].subfrequent) { - for (var j = 0; j < lib.skill[name].subfrequent.length; j++) { - if ( - lib.config.autoskilllist.includes( - name + "_" + lib.skill[name].subfrequent[j] - ) - ) { - underlinenode.classList.remove("on"); - } - } - } - if (lib.config.autoskilllist.includes(name)) - underlinenode.classList.remove("on"); - underlinenode.link = name; - underlinenode.listen(ui.click.autoskill2); - } else if ( - lib.skill[name].clickable && - player.isIn() && - player.isUnderControl(true) - ) { - var id = name + "_idy"; - id = ui.create.div( - ".xskill", - "
" + - "【" + - lib.translate[name] + - "】" + - "
" + - "
" + - get.skillInfoTranslation(name, player) + - '
' + - "
", - rightPane.firstChild - ); - var intronode = id.querySelector(".skillbutton"); - if ( - !_status.gameStarted || - (lib.skill[name].clickableFilter && - !lib.skill[name].clickableFilter(player)) - ) { - intronode.classList.add("disabled"); - intronode.style.opacity = 0.5; - } else { - intronode.link = player; - intronode.func = lib.skill[name].clickable; - intronode.classList.add("pointerdiv"); - intronode.listen(ui.click.skillbutton); - } - } else - ui.create.div( - ".xskill", - "
【" + - lib.translate[name] + - "】
" + - "
" + - get.skillInfoTranslation(name, player) + - "
", - rightPane.firstChild - ); - }); - } + if (oSkills.length) { + ui.create.div(".xcaption", "武将技能", rightPane.firstChild); + oSkills.forEach(function (name) { + if (player.forbiddenSkills[name]) { + if (player.forbiddenSkills[name].length) ui.create.div(".xskill", "
" + '' + "【" + lib.translate[name] + "】" + "" + "
" + "
" + '' + "(与" + get.translation(player.forbiddenSkills[name]) + "冲突)" + get.skillInfoTranslation(name, player) + "" + "
", rightPane.firstChild); + else ui.create.div(".xskill", "
" + '' + "【" + lib.translate[name] + "】" + "" + "
" + "
" + '' + "(双将禁用)" + get.skillInfoTranslation(name, player) + "" + "
", rightPane.firstChild); + } else if (player.hiddenSkills.includes(name)) { + if (lib.skill[name].preHidden && get.mode() == "guozhan") { + var id = name + "_idx"; + id = ui.create.div(".xskill", "
" + '' + "【" + lib.translate[name] + "】" + "" + "
" + "
" + '' + get.skillInfoTranslation(name, player) + "" + '
预亮技能
' + "
", rightPane.firstChild); + var underlinenode = id.querySelector(".underlinenode"); + if (_status.prehidden_skills.includes(name)) underlinenode.classList.remove("on"); + underlinenode.link = name; + underlinenode.listen(ui.click.hiddenskill); + } else ui.create.div(".xskill", "
" + '' + "【" + lib.translate[name] + "】" + "" + "
" + "
" + '' + get.skillInfoTranslation(name, player) + "" + "
", rightPane.firstChild); + } else if (!player.getSkills().includes(name) || player.awakenedSkills.includes(name)) ui.create.div(".xskill", "
" + '' + "【" + lib.translate[name] + "】" + "" + "
" + "
" + '' + get.skillInfoTranslation(name, player) + "" + "
", rightPane.firstChild); + else if (lib.skill[name].frequent || lib.skill[name].subfrequent) { + var id = name + "_id"; + id = ui.create.div(".xskill", "
" + "【" + lib.translate[name] + "】" + "
" + "
" + get.skillInfoTranslation(name, player) + '
自动发动
' + "
", rightPane.firstChild); + var underlinenode = id.querySelector(".underlinenode"); + if (lib.skill[name].frequent) { + if (lib.config.autoskilllist.includes(name)) { + underlinenode.classList.remove("on"); + } + } + if (lib.skill[name].subfrequent) { + for (var j = 0; j < lib.skill[name].subfrequent.length; j++) { + if (lib.config.autoskilllist.includes(name + "_" + lib.skill[name].subfrequent[j])) { + underlinenode.classList.remove("on"); + } + } + } + if (lib.config.autoskilllist.includes(name)) underlinenode.classList.remove("on"); + underlinenode.link = name; + underlinenode.listen(ui.click.autoskill2); + } else if (lib.skill[name].clickable && player.isIn() && player.isUnderControl(true)) { + var id = name + "_idy"; + id = ui.create.div(".xskill", "
" + "【" + lib.translate[name] + "】" + "
" + "
" + get.skillInfoTranslation(name, player) + '
' + "
", rightPane.firstChild); + var intronode = id.querySelector(".skillbutton"); + if (!_status.gameStarted || (lib.skill[name].clickableFilter && !lib.skill[name].clickableFilter(player))) { + intronode.classList.add("disabled"); + intronode.style.opacity = 0.5; + } else { + intronode.link = player; + intronode.func = lib.skill[name].clickable; + intronode.classList.add("pointerdiv"); + intronode.listen(ui.click.skillbutton); + } + } else ui.create.div(".xskill", "
【" + lib.translate[name] + "】
" + "
" + get.skillInfoTranslation(name, player) + "
", rightPane.firstChild); + }); + } - var eSkills = player.getVCards("e"); - if (eSkills.length) { - ui.create.div(".xcaption", "装备区域", rightPane.firstChild); - eSkills.forEach(function (card) { - let str = [ - get.translation(card), - get.translation(card.name + "_info"), - ]; - if (card.cards?.length) - str[0] += "(" + get.translation(card.cards) + ")"; - const special = card.cards?.find( - (item) => - item.name == card.name && lib.card[item.name]?.cardPrompt - ); - if (special) str[1] = lib.card[special.name].cardPrompt(special); - ui.create.div( - ".xskill", - "
" + str[0] + "
" + str[1] + "
", - rightPane.firstChild - ); - }); - } + var eSkills = player.getVCards("e"); + if (eSkills.length) { + ui.create.div(".xcaption", "装备区域", rightPane.firstChild); + eSkills.forEach(function (card) { + let str = [get.translation(card), get.translation(card.name + "_info")]; + if (card.cards?.length) str[0] += "(" + get.translation(card.cards) + ")"; + const special = card.cards?.find(item => item.name == card.name && lib.card[item.name]?.cardPrompt); + if (special) str[1] = lib.card[special.name].cardPrompt(special); + ui.create.div(".xskill", "
" + str[0] + "
" + str[1] + "
", rightPane.firstChild); + }); + } - var judges = player.getVCards("j"); - if (judges.length) { - ui.create.div(".xcaption", "判定区域", rightPane.firstChild); - judges.forEach(function (card) { - const cards = card.cards; - let str = get.translation(card); - if ( - !cards?.length || - cards?.length !== 1 || - cards[0].name !== card.name - ) { - if (!lib.card[card]?.blankCard || player.isUnderControl(true)) { - if (cards?.length) - str += "(" + get.translation(cards) + ")"; - } - } - ui.create.div( - ".xskill", - "
" + - str + - "
" + - get.translation(card.name + "_info") + - "
", - rightPane.firstChild - ); - }); - } + var judges = player.getVCards("j"); + if (judges.length) { + ui.create.div(".xcaption", "判定区域", rightPane.firstChild); + judges.forEach(function (card) { + const cards = card.cards; + let str = get.translation(card); + if (!cards?.length || cards?.length !== 1 || cards[0].name !== card.name) { + if (!lib.card[card]?.blankCard || player.isUnderControl(true)) { + if (cards?.length) str += "(" + get.translation(cards) + ")"; + } + } + ui.create.div(".xskill", "
" + str + "
" + get.translation(card.name + "_info") + "
", rightPane.firstChild); + }); + } - container.classList.remove("hidden"); - game.pause2(); - }; - plugin.characterDialog = container; - container.show(this); - }, - }, - }; - return plugin; + container.classList.remove("hidden"); + game.pause2(); + }; + plugin.characterDialog = container; + container.show(this); + }, + }, + }; + return plugin; }); diff --git a/shoushaUI/character/main2.js b/shoushaUI/character/main2.js index b682cb0..d196046 100644 --- a/shoushaUI/character/main2.js +++ b/shoushaUI/character/main2.js @@ -1,414 +1,216 @@ app.import(function (lib, game, ui, get, ai, _status, app) { - var plugin = { - name: "character", - filter: function () { - return !["chess", "tafang"].includes(get.mode()); - }, - content: function (next) {}, - precontent: function () { - app.reWriteFunction(lib, { - setIntro: [ - function (args, node) { - if (get.itemtype(node) === "player") { - if (lib.config.touchscreen) { - lib.setLongPress(node, plugin.click.playerIntro); - } else { - if (lib.config.right_info) { - node.oncontextmenu = plugin.click.playerIntro; - } - } - return node; - } - }, - ], - }); - }, + var plugin = { + name: "character", + filter: function () { + return !["chess", "tafang"].includes(get.mode()); + }, + content: function (next) {}, + precontent: function () { + app.reWriteFunction(lib, { + setIntro: [ + function (args, node) { + if (get.itemtype(node) === "player") { + if (lib.config.touchscreen) { + lib.setLongPress(node, plugin.click.playerIntro); + } else { + if (lib.config.right_info) { + node.oncontextmenu = plugin.click.playerIntro; + } + } + return node; + } + }, + ], + }); + }, - click: { - identity: function (e) { - e.stopPropagation(); - var player = this.parentNode; - if (!game.getIdentityList) return; - if (player.node.guessDialog) { - player.node.guessDialog.classList.toggle("hidden"); - } else { - var list = game.getIdentityList(player); - if (!list) return; - var guessDialog = ui.create.div(".guessDialog", player); - var container = ui.create.div(guessDialog); + click: { + identity: function (e) { + e.stopPropagation(); + var player = this.parentNode; + if (!game.getIdentityList) return; + if (player.node.guessDialog) { + player.node.guessDialog.classList.toggle("hidden"); + } else { + var list = game.getIdentityList(player); + if (!list) return; + var guessDialog = ui.create.div(".guessDialog", player); + var container = ui.create.div(guessDialog); - lib.setScroll(guessDialog); - player.node.guessDialog = guessDialog; - } - }, - playerIntro: function (e) { - e.stopPropagation(); + lib.setScroll(guessDialog); + player.node.guessDialog = guessDialog; + } + }, + playerIntro: function (e) { + e.stopPropagation(); - if (plugin.playerDialog) { - return plugin.playerDialog.show(this); - } + if (plugin.playerDialog) { + return plugin.playerDialog.show(this); + } - var container = ui.create.div( - ".popup-container.hidden", - ui.window, - function (e) { - if (e.target === container) { - container.hide(); - game.resume2(); - } - } - ); - var dialog = ui.create.div(".character-dialog.popped", container); - var leftPane = ui.create.div(".left", dialog); - var rightPane = ui.create.div(".right", dialog); + var container = ui.create.div(".popup-container.hidden", ui.window, function (e) { + if (e.target === container) { + container.hide(); + game.resume2(); + } + }); + var dialog = ui.create.div(".character-dialog.popped", container); + var leftPane = ui.create.div(".left", dialog); + var rightPane = ui.create.div(".right", dialog); - var createButton = function (name, parent) { - if (!name) return; - if (!lib.character[name]) return; - var button = ui.create.button(name, "character", parent, true); - }; + var createButton = function (name, parent) { + if (!name) return; + if (!lib.character[name]) return; + var button = ui.create.button(name, "character", parent, true); + }; - container.show = function (player) { - var name = player.name1 || player.name; - var name2 = player.name2; - if (player.classList.contains("unseen") && player !== game.me) { - name = "unknown"; - } - if (player.classList.contains("unseen2") && player !== game.me) { - name2 = "unknown"; - } + container.show = function (player) { + var name = player.name1 || player.name; + var name2 = player.name2; + if (player.classList.contains("unseen") && player !== game.me) { + name = "unknown"; + } + if (player.classList.contains("unseen2") && player !== game.me) { + name2 = "unknown"; + } - leftPane.innerHTML = "
"; - createButton(name, leftPane.firstChild); - createButton(name2, leftPane.firstChild); - if (name && name2) { - dialog.classList.remove("single"); - } else { - dialog.classList.add("single"); - } + leftPane.innerHTML = "
"; + createButton(name, leftPane.firstChild); + createButton(name2, leftPane.firstChild); + if (name && name2) { + dialog.classList.remove("single"); + } else { + dialog.classList.add("single"); + } - rightPane.innerHTML = "
"; - lib.setScroll(rightPane.firstChild); - var oSkills = player.getSkills(null, false, false).slice(0); - oSkills = oSkills.filter(function (skill) { - if (!lib.skill[skill] || skill == "jiu") return false; - if (lib.skill[skill].nopop || lib.skill[skill].equipSkill) - return false; - return ( - lib.translate[skill + "_info"] && - lib.translate[skill + "_info"] != "" - ); - }); - if (player == game.me && player.hiddenSkills.length) - oSkills.addArray(player.hiddenSkills); + rightPane.innerHTML = "
"; + lib.setScroll(rightPane.firstChild); + var oSkills = player.getSkills(null, false, false).slice(0); + oSkills = oSkills.filter(function (skill) { + if (!lib.skill[skill] || skill == "jiu") return false; + if (lib.skill[skill].nopop || lib.skill[skill].equipSkill) return false; + return lib.translate[skill + "_info"] && lib.translate[skill + "_info"] != ""; + }); + if (player == game.me && player.hiddenSkills.length) oSkills.addArray(player.hiddenSkills); - var allShown = - player.isUnderControl() || - (!game.observe && - game.me && - game.me.hasSkillTag("viewHandcard", null, player, true)); - var shownHs = player.getShownCards(); - if (shownHs.length) { - ui.create.div( - ".xcaption", - player.getCards("h").some((card) => !shownHs.includes(card)) - ? "明置的手牌" - : "手牌区域", - rightPane.firstChild - ); - shownHs.forEach(function (item) { - var card = game.createCard( - get.name(item, false), - get.suit(item, false), - get.number(item, false), - get.nature(item, false) - ); - card.style.zoom = "0.6"; - rightPane.firstChild.appendChild(card); - }); - if (allShown) { - var hs = player.getCards("h"); - hs.removeArray(shownHs); - if (hs.length) { - ui.create.div(".xcaption", "其他手牌", rightPane.firstChild); - hs.forEach(function (item) { - var card = game.createCard( - get.name(item, false), - get.suit(item, false), - get.number(item, false), - get.nature(item, false) - ); - card.style.zoom = "0.6"; - rightPane.firstChild.appendChild(card); - }); - } - } - } else if (allShown) { - var hs = player.getCards("h"); - if (hs.length) { - ui.create.div(".xcaption", "手牌区域", rightPane.firstChild); - hs.forEach(function (item) { - var card = game.createCard( - get.name(item, false), - get.suit(item, false), - get.number(item, false), - get.nature(item, false) - ); - card.style.zoom = "0.6"; - rightPane.firstChild.appendChild(card); - }); - } - } + var allShown = player.isUnderControl() || (!game.observe && game.me && game.me.hasSkillTag("viewHandcard", null, player, true)); + var shownHs = player.getShownCards(); + if (shownHs.length) { + ui.create.div(".xcaption", player.getCards("h").some(card => !shownHs.includes(card)) ? "明置的手牌" : "手牌区域", rightPane.firstChild); + shownHs.forEach(function (item) { + var card = game.createCard(get.name(item, false), get.suit(item, false), get.number(item, false), get.nature(item, false)); + card.style.zoom = "0.6"; + rightPane.firstChild.appendChild(card); + }); + if (allShown) { + var hs = player.getCards("h"); + hs.removeArray(shownHs); + if (hs.length) { + ui.create.div(".xcaption", "其他手牌", rightPane.firstChild); + hs.forEach(function (item) { + var card = game.createCard(get.name(item, false), get.suit(item, false), get.number(item, false), get.nature(item, false)); + card.style.zoom = "0.6"; + rightPane.firstChild.appendChild(card); + }); + } + } + } else if (allShown) { + var hs = player.getCards("h"); + if (hs.length) { + ui.create.div(".xcaption", "手牌区域", rightPane.firstChild); + hs.forEach(function (item) { + var card = game.createCard(get.name(item, false), get.suit(item, false), get.number(item, false), get.nature(item, false)); + card.style.zoom = "0.6"; + rightPane.firstChild.appendChild(card); + }); + } + } - if (oSkills.length) { - ui.create.div(".xcaption", "武将技能", rightPane.firstChild); - oSkills.forEach(function (name) { - if (player.forbiddenSkills[name]) { - if (player.forbiddenSkills[name].length) - ui.create.div( - ".xskill", - "
" + - '' + - "【" + - lib.translate[name] + - "】" + - "" + - "
" + - "
" + - '' + - "(与" + - get.translation(player.forbiddenSkills[name]) + - "冲突)" + - get.skillInfoTranslation(name, player) + - "" + - "
", - rightPane.firstChild - ); - else - ui.create.div( - ".xskill", - "
" + - '' + - "【" + - lib.translate[name] + - "】" + - "" + - "
" + - "
" + - '' + - "(双将禁用)" + - get.skillInfoTranslation(name, player) + - "" + - "
", - rightPane.firstChild - ); - } else if (player.hiddenSkills.includes(name)) { - if (lib.skill[name].preHidden && get.mode() == "guozhan") { - var id = name + "_idx"; - id = ui.create.div( - ".xskill", - "
" + - '' + - "【" + - lib.translate[name] + - "】" + - "" + - "
" + - "
" + - '' + - get.skillInfoTranslation(name, player) + - "" + - '
预亮技能
' + - "
", - rightPane.firstChild - ); - var underlinenode = id.querySelector(".underlinenode"); - if (_status.prehidden_skills.includes(name)) - underlinenode.classList.remove("on"); - underlinenode.link = name; - underlinenode.listen(ui.click.hiddenskill); - } else - ui.create.div( - ".xskill", - "
" + - '' + - "【" + - lib.translate[name] + - "】" + - "" + - "
" + - "
" + - '' + - get.skillInfoTranslation(name, player) + - "" + - "
", - rightPane.firstChild - ); - } else if ( - !player.getSkills().includes(name) || - player.awakenedSkills.includes(name) - ) - ui.create.div( - ".xskill", - "
" + - '' + - "【" + - lib.translate[name] + - "】" + - "" + - "
" + - "
" + - '' + - get.skillInfoTranslation(name, player) + - "" + - "
", - rightPane.firstChild - ); - else if ( - lib.skill[name].frequent || - lib.skill[name].subfrequent - ) { - var id = name + "_id"; - id = ui.create.div( - ".xskill", - "
" + - "【" + - lib.translate[name] + - "】" + - "
" + - "
" + - get.skillInfoTranslation(name, player) + - '
自动发动
' + - "
", - rightPane.firstChild - ); - var underlinenode = id.querySelector(".underlinenode"); - if (lib.skill[name].frequent) { - if (lib.config.autoskilllist.includes(name)) { - underlinenode.classList.remove("on"); - } - } - if (lib.skill[name].subfrequent) { - for (var j = 0; j < lib.skill[name].subfrequent.length; j++) { - if ( - lib.config.autoskilllist.includes( - name + "_" + lib.skill[name].subfrequent[j] - ) - ) { - underlinenode.classList.remove("on"); - } - } - } - if (lib.config.autoskilllist.includes(name)) - underlinenode.classList.remove("on"); - underlinenode.link = name; - underlinenode.listen(ui.click.autoskill2); - } else if ( - lib.skill[name].clickable && - player.isIn() && - player.isUnderControl(true) - ) { - var id = name + "_idy"; - id = ui.create.div( - ".xskill", - "
" + - "【" + - lib.translate[name] + - "】" + - "
" + - "
" + - get.skillInfoTranslation(name, player) + - '
' + - "
", - rightPane.firstChild - ); - var intronode = id.querySelector(".skillbutton"); - if ( - !_status.gameStarted || - (lib.skill[name].clickableFilter && - !lib.skill[name].clickableFilter(player)) - ) { - intronode.classList.add("disabled"); - intronode.style.opacity = 0.5; - } else { - intronode.link = player; - intronode.func = lib.skill[name].clickable; - intronode.classList.add("pointerdiv"); - intronode.listen(ui.click.skillbutton); - } - } else - ui.create.div( - ".xskill", - "
【" + - lib.translate[name] + - "】
" + - "
" + - get.skillInfoTranslation(name, player) + - "
", - rightPane.firstChild - ); - }); - } + if (oSkills.length) { + ui.create.div(".xcaption", "武将技能", rightPane.firstChild); + oSkills.forEach(function (name) { + if (player.forbiddenSkills[name]) { + if (player.forbiddenSkills[name].length) ui.create.div(".xskill", "
" + '' + "【" + lib.translate[name] + "】" + "" + "
" + "
" + '' + "(与" + get.translation(player.forbiddenSkills[name]) + "冲突)" + get.skillInfoTranslation(name, player) + "" + "
", rightPane.firstChild); + else ui.create.div(".xskill", "
" + '' + "【" + lib.translate[name] + "】" + "" + "
" + "
" + '' + "(双将禁用)" + get.skillInfoTranslation(name, player) + "" + "
", rightPane.firstChild); + } else if (player.hiddenSkills.includes(name)) { + if (lib.skill[name].preHidden && get.mode() == "guozhan") { + var id = name + "_idx"; + id = ui.create.div(".xskill", "
" + '' + "【" + lib.translate[name] + "】" + "" + "
" + "
" + '' + get.skillInfoTranslation(name, player) + "" + '
预亮技能
' + "
", rightPane.firstChild); + var underlinenode = id.querySelector(".underlinenode"); + if (_status.prehidden_skills.includes(name)) underlinenode.classList.remove("on"); + underlinenode.link = name; + underlinenode.listen(ui.click.hiddenskill); + } else ui.create.div(".xskill", "
" + '' + "【" + lib.translate[name] + "】" + "" + "
" + "
" + '' + get.skillInfoTranslation(name, player) + "" + "
", rightPane.firstChild); + } else if (!player.getSkills().includes(name) || player.awakenedSkills.includes(name)) ui.create.div(".xskill", "
" + '' + "【" + lib.translate[name] + "】" + "" + "
" + "
" + '' + get.skillInfoTranslation(name, player) + "" + "
", rightPane.firstChild); + else if (lib.skill[name].frequent || lib.skill[name].subfrequent) { + var id = name + "_id"; + id = ui.create.div(".xskill", "
" + "【" + lib.translate[name] + "】" + "
" + "
" + get.skillInfoTranslation(name, player) + '
自动发动
' + "
", rightPane.firstChild); + var underlinenode = id.querySelector(".underlinenode"); + if (lib.skill[name].frequent) { + if (lib.config.autoskilllist.includes(name)) { + underlinenode.classList.remove("on"); + } + } + if (lib.skill[name].subfrequent) { + for (var j = 0; j < lib.skill[name].subfrequent.length; j++) { + if (lib.config.autoskilllist.includes(name + "_" + lib.skill[name].subfrequent[j])) { + underlinenode.classList.remove("on"); + } + } + } + if (lib.config.autoskilllist.includes(name)) underlinenode.classList.remove("on"); + underlinenode.link = name; + underlinenode.listen(ui.click.autoskill2); + } else if (lib.skill[name].clickable && player.isIn() && player.isUnderControl(true)) { + var id = name + "_idy"; + id = ui.create.div(".xskill", "
" + "【" + lib.translate[name] + "】" + "
" + "
" + get.skillInfoTranslation(name, player) + '
' + "
", rightPane.firstChild); + var intronode = id.querySelector(".skillbutton"); + if (!_status.gameStarted || (lib.skill[name].clickableFilter && !lib.skill[name].clickableFilter(player))) { + intronode.classList.add("disabled"); + intronode.style.opacity = 0.5; + } else { + intronode.link = player; + intronode.func = lib.skill[name].clickable; + intronode.classList.add("pointerdiv"); + intronode.listen(ui.click.skillbutton); + } + } else ui.create.div(".xskill", "
【" + lib.translate[name] + "】
" + "
" + get.skillInfoTranslation(name, player) + "
", rightPane.firstChild); + }); + } - var eSkills = player.getVCards("e"); - if (eSkills.length) { - ui.create.div(".xcaption", "装备区域", rightPane.firstChild); - eSkills.forEach(function (card) { - let str = [ - get.translation(card), - get.translation(card.name + "_info"), - ]; - const cards = card.cards; - if ( - cards?.length && - (cards?.length !== 1 || cards[0].name !== card.name) - ) - str[0] += "(" + get.translation(card.cards) + ")"; - const special = card.cards?.find( - (item) => - item.name == card.name && lib.card[item.name]?.cardPrompt - ); - if (special) str[1] = lib.card[special.name].cardPrompt(special); - ui.create.div( - ".xskill", - "
" + str[0] + "
" + str[1] + "
", - rightPane.firstChild - ); - }); - } + var eSkills = player.getVCards("e"); + if (eSkills.length) { + ui.create.div(".xcaption", "装备区域", rightPane.firstChild); + eSkills.forEach(function (card) { + let str = [get.translation(card), get.translation(card.name + "_info")]; + const cards = card.cards; + if (cards?.length && (cards?.length !== 1 || cards[0].name !== card.name)) str[0] += "(" + get.translation(card.cards) + ")"; + const special = card.cards?.find(item => item.name == card.name && lib.card[item.name]?.cardPrompt); + if (special) str[1] = lib.card[special.name].cardPrompt(special); + ui.create.div(".xskill", "
" + str[0] + "
" + str[1] + "
", rightPane.firstChild); + }); + } - var judges = player.getVCards("j"); - if (judges.length) { - ui.create.div(".xcaption", "判定区域", rightPane.firstChild); - judges.forEach(function (card) { - const cards = card.cards; - let str = get.translation(card); - if ( - cards?.length && - (cards?.length !== 1 || cards[0].name !== card.name) - ) { - if (!lib.card[card]?.blankCard || player.isUnderControl(true)) - str += "(" + get.translation(cards) + ")"; - } - ui.create.div( - ".xskill", - "
" + - str + - "
" + - get.translation(card.name + "_info") + - "
", - rightPane.firstChild - ); - }); - } + var judges = player.getVCards("j"); + if (judges.length) { + ui.create.div(".xcaption", "判定区域", rightPane.firstChild); + judges.forEach(function (card) { + const cards = card.cards; + let str = get.translation(card); + if (cards?.length && (cards?.length !== 1 || cards[0].name !== card.name)) { + if (!lib.card[card]?.blankCard || player.isUnderControl(true)) str += "(" + get.translation(cards) + ")"; + } + ui.create.div(".xskill", "
" + str + "
" + get.translation(card.name + "_info") + "
", rightPane.firstChild); + }); + } - container.classList.remove("hidden"); - game.pause2(); - }; - plugin.characterDialog = container; - container.show(this); - }, - }, - }; - return plugin; + container.classList.remove("hidden"); + game.pause2(); + }; + plugin.characterDialog = container; + container.show(this); + }, + }, + }; + return plugin; }); diff --git a/shoushaUI/character/main3.css b/shoushaUI/character/main3.css index e9ce0c8..94e8250 100644 --- a/shoushaUI/character/main3.css +++ b/shoushaUI/character/main3.css @@ -1,91 +1,86 @@ .button.character, - - #arena > .player.xplayer { - --width: 120px; + --width: 120px; } - - .popup-container > .character-dialog { - top: calc(55% - var(--h) / 2 + var(--bt)); - left: calc(60% - var(--w) / 2 + var(--bl)); + top: calc(55% - var(--h) / 2 + var(--bt)); + left: calc(60% - var(--w) / 2 + var(--bl)); } /*开始修改*/ .character-dialog { - --w: 536px; - --h: 305px; - --bt: calc(var(--h) * 40 / 290); - --bl: calc(var(--w) * 38 / 497); - --bb: calc(var(--h) * 17 / 290); - --dw: calc(var(--w) - 2 * var(--bl)); - --dh: calc(var(--h) - var(--bt) - var(--bb)); + --w: 536px; + --h: 305px; + --bt: calc(var(--h) * 40 / 290); + --bl: calc(var(--w) * 38 / 497); + --bb: calc(var(--h) * 17 / 290); + --dw: calc(var(--w) - 2 * var(--bl)); + --dh: calc(var(--h) - var(--bt) - var(--bb)); - width: var(--dw); - height: var(--dh); - position: absolute; - box-sizing: border-box; - padding: 10px; + width: var(--dw); + height: var(--dh); + position: absolute; + box-sizing: border-box; + padding: 10px; } .character-dialog.dialog2 { - --bt: calc(var(--h) * 10 / 280); - --bl: calc(var(--w) * 12 / 287); - --bb: calc(var(--h) * 20 / 280); + --bt: calc(var(--h) * 10 / 280); + --bl: calc(var(--w) * 12 / 287); + --bb: calc(var(--h) * 20 / 280); } .character-dialog.popped { - animation: dialog_start2 0.3s; - -webkit-animation: dialog_start2 0.3s; + animation: dialog_start2 0.3s; + -webkit-animation: dialog_start2 0.3s; } .character-dialog::before { - content: ''; - top: calc(0% - var(--bt)); - left: calc(0% - var(--bl)); - width: var(--w); - height: var(--h); - position: absolute; - /* background-image: url("./images/dialog4.png"); */ - background-size: 100% 100%; + content: ""; + top: calc(0% - var(--bt)); + left: calc(0% - var(--bl)); + width: var(--w); + height: var(--h); + position: absolute; + /* background-image: url("./images/dialog4.png"); */ + background-size: 100% 100%; } .character-dialog.dialog2::before { - background-image: url("./images/dialog3.png"); + background-image: url("./images/dialog3.png"); } .character-dialog > div { - top: 0; - height: 100%; - position: absolute; + top: 0; + height: 100%; + position: absolute; } - .character-dialog > div.skin1 { - left: -230px; - top: -50px; - width: 250px; - height: 295px; - background-size: cover; - position: relative; - background-repeat: no-repeat; - -webkit-mask: radial-gradient(115px 160px at 125px 160px ,#000 70% , transparent 100% ); + left: -230px; + top: -50px; + width: 250px; + height: 295px; + background-size: cover; + position: relative; + background-repeat: no-repeat; + -webkit-mask: radial-gradient(115px 160px at 125px 160px, #000 70%, transparent 100%); } .character-dialog > div.skin2 { - left: -550px; - top: -40px; - width: 150px; - height: 177px; - background-size: cover; - position: relative; - background-repeat: no-repeat; - -webkit-mask: radial-gradient(closest-side,#000 70% , transparent 100% ); + left: -550px; + top: -40px; + width: 150px; + height: 177px; + background-size: cover; + position: relative; + background-repeat: no-repeat; + -webkit-mask: radial-gradient(closest-side, #000 70%, transparent 100%); } .character-dialog > div.pe1 { - left: -190px; - top: -180px; - width: 120px; - height: 120px; - background-size: cover; - position: relative; - background-repeat: no-repeat; + left: -190px; + top: -180px; + width: 120px; + height: 120px; + background-size: cover; + position: relative; + background-repeat: no-repeat; } /* .character-dialog > div.pn1 { left: -190px; @@ -98,128 +93,125 @@ background-image: url("./images/skinname.png"); } */ .character-dialog > div.name { - position: relative; - left:55px; - top:-415px; - width: 500px; - height: 23px; - color:white; - font-size: 23px; - font-family: yuanli; - letter-spacing: 1.5px; - text-shadow: 0 0 2px rgb(170,170,170),0 0 3px rgb(170,170,170),0 0 4px rgb(170,170,170), 0 0 4px rgb(118,118,118), 0 0 4px rgb(118,118,118); + position: relative; + left: 55px; + top: -415px; + width: 500px; + height: 23px; + color: white; + font-size: 23px; + font-family: yuanli; + letter-spacing: 1.5px; + text-shadow: 0 0 2px rgb(170, 170, 170), 0 0 3px rgb(170, 170, 170), 0 0 4px rgb(170, 170, 170), 0 0 4px rgb(118, 118, 118), 0 0 4px rgb(118, 118, 118); } -.character-dialog > div.name[data-camp='wei'] { - text-shadow: 0 0 2px rgb(94, 135, 238),0 0 3px rgb(94, 135, 238),0 0 4px rgb(94, 135, 238); +.character-dialog > div.name[data-camp="wei"] { + text-shadow: 0 0 2px rgb(94, 135, 238), 0 0 3px rgb(94, 135, 238), 0 0 4px rgb(94, 135, 238); } -.character-dialog > div.name[data-camp='shu'] { - text-shadow: 0 0 2px rgb(255,100,100), 0 0 3px rgb(255,50,50), 0 0 3px rgb(255,50,50); +.character-dialog > div.name[data-camp="shu"] { + text-shadow: 0 0 2px rgb(255, 100, 100), 0 0 3px rgb(255, 50, 50), 0 0 3px rgb(255, 50, 50); } -.character-dialog > div.name[data-camp='wu'] { - text-shadow: 0 0 1px rgb(100,233,100), 0 0 2px rgba(50, 255, 50, 0.789); +.character-dialog > div.name[data-camp="wu"] { + text-shadow: 0 0 1px rgb(100, 233, 100), 0 0 2px rgba(50, 255, 50, 0.789); } -.character-dialog > div.name[data-camp='qun'] { - text-shadow: 0 0 2px rgb(170,170,170),0 0 3px rgb(170,170,170),0 0 4px rgb(170,170,170), 0 0 4px rgb(118,118,118), 0 0 4px rgb(118,118,118); +.character-dialog > div.name[data-camp="qun"] { + text-shadow: 0 0 2px rgb(170, 170, 170), 0 0 3px rgb(170, 170, 170), 0 0 4px rgb(170, 170, 170), 0 0 4px rgb(118, 118, 118), 0 0 4px rgb(118, 118, 118); } -.character-dialog > div.name[data-camp='shen'] { - text-shadow: 0 0 2px rgb(255, 200, 0), 0 0 5px rgb(255, 200, 0), 0 0 5px rgb(255, 200, 0); +.character-dialog > div.name[data-camp="shen"] { + text-shadow: 0 0 2px rgb(255, 200, 0), 0 0 5px rgb(255, 200, 0), 0 0 5px rgb(255, 200, 0); } -.character-dialog > div.name[data-camp='ye'], -.character-dialog > div.name[data-camp='jin'] { - text-shadow: 0 0 2px rgb(203, 72, 223),0 0 5px rgb(195, 28, 237),0 0 5px rgb(195, 28, 237); +.character-dialog > div.name[data-camp="ye"], +.character-dialog > div.name[data-camp="jin"] { + text-shadow: 0 0 2px rgb(203, 72, 223), 0 0 5px rgb(195, 28, 237), 0 0 5px rgb(195, 28, 237); } .character-dialog > div.pack { - position: relative; - right:25px; - top:-436px; - width: max-content; - height: 20px; - color: rgba(255,201,1,1); - font-size: 23px; - font-family: yuanli; - letter-spacing: 1px; - float: right; + position: relative; + right: 25px; + top: -436px; + width: max-content; + height: 20px; + color: rgba(255, 201, 1, 1); + font-size: 23px; + font-family: yuanli; + letter-spacing: 1px; + float: right; } - - - .character-dialog > div.left { - left: 0; - width: 50%; + left: 0; + width: 50%; } .character-dialog.single > div.left { - width: calc(50% - 105px); + width: calc(50% - 105px); } .character-dialog > div.right { - left: 0; - width: 100%; - box-sizing: border-box; - padding: 60px 20px 20px 29px; - overflow: auto; + left: 0; + width: 100%; + box-sizing: border-box; + padding: 60px 20px 20px 29px; + overflow: auto; } .character-dialog.single > div.right { - left: calc(0% - 105px); - width: calc(50% + 105px); + left: calc(0% - 105px); + width: calc(50% + 105px); } .character-dialog > div.left > div { - top: 50%; - right: 15px; - width: 210px; - text-align: center; - transform: translateY(-50%); - white-space: nowrap; + top: 50%; + right: 15px; + width: 210px; + text-align: center; + transform: translateY(-50%); + white-space: nowrap; } .character-dialog.single > div.left > div { - width: 105px; + width: 105px; } .character-dialog > div.right > div { - width: 100%; - height: 100%; - overflow: auto; + width: 100%; + height: 100%; + overflow: auto; } .character-dialog > div.right div { - position: relative; + position: relative; } .character-dialog > div.right .xcaption { - width: 100%; - text-align: center; - font-size: 20px; - font-weight: bold; - padding: 10px 0; - font-family: 'yuanli'; + width: 100%; + text-align: center; + font-size: 20px; + font-weight: bold; + padding: 10px 0; + font-family: "yuanli"; } .character-dialog > div.right .xskill > div { - display: inline; - color: #f7f3e0; - text-shadow: none; - font-size: 16px; - font-family: 'yuanli'; - font-weight: 500; - line-height: 1em; - margin-top: 30px; + display: inline; + color: #f7f3e0; + text-shadow: none; + font-size: 16px; + font-family: "yuanli"; + font-weight: 500; + line-height: 1em; + margin-top: 30px; } .character-dialog > div.right .xskill > div[data-color] { - color: #00e13b; + color: #00e13b; } .character-dialog > div.right .xskill + .xskill { - margin-top: 15px; + margin-top: 15px; } .pn1 { - left: 10px; - top: 110px; - width: 200px; - height: 24.5px; - font-family: 'heiti'; - text-indent: 1em; - font-size: 14px; - position: relative; - line-height: 1.5em; - color: #f7f3e0; - background-size: contain; - background-position: left; - background-repeat: no-repeat; - background-image: url("./images/skinname.png"); + left: 10px; + top: 110px; + width: 200px; + height: 24.5px; + font-family: "heiti"; + text-indent: 1em; + font-size: 14px; + position: relative; + line-height: 1.5em; + color: #f7f3e0; + background-size: contain; + background-position: left; + background-repeat: no-repeat; + background-image: url("./images/skinname.png"); } /* hp */ /* .hp:not(.text):not(.actcount):not(.treasure) > div { diff --git a/shoushaUI/character/main3.js b/shoushaUI/character/main3.js index 6879657..f3c8f0f 100644 --- a/shoushaUI/character/main3.js +++ b/shoushaUI/character/main3.js @@ -1,298 +1,289 @@ app.import(function (lib, game, ui, get, ai, _status, app) { - var plugin = { - name: 'character', - filter: function () { - return !['chess', 'tafang'].includes(get.mode()); - }, - content: function (next) { - }, - precontent: function () { - app.reWriteFunction(lib, { - setIntro: [function (args, node) { - if (get.itemtype(node) === 'player') { - if (lib.config.touchscreen) { - lib.setLongPress(node, plugin.click.playerIntro); - } else { - if (lib.config.right_info) { - node.oncontextmenu = plugin.click.playerIntro; - } - } - return node; - } - }], - }); + var plugin = { + name: "character", + filter: function () { + return !["chess", "tafang"].includes(get.mode()); + }, + content: function (next) {}, + precontent: function () { + app.reWriteFunction(lib, { + setIntro: [ + function (args, node) { + if (get.itemtype(node) === "player") { + if (lib.config.touchscreen) { + lib.setLongPress(node, plugin.click.playerIntro); + } else { + if (lib.config.right_info) { + node.oncontextmenu = plugin.click.playerIntro; + } + } + return node; + } + }, + ], + }); + }, + click: { + identity: function (e) { + e.stopPropagation(); + var player = this.parentNode; + if (!game.getIdentityList) return; + if (player.node.guessDialog) { + player.node.guessDialog.classList.toggle("hidden"); + } else { + var list = game.getIdentityList(player); + if (!list) return; + var guessDialog = ui.create.div(".guessDialog", player); + var container = ui.create.div(guessDialog); - }, + lib.setScroll(guessDialog); + player.node.guessDialog = guessDialog; + } + }, + playerIntro: function (e) { + e.stopPropagation(); - click: { - identity: function (e) { - e.stopPropagation(); - var player = this.parentNode; - if (!game.getIdentityList) return; - if (player.node.guessDialog) { - player.node.guessDialog.classList.toggle('hidden'); - } else { - var list = game.getIdentityList(player); - if (!list) return; - var guessDialog = ui.create.div('.guessDialog', player); - var container = ui.create.div(guessDialog); + if (plugin.playerDialog) { + return plugin.playerDialog.show(this); + } - lib.setScroll(guessDialog); - player.node.guessDialog = guessDialog; - } - }, - playerIntro: function (e) { - e.stopPropagation(); + var container = ui.create.div(".popup-container.hidden", ui.window, function (e) { + if (e.target === container) { + container.hide(); + game.resume2(); + } + }); + var dialog = ui.create.div(".character-dialog.popped", container); + var leftPane = ui.create.div(".left", dialog); + var rightPane = ui.create.div(".right", dialog); - if (plugin.playerDialog) { - return plugin.playerDialog.show(this); - } + container.show = function (player) { + //通过势力判断技能框的背景颜色 + var extensionPath = lib.assetURL + "extension/十周年UI/shoushaUI/"; + var group = player.group; + if (group != "wei" && group != "shu" && group != "wu" && group != "qun" && group != "ye" && group != "jin" && group != "daqin" && group != "western" && group != "shen" && group != "key") group = "default"; + var url = extensionPath + "character/images/skt_" + group + ".png"; + dialog.style.backgroundImage = 'url("' + url + '")'; + var skin1 = ui.create.div(".skin1", dialog); + var skin2 = ui.create.div(".skin2", dialog); - var container = ui.create.div('.popup-container.hidden', ui.window, function (e) { - if (e.target === container) { - container.hide(); - game.resume2(); - } - }); - var dialog = ui.create.div('.character-dialog.popped', container); - var leftPane = ui.create.div('.left', dialog); - var rightPane = ui.create.div('.right', dialog); + //判断是否隐藏,以及获取主副将的姓名 + var name = player.name1 || player.name; + var name2 = player.name2; + if (player.classList.contains("unseen") && player !== game.me) { + name = "unknown"; + } + if (player.classList.contains("unseen2") && player !== game.me) { + name2 = "unknown"; + } + //主将立绘 + var playerSkin; + if (name != "unknown") { + playerSkin = player.style.backgroundImage; + if (!playerSkin) playerSkin = player.childNodes[0].style.backgroundImage; + skin1.style.backgroundImage = playerSkin; + } else { + var url = extensionPath + "character/images/unknown.png"; + skin1.style.backgroundImage = 'url("' + url + '")'; + } + //副将立绘 + if (name2) { + var playerSkin2; + if (name2 != "unknown") { + playerSkin2 = player.childNodes[1].style.backgroundImage; + skin2.style.backgroundImage = playerSkin2; + } else { + var url = extensionPath + "character/images/unknown.png"; + skin2.style.backgroundImage = 'url("' + url + '")'; + } + } - var createButton = function (name, parent) { - if (!name) return; - if (!lib.character[name]) return; - var button = ui.create.button(name, 'character', parent, true); - }; + //等阶。适配最新版千幻 + var rarity = game.getRarity(name); + if (!rarity) rarity = "junk"; + var pe = ui.create.div(".pe1", dialog); + var url; + if (lib.config["extension_千幻聆音_enable"]) { + var temp; + switch (game.qhly_getSkinLevel(name, game.qhly_getSkin(name), true, false)) { + case "xiyou": + temp = "rare"; + break; + case "shishi": + temp = "epic"; + break; + case "chuanshuo": + temp = "legend"; + break; + case "putong": + temp = "common"; + break; + case "dongtai": + temp = "legend"; + break; + case "jueban": + temp = "unique"; + break; + case "xianding": + temp = "restrictive"; + break; + default: + temp = "junk"; + } + url = extensionPath + "character/images/pe_" + temp + ".png"; + } else url = extensionPath + "character/images/pe_" + rarity + ".png"; + pe.style.backgroundImage = 'url("' + url + '")'; + var value; + if (lib.config["extension_千幻聆音_enable"]) { + value = game.qhly_getSkin(name); + if (value) value = value.substring(0, value.lastIndexOf(".")); + else value = "经典形象"; + } else value = "经典形象"; + var pn = ui.create.div(".pn1", value + "*" + get.translation(name)); + pe.appendChild(pn); - container.show = function (player) { - //通过势力判断技能框的背景颜色 - var extensionPath = lib.assetURL + 'extension/十周年UI/shoushaUI/'; - var group = player.group; - if (group != 'wei' && group != 'shu' && group != 'wu' && group != 'qun' && group != 'ye' - && group != 'jin' && group != 'daqin' && group != 'western' && group != 'shen' && group != 'key') - group = 'default'; - var url = extensionPath + 'character/images/skt_' + group + '.png'; - dialog.style.backgroundImage = 'url("' + url + '")'; - var skin1 = ui.create.div('.skin1', dialog); - var skin2 = ui.create.div('.skin2', dialog); + //武将姓名 + var nametext = ""; + if (name && name2) { + if (name == "unknown") nametext += "未知"; + else if (lib.translate[name + "_ab"]) nametext += lib.translate[name + "_ab"]; + else nametext += get.translation(name); + nametext += " / "; + if (name2 == "unknown") nametext += "未知"; + else if (lib.translate[name2 + "_ab"]) nametext += lib.translate[name2 + "_ab"]; + else nametext += get.translation(name2); + } else { + if (name == "unknown") nametext += "未知"; + else if (lib.translate[name + "_ab"]) nametext += lib.translate[name + "_ab"]; + else nametext += get.translation(name); + } + var namestyle = ui.create.div(".name", nametext, dialog); + namestyle.dataset.camp = group; + if (name && name2) { + namestyle.style.fontSize = "18px"; + namestyle.style.letterSpacing = "1px"; + } - //判断是否隐藏,以及获取主副将的姓名 - var name = player.name1 || player.name; - var name2 = player.name2; - if (player.classList.contains('unseen') && player !== game.me) { - name = 'unknown'; - } - if (player.classList.contains('unseen2') && player !== game.me) { - name2 = 'unknown'; - } + //等阶图标 + var head = ui.create.node("img"); + head.src = extensionPath + "character/images/rarity_" + rarity + ".png"; + head.style.cssText = "display:inline-block;width:61.6px;height:53.2px;top:-13px; position:absolute;background-color: transparent;z-index:1;margin-left:5px;"; + namestyle.appendChild(head); - //主将立绘 - var playerSkin; - if(name != 'unknown'){ - playerSkin = player.style.backgroundImage; - if (!playerSkin) playerSkin = player.childNodes[0].style.backgroundImage; - skin1.style.backgroundImage = playerSkin; - } - else { - var url = extensionPath + 'character/images/unknown.png'; - skin1.style.backgroundImage = 'url("' + url + '")'; - } - //副将立绘 - if (name2) { - var playerSkin2; - if (name2 != 'unknown') { - playerSkin2 = player.childNodes[1].style.backgroundImage; - skin2.style.backgroundImage = playerSkin2; - } - else { - var url = extensionPath + 'character/images/unknown.png'; - skin2.style.backgroundImage = 'url("' + url + '")'; - } - } - - //等阶。适配最新版千幻 - var rarity = game.getRarity(name); - if(!rarity) rarity = 'junk'; - var pe = ui.create.div('.pe1',dialog); - var url; - if(lib.config['extension_千幻聆音_enable']){ - var temp; - switch(game.qhly_getSkinLevel(name,game.qhly_getSkin(name),true,false)){ - case 'xiyou': temp='rare';break; - case 'shishi': temp='epic';break; - case 'chuanshuo': temp='legend';break; - case 'putong': temp='common';break; - case 'dongtai': temp='legend';break; - case 'jueban': temp='unique';break; - case 'xianding': temp='restrictive';break; - default: temp='junk'; - } - url = extensionPath + 'character/images/pe_' + temp + '.png'; - } - else url = extensionPath + 'character/images/pe_' + rarity + '.png'; - pe.style.backgroundImage = 'url("' + url + '")'; - var value; - if(lib.config['extension_千幻聆音_enable']){ - value = game.qhly_getSkin(name); - if (value) value = value.substring(0, value.lastIndexOf('.')); - else value = '经典形象'; - } - else value='经典形象'; - var pn= ui.create.div('.pn1',value+'*'+get.translation(name)); - pe.appendChild(pn); - - //武将姓名 - var nametext=''; - if(name && name2){ - if(name == 'unknown') nametext+='未知'; - else if(lib.translate[name + '_ab']) nametext+=lib.translate[name + '_ab']; - else nametext+=get.translation(name); - nametext+=' / '; - if(name2 == 'unknown') nametext+='未知'; - else if(lib.translate[name2 + '_ab']) nametext+=lib.translate[name2 + '_ab']; - else nametext+=get.translation(name2); - } - else{ - if(name == 'unknown') nametext+='未知'; - else if(lib.translate[name + '_ab']) nametext+=lib.translate[name + '_ab']; - else nametext+=get.translation(name); - } - var namestyle = ui.create.div('.name',nametext,dialog); - namestyle.dataset.camp = group; - if(name && name2) { - namestyle.style.fontSize = '18px'; - namestyle.style.letterSpacing = '1px'; - } - - //等阶图标 - var head = ui.create.node('img'); - head.src = extensionPath + 'character/images/rarity_' + rarity + '.png'; - head.style.cssText = "display:inline-block;width:61.6px;height:53.2px;top:-13px; position:absolute;background-color: transparent;z-index:1;margin-left:5px;"; - namestyle.appendChild(head); - - //分包 - var getPack = function(name){ - for(const pak in lib.characterSort){ - for(const package in lib.characterSort[pak]){ - if (lib.characterSort[pak][package].contains(name)) { - if (pak == 'standard' || package == 'sp_waitforsort' || package == 'sp_qifu' || package == 'sp_others' || package == 'sp_guozhan2' - || pak == 'old' || pak == 'diy' || pak=='collab') - return lib.translate[pak+'_character_config']; - if (pak == 'sp') { - if (get.translation(package).length > 6) return get.translation(package).slice(0,2); - } - if (pak == 'sp2') { - if (get.translation(package).length > 6) return get.translation(package).slice(3,7); - } - if (pak == 'mobile') { - if (get.translation(package).length > 6) return '手杀异构'; - } - if (pak == 'WeChatkill') return '微信三国杀'; - if (pak == 'tw') return '海外'; - if (pak == 'MiNikill') return '欢乐三国杀'; - switch (package) { - case 'sp_decade': - case 'extra_decade': - return '限定'; - case 'extra_tw': - return '海外'; - case 'mobile_default': - case 'mobile_sunben': - return '手杀'; - case 'offline_piracyE': - return '官盗E系列'; - default: - return get.translation(package); - } - } - } - } - for(const pak in lib.characterPack){ - for(const namein in lib.characterPack[pak]){ - if(name == namein) return get.translation(pak+'_character_config'); - } - } - return '暂无分包'; - } - var packinfo = ui.create.div('.pack',getPack(name),dialog); - - - - leftPane.innerHTML = '
'; - rightPane.innerHTML = '
'; - lib.setScroll(rightPane.firstChild); - var hSkills = player.getCards('h'); - var eSkills = player.getCards('e'); - var oSkills = player.getSkills(null, false, false).slice(0); - if(player==game.me) oSkills = oSkills.concat(player.hiddenSkills); - var judges = player.getCards('j'); - if (oSkills.length) { - oSkills.forEach(function (name) { - var translation = lib.translate[name]; - if (translation && lib.translate[name + '_info'] && translation != '' && lib.translate[name + '_info'] != '') { - if (!player.getSkills().contains(name) || player.awakenedSkills.contains(name)) ui.create.div('.xskill', '
' + '' +translation + ': ' + '' - + '
' + '
' + '' + get.skillInfoTranslation(name, player) + '' + '
', rightPane.firstChild); - else ui.create.div('.xskill', '
' + translation + ':
' + '
' + ''+ get.skillInfoTranslation(name, player) + ''+ '
', rightPane.firstChild); - //自动发动 - if(lib.skill[name].frequent ||lib.skill[name].subfrequent ){ - ui.create.div('.xskill', '
【'+translation+'】自动发动
', rightPane.firstChild); - var underlinenode=rightPane.firstChild.querySelector('.underlinenode'); - if(lib.skill[name].frequent){ - if(lib.config.autoskilllist.contains(name)){ - underlinenode.classList.remove('on'); - } - } - if(lib.skill[name].subfrequent){ - for(var j=0;j' + get.translation(card) + '
' + get.translation((card.viewAs || card.name) + '_info') + '
', rightPane.firstChild); - }); - } - - if (eSkills.length) { - ui.create.div('.xcaption', '装备区域', rightPane.firstChild); - eSkills.forEach(function (item) { - ui.create.div('.xskill', '
' + get.translation(item) + '
' + get.translation(item.name + '_info') + '
', rightPane.firstChild); - }); - } - - if (player!= game.me && !player.noclick && (player.isUnderControl() || (!game.observe && game.me && game.me.hasSkillTag('viewHandcard', null, player, true)))) { - ui.create.div('.xcaption', '手牌区域', rightPane.firstChild); - hSkills.forEach(function (item) { - var button = ui.create.button(item, 'card', rightPane.firstChild, true); - button.style.zoom=0.65; - button.style.marginTop = 0; - }); - } - - - container.classList.remove('hidden'); - game.pause2(); - }; - plugin.characterDialog = container; - container.show(this); - }, - }, - - }; - return plugin; + //分包 + const getName = (() => { + const pack = Object.keys(lib.characterPack).find(pak => lib.characterPack[pak][name]); + if (pack) { + if (lib.characterSort[pack]) { + const sort = Object.keys(lib.characterSort[pack]).find(i => lib.characterSort[pack][i].includes(name)); + if (sort) return get.translation(sort); + } + return get.translation(pack + "_character_config"); + } + })(); + if (getName) ui.create.div(".pack", getName, dialog); + leftPane.innerHTML = "
"; + rightPane.innerHTML = "
"; + lib.setScroll(rightPane.firstChild); + var oSkills = player.getSkills(null, false, false).slice(0); + oSkills = oSkills.filter(function (skill) { + if (!lib.skill[skill] || skill == "jiu") return false; + if (lib.skill[skill].nopop || lib.skill[skill].equipSkill) return false; + return lib.translate[skill + "_info"] && lib.translate[skill + "_info"] != ""; + }); + if (player == game.me) oSkills = oSkills.concat(player.hiddenSkills); + if (oSkills.length) { + oSkills.forEach(function (name) { + if (player.forbiddenSkills[name]) { + if (player.forbiddenSkills[name].length) ui.create.div(".xskill", "
" + '' + "【" + lib.translate[name] + "】" + "" + "
" + "
" + '' + "(与" + get.translation(player.forbiddenSkills[name]) + "冲突)" + get.skillInfoTranslation(name, player) + "" + "
", rightPane.firstChild); + else ui.create.div(".xskill", "
" + '' + "【" + lib.translate[name] + "】" + "" + "
" + "
" + '' + "(双将禁用)" + get.skillInfoTranslation(name, player) + "" + "
", rightPane.firstChild); + } else if (player.hiddenSkills.includes(name)) { + if (lib.skill[name].preHidden && get.mode() == "guozhan") { + var id = name + "_idx"; + id = ui.create.div(".xskill", "
" + '' + "【" + lib.translate[name] + "】" + "" + "
" + "
" + '' + get.skillInfoTranslation(name, player) + "" + '
预亮技能
' + "
", rightPane.firstChild); + var underlinenode = id.querySelector(".underlinenode"); + if (_status.prehidden_skills.includes(name)) underlinenode.classList.remove("on"); + underlinenode.link = name; + underlinenode.listen(ui.click.hiddenskill); + } else ui.create.div(".xskill", "
" + '' + "【" + lib.translate[name] + "】" + "" + "
" + "
" + '' + get.skillInfoTranslation(name, player) + "" + "
", rightPane.firstChild); + } else if (!player.getSkills().includes(name) || player.awakenedSkills.includes(name)) ui.create.div(".xskill", "
" + '' + "【" + lib.translate[name] + "】" + "" + "
" + "
" + '' + get.skillInfoTranslation(name, player) + "" + "
", rightPane.firstChild); + else if (lib.skill[name].frequent || lib.skill[name].subfrequent) { + var id = name + "_id"; + id = ui.create.div(".xskill", "
" + "【" + lib.translate[name] + "】" + "
" + "
" + get.skillInfoTranslation(name, player) + '
自动发动
' + "
", rightPane.firstChild); + var underlinenode = id.querySelector(".underlinenode"); + if (lib.skill[name].frequent) { + if (lib.config.autoskilllist.includes(name)) { + underlinenode.classList.remove("on"); + } + } + if (lib.skill[name].subfrequent) { + for (var j = 0; j < lib.skill[name].subfrequent.length; j++) { + if (lib.config.autoskilllist.includes(name + "_" + lib.skill[name].subfrequent[j])) { + underlinenode.classList.remove("on"); + } + } + } + if (lib.config.autoskilllist.includes(name)) underlinenode.classList.remove("on"); + underlinenode.link = name; + underlinenode.listen(ui.click.autoskill2); + } else if (lib.skill[name].clickable && player.isIn() && player.isUnderControl(true)) { + var id = name + "_idy"; + id = ui.create.div(".xskill", "
" + "【" + lib.translate[name] + "】" + "
" + "
" + get.skillInfoTranslation(name, player) + '
' + "
", rightPane.firstChild); + var intronode = id.querySelector(".skillbutton"); + if (!_status.gameStarted || (lib.skill[name].clickableFilter && !lib.skill[name].clickableFilter(player))) { + intronode.classList.add("disabled"); + intronode.style.opacity = 0.5; + } else { + intronode.link = player; + intronode.func = lib.skill[name].clickable; + intronode.classList.add("pointerdiv"); + intronode.listen(ui.click.skillbutton); + } + } else ui.create.div(".xskill", "
【" + lib.translate[name] + "】
" + "
" + get.skillInfoTranslation(name, player) + "
", rightPane.firstChild); + }); + } + var hSkills = player.getCards("h"); + if (player != game.me && !player.noclick && (player.isUnderControl() || (!game.observe && game.me && game.me.hasSkillTag("viewHandcard", null, player, true)))) { + ui.create.div(".xcaption", "手牌区域", rightPane.firstChild); + hSkills.forEach(function (item) { + var button = ui.create.button(item, "card", rightPane.firstChild, true); + button.style.zoom = 0.65; + button.style.marginTop = 0; + }); + } + var eSkills = player.getVCards("e"); + if (eSkills.length) { + ui.create.div(".xcaption", "装备区域", rightPane.firstChild); + eSkills.forEach(function (card) { + let str = [get.translation(card), get.translation(card.name + "_info")]; + const cards = card.cards; + if (cards?.length && (cards?.length !== 1 || cards[0].name !== card.name)) str[0] += "(" + get.translation(card.cards) + ")"; + const special = card.cards?.find(item => item.name == card.name && lib.card[item.name]?.cardPrompt); + if (special) str[1] = lib.card[special.name].cardPrompt(special); + ui.create.div(".xskill", "
" + str[0] + "
" + str[1] + "
", rightPane.firstChild); + }); + } + var judges = player.getVCards("j"); + if (judges.length) { + ui.create.div(".xcaption", "判定区域", rightPane.firstChild); + judges.forEach(function (card) { + const cards = card.cards; + let str = get.translation(card); + if (cards?.length && (cards?.length !== 1 || cards[0].name !== card.name)) { + if (!lib.card[card]?.blankCard || player.isUnderControl(true)) str += "(" + get.translation(cards) + ")"; + } + ui.create.div(".xskill", "
" + str + "
" + get.translation(card.name + "_info") + "
", rightPane.firstChild); + }); + } + container.classList.remove("hidden"); + game.pause2(); + }; + plugin.characterDialog = container; + container.show(this); + }, + }, + }; + return plugin; }); diff --git a/shoushaUI/lbtn/main1.css b/shoushaUI/lbtn/main1.css index 6463134..d6ce8d5 100644 --- a/shoushaUI/lbtn/main1.css +++ b/shoushaUI/lbtn/main1.css @@ -1,102 +1,101 @@ -.lbtn-controls {/*牌序,记录按钮*/ - --width: 66px;/*按钮宽度*/ - --height: 55px;/*按钮高度*/ - left: 18px;/*左边距,越大越靠右*/ - bottom: 14.2%;/*整体上移*/ +.lbtn-controls { + /*牌序,记录按钮*/ + --width: 66px; /*按钮宽度*/ + --height: 55px; /*按钮高度*/ + left: 18px; /*左边距,越大越靠右*/ + bottom: 14.2%; /*整体上移*/ width: var(--width); z-index: 4; } /*右上角弹出的二级菜单页面*/ -.yemian{ - --w: 566px; - --h: calc(var(--w) * 360/1560);/*高和长*/ - width: var(--w);/*按比例调节*/ - height: var(--h);/*同理*/ - top: 0%; - left: calc(100% - 562px); - background-size: 100% 100%; - background-image: url("./images/SSCD/yemian.png"); - z-index: 68; - position: relative;/*定位位置*/ - -webkit-transition: opacity 1s ease-in-out; - -moz-transition: opacity 1s ease-in-out; - -o-transition: opacity 1s ease-in-out; - transition: opacity 1s ease-in-out; +.yemian { + --w: 566px; + --h: calc(var(--w) * 360 / 1560); /*高和长*/ + width: var(--w); /*按比例调节*/ + height: var(--h); /*同理*/ + top: 0%; + left: calc(100% - 562px); + background-size: 100% 100%; + background-image: url("./images/SSCD/yemian.png"); + z-index: 68; + position: relative; /*定位位置*/ + -webkit-transition: opacity 1s ease-in-out; + -moz-transition: opacity 1s ease-in-out; + -o-transition: opacity 1s ease-in-out; + transition: opacity 1s ease-in-out; } /*元素·设置*/ -.shezhi{ - --w: 65px; - --h: calc(var(--w) * 82/107); - width: var(--w); - height: var(--h); - bottom: calc(100% - 69px);/*calc提高位置布局精度*/ - left: calc(100% - 498px); - background-size: 100% 100%; - background-image: url("./images/SSCD/shezhi.png");/*图片路径*/ - z-index: 99;/*元素堆叠层级,越大越往前*/ - position:fixed;/*固定位置,防止元素乱跑*/ +.shezhi { + --w: 65px; + --h: calc(var(--w) * 82 / 107); + width: var(--w); + height: var(--h); + bottom: calc(100% - 69px); /*calc提高位置布局精度*/ + left: calc(100% - 498px); + background-size: 100% 100%; + background-image: url("./images/SSCD/shezhi.png"); /*图片路径*/ + z-index: 99; /*元素堆叠层级,越大越往前*/ + position: fixed; /*固定位置,防止元素乱跑*/ } /*元素·退出*/ -.tuichu{ - --w: 65px; - --h: calc(var(--w) * 82/107); - width: var(--w); - height: var(--h); - bottom: calc(100% - 69px); - left: calc(100% - 418px); - background-size: 100% 100%; - background-image: url("./images/SSCD/tuichu.png"); - z-index: 99; - position:fixed;/*固定位置防止元素乱跑*/ +.tuichu { + --w: 65px; + --h: calc(var(--w) * 82 / 107); + width: var(--w); + height: var(--h); + bottom: calc(100% - 69px); + left: calc(100% - 418px); + background-size: 100% 100%; + background-image: url("./images/SSCD/tuichu.png"); + z-index: 99; + position: fixed; /*固定位置防止元素乱跑*/ } /*元素·逃跑*/ -.taopao{ - --w: 65px; - --h: calc(var(--w) * 82/107); - width: var(--w); - height: var(--h); - bottom: calc(100% - 69px); - left: calc(100% - 338px); - background-size: 100% 100%; - background-image: url("./images/SSCD/taopao.png"); - z-index: 99; - position:fixed; +.taopao { + --w: 65px; + --h: calc(var(--w) * 82 / 107); + width: var(--w); + height: var(--h); + bottom: calc(100% - 69px); + left: calc(100% - 338px); + background-size: 100% 100%; + background-image: url("./images/SSCD/taopao.png"); + z-index: 99; + position: fixed; } /*元素·投降*/ -.touxiang{ - --w: 65px; - --h: calc(var(--w) * 82/107); - width: var(--w); - height: var(--h); - bottom: calc(100% - 69px); - left: calc(100% - 260px); - background-size: 100% 100%; - background-image: url("./images/SSCD/touxiang.png"); - z-index: 99; - position:fixed; +.touxiang { + --w: 65px; + --h: calc(var(--w) * 82 / 107); + width: var(--w); + height: var(--h); + bottom: calc(100% - 69px); + left: calc(100% - 260px); + background-size: 100% 100%; + background-image: url("./images/SSCD/touxiang.png"); + z-index: 99; + position: fixed; } /*元素·托管*/ -.tuoguan{ - --w: 65px; - --h: calc(var(--w) * 82/107); - width: var(--w); - height: var(--h); - bottom: calc(100% - 69px); - left: calc(100% - 184px); - background-size: 100% 100%; - background-image: url("./images/SSCD/tuoguan.png"); - z-index: 99; - position:fixed; +.tuoguan { + --w: 65px; + --h: calc(var(--w) * 82 / 107); + width: var(--w); + height: var(--h); + bottom: calc(100% - 69px); + left: calc(100% - 184px); + background-size: 100% 100%; + background-image: url("./images/SSCD/tuoguan.png"); + z-index: 99; + position: fixed; } - - #arena:not(.single-handcard):not(.chess).cxy-new-ui > .lbtn-controls ~ #mebg, #arena:not(.single-handcard):not(.chess).cxy-new-ui > .lbtn-controls ~ #me { left: 40px !important; @@ -114,27 +113,25 @@ .lbtn-control { width: 68px; height: 55px; - background-image:none; + background-image: none; left: 1.6%; - font-size: 19px;/*字体大小*/ + font-size: 19px; /*字体大小*/ background-size: 100% 100%; background-color: transparent; line-height: 45px; - text-align: center;/*使文本位于元素中心*/ + text-align: center; /*使文本位于元素中心*/ white-space: nowrap; - color: #a08850;/*颜色色值*/ - font-family: 'shousha';/*字体*/ - font-weight: bold;/*字体加粗*/ - -webkit-text-stroke: 1.5px rgba(43,31,25,0.4);/*描边*/ - text-shadow:none;/*文字阴影*/ - border-radius: 0px;/*元素边缘圆角大小*/ + color: #a08850; /*颜色色值*/ + font-family: "shousha"; /*字体*/ + font-weight: bold; /*字体加粗*/ + -webkit-text-stroke: 1.5px rgba(43, 31, 25, 0.4); /*描边*/ + text-shadow: none; /*文字阴影*/ + border-radius: 0px; /*元素边缘圆角大小*/ } .lbtn-control + .lbtn-control { margin-top: 1px; } - - /*牌序*/ .lbtn-paixu { width: 68px; @@ -142,19 +139,19 @@ background-image: url("./images/uibutton/btn-paixu.png"); left: 1.6%; bottom: 25.2%; - z-index:5; - font-size: 18.1px;/*字体大小*/ + z-index: 5; + font-size: 18.1px; /*字体大小*/ background-size: 100% 100%; background-color: transparent; line-height: 45px; - text-align: center;/*使文本位于元素中心*/ + text-align: center; /*使文本位于元素中心*/ white-space: nowrap; - color: #c5af88;/*颜色色值*/ - font-family: 'shousha';/*字体*/ - font-weight: bold;/*字体加粗*/ - -webkit-text-stroke: 1.1px rgba(43,31,25,0.5);/*描边*/ - text-shadow:none;/*文字阴影*/ - border-radius: 0px;/*元素边缘圆角大小*/ + color: #c5af88; /*颜色色值*/ + font-family: "shousha"; /*字体*/ + font-weight: bold; /*字体加粗*/ + -webkit-text-stroke: 1.1px rgba(43, 31, 25, 0.5); /*描边*/ + text-shadow: none; /*文字阴影*/ + border-radius: 0px; /*元素边缘圆角大小*/ } .lbtn-control + .lbtn-control { margin-top: 1px; @@ -162,20 +159,20 @@ /*记录*/ .latn-jilu { - display: block; + display: block; position: absolute; left: 1.6%; background-size: 100% 100%; border-radius: 1px; width: 68px; height: 55px; - /*--w: 68px; + /*--w: 68px; --h: calc(var(--w) * 78/91); width: var(--w); height: var(--h);*/ - background-image: url("./images/uibutton/btn-jilu.png"); - bottom: 15%; - z-index:5; + background-image: url("./images/uibutton/btn-jilu.png"); + bottom: 15%; + z-index: 5; } .lbtn-confirm:not(.closing).removing { @@ -183,7 +180,7 @@ } .control { - --height: 40px;/*40*/ + --height: 40px; /*40*/ width: auto !important; background: transparent; box-shadow: none; @@ -192,12 +189,13 @@ } /*无懈按钮位置*/ -#arena>#dui-controls>.control.stayleft { +#arena > #dui-controls > .control.stayleft { left: calc(50% - 420px) !important; margin-bottom: 0px !important; order: 3; } -.control > div { /*其他按钮(与下面的相反)*/ +.control > div { + /*其他按钮(与下面的相反)*/ background-image: url("./images/uibutton/cbtn.png"); background-size: 100% 100%; line-height: 30px; @@ -206,16 +204,16 @@ min-width: 140px !important; /*限制最小宽度*/ min-height: 18px !important; /*限制最大高度*/ /*margin: 0px 5px !important;/*与其他按钮之间的距离,越小越靠近0 5*/ - margin-left:2px !important; - margin-right:2px !important; - margin-top:20px !important; + margin-left: 2px !important; + margin-right: 2px !important; + margin-top: 20px !important; margin-bottom: 0px !important; - -webkit-text-stroke:0.7px #5b6727; - text-shadow: 1px 1px 0px #5b6727,-1px -1px 0px #5b6727,2px 2px 0px #5b6727,-2px -2px 0px #5b6727; + -webkit-text-stroke: 0.7px #5b6727; + text-shadow: 1px 1px 0px #5b6727, -1px -1px 0px #5b6727, 2px 2px 0px #5b6727, -2px -2px 0px #5b6727; color: #c2c374; - font-family: 'HYZLSJ'; + font-family: "HYZLSJ"; font-size: 30px; - font-weight:900; + font-weight: 900; border-radius: 4px; overflow: visible; transition: none; @@ -226,7 +224,8 @@ } /*分离选项类名*/ -.control > div.choice { /*其他按钮(确认/取消除外)*/ +.control > div.choice { + /*其他按钮(确认/取消除外)*/ background-image: url("./images/uibutton/cbtn.png"); background-size: 100% 100%; text-align: center; @@ -234,12 +233,12 @@ min-width: 120px !important; /*限制最小宽度*/ min-height: 25px !important; /*限制最小高度*/ margin: 2px 20px 3px 20px !important; /*外边距,别管*/ - font-family: 'shousha'; /*字体样式*/ + font-family: "shousha"; /*字体样式*/ font-size: 30px; /*字体大小*/ border-radius: 4px; - color:#c2c374; - -webkit-text-stroke:0.7px #5b6727; - text-shadow: 1px 1px 0px #5b6727,-1px -1px 0px #5b6727,2px 2px 0px #5b6727,-2px -2px 0px #5b6727; + color: #c2c374; + -webkit-text-stroke: 0.7px #5b6727; + text-shadow: 1px 1px 0px #5b6727, -1px -1px 0px #5b6727, 2px 2px 0px #5b6727, -2px -2px 0px #5b6727; overflow: visible; transition: none; } @@ -249,7 +248,6 @@ font-size: 30px !important; /*字体大小*/ background-image: url("./images/uibutton/confirm-bg-c.png"); padding: 8px 12px !important; - } .control > div + div { @@ -260,19 +258,20 @@ .control > div.disabled:not([data-type="endButton"]) { background-size: 100% 100%; filter: grayscale(100%); - -webkit-filter: grayscale(100%);/*按钮变灰*/ + -webkit-filter: grayscale(100%); /*按钮变灰*/ } -.control > div.primary > span { /*确认按钮*/ +.control > div.primary > span { + /*确认按钮*/ --sh: calc(var(--h) - 6px); display: block; font-size: 40px; line-height: var(--sh); /*top: calc(100% - 44px);/*按钮位置数字越小越往下*/ - margin: 0px 5px !important;/*0 35*/ + margin: 0px 5px !important; /*0 35*/ background-image: url("./images/uibutton/btn.png"); - padding: 20px 60px !important;/*按钮高度+宽度 建议别调22 68*/ + padding: 20px 60px !important; /*按钮高度+宽度 建议别调22 68*/ min-height: 20px; /*限制最小高度*/ - min-width: 60px; /*限制最小宽度*/ + min-width: 60px; /*限制最小宽度*/ background-size: 100% 108%; text-shadow: 1px 1px 2.5px rgba(62, 57, 38, 0.1); bottom: 0px; @@ -287,45 +286,45 @@ display: block; font-size: 40px; line-height: var(--sh); - margin: 0px 5px !important;/*元素离边缘的距离,外边距,简单说就是确定与取消之间的距离*/ + margin: 0px 5px !important; /*元素离边缘的距离,外边距,简单说就是确定与取消之间的距离*/ background-image: url("./images/uibutton/huanpai.png"); - padding: 12px 36px !important;/*按钮高度+宽度 建议别调*/ + padding: 12px 36px !important; /*按钮高度+宽度 建议别调*/ min-height: 20px; /*限制最小高度*/ min-width: 60px; /*限制最小宽度*/ background-size: 100% 108%; - background-repeat:no-repeat; + background-repeat: no-repeat; text-shadow: 1px 1px 2.5px rgba(62, 57, 38, 0.1); - margin-top:20px !important; + margin-top: 20px !important; position: relative; } .control > div.huan.huan2 { -background-image: url("./images/uibutton/huanpai2.png"); + background-image: url("./images/uibutton/huanpai2.png"); } .control > div.qi { --sh: calc(var(--h) - 6px); display: block; font-size: 40px; line-height: var(--sh); - margin: 0px 5px !important;/*元素离边缘的距离,外边距,简单说就是确定与取消之间的距离*/ + margin: 0px 5px !important; /*元素离边缘的距离,外边距,简单说就是确定与取消之间的距离*/ background-image: url("./images/uibutton/qipai.png"); - padding: 15px 30px !important;/*按钮高度+宽度 建议别调*/ + padding: 15px 30px !important; /*按钮高度+宽度 建议别调*/ min-height: 20px; /*限制最小高度*/ min-width: 60px; /*限制最小宽度*/ background-size: 100% 100%; text-shadow: 1px 1px 2.5px rgba(62, 57, 38, 0.1); - margin-top:21px !important; + margin-top: 21px !important; position: relative; } /*手牌*/ /*这里给这个元素设置了一些默认值,如果在这个标签下的元素,不再设置其他值时,将调用这些默认值*/ .handcardNumber { - bottom: 2px; + bottom: 2px; right: 275px; - font-family: 'HYZLSJ'; + font-family: "HYZLSJ"; color: #ffffff; font-weight: 100 !important; font-size: 13px !important; -/* text-shadow: #F5D78E 0 0 1px, + /* text-shadow: #F5D78E 0 0 1px, black 0 0 2px, black 0 0 2px, black 0 0 2px, @@ -339,23 +338,23 @@ background-image: url("./images/uibutton/huanpai2.png"); left: 354px; bottom: -10px; --w: 450px; - --h: calc(var(--w) * 300/ 720);/*宽和长*/ + --h: calc(var(--w) * 300 / 720); /*宽和长*/ width: var(--w); height: var(--h); background-image: url("./images/uibutton/shoupai1.png"); background-size: 100% 100%; -/* box-shadow: 2px 2px 1px #2b2219;*/ + /* box-shadow: 2px 2px 1px #2b2219;*/ position: relative; - z-index: -1; + z-index: -1; } /*手牌数值 /*由于重新设置了数值,所以不调用默认值*/ .handcardNumber > .cardNumber { - left: 500px; + left: 500px; bottom: 15px; height: 8px; - font-family: 'HYZLSJ'; + font-family: "HYZLSJ"; font-weight: 600; line-height: 25px; text-align: right; @@ -368,12 +367,9 @@ background-image: url("./images/uibutton/huanpai2.png"); /*同理,定义整体*/ .cardRoundNumber { top: 30px; - right: 123px;/*牌堆数及游戏时间,轮数整体。越大越往左*/ - font-family: 'shousha'; - text-shadow: black 1px 1px 1px, - black 1px -1px 1px, - black -1px 1px 1px, - black -1px -1px 1px; + right: 123px; /*牌堆数及游戏时间,轮数整体。越大越往左*/ + font-family: "shousha"; + text-shadow: black 1px 1px 1px, black 1px -1px 1px, black -1px 1px 1px, black -1px -1px 1px; } /*牌堆图片*/ .cardRoundNumber > .cardPileNumber { @@ -384,380 +380,377 @@ background-image: url("./images/uibutton/huanpai2.png"); background-size: 100% 100%; left: 1px; position: relative; - z-index:92px;/*为了兼容武将界面*/ + z-index: 92px; /*为了兼容武将界面*/ } .cardRoundNumber > .cardPileNumber > span { - left: 3.7px; - bottom: 24px; - width: 100%; - color: #e2d3c2; - display: block; - position: absolute; - line-height: 18px; - text-align: center; - font-family: 'HYZLSJ'; - font-stretch: ultra-condensed; - font-size: 25px;/*牌堆数*/ - -webkit-text-stroke: 1.25px #2b1f19; - text-shadow:-1.5px 0px 1.5px #2b1f19, 0px -1.5px 1.5px #2b1f19, 1.5px 0px 1.5px #2b1f19 ,0px 1.5px 1.5px #2b1f19; - font-weight: 600; + left: 3.7px; + bottom: 24px; + width: 100%; + color: #e2d3c2; + display: block; + position: absolute; + line-height: 18px; + text-align: center; + font-family: "HYZLSJ"; + font-stretch: ultra-condensed; + font-size: 25px; /*牌堆数*/ + -webkit-text-stroke: 1.25px #2b1f19; + text-shadow: -1.5px 0px 1.5px #2b1f19, 0px -1.5px 1.5px #2b1f19, 1.5px 0px 1.5px #2b1f19, 0px 1.5px 1.5px #2b1f19; + font-weight: 600; } /*游戏轮数和时间*/ /*这里要为轮数和时间一起设置参数,但又不能调用默认值,所以用,连写*/ .cardRoundNumber > .roundNumber, .cardRoundNumber > .time { - /*游戏轮数显示*/ - left: 10px; - bottom: 70px; - height: 16px; - line-height: 16px; - letter-spacing: 3.2px; - font-family: 'shousha'; - font-size: 20px; - font-weight: 900; - text-shadow:-1.7px 0px 3px #2b1f19, 0px -1.7px 3px #2b1f19, 1.7px 0px 3px #2b1f19 ,0px 1.7px 3px #2b1f19;/*这个是文字阴影*/ - -webkit-text-stroke: 0.85px #2b1f19; - white-space: nowrap; - color: #97856a; + /*游戏轮数显示*/ + left: 10px; + bottom: 70px; + height: 16px; + line-height: 16px; + letter-spacing: 3.2px; + font-family: "shousha"; + font-size: 20px; + font-weight: 900; + text-shadow: -1.7px 0px 3px #2b1f19, 0px -1.7px 3px #2b1f19, 1.7px 0px 3px #2b1f19, 0px 1.7px 3px #2b1f19; /*这个是文字阴影*/ + -webkit-text-stroke: 0.85px #2b1f19; + white-space: nowrap; + color: #97856a; } /*游戏时间显示*/ /*Q:可能有小伙伴不李姐了,说上面不是定义了游戏时间的参数了吗?为啥这里又来一遍?A:js里创造了两个布局一个是时间,另一个是游戏轮数。关于位置关系,不能一同用一种参数调用,不然会叠在一起(不信你试试),当然下面的颜色属性是可以删掉的,不影响。*/ .cardRoundNumber > .time { - bottom: 70px; - font-size: 20px; - font-family: 'shousha'; - line-height: 16px;/*文字行高*/ - letter-spacing: 3.2px; - left: -60px; - color: #97856a; - /*font-size: 0px;*/ -} - -.control.dou3> div { - /*无懈按钮*/ + bottom: 70px; + font-size: 20px; + font-family: "shousha"; + line-height: 16px; /*文字行高*/ + letter-spacing: 3.2px; + left: -60px; + color: #97856a; + /*font-size: 0px;*/ +} + +.control.dou3 > div { + /*无懈按钮*/ background-size: contain; font-size: 0px; /*字体大小*/ - margin-top:3px!important; - margin-left:152px!important; - background-repeat:no-repeat; + margin-top: 3px !important; + margin-left: 152px !important; + background-repeat: no-repeat; padding: 6px 24px !important; /*按钮高度+宽度 建议别调*/ - } - - /*假装无敌牌堆计数*/ .card-statistics { - width: 85%; - height: 75%; - left: 50%; - top: 50%; - border: 3px solid rgb(213 194 179); - border-radius: 10px; - font-size: 48px !important; - transform: translate(-50%, -50%); - text-align: center; - background: #231A1B; + width: 85%; + height: 75%; + left: 50%; + top: 50%; + border: 3px solid rgb(213 194 179); + border-radius: 10px; + font-size: 48px !important; + transform: translate(-50%, -50%); + text-align: center; + background: #231a1b; } .card-statistics-title { - display: flex; - position: relative; - width: 100%; - height: 10%; - align-items: center; - justify-items: center; - /*background: #372E1F;*/ - background-size: 100% 100%; - background-image: url("./images/uibutton/paiduiming.png"); + display: flex; + position: relative; + width: 100%; + height: 10%; + align-items: center; + justify-items: center; + /*background: #372E1F;*/ + background-size: 100% 100%; + background-image: url("./images/uibutton/paiduiming.png"); } .card-statistics-title > div { - position: relative; - flex: 1; - text-align: center; - color: #7F7768; - font-family: xinwei; - font-size: 25px; - align-items: center; - justify-items: center; - text-shadow: none; + position: relative; + flex: 1; + text-align: center; + color: #7f7768; + font-family: xinwei; + font-size: 25px; + align-items: center; + justify-items: center; + text-shadow: none; } .card-statistics-content { - display: flex; - width: 100%; - height: 80%; - font-size: 18px;/*单个项目文字大小*/ - position: relative; + display: flex; + width: 100%; + height: 80%; + font-size: 18px; /*单个项目文字大小*/ + position: relative; } .card-statistics-content > div { - overflow: auto; - flex: 1; - position: relative; - border-right: 3px solid; - border-image-slice: 0 100% 0 0; - border-image-source: url("./images/uibutton/paiduixian.png"); - height: 96%;/*明细项目长度*/ + overflow: auto; + flex: 1; + position: relative; + border-right: 3px solid; + border-image-slice: 0 100% 0 0; + border-image-source: url("./images/uibutton/paiduixian.png"); + height: 96%; /*明细项目长度*/ } .card-statistics-content .items { -/*单个卡牌名*/ - margin: 5px 0; - height: 30px; - position: relative; - color: #000000; - width: 100%; - display: flex; - align-items: center; - justify-items: center; + /*单个卡牌名*/ + margin: 5px 0; + height: 30px; + position: relative; + color: #000000; + width: 100%; + display: flex; + align-items: center; + justify-items: center; } .card-statistics-content .items .item { - position: relative; - flex: .8; - /*background: #C5BA9A;*/ - background-size: 90% 100%; - background-repeat: no-repeat; - background-position: center; - background-image: url("./images/uibutton/shousha.png"); - line-height: 2; - border-radius: 6px; + position: relative; + flex: 0.8; + /*background: #C5BA9A;*/ + background-size: 90% 100%; + background-repeat: no-repeat; + background-position: center; + background-image: url("./images/uibutton/shousha.png"); + line-height: 2; + border-radius: 6px; } .card-statistics-content .items .item-num { - position: relative; - color: #BDAF92; - flex: .2; + position: relative; + color: #bdaf92; + flex: 0.2; } -#arenalog>div { +#arenalog > div { position: relative; display: block; width: calc(100% - 23px); left: 20px; font-size: 18px; line-height: 21px; - background: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.5) 10%, rgba(0,0,0,0.5) 90%, transparent 100%); - /*background-image: url("./info.png");*/ - background-size: 100% 100%; + background: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.5) 10%, rgba(0, 0, 0, 0.5) 90%, transparent 100%); + /*background-image: url("./info.png");*/ + background-size: 100% 100%; } -#window:not(.low_performance) #arena #arenalog>div { +#window:not(.low_performance) #arena #arenalog > div { animation: game_start 0.5s; -webkit-animation: game_start 0.5s; } /*托管中图片(手杀)*/ -#autonode>div:last-child{ - z-index: 10; - margin-left:150px!important; - margin-bottom:-46px!important; +#autonode > div:last-child { + z-index: 10; + margin-left: 150px !important; + margin-bottom: -46px !important; font-size: 0px; text-shadow: none; --w: 285px; - --h: calc(var(--w) * 169/365);/*高和长*/ - width: var(--w);/*按比例调节*/ - height: var(--h);/*同理*/ + --h: calc(var(--w) * 169 / 365); /*高和长*/ + width: var(--w); /*按比例调节*/ + height: var(--h); /*同理*/ /*display: table;*/ background-image: url("./images/SSCD/tuoguan2.png"); - background-size:100% 100%; - -webkit-text-fill-color: transparent; - text-shadow:none!important; + background-size: 100% 100%; + -webkit-text-fill-color: transparent; + text-shadow: none !important; } /*------身份任务提示-------*/ /*身份任务主公*/ -.sfrwzhugong{ - position:fixed; - background-color: none; - background-repeat: no-repeat; - background-image: url('./images/JSJM/zhugong.png')!important; - background-size: 100% 100%; - width:1000px; - height:435px; - left: 110px; - bottom: 60px; +.sfrwzhugong { + position: fixed; + background-color: none; + background-repeat: no-repeat; + background-image: url("./images/JSJM/zhugong.png") !important; + background-size: 100% 100%; + width: 1000px; + height: 435px; + left: 110px; + bottom: 60px; } /*身份任务忠臣*/ -.sfrwchongchen{ - position:fixed; - background-color: none; - background-repeat: no-repeat; - background-image: url('./images/JSJM/zhongchen.png')!important; - background-size: 100% 100%; - width:1000px; - height:435px; - left: 110px; - bottom: 60px; +.sfrwchongchen { + position: fixed; + background-color: none; + background-repeat: no-repeat; + background-image: url("./images/JSJM/zhongchen.png") !important; + background-size: 100% 100%; + width: 1000px; + height: 435px; + left: 110px; + bottom: 60px; } /*身份任务反贼*/ -.sfrwfanzei{ - position:fixed; - background-color: none; - background-repeat: no-repeat; - background-image: url('./images/JSJM/fanzei.png')!important; - background-size: 100% 100%; - width:1000px; - height:435px; - left: 110px; - bottom: 60px; +.sfrwfanzei { + position: fixed; + background-color: none; + background-repeat: no-repeat; + background-image: url("./images/JSJM/fanzei.png") !important; + background-size: 100% 100%; + width: 1000px; + height: 435px; + left: 110px; + bottom: 60px; } /*身份任务内奸*/ -.sfrwneijian{ - position:fixed; - background-color: none; - background-repeat: no-repeat; - background-image: url('./images/JSJM/neijian.png')!important; - background-size: 100% 100%; - width:1000px; - height:435px; - left: 110px; - bottom: 60px; +.sfrwneijian { + position: fixed; + background-color: none; + background-repeat: no-repeat; + background-image: url("./images/JSJM/neijian.png") !important; + background-size: 100% 100%; + width: 1000px; + height: 435px; + left: 110px; + bottom: 60px; } /*身份任务地主*/ -.sfrwdizhu{ - position:fixed; - background-color: none; - background-repeat: no-repeat; - background-image: url('./images/JSJM/dizhu.png')!important; - background-size: 100% 100%; - width:1000px; - height:435px; - left: 110px; - bottom: 60px; +.sfrwdizhu { + position: fixed; + background-color: none; + background-repeat: no-repeat; + background-image: url("./images/JSJM/dizhu.png") !important; + background-size: 100% 100%; + width: 1000px; + height: 435px; + left: 110px; + bottom: 60px; } /*身份任务农民*/ -.sfrwnongmin{ - position:fixed; - background-color: none; - background-repeat: no-repeat; - background-image: url('./images/JSJM/nongmin.png')!important; - background-size: 100% 100%; - width:1000px; - height:435px; - left: 110px; - bottom: 60px; +.sfrwnongmin { + position: fixed; + background-color: none; + background-repeat: no-repeat; + background-image: url("./images/JSJM/nongmin.png") !important; + background-size: 100% 100%; + width: 1000px; + height: 435px; + left: 110px; + bottom: 60px; } /*身份任务虎队*/ -.sfrwhu{ - position:fixed; - background-color: none; - background-repeat: no-repeat; - background-image: url('./images/JSJM/hu.png')!important; - background-size: 100% 100%; - width:1000px; - height:435px; - left: 110px; - bottom: 60px; +.sfrwhu { + position: fixed; + background-color: none; + background-repeat: no-repeat; + background-image: url("./images/JSJM/hu.png") !important; + background-size: 100% 100%; + width: 1000px; + height: 435px; + left: 110px; + bottom: 60px; } /*身份任务魏国*/ -.sfrwweiguo{ - position:fixed; - background-color: none; - background-repeat: no-repeat; - background-image: url('./images/JSJM/weiguo.png')!important; - background-size: 100% 100%; - width:1000px; - height:435px; - left: 110px; - bottom: 60px; +.sfrwweiguo { + position: fixed; + background-color: none; + background-repeat: no-repeat; + background-image: url("./images/JSJM/weiguo.png") !important; + background-size: 100% 100%; + width: 1000px; + height: 435px; + left: 110px; + bottom: 60px; } /*身份任务蜀国*/ -.sfrwshuguo{ - position:fixed; - background-color: none; - background-repeat: no-repeat; - background-image: url('./images/JSJM/shuguo.png')!important; - background-size: 100% 100%; - width:1000px; - height:435px; - left: 110px; - bottom: 60px; +.sfrwshuguo { + position: fixed; + background-color: none; + background-repeat: no-repeat; + background-image: url("./images/JSJM/shuguo.png") !important; + background-size: 100% 100%; + width: 1000px; + height: 435px; + left: 110px; + bottom: 60px; } /*身份任务吴国*/ -.sfrwwuguo{ - position:fixed; - background-color: none; - background-repeat: no-repeat; - background-image: url('./images/JSJM/wuguo.png')!important; - background-size: 100% 100%; - width:1000px; - height:435px; - left: 110px; - bottom: 60px; +.sfrwwuguo { + position: fixed; + background-color: none; + background-repeat: no-repeat; + background-image: url("./images/JSJM/wuguo.png") !important; + background-size: 100% 100%; + width: 1000px; + height: 435px; + left: 110px; + bottom: 60px; } /*身份任务晋国*/ -.sfrwjinguo{ - position:fixed; - background-color: none; - background-repeat: no-repeat; - background-image: url('./images/JSJM/jinguo.png')!important; - background-size: 100% 100%; - width:1000px; - height:435px; - left: 110px; - bottom: 60px; +.sfrwjinguo { + position: fixed; + background-color: none; + background-repeat: no-repeat; + background-image: url("./images/JSJM/jinguo.png") !important; + background-size: 100% 100%; + width: 1000px; + height: 435px; + left: 110px; + bottom: 60px; } /*身份任务野心家*/ -.sfrwyexinjia{ - position:fixed; - background-color: none; - background-repeat: no-repeat; - background-image: url('./images/JSJM/yexinjia.png')!important; - background-size: 100% 100%; - width:1000px; - height:435px; - left: 110px; - bottom: 60px; +.sfrwyexinjia { + position: fixed; + background-color: none; + background-repeat: no-repeat; + background-image: url("./images/JSJM/yexinjia.png") !important; + background-size: 100% 100%; + width: 1000px; + height: 435px; + left: 110px; + bottom: 60px; } /*身份任务群雄*/ -.sfrwqunxiong{ - position:fixed; - background-color: none; - background-repeat: no-repeat; - background-image: url('./images/JSJM/qunxiong.png')!important; - background-size: 100% 100%; - width:1000px; - height:435px; - left: 110px; - bottom: 60px; +.sfrwqunxiong { + position: fixed; + background-color: none; + background-repeat: no-repeat; + background-image: url("./images/JSJM/qunxiong.png") !important; + background-size: 100% 100%; + width: 1000px; + height: 435px; + left: 110px; + bottom: 60px; } /*身份任务未知*/ -.sfrwundefined{ - position:fixed; - background-color: none; - background-repeat: no-repeat; - background-image: url('./images/JSJM/undefined.png')!important; - background-size: 100% 100%; - width:1000px; - height:435px; - left: 110px; - bottom: 60px; +.sfrwundefined { + position: fixed; + background-color: none; + background-repeat: no-repeat; + background-image: url("./images/JSJM/undefined.png") !important; + background-size: 100% 100%; + width: 1000px; + height: 435px; + left: 110px; + bottom: 60px; } /*单挑任务先手*/ -.sfrwxianshou{ - position:fixed; - background-color: none; - background-repeat: no-repeat; - background-image: url('./images/JSJM/xianshou.png')!important; - background-size: 100% 100%; - width:1000px; - height:435px; - left: 110px; - bottom: 60px; +.sfrwxianshou { + position: fixed; + background-color: none; + background-repeat: no-repeat; + background-image: url("./images/JSJM/xianshou.png") !important; + background-size: 100% 100%; + width: 1000px; + height: 435px; + left: 110px; + bottom: 60px; } /*单挑任务后手*/ -.sfrwhoushou{ - position:fixed; - background-color: none; - background-repeat: no-repeat; - background-image: url('./images/JSJM/houshou.png')!important; - background-size: 100% 100%; - width:1000px; - height:435px; - left: 110px; - bottom: 60px; -} \ No newline at end of file +.sfrwhoushou { + position: fixed; + background-color: none; + background-repeat: no-repeat; + background-image: url("./images/JSJM/houshou.png") !important; + background-size: 100% 100%; + width: 1000px; + height: 435px; + left: 110px; + bottom: 60px; +} diff --git a/shoushaUI/lbtn/main1.js b/shoushaUI/lbtn/main1.js index bfd7426..c3a3c16 100644 --- a/shoushaUI/lbtn/main1.js +++ b/shoushaUI/lbtn/main1.js @@ -1,1140 +1,874 @@ app.import(function (lib, game, ui, get, ai, _status, app) { - game.ui_identityShow_update = function () { - var identityShow = game.ui_identityShow; /*图层1*/ - var identityShowx = game.ui_identityShowx; /*图层2 在图层1下面*/ - var str = ""; - if ( - lib.config.mode == "guozhan" || - (lib.config.mode == "versus" && get.config("versus_mode") == "siguo") || - (lib.config.mode == "versus" && get.config("versus_mode") == "jiange") - ) { - var unknown = game.countPlayer(function (current) { - return current.identity == "unknown"; - }); - var wei = game.countPlayer(function (current) { - return current.identity == "wei"; - }); - var shu = game.countPlayer(function (current) { - return current.identity == "shu"; - }); - var wu = game.countPlayer(function (current) { - return current.identity == "wu"; - }); - var qun = game.countPlayer(function (current) { - return current.identity == "qun"; - }); - var jin = game.countPlayer(function (current) { - return current.identity == "jin"; - }); - var ye = game.countPlayer(function (current) { - return current.identity == "ye"; - }); - var key = game.countPlayer(function (current) { - return current.identity == "key"; - }); - if (unknown > 0) - str += - '' + - get.translation("unknown") + - " x " + - unknown + - " "; - if (wei > 0) - str += - '' + - get.translation("wei") + - " x " + - wei + - " "; - if (shu > 0) - str += - '' + - get.translation("shu") + - " x " + - shu + - " "; - if (wu > 0) - str += - '' + - get.translation("wu") + - " x " + - wu + - " "; - if (qun > 0) - str += - '' + - get.translation("qun") + - " x " + - qun + - " "; - if (jin > 0) - str += - '' + - get.translation("jin") + - " x " + - jin + - " "; - if (ye > 0) - str += - '' + - get.translation("ye") + - " x " + - ye + - " "; - if (key > 0) - str += - '' + - get.translation("key") + - " x " + - key + - " "; - } else if ( - lib.config.mode == "versus" && - get.config("versus_mode") == "two" - ) { - var enemy = game.countPlayer(function (current) { - return current.isEnemyOf(game.me); - }); - var friend = game.countPlayer(function (current) { - return current.isFriendOf(game.me); - }); - if (enemy > 0) - str += '' + "虎" + " x " + enemy + " "; - if (friend > 0) - str += '' + "龙" + " x " + friend + " "; - } else { - var zhu = game.countPlayer(function (current) { - return ( - current.identity == "zhu" || - current.identity == "rZhu" || - current.identity == "bZhu" - ); - }); - var zhong = game.countPlayer(function (current) { - return ( - current.identity == "zhong" || - current.identity == "rZhong" || - current.identity == "bZhong" || - current.identity == "mingzhong" - ); - }); - var fan = game.countPlayer(function (current) { - return ( - current.identity == "fan" || - current.identity == "rYe" || - current.identity == "bYe" - ); - }); - var nei = game.countPlayer(function (current) { - return ( - current.identity == "nei" || - current.identity == "rNei" || - current.identity == "bNei" - ); - }); - if (zhu > 0) - str += - '' + - get.translation("zhu") + - " x " + - zhu + - " "; - if (zhong > 0) - str += - '' + - get.translation("zhong") + - " x " + - zhong + - " "; - if (fan > 0) - str += - '' + - get.translation("fan") + - " x " + - fan + - " "; - if (nei > 0) - str += - '' + - get.translation("nei") + - " x " + - nei; - } - - str += "
" + get.translation(game.me.identity + "_win_option"); - - /*尽量保持字体大小,行高一致,不然会产生偏移*/ - identityShow.innerHTML = - '' + - str + - ""; /*图层1*/ - identityShowx.innerHTML = - '' + - str + - ""; /*图层2*/ - }; - - game.ui_identityShow_init = function () { - if (game.ui_identityShow == undefined) { - game.ui_identityShow = ui.create.div("", "身份加载中......"); - game.ui_identityShow.style.top = - "1.9px"; /*图层1 上下位置如果需要改动 两个图层都要改*/ - game.ui_identityShow.style.left = - "63.5px"; /*图层2 左右位置如果需要改动 两个图层都要改*/ - game.ui_identityShow.style["z-index"] = 4; - if (lib.config.mode != "doudizhu") { - ui.arena.appendChild(game.ui_identityShow); - } - } - if (game.ui_identityShowx == undefined) { - game.ui_identityShowx = ui.create.div("", "身份加载中......"); - game.ui_identityShowx.style.top = "1.9px"; /*图层2*/ - game.ui_identityShowx.style.left = "63.5px"; /*图层2*/ - game.ui_identityShowx.style["z-index"] = 3; - if (lib.config.mode != "doudizhu") { - ui.arena.appendChild(game.ui_identityShowx); - } - } - }; - - lib.arenaReady.push(function () { - //更新轮次 - var originUpdateRoundNumber = game.updateRoundNumber; - game.updateRoundNumber = function () { - originUpdateRoundNumber.apply(this, arguments); - if (ui.cardRoundTime) ui.cardRoundTime.updateRoundCard(); - }; - /*聊天按钮模块*/ - if (lib.config.extension_十周年UI_LTAN == false) { - var liaotian = ui.create.node("img"); - liaotian.src = - lib.assetURL + - "extension/十周年UI/shoushaUI/lbtn/images/uibutton/liaotian.png"; - liaotian.style.cssText = - "display: block;--w: 135px;--h: calc(var(--w) * 699/960);width: var(--w);height: var(--h);position: absolute;top: calc(100% - 97px);right: calc(100% - 125px);background-color: transparent;z-index:3"; - liaotian.onclick = function () { - if (lib.config["extension_说话_enable"]) { - game.showChatWordBackground(); - } else { - game.showChatWordBackgroundX(); - } - }; - document.body.appendChild(liaotian); - } - /*---------------------*/ - - if ( - lib.config.mode == "identity" || - lib.config.mode == "guozhan" || - lib.config.mode == "versus" || - lib.config.mode == "single" || - lib.config.mode == "boss" - ) { - var translate = {}; - switch (lib.config.mode) { - case "single": - translate = { - zhu: "击败对手", - fan: "击败对手", - undefined: "未选择阵营", - }; - break; - case "boss": - translate = { - zhu: "击败盟军", - cai: "击败神祇", - undefined: "未选择阵营", - }; - break; - case "guozhan": - translate = { - undefined: "未选择势力", - unknown: "保持隐蔽", - ye: "   击败场上
所有其他角色", - key: "   击败所有
非键势力角色", - }; - for (var i = 0; i < lib.group.length; i++) { - translate[lib.group[i]] = - "   击败所有
非" + - get.translation(lib.group[i]) + - "势力角色"; - } - break; - case "versus": - if (get.config("versus_mode") == "standard") { - return; - } - if (get.config("versus_mode") == "two") { - translate = { - undefined: get.config("replace_character_two") - ? "抢先击败敌人
所有上场角色" - : "   协同队友
击败所有敌人", - }; - } - if (get.config("versus_mode") == "jiange") { - translate = { - wei: "  击败所有
蜀势力角色", - shu: "  击败所有
魏势力角色", - }; - } - if (get.config("versus_mode") == "siguo") { - for (var i = 0; i < lib.group.length; i++) { - translate[lib.group[i]] = - "获得龙船或击败
非" + - get.translation(lib.group[i]) + - "势力角色"; - } - } - break; - default: - translate = { - rZhu: "击败冷方主公
与所有野心家", - rZhong: "保护暖方主公
击败冷方主公
与所有野心家", - rYe: "联合冷方野心家
击败其他角色", - rNei: "协助冷方主公
击败暖方主公
与所有野心家", - bZhu: "击败暖方主公
与所有野心家", - bZhong: "保护冷方主公
击败暖方主公
与所有野心家", - bYe: "联合暖方野心家
击败其他角色", - bNei: "协助暖方主公
击败冷方主公
与所有野心家", - zhu: "推测场上身份
击败反贼内奸", - zhong: "   保护主公
取得最后胜利", - fan: "找出反贼队友
全力击败主公", - nei: "找出反贼忠臣
最后击败主公", - mingzhong: "   保护主公
取得最后胜利", - undefined: "胜利条件", - }; - break; - } - for (var i in translate) { - lib.translate[i + "_win_option"] = translate[i]; - } - game.ui_identityShow_init(); - setInterval(function () { - game.ui_identityShow_update(); - }, 1000); - } - //右上角菜单栏 - var head = ui.create.node("img"); - head.src = - lib.assetURL + "extension/十周年UI/shoushaUI/lbtn/images/SSCD/button.png"; - head.style.cssText = - "display: block;--w: 130px;--h: calc(var(--w) * 1080/1434);width: var(--w);height: var(--h);position: absolute;bottom: calc(100% - 98px);left: calc(100% - 126.2px);background-color: transparent;z-index:1"; - document.body.appendChild(head); - - var head = ui.create.node("div"); - head.style.cssText = - "display: block;width: 134px;height: 103px;position: absolute;top: 0px;right: -8px;background-color: transparent;z-index:1"; - head.onclick = function () { - game.playAudio( - "../extension/十周年UI/shoushaUI/lbtn/images/SSCD/label.mp3" - ); - var popuperContainer = ui.create.div( - ".popup-container", - { background: "rgb(0,0,0,0)" }, - ui.window - ); - popuperContainer.addEventListener("click", (event) => { - game.playAudio( - "../extension/十周年UI/shoushaUI/lbtn/images/SSCD/caidan.mp3" - ); - event.stopPropagation(); - popuperContainer.delete(200); - }); - var yemian = ui.create.div(".yemian", popuperContainer); - var shezhi = ui.create.div(".shezhi", popuperContainer); - shezhi.addEventListener("click", (event) => { - game.playAudio( - "../extension/十周年UI/shoushaUI/lbtn/images/SSCD/xuanzhe.mp3" - ); - if (!ui.click.configMenu) return; - game.closePopped(); - game.pause2(); - ui.click.configMenu(); - ui.system1.classList.remove("shown"); - ui.system2.classList.remove("shown"); - }); - var tuichu = ui.create.div(".tuichu", popuperContainer); - tuichu.addEventListener("click", (event) => { - game.playAudio( - "../extension/十周年UI/shoushaUI/lbtn/images/SSCD/xuanzhe.mp3" - ); - window.location.reload(); - }); - var taopao = ui.create.div(".taopao", popuperContainer); - taopao.addEventListener("click", (event) => { - game.playAudio( - "../extension/十周年UI/shoushaUI/lbtn/images/SSCD/xuanzhe.mp3" - ); - - game.reload(); - }); - var touxiang = ui.create.div(".touxiang", popuperContainer); - touxiang.addEventListener("click", (event) => { - game.playAudio( - "../extension/十周年UI/shoushaUI/lbtn/images/SSCD/xuanzhe.mp3" - ); - - game.over(); - }); - var tuoguan = ui.create.div(".tuoguan", popuperContainer); - tuoguan.addEventListener("click", (event) => { - game.playAudio( - "../extension/十周年UI/shoushaUI/lbtn/images/SSCD/xuanzhe.mp3" - ); - - ui.click.auto(); - }); - }; - document.body.appendChild(head); - - if ( - lib.config.mode == "identity" || - lib.config.mode == "doudizhu" || - lib.config.mode == "versus" || - lib.config.mode == "guozhan" - ) { - /*左上角问号框*/ - var tipshow = ui.create.node("img"); - tipshow.src = - lib.assetURL + - "extension/十周年UI/shoushaUI/lbtn/images/uibutton/shenfen.png"; - tipshow.style.cssText = - "display: block;--w: 400px;--h: calc(var(--w) * 279/2139);width: var(--w);height: var(--h);position: absolute;top: -1px;left:-45px;background-color: transparent;z-index:1"; - tipshow.onclick = function () { - var popuperContainer = ui.create.div(".popup-container", ui.window); - game.playAudio( - "../extension/十周年UI/shoushaUI/lbtn/images/SSCD/label.mp3" - ); - if (lib.config.mode == "identity") { - if (game.me.identity == "zhu") { - ui.create.div(".sfrwzhugong", popuperContainer); - } else if (game.me.identity == "zhong") { - ui.create.div(".sfrwchongchen", popuperContainer); - } else if (game.me.identity == "fan") { - ui.create.div(".sfrwfanzei", popuperContainer); - } else if (game.me.identity == "nei") { - ui.create.div(".sfrwneijian", popuperContainer); - } - } - if (lib.config.mode == "doudizhu") { - if (game.me.identity == "zhu") { - ui.create.div(".sfrwdizhu", popuperContainer); - } else if (game.me.identity == "fan") { - ui.create.div(".sfrwnongmin", popuperContainer); - } - } - if (lib.config.mode == "versus") { - ui.create.div(".sfrwhu", popuperContainer); - } - if (lib.config.mode == "guozhan") { - if (game.me.group == "unknown" || game.me.group == "undefined") { - ui.create.div(".sfrwundefined", popuperContainer); - } else if (game.me.group == "wei") { - ui.create.div(".sfrwweiguo", popuperContainer); - } else if (game.me.group == "shu") { - ui.create.div(".sfrwshuguo", popuperContainer); - } else if (game.me.group == "wu") { - ui.create.div(".sfrwwuguo", popuperContainer); - } else if (game.me.group == "qun") { - ui.create.div(".sfrwqunxiong", popuperContainer); - } else if (game.me.group == "jin") { - ui.create.div(".sfrwjinguo", popuperContainer); - } else if (game.me.group == "ye") { - ui.create.div(".sfrwyexinjia", popuperContainer); - } - } - popuperContainer.addEventListener("click", (event) => { - game.playAudio( - "../extension/十周年UI/shoushaUI/lbtn/images/SSCD/caidan.mp3" - ); - popuperContainer.delete(200); - }); - }; - document.body.appendChild(tipshow); - } - }); - - var plugin = { - name: "lbtn", - filter: function () { - return !["chess", "tafang"].includes(get.mode()); - }, - content: function (next) { - (lib.skill._uicardupdate = { - trigger: { player: "phaseJieshuBegin" }, - forced: true, - unique: true, - popup: false, - silent: true, - noLose: true, - noGain: true, - noDeprive: true, - priority: -Infinity, - filter: function (event, player) { - return player == game.me; - }, - content: function () { - if (ui.updateSkillControl) ui.updateSkillControl(game.me, true); - }, - }), - /*来自瓜瓜 自动牌序*/ - (lib.skill._paixu_paixu_paixu = { - charlotte: true, - trigger: { - player: ["gainEnd"], - }, - filter(event, player) { - return ( - window.paixuxx == false && - player == game.me && - !player.hasSkillTag("noSortCard") - ); - }, - silent: true, - forced: true, - content: function () { - var cards = game.me.getCards("hs"); - var sort2 = function (b, a) { - if (a.name != b.name) return lib.sort.card(a.name, b.name); - else if (a.suit != b.suit) - return lib.suit.indexOf(a) - lib.suit.indexOf(b); - else return a.number - b.number; - }; - if (cards.length > 1) { - cards.sort(sort2); - cards.forEach(function (i, j) { - game.me.node.handcards1.insertBefore( - cards[j], - game.me.node.handcards1.firstChild - ); - }); - dui.queueNextFrameTick(dui.layoutHand, dui); - } - }, - }); - }, - precontent: function () { - Object.assign(game.videoContent, { - createCardRoundTime: function () { - ui.cardRoundTime = plugin.create.cardRoundTime(); - }, - createhandcardNumber: function () { - ui.handcardNumber = plugin.create.handcardNumber(); - }, - updateCardRoundTime: function (opts) { - if (!ui.cardRoundTime) return; - ui.cardRoundTime.node.roundNumber.innerHTML = - "第" + game.roundNumber + "轮"; - ui.cardRoundTime.setNumberAnimation(opts.cardNumber); - }, - updateCardnumber: function (opts) { - if (!ui.handcardNumber) return; - // ui.handcardNumber.setNumberAnimation(opts.cardNumber); - }, - }); - app.reWriteFunction(ui.create, { - me: [ - function () { - plugin.create.control(); - }, - null, - ], - arena: [ - null, - function () { - if (ui.time3) { - clearInterval(ui.time3.interval); - ui.time3.delete(); - } - if (ui.cardPileNumber) ui.cardPileNumber.delete(); - ui.cardRoundTime = plugin.create.cardRoundTime(); - ui.handcardNumber = plugin.create.handcardNumber(); - }, - ], - cards: [ - null, - function () { - if (ui.cardRoundTime) { - ui.cardRoundTime.updateRoundCard(); - } - }, - ], - }); - app.reWriteFunction(lib.configMenu.appearence.config, { - update: [ - null, - function (res, config, map) { - map.control_style.hide(); - map.custom_button.hide(); - map.custom_button_system_top.hide(); - map.custom_button_system_bottom.hide(); - map.custom_button_control_top.hide(); - map.custom_button_control_bottom.hide(); - map.radius_size.hide(); - }, - ], - }); - - ui.create.confirm = function (str, func) { - if ( - (_status.mode == "huanle" && - _status.event.parent.name == "chooseCharacter" && - _status.event.parent.step == "6" && - _status.event.name == "chooseButton") || - (lib.config["extension_无名补丁_xindjun"] && - get.playerNumber() == "8" && - get.mode() == "identity" && - _status.mode == "normal" && - _status.event.parent.name == "chooseCharacter" && - _status.event.parent.step == "1" && - _status.event.name == "chooseButton") - ) { - var node = ui.dialog.querySelector(".selected"); - var head = ui.create.div(".ok23", node); - head.ondblclick = function (e) { - e.stopPropagation(); - ui.click.ok(); - }; - return; - } - var confirm = ui.confirm; - if (!confirm) { - confirm = ui.confirm = plugin.create.confirm(); - } - confirm.node.ok.classList.add("disabled"); - confirm.node.cancel.classList.add("disabled"); - if (_status.event.endButton) { - ui.confirm.node.cancel.classList.remove("disabled"); - } - if (str) { - if (str.indexOf("o") !== -1) { - confirm.node.ok.classList.remove("disabled"); - } - if (str.indexOf("c") !== -1) { - confirm.node.cancel.classList.remove("disabled"); - } - confirm.str = str; - } - - if (func) { - confirm.custom = func; - } - ui.updatec(); - confirm.update(); - }; - }, - create: { - control: function () {}, - confirm: function () { - //确定文本 - var confirm = ui.create.control("", "cancel"); - confirm.classList.add("lbtn-confirm"); - confirm.node = { - ok: confirm.firstChild, - cancel: confirm.lastChild, - - //小改动 - //cancel2: confirm.lastChild, - }; - if (_status.event.endButton) { - _status.event.endButton.close(); - // delete event.endButton; - } - confirm.node.ok.link = "ok"; - //这里重要修改2开始 - //目的是在使用手气卡时,将按钮替换为免费换牌(3次后替换为换牌的函数在gamedraw函数里),将弃牌阶段按钮替换为弃牌,所以css的样式一定要搬。(再次修改,用以适配神将选势力) - if (_status.event.name == "gameDraw") - confirm.node.ok.classList.add("huan"); - else if ( - _status.event.name == "chooseToDiscard" && - _status.event.parent.name == "phaseDiscard" - ) - confirm.node.ok.classList.add("qi"); - else if ( - (_status.mode == "huanle" && _status.event.parent.step == "7") || - (get.mode() == "identity" && - _status.mode == "normal" && - _status.event.parent.name == "chooseCharacter" && - _status.event.parent.step == "2") - ) - confirm.node.ok.classList.add("group"); - else confirm.node.ok.classList.add("primary"); - if ( - (_status.mode == "huanle" && _status.event.parent.step == "7") || - (get.mode() == "identity" && - _status.mode == "normal" && - _status.event.parent.name == "chooseCharacter" && - _status.event.parent.step == "2") - ) - confirm.node.cancel.remove(); - else confirm.node.cancel.classList.add("primary2"); - confirm.node.cancel.innerHTML = - ""; - - // confirm.node.cancel2.classList.add('primary2'); - - confirm.custom = plugin.click.confirm; - app.reWriteFunction(confirm, { - close: [ - function () { - this.classList.add("closing"); - }, - ], - }); - for (var k in confirm.node) { - confirm.node[k].classList.add("disabled"); - confirm.node[k].removeEventListener( - lib.config.touchscreen ? "touchend" : "click", - ui.click.control - ); - confirm.node[k].addEventListener( - lib.config.touchscreen ? "touchend" : "click", - function (e) { - e.stopPropagation(); - if (this.classList.contains("disabled")) { - if ( - this.link === "cancel" && - this.dataset.type === "endButton" && - _status.event.endButton - ) { - _status.event.endButton.custom(); - ui.confirm.close(); - // ui.updatec(); - } - return; - } - - if (this.parentNode.custom) { - this.parentNode.custom(this.link, this); - } - } - ); - } - - //添加重铸按钮素材 - if (ui.skills2 && ui.skills2.skills.length) { - var skills = ui.skills2.skills; - confirm.skills2 = []; - for (var i = 0; i < skills.length; i++) { - var item = document.createElement("div"); - item.link = skills[i]; - - if (skills[i] == "_recasting") { - item.innerHTML = - ""; - } else { - item.innerHTML = get.translation(skills[i]); - } - - item.addEventListener( - lib.config.touchscreen ? "touchend" : "click", - function (e) { - e.stopPropagation(); - ui.click.skill(this.link); - } - ); - - item.dataset.type = "skill2"; /* + game.ui_identityShow_update = function () { + var identityShow = game.ui_identityShow; /*图层1*/ + var identityShowx = game.ui_identityShowx; /*图层2 在图层1下面*/ + var str = ""; + if (lib.config.mode == "guozhan" || (lib.config.mode == "versus" && get.config("versus_mode") == "siguo") || (lib.config.mode == "versus" && get.config("versus_mode") == "jiange")) { + var unknown = game.countPlayer(function (current) { + return current.identity == "unknown"; + }); + var wei = game.countPlayer(function (current) { + return current.identity == "wei"; + }); + var shu = game.countPlayer(function (current) { + return current.identity == "shu"; + }); + var wu = game.countPlayer(function (current) { + return current.identity == "wu"; + }); + var qun = game.countPlayer(function (current) { + return current.identity == "qun"; + }); + var jin = game.countPlayer(function (current) { + return current.identity == "jin"; + }); + var ye = game.countPlayer(function (current) { + return current.identity == "ye"; + }); + var key = game.countPlayer(function (current) { + return current.identity == "key"; + }); + if (unknown > 0) str += '' + get.translation("unknown") + " x " + unknown + " "; + if (wei > 0) str += '' + get.translation("wei") + " x " + wei + " "; + if (shu > 0) str += '' + get.translation("shu") + " x " + shu + " "; + if (wu > 0) str += '' + get.translation("wu") + " x " + wu + " "; + if (qun > 0) str += '' + get.translation("qun") + " x " + qun + " "; + if (jin > 0) str += '' + get.translation("jin") + " x " + jin + " "; + if (ye > 0) str += '' + get.translation("ye") + " x " + ye + " "; + if (key > 0) str += '' + get.translation("key") + " x " + key + " "; + } else if (lib.config.mode == "versus" && get.config("versus_mode") == "two") { + var enemy = game.countPlayer(function (current) { + return current.isEnemyOf(game.me); + }); + var friend = game.countPlayer(function (current) { + return current.isFriendOf(game.me); + }); + if (enemy > 0) str += '' + "虎" + " x " + enemy + " "; + if (friend > 0) str += '' + "龙" + " x " + friend + " "; + } else { + var zhu = game.countPlayer(function (current) { + return current.identity == "zhu" || current.identity == "rZhu" || current.identity == "bZhu"; + }); + var zhong = game.countPlayer(function (current) { + return current.identity == "zhong" || current.identity == "rZhong" || current.identity == "bZhong" || current.identity == "mingzhong"; + }); + var fan = game.countPlayer(function (current) { + return current.identity == "fan" || current.identity == "rYe" || current.identity == "bYe"; + }); + var nei = game.countPlayer(function (current) { + return current.identity == "nei" || current.identity == "rNei" || current.identity == "bNei"; + }); + if (zhu > 0) str += '' + get.translation("zhu") + " x " + zhu + " "; + if (zhong > 0) str += '' + get.translation("zhong") + " x " + zhong + " "; + if (fan > 0) str += '' + get.translation("fan") + " x " + fan + " "; + if (nei > 0) str += '' + get.translation("nei") + " x " + nei; + } + + str += "
" + get.translation(game.me.identity + "_win_option"); + + /*尽量保持字体大小,行高一致,不然会产生偏移*/ + identityShow.innerHTML = '' + str + ""; /*图层1*/ + identityShowx.innerHTML = '' + str + ""; /*图层2*/ + }; + + game.ui_identityShow_init = function () { + if (game.ui_identityShow == undefined) { + game.ui_identityShow = ui.create.div("", "身份加载中......"); + game.ui_identityShow.style.top = "1.9px"; /*图层1 上下位置如果需要改动 两个图层都要改*/ + game.ui_identityShow.style.left = "63.5px"; /*图层2 左右位置如果需要改动 两个图层都要改*/ + game.ui_identityShow.style["z-index"] = 4; + if (lib.config.mode != "doudizhu") { + ui.arena.appendChild(game.ui_identityShow); + } + } + if (game.ui_identityShowx == undefined) { + game.ui_identityShowx = ui.create.div("", "身份加载中......"); + game.ui_identityShowx.style.top = "1.9px"; /*图层2*/ + game.ui_identityShowx.style.left = "63.5px"; /*图层2*/ + game.ui_identityShowx.style["z-index"] = 3; + if (lib.config.mode != "doudizhu") { + ui.arena.appendChild(game.ui_identityShowx); + } + } + }; + + lib.arenaReady.push(function () { + //更新轮次 + var originUpdateRoundNumber = game.updateRoundNumber; + game.updateRoundNumber = function () { + originUpdateRoundNumber.apply(this, arguments); + if (ui.cardRoundTime) ui.cardRoundTime.updateRoundCard(); + }; + /*聊天按钮模块*/ + if (lib.config.extension_十周年UI_LTAN == false) { + var liaotian = ui.create.node("img"); + liaotian.src = lib.assetURL + "extension/十周年UI/shoushaUI/lbtn/images/uibutton/liaotian.png"; + liaotian.style.cssText = "display: block;--w: 135px;--h: calc(var(--w) * 699/960);width: var(--w);height: var(--h);position: absolute;top: calc(100% - 97px);right: calc(100% - 125px);background-color: transparent;z-index:3"; + liaotian.onclick = function () { + if (lib.config["extension_说话_enable"]) { + game.showChatWordBackground(); + } else { + game.showChatWordBackgroundX(); + } + }; + document.body.appendChild(liaotian); + } + /*---------------------*/ + + if (lib.config.mode == "identity" || lib.config.mode == "guozhan" || lib.config.mode == "versus" || lib.config.mode == "single" || lib.config.mode == "boss") { + var translate = {}; + switch (lib.config.mode) { + case "single": + translate = { + zhu: "击败对手", + fan: "击败对手", + undefined: "未选择阵营", + }; + break; + case "boss": + translate = { + zhu: "击败盟军", + cai: "击败神祇", + undefined: "未选择阵营", + }; + break; + case "guozhan": + translate = { + undefined: "未选择势力", + unknown: "保持隐蔽", + ye: "   击败场上
所有其他角色", + key: "   击败所有
非键势力角色", + }; + for (var i = 0; i < lib.group.length; i++) { + translate[lib.group[i]] = "   击败所有
非" + get.translation(lib.group[i]) + "势力角色"; + } + break; + case "versus": + if (get.config("versus_mode") == "standard") { + return; + } + if (get.config("versus_mode") == "two") { + translate = { + undefined: get.config("replace_character_two") ? "抢先击败敌人
所有上场角色" : "   协同队友
击败所有敌人", + }; + } + if (get.config("versus_mode") == "jiange") { + translate = { + wei: "  击败所有
蜀势力角色", + shu: "  击败所有
魏势力角色", + }; + } + if (get.config("versus_mode") == "siguo") { + for (var i = 0; i < lib.group.length; i++) { + translate[lib.group[i]] = "获得龙船或击败
非" + get.translation(lib.group[i]) + "势力角色"; + } + } + break; + default: + translate = { + rZhu: "击败冷方主公
与所有野心家", + rZhong: "保护暖方主公
击败冷方主公
与所有野心家", + rYe: "联合冷方野心家
击败其他角色", + rNei: "协助冷方主公
击败暖方主公
与所有野心家", + bZhu: "击败暖方主公
与所有野心家", + bZhong: "保护冷方主公
击败暖方主公
与所有野心家", + bYe: "联合暖方野心家
击败其他角色", + bNei: "协助暖方主公
击败冷方主公
与所有野心家", + zhu: "推测场上身份
击败反贼内奸", + zhong: "   保护主公
取得最后胜利", + fan: "找出反贼队友
全力击败主公", + nei: "找出反贼忠臣
最后击败主公", + mingzhong: "   保护主公
取得最后胜利", + undefined: "胜利条件", + }; + break; + } + for (var i in translate) { + lib.translate[i + "_win_option"] = translate[i]; + } + game.ui_identityShow_init(); + setInterval(function () { + game.ui_identityShow_update(); + }, 1000); + } + //右上角菜单栏 + var head = ui.create.node("img"); + head.src = lib.assetURL + "extension/十周年UI/shoushaUI/lbtn/images/SSCD/button.png"; + head.style.cssText = "display: block;--w: 130px;--h: calc(var(--w) * 1080/1434);width: var(--w);height: var(--h);position: absolute;bottom: calc(100% - 98px);left: calc(100% - 126.2px);background-color: transparent;z-index:1"; + document.body.appendChild(head); + + var head = ui.create.node("div"); + head.style.cssText = "display: block;width: 134px;height: 103px;position: absolute;top: 0px;right: -8px;background-color: transparent;z-index:1"; + head.onclick = function () { + game.playAudio("../extension/十周年UI/shoushaUI/lbtn/images/SSCD/label.mp3"); + var popuperContainer = ui.create.div(".popup-container", { background: "rgb(0,0,0,0)" }, ui.window); + popuperContainer.addEventListener("click", event => { + game.playAudio("../extension/十周年UI/shoushaUI/lbtn/images/SSCD/caidan.mp3"); + event.stopPropagation(); + popuperContainer.delete(200); + }); + var yemian = ui.create.div(".yemian", popuperContainer); + var shezhi = ui.create.div(".shezhi", popuperContainer); + shezhi.addEventListener("click", event => { + game.playAudio("../extension/十周年UI/shoushaUI/lbtn/images/SSCD/xuanzhe.mp3"); + if (!ui.click.configMenu) return; + game.closePopped(); + game.pause2(); + ui.click.configMenu(); + ui.system1.classList.remove("shown"); + ui.system2.classList.remove("shown"); + }); + var tuichu = ui.create.div(".tuichu", popuperContainer); + tuichu.addEventListener("click", event => { + game.playAudio("../extension/十周年UI/shoushaUI/lbtn/images/SSCD/xuanzhe.mp3"); + window.location.reload(); + }); + var taopao = ui.create.div(".taopao", popuperContainer); + taopao.addEventListener("click", event => { + game.playAudio("../extension/十周年UI/shoushaUI/lbtn/images/SSCD/xuanzhe.mp3"); + + game.reload(); + }); + var touxiang = ui.create.div(".touxiang", popuperContainer); + touxiang.addEventListener("click", event => { + game.playAudio("../extension/十周年UI/shoushaUI/lbtn/images/SSCD/xuanzhe.mp3"); + + game.over(); + }); + var tuoguan = ui.create.div(".tuoguan", popuperContainer); + tuoguan.addEventListener("click", event => { + game.playAudio("../extension/十周年UI/shoushaUI/lbtn/images/SSCD/xuanzhe.mp3"); + + ui.click.auto(); + }); + }; + document.body.appendChild(head); + + if (lib.config.mode == "identity" || lib.config.mode == "doudizhu" || lib.config.mode == "versus" || lib.config.mode == "guozhan") { + /*左上角问号框*/ + var tipshow = ui.create.node("img"); + tipshow.src = lib.assetURL + "extension/十周年UI/shoushaUI/lbtn/images/uibutton/shenfen.png"; + tipshow.style.cssText = "display: block;--w: 400px;--h: calc(var(--w) * 279/2139);width: var(--w);height: var(--h);position: absolute;top: -1px;left:-45px;background-color: transparent;z-index:1"; + tipshow.onclick = function () { + var popuperContainer = ui.create.div(".popup-container", ui.window); + game.playAudio("../extension/十周年UI/shoushaUI/lbtn/images/SSCD/label.mp3"); + if (lib.config.mode == "identity") { + if (game.me.identity == "zhu") { + ui.create.div(".sfrwzhugong", popuperContainer); + } else if (game.me.identity == "zhong") { + ui.create.div(".sfrwchongchen", popuperContainer); + } else if (game.me.identity == "fan") { + ui.create.div(".sfrwfanzei", popuperContainer); + } else if (game.me.identity == "nei") { + ui.create.div(".sfrwneijian", popuperContainer); + } + } + if (lib.config.mode == "doudizhu") { + if (game.me.identity == "zhu") { + ui.create.div(".sfrwdizhu", popuperContainer); + } else if (game.me.identity == "fan") { + ui.create.div(".sfrwnongmin", popuperContainer); + } + } + if (lib.config.mode == "versus") { + ui.create.div(".sfrwhu", popuperContainer); + } + if (lib.config.mode == "guozhan") { + if (game.me.group == "unknown" || game.me.group == "undefined") { + ui.create.div(".sfrwundefined", popuperContainer); + } else if (game.me.group == "wei") { + ui.create.div(".sfrwweiguo", popuperContainer); + } else if (game.me.group == "shu") { + ui.create.div(".sfrwshuguo", popuperContainer); + } else if (game.me.group == "wu") { + ui.create.div(".sfrwwuguo", popuperContainer); + } else if (game.me.group == "qun") { + ui.create.div(".sfrwqunxiong", popuperContainer); + } else if (game.me.group == "jin") { + ui.create.div(".sfrwjinguo", popuperContainer); + } else if (game.me.group == "ye") { + ui.create.div(".sfrwyexinjia", popuperContainer); + } + } + popuperContainer.addEventListener("click", event => { + game.playAudio("../extension/十周年UI/shoushaUI/lbtn/images/SSCD/caidan.mp3"); + popuperContainer.delete(200); + }); + }; + document.body.appendChild(tipshow); + } + }); + + var plugin = { + name: "lbtn", + filter: function () { + return !["chess", "tafang"].includes(get.mode()); + }, + content: function (next) { + (lib.skill._uicardupdate = { + trigger: { player: "phaseJieshuBegin" }, + forced: true, + unique: true, + popup: false, + silent: true, + noLose: true, + noGain: true, + noDeprive: true, + priority: -Infinity, + filter: function (event, player) { + return player == game.me; + }, + content: function () { + if (ui.updateSkillControl) ui.updateSkillControl(game.me, true); + }, + }), + /*来自瓜瓜 自动牌序*/ + (lib.skill._paixu_paixu_paixu = { + charlotte: true, + trigger: { + player: ["gainEnd"], + }, + filter(event, player) { + return window.paixuxx == false && player == game.me && !player.hasSkillTag("noSortCard"); + }, + silent: true, + forced: true, + content: function () { + var cards = game.me.getCards("hs"); + var sort2 = function (b, a) { + if (a.name != b.name) return lib.sort.card(a.name, b.name); + else if (a.suit != b.suit) return lib.suit.indexOf(a) - lib.suit.indexOf(b); + else return a.number - b.number; + }; + if (cards.length > 1) { + cards.sort(sort2); + cards.forEach(function (i, j) { + game.me.node.handcards1.insertBefore(cards[j], game.me.node.handcards1.firstChild); + }); + dui.queueNextFrameTick(dui.layoutHand, dui); + } + }, + }); + }, + precontent: function () { + Object.assign(game.videoContent, { + createCardRoundTime: function () { + ui.cardRoundTime = plugin.create.cardRoundTime(); + }, + createhandcardNumber: function () { + ui.handcardNumber = plugin.create.handcardNumber(); + }, + updateCardRoundTime: function (opts) { + if (!ui.cardRoundTime) return; + ui.cardRoundTime.node.roundNumber.innerHTML = "第" + game.roundNumber + "轮"; + ui.cardRoundTime.setNumberAnimation(opts.cardNumber); + }, + updateCardnumber: function (opts) { + if (!ui.handcardNumber) return; + // ui.handcardNumber.setNumberAnimation(opts.cardNumber); + }, + }); + app.reWriteFunction(ui.create, { + me: [ + function () { + plugin.create.control(); + }, + null, + ], + arena: [ + null, + function () { + if (ui.time3) { + clearInterval(ui.time3.interval); + ui.time3.delete(); + } + if (ui.cardPileNumber) ui.cardPileNumber.delete(); + ui.cardRoundTime = plugin.create.cardRoundTime(); + ui.handcardNumber = plugin.create.handcardNumber(); + }, + ], + cards: [ + null, + function () { + if (ui.cardRoundTime) { + ui.cardRoundTime.updateRoundCard(); + } + }, + ], + }); + app.reWriteFunction(lib.configMenu.appearence.config, { + update: [ + null, + function (res, config, map) { + map.control_style.hide(); + map.custom_button.hide(); + map.custom_button_system_top.hide(); + map.custom_button_system_bottom.hide(); + map.custom_button_control_top.hide(); + map.custom_button_control_bottom.hide(); + map.radius_size.hide(); + }, + ], + }); + + ui.create.confirm = function (str, func) { + if ((_status.mode == "huanle" && _status.event.parent.name == "chooseCharacter" && _status.event.parent.step == "6" && _status.event.name == "chooseButton") || (lib.config["extension_无名补丁_xindjun"] && get.playerNumber() == "8" && get.mode() == "identity" && _status.mode == "normal" && _status.event.parent.name == "chooseCharacter" && _status.event.parent.step == "1" && _status.event.name == "chooseButton")) { + var node = ui.dialog.querySelector(".selected"); + var head = ui.create.div(".ok23", node); + head.ondblclick = function (e) { + e.stopPropagation(); + ui.click.ok(); + }; + return; + } + var confirm = ui.confirm; + if (!confirm) { + confirm = ui.confirm = plugin.create.confirm(); + } + confirm.node.ok.classList.add("disabled"); + confirm.node.cancel.classList.add("disabled"); + if (_status.event.endButton) { + ui.confirm.node.cancel.classList.remove("disabled"); + } + if (str) { + if (str.indexOf("o") !== -1) { + confirm.node.ok.classList.remove("disabled"); + } + if (str.indexOf("c") !== -1) { + confirm.node.cancel.classList.remove("disabled"); + } + confirm.str = str; + } + + if (func) { + confirm.custom = func; + } + ui.updatec(); + confirm.update(); + }; + }, + create: { + control: function () {}, + confirm: function () { + //确定文本 + var confirm = ui.create.control("", "cancel"); + confirm.classList.add("lbtn-confirm"); + confirm.node = { + ok: confirm.firstChild, + cancel: confirm.lastChild, + + //小改动 + //cancel2: confirm.lastChild, + }; + if (_status.event.endButton) { + _status.event.endButton.close(); + // delete event.endButton; + } + confirm.node.ok.link = "ok"; + //这里重要修改2开始 + //目的是在使用手气卡时,将按钮替换为免费换牌(3次后替换为换牌的函数在gamedraw函数里),将弃牌阶段按钮替换为弃牌,所以css的样式一定要搬。(再次修改,用以适配神将选势力) + if (_status.event.name == "gameDraw") confirm.node.ok.classList.add("huan"); + else if (_status.event.name == "chooseToDiscard" && _status.event.parent.name == "phaseDiscard") confirm.node.ok.classList.add("qi"); + else if ((_status.mode == "huanle" && _status.event.parent.step == "7") || (get.mode() == "identity" && _status.mode == "normal" && _status.event.parent.name == "chooseCharacter" && _status.event.parent.step == "2")) confirm.node.ok.classList.add("group"); + else confirm.node.ok.classList.add("primary"); + if ((_status.mode == "huanle" && _status.event.parent.step == "7") || (get.mode() == "identity" && _status.mode == "normal" && _status.event.parent.name == "chooseCharacter" && _status.event.parent.step == "2")) confirm.node.cancel.remove(); + else confirm.node.cancel.classList.add("primary2"); + confirm.node.cancel.innerHTML = ""; + + // confirm.node.cancel2.classList.add('primary2'); + + confirm.custom = plugin.click.confirm; + app.reWriteFunction(confirm, { + close: [ + function () { + this.classList.add("closing"); + }, + ], + }); + for (var k in confirm.node) { + confirm.node[k].classList.add("disabled"); + confirm.node[k].removeEventListener(lib.config.touchscreen ? "touchend" : "click", ui.click.control); + confirm.node[k].addEventListener(lib.config.touchscreen ? "touchend" : "click", function (e) { + e.stopPropagation(); + if (this.classList.contains("disabled")) { + if (this.link === "cancel" && this.dataset.type === "endButton" && _status.event.endButton) { + _status.event.endButton.custom(); + ui.confirm.close(); + // ui.updatec(); + } + return; + } + + if (this.parentNode.custom) { + this.parentNode.custom(this.link, this); + } + }); + } + + //添加重铸按钮素材 + if (ui.skills2 && ui.skills2.skills.length) { + var skills = ui.skills2.skills; + confirm.skills2 = []; + for (var i = 0; i < skills.length; i++) { + var item = document.createElement("div"); + item.link = skills[i]; + + if (skills[i] == "_recasting") { + item.innerHTML = ""; + } else { + item.innerHTML = get.translation(skills[i]); + } + + item.addEventListener(lib.config.touchscreen ? "touchend" : "click", function (e) { + e.stopPropagation(); + ui.click.skill(this.link); + }); + + item.dataset.type = "skill2"; /* if(ui.updateSkillControl) ui.updateSkillControl(game.me, true);*/ - confirm.insertBefore(item, confirm.firstChild); - } - } - - confirm.update = function () { - if (confirm.skills2) { - if ( - _status.event.skill && - _status.event.skill !== confirm.dataset.skill - ) { - confirm.dataset.skill = _status.event.skill; - confirm.skills2.forEach(function (item) { - item.remove(); - }); - ui.updatec(); - } else if (!_status.event.skill && confirm.dataset.skill) { - delete confirm.dataset.skill; - confirm.skills2.forEach(function (item) { - confirm.insertBefore(item, confirm.firstChild); - }); - ui.updatec(); - } - } - if (ui.updateSkillControl) ui.updateSkillControl(game.me, true); - }; - return confirm; - }, - - handcardNumber: function () { - var node3 = ui.create.div( - ".settingButton", - ui.arena, - plugin.click.setting - ); - var node2 = ui.create.div(".lbtn-controls", ui.arena); - ui.create.div(".lbtn-control", node2, " "); - ui.create.div(".lbtn-control", node2, " "); - /*ui.create.div('.lbtn-control1', node2, plugin.click.paixu);*/ - var paixuauto = ui.create.div(".lbtn-paixu", ui.arena); - paixuauto.onclick = function () { - if (window.paixuxx == false) { - plugin.click.paixu(); - paixuauto.setBackgroundImage( - "extension/十周年UI/shoushaUI/lbtn/images/uibutton/btn-paixu.png" - ); - window.paixuxx = true; - } else { - plugin.click.paixu(); - paixuauto.setBackgroundImage( - "extension/十周年UI/shoushaUI/lbtn/images/uibutton/zidongpaixu.png" - ); - window.paixuxx = false; - } - }; - var jilu = ui.create.div(".latn-jilu", ui.arena, ui.click.pause); - //-----------------// - /*ui.create.div('.lbtn-control2', node2, ui.click.pause);*/ - //var node4 = ui.create.div('.tuoguanButton', ui.arena, ui.click.auto); - var node = ui.create.div(".handcardNumber", ui.arena).hide(); - node.node = { - cardPicture: ui.create.div(".cardPicture", node), - cardNumber: ui.create.div(".cardNumber", node), - }; - //手牌显示·---// - node.updateCardnumber = function () { - if (!game.me) return; - var cardNumber2 = game.me.countCards("h") || 0; - var cardNumber = game.me.getHandcardLimit() || 0; - var numbercolor = "white"; - if (cardNumber2 > cardNumber) numbercolor = "white"; - if (cardNumber == Infinity) cardNumber = "∞"; - if (cardNumber > game.me.hp) numbercolor = "#20c520"; - if (cardNumber < game.me.hp) numbercolor = "#ff1813"; - if (cardNumber == game.me.hp) numbercolor = "#ffe9cd"; - this.node.cardNumber.innerHTML = - "" + - "" + - cardNumber2 + - "" + - '' + - "/" + - "' + - cardNumber + - "" + - ""; - // this.setNumberAnimation(cardNumber); - this.show(); - - game.addVideo("updateCardnumber", null, { - cardNumber: cardNumber, - }); - }; - node.node.cardNumber.interval = setInterval(function () { - ui.handcardNumber.updateCardnumber(); - }, 1000); - // game.addVideo('createCardRoundTime'); - game.addVideo("createhandcardNumber"); - return node; - }, - cardRoundTime: function () { - var node = ui.create.div(".cardRoundNumber", ui.arena).hide(); - node.node = { - /*cardPileNumber: ui.create.div('.cardPileNumber', node),*/ - //牌堆可点击 - cardPileNumber: ui.create.div( - ".cardPileNumber", - node, - plugin.click.paidui - ), - roundNumber: ui.create.div(".roundNumber", node), - time: ui.create.div(".time", node), - }; - - node.updateRoundCard = function () { - var cardNumber = ui.cardPile.childNodes.length || 0; - var roundNumber = game.roundNumber || 0; - this.node.roundNumber.innerHTML = - "第" + game.roundNumber + "轮"; - this.setNumberAnimation(cardNumber); - this.show(); - game.addVideo("updateCardRoundTime", null, { - cardNumber: cardNumber, - roundNumber: roundNumber, - }); - }; - - node.setNumberAnimation = function (num, step) { - var item = this.node.cardPileNumber; - clearTimeout(item.interval); - if (!item._num) { - item.innerHTML = "" + num + ""; - item._num = num; - } else { - if (item._num !== num) { - if (!step) step = 500 / Math.abs(item._num - num); - if (item._num > num) item._num--; - else item._num++; - item.innerHTML = "" + item._num + ""; - if (item._num !== num) { - item.interval = setTimeout(function () { - node.setNumberAnimation(num, step); - }, step); - } - } - } - }; - - ui.time4 = node.node.time; - ui.time4.starttime = get.utc(); - ui.time4.interval = setInterval(function () { - var num = Math.round((get.utc() - ui.time4.starttime) / 1000); - if (num >= 3600) { - var num1 = Math.floor(num / 3600); - var num2 = Math.floor((num - num1 * 3600) / 60); - var num3 = num - num1 * 3600 - parseInt(num2) * 60; - if (num1 < 10) { - num1 = "0" + num1.toString(); - } - if (num2 < 10) { - num2 = "0" + num2.toString(); - } - if (num3 < 10) { - num3 = "0" + num3.toString(); - } - ui.time4.innerHTML = - "" + num1 + ":" + num2 + ":" + num3 + ""; - } else { - var num1 = Math.floor(num / 60); - var num2 = num - num1 * 60; - if (num1 < 10) { - num1 = "0" + num1.toString(); - } - if (num2 < 10) { - num2 = "0" + num2.toString(); - } - ui.time4.innerHTML = "" + num1 + ":" + num2 + ""; - } - }, 1000); - game.addVideo("createCardRoundTime"); - return node; - }, - }, - click: { - setting: function () { - if (lib.extensionMenu.extension_概念武将.zyile_skin_Menu) { - lib.extensionMenu.extension_概念武将.zyile_skin_Menu.onclick(); - } else { - // head.remove() - game.closePopped(); - game.pause2(); - ui.click.configMenu(); - ui.system1.classList.remove("shown"); - ui.system2.classList.remove("shown"); - } - }, - - paixu: function () { - if (!game.me || game.me.hasSkillTag("noSortCard")) return; - var cards = game.me.getCards("hs"); - var sort2 = function (b, a) { - if (a.name != b.name) return lib.sort.card(a.name, b.name); - else if (a.suit != b.suit) - return lib.suit.indexOf(a) - lib.suit.indexOf(b); - else return a.number - b.number; - }; - if (cards.length > 1) { - cards.sort(sort2); - cards.forEach(function (i, j) { - game.me.node.handcards1.insertBefore( - cards[j], - game.me.node.handcards1.firstChild - ); - }); - dui.queueNextFrameTick(dui.layoutHand, dui); - } - }, - //可点击函数(牌堆) - paidui: function () { - if (!_status.gameStarted) return; - game.pause2(); - - const cardsInfo = game.players - .map((item) => item.get("h")) - .flat(window.Infinity) - .concat(...ui.cardPile.childNodes) - .concat(...ui.discardPile.childNodes) - .map((item) => ({ - name: item.name, - suit: item.suit, - number: item.number, - nature: get.translation(item.nature), - color: get.color(item), - type: get.translation(get.type(item), "trick"), - translate: lib.translate[item.name], - link: item, - })); - let cardStatistics = { - 杀: { - num: 0, - type: "基本", - }, - 火杀: { - num: 0, - type: "基本", - }, - 雷杀: { - num: 0, - type: "基本", - }, - 红杀: { - num: 0, - type: "基本", - }, - 黑杀: { - num: 0, - type: "基本", - }, - "黑桃2~9": { - num: 0, - type: "花色", - }, - }; - let typeList = ["点数", "花色"]; - for (let card of cardsInfo) { - typeList.add(card.type); - // 统计卡牌名 - if (!cardStatistics[card.translate]) - cardStatistics[card.translate] = { - num: 0, - type: card.type, - }; - // 统计花色 - if (!cardStatistics[get.translation(card.suit)]) - cardStatistics[get.translation(card.suit)] = { - num: 0, - type: "花色", - }; - // 统计点数 - if (!cardStatistics[card.number]) - cardStatistics[card.number] = { - num: 0, - type: "点数", - }; - - if (ui.cardPile.contains(card.link)) { - cardStatistics[card.translate].num++; - cardStatistics[get.translation(card.suit)].num++; - cardStatistics[card.number].num++; - - if (card.name === "sha") { - if (card.color === "black") { - cardStatistics["黑杀"].num++; - if ( - card.suit === "spade" && - card.number <= 9 && - card.number >= 2 - ) - cardStatistics["黑桃2~9"].num++; - } else if (card.color === "red") { - cardStatistics["红杀"].num++; - } - } - } - - if (card.nature) { - if (!cardStatistics[card.nature + card.translate]) - cardStatistics[card.nature + card.translate] = { - num: 0, - type: card.type, - }; - if (ui.cardPile.contains(card.link)) { - cardStatistics[card.nature + card.translate].num++; - } - } - } - - let popupContainer = ui.create.div( - ".popup-container", - ui.window, - { - zIndex: 10, - background: "rgb(0,0,0,.3)", - }, - function () { - this.delete(500); - game.resume2(); - } - ); - let statistics = ui.create.div( - ".card-statistics", - "卡牌计数器", - popupContainer - ); - let statisticsTitle = ui.create.div( - ".card-statistics-title", - statistics - ); - let statisticsContent = ui.create.div( - ".card-statistics-content", - statistics - ); - - typeList.forEach((item) => { - ui.create.div(statisticsTitle, "", item); - statisticsContent[item] = ui.create.div(statisticsContent, ""); - }); - - for (let i in cardStatistics) { - let items = ui.create.div(".items"); - let item = ui.create.div(".item", i, items); - let num = ui.create.div( - ".item-num", - `X${cardStatistics[i].num}`, - items - ); - statisticsContent[cardStatistics[i].type].appendChild(items); - } - }, - - confirm: function (link, target) { - if (link === "ok") { - ui.click.ok(target); - } else if (link === "cancel") { - ui.click.cancel(target); - } else if (target.custom) { - target.custom(link); - } - }, - }, - compare: { - type: function (a, b) { - if (a === b) return 0; - var types = ["basic", "trick", "delay", "equip"].addArray([a, b]); - return types.indexOf(a) - types.indexOf(b); - }, - name: function (a, b) { - if (a === b) return 0; - return a > b ? 1 : -1; - }, - nature: function (a, b) { - if (a === b) return 0; - var nature = [undefined, "fire", "thunder"].addArray([a, b]); - return nature.indexOf(a) - nature.indexOf(b); - }, - suit: function (a, b) { - if (a === b) return 0; - var suit = ["diamond", "heart", "club", "spade"].addArray([a, b]); - return suit.indexOf(a) - suit.indexOf(b); - }, - number: function (a, b) { - return a - b; - }, - }, - }; - return plugin; + confirm.insertBefore(item, confirm.firstChild); + } + } + + confirm.update = function () { + if (confirm.skills2) { + if (_status.event.skill && _status.event.skill !== confirm.dataset.skill) { + confirm.dataset.skill = _status.event.skill; + confirm.skills2.forEach(function (item) { + item.remove(); + }); + ui.updatec(); + } else if (!_status.event.skill && confirm.dataset.skill) { + delete confirm.dataset.skill; + confirm.skills2.forEach(function (item) { + confirm.insertBefore(item, confirm.firstChild); + }); + ui.updatec(); + } + } + if (ui.updateSkillControl) ui.updateSkillControl(game.me, true); + }; + return confirm; + }, + + handcardNumber: function () { + var node3 = ui.create.div(".settingButton", ui.arena, plugin.click.setting); + var node2 = ui.create.div(".lbtn-controls", ui.arena); + ui.create.div(".lbtn-control", node2, " "); + ui.create.div(".lbtn-control", node2, " "); + /*ui.create.div('.lbtn-control1', node2, plugin.click.paixu);*/ + var paixuauto = ui.create.div(".lbtn-paixu", ui.arena); + paixuauto.onclick = function () { + if (window.paixuxx == false) { + plugin.click.paixu(); + paixuauto.setBackgroundImage("extension/十周年UI/shoushaUI/lbtn/images/uibutton/btn-paixu.png"); + window.paixuxx = true; + } else { + plugin.click.paixu(); + paixuauto.setBackgroundImage("extension/十周年UI/shoushaUI/lbtn/images/uibutton/zidongpaixu.png"); + window.paixuxx = false; + } + }; + var jilu = ui.create.div(".latn-jilu", ui.arena, ui.click.pause); + //-----------------// + /*ui.create.div('.lbtn-control2', node2, ui.click.pause);*/ + //var node4 = ui.create.div('.tuoguanButton', ui.arena, ui.click.auto); + var node = ui.create.div(".handcardNumber", ui.arena).hide(); + node.node = { + cardPicture: ui.create.div(".cardPicture", node), + cardNumber: ui.create.div(".cardNumber", node), + }; + //手牌显示·---// + node.updateCardnumber = function () { + if (!game.me) return; + var cardNumber2 = game.me.countCards("h") || 0; + var cardNumber = game.me.getHandcardLimit() || 0; + var numbercolor = "white"; + if (cardNumber2 > cardNumber) numbercolor = "white"; + if (cardNumber == Infinity) cardNumber = "∞"; + if (cardNumber > game.me.hp) numbercolor = "#20c520"; + if (cardNumber < game.me.hp) numbercolor = "#ff1813"; + if (cardNumber == game.me.hp) numbercolor = "#ffe9cd"; + this.node.cardNumber.innerHTML = "" + "" + cardNumber2 + "" + '' + "/" + "' + cardNumber + "" + ""; + // this.setNumberAnimation(cardNumber); + this.show(); + + game.addVideo("updateCardnumber", null, { + cardNumber: cardNumber, + }); + }; + node.node.cardNumber.interval = setInterval(function () { + ui.handcardNumber.updateCardnumber(); + }, 1000); + // game.addVideo('createCardRoundTime'); + game.addVideo("createhandcardNumber"); + return node; + }, + cardRoundTime: function () { + var node = ui.create.div(".cardRoundNumber", ui.arena).hide(); + node.node = { + /*cardPileNumber: ui.create.div('.cardPileNumber', node),*/ + //牌堆可点击 + cardPileNumber: ui.create.div(".cardPileNumber", node, plugin.click.paidui), + roundNumber: ui.create.div(".roundNumber", node), + time: ui.create.div(".time", node), + }; + + node.updateRoundCard = function () { + var cardNumber = ui.cardPile.childNodes.length || 0; + var roundNumber = game.roundNumber || 0; + this.node.roundNumber.innerHTML = "第" + game.roundNumber + "轮"; + this.setNumberAnimation(cardNumber); + this.show(); + game.addVideo("updateCardRoundTime", null, { + cardNumber: cardNumber, + roundNumber: roundNumber, + }); + }; + + node.setNumberAnimation = function (num, step) { + var item = this.node.cardPileNumber; + clearTimeout(item.interval); + if (!item._num) { + item.innerHTML = "" + num + ""; + item._num = num; + } else { + if (item._num !== num) { + if (!step) step = 500 / Math.abs(item._num - num); + if (item._num > num) item._num--; + else item._num++; + item.innerHTML = "" + item._num + ""; + if (item._num !== num) { + item.interval = setTimeout(function () { + node.setNumberAnimation(num, step); + }, step); + } + } + } + }; + + ui.time4 = node.node.time; + ui.time4.starttime = get.utc(); + ui.time4.interval = setInterval(function () { + var num = Math.round((get.utc() - ui.time4.starttime) / 1000); + if (num >= 3600) { + var num1 = Math.floor(num / 3600); + var num2 = Math.floor((num - num1 * 3600) / 60); + var num3 = num - num1 * 3600 - parseInt(num2) * 60; + if (num1 < 10) { + num1 = "0" + num1.toString(); + } + if (num2 < 10) { + num2 = "0" + num2.toString(); + } + if (num3 < 10) { + num3 = "0" + num3.toString(); + } + ui.time4.innerHTML = "" + num1 + ":" + num2 + ":" + num3 + ""; + } else { + var num1 = Math.floor(num / 60); + var num2 = num - num1 * 60; + if (num1 < 10) { + num1 = "0" + num1.toString(); + } + if (num2 < 10) { + num2 = "0" + num2.toString(); + } + ui.time4.innerHTML = "" + num1 + ":" + num2 + ""; + } + }, 1000); + game.addVideo("createCardRoundTime"); + return node; + }, + }, + click: { + setting: function () { + if (lib.extensionMenu.extension_概念武将.zyile_skin_Menu) { + lib.extensionMenu.extension_概念武将.zyile_skin_Menu.onclick(); + } else { + // head.remove() + game.closePopped(); + game.pause2(); + ui.click.configMenu(); + ui.system1.classList.remove("shown"); + ui.system2.classList.remove("shown"); + } + }, + + paixu: function () { + if (!game.me || game.me.hasSkillTag("noSortCard")) return; + var cards = game.me.getCards("hs"); + var sort2 = function (b, a) { + if (a.name != b.name) return lib.sort.card(a.name, b.name); + else if (a.suit != b.suit) return lib.suit.indexOf(a) - lib.suit.indexOf(b); + else return a.number - b.number; + }; + if (cards.length > 1) { + cards.sort(sort2); + cards.forEach(function (i, j) { + game.me.node.handcards1.insertBefore(cards[j], game.me.node.handcards1.firstChild); + }); + dui.queueNextFrameTick(dui.layoutHand, dui); + } + }, + //可点击函数(牌堆) + paidui: function () { + if (!_status.gameStarted) return; + game.pause2(); + + const cardsInfo = game.players + .map(item => item.get("h")) + .flat(window.Infinity) + .concat(...ui.cardPile.childNodes) + .concat(...ui.discardPile.childNodes) + .map(item => ({ + name: item.name, + suit: item.suit, + number: item.number, + nature: get.translation(item.nature), + color: get.color(item), + type: get.translation(get.type(item), "trick"), + translate: lib.translate[item.name], + link: item, + })); + let cardStatistics = { + 杀: { + num: 0, + type: "基本", + }, + 火杀: { + num: 0, + type: "基本", + }, + 雷杀: { + num: 0, + type: "基本", + }, + 红杀: { + num: 0, + type: "基本", + }, + 黑杀: { + num: 0, + type: "基本", + }, + "黑桃2~9": { + num: 0, + type: "花色", + }, + }; + let typeList = ["点数", "花色"]; + for (let card of cardsInfo) { + typeList.add(card.type); + // 统计卡牌名 + if (!cardStatistics[card.translate]) + cardStatistics[card.translate] = { + num: 0, + type: card.type, + }; + // 统计花色 + if (!cardStatistics[get.translation(card.suit)]) + cardStatistics[get.translation(card.suit)] = { + num: 0, + type: "花色", + }; + // 统计点数 + if (!cardStatistics[card.number]) + cardStatistics[card.number] = { + num: 0, + type: "点数", + }; + + if (ui.cardPile.contains(card.link)) { + cardStatistics[card.translate].num++; + cardStatistics[get.translation(card.suit)].num++; + cardStatistics[card.number].num++; + + if (card.name === "sha") { + if (card.color === "black") { + cardStatistics["黑杀"].num++; + if (card.suit === "spade" && card.number <= 9 && card.number >= 2) cardStatistics["黑桃2~9"].num++; + } else if (card.color === "red") { + cardStatistics["红杀"].num++; + } + } + } + + if (card.nature) { + if (!cardStatistics[card.nature + card.translate]) + cardStatistics[card.nature + card.translate] = { + num: 0, + type: card.type, + }; + if (ui.cardPile.contains(card.link)) { + cardStatistics[card.nature + card.translate].num++; + } + } + } + + let popupContainer = ui.create.div( + ".popup-container", + ui.window, + { + zIndex: 10, + background: "rgb(0,0,0,.3)", + }, + function () { + this.delete(500); + game.resume2(); + } + ); + let statistics = ui.create.div(".card-statistics", "卡牌计数器", popupContainer); + let statisticsTitle = ui.create.div(".card-statistics-title", statistics); + let statisticsContent = ui.create.div(".card-statistics-content", statistics); + + typeList.forEach(item => { + ui.create.div(statisticsTitle, "", item); + statisticsContent[item] = ui.create.div(statisticsContent, ""); + }); + + for (let i in cardStatistics) { + let items = ui.create.div(".items"); + let item = ui.create.div(".item", i, items); + let num = ui.create.div(".item-num", `X${cardStatistics[i].num}`, items); + statisticsContent[cardStatistics[i].type].appendChild(items); + } + }, + + confirm: function (link, target) { + if (link === "ok") { + ui.click.ok(target); + } else if (link === "cancel") { + ui.click.cancel(target); + } else if (target.custom) { + target.custom(link); + } + }, + }, + compare: { + type: function (a, b) { + if (a === b) return 0; + var types = ["basic", "trick", "delay", "equip"].addArray([a, b]); + return types.indexOf(a) - types.indexOf(b); + }, + name: function (a, b) { + if (a === b) return 0; + return a > b ? 1 : -1; + }, + nature: function (a, b) { + if (a === b) return 0; + var nature = [undefined, "fire", "thunder"].addArray([a, b]); + return nature.indexOf(a) - nature.indexOf(b); + }, + suit: function (a, b) { + if (a === b) return 0; + var suit = ["diamond", "heart", "club", "spade"].addArray([a, b]); + return suit.indexOf(a) - suit.indexOf(b); + }, + number: function (a, b) { + return a - b; + }, + }, + }; + return plugin; }); diff --git a/shoushaUI/lbtn/main1_window.css b/shoushaUI/lbtn/main1_window.css index a7bfd66..5410f8e 100644 --- a/shoushaUI/lbtn/main1_window.css +++ b/shoushaUI/lbtn/main1_window.css @@ -1,102 +1,101 @@ -.lbtn-controls {/*牌序,记录按钮*/ - --width: 66px;/*按钮宽度*/ - --height: 55px;/*按钮高度*/ - left: 18px;/*左边距,越大越靠右*/ - bottom: 15%;/*整体上移*/ +.lbtn-controls { + /*牌序,记录按钮*/ + --width: 66px; /*按钮宽度*/ + --height: 55px; /*按钮高度*/ + left: 18px; /*左边距,越大越靠右*/ + bottom: 15%; /*整体上移*/ width: var(--width); z-index: 4; } /*右上角弹出的二级菜单页面*/ -.yemian{ - --w: 566px; - --h: calc(var(--w) * 360/1560);/*高和长*/ - width: var(--w);/*按比例调节*/ - height: var(--h);/*同理*/ - top: 0%; - left: calc(100% - 562px); - background-size: 100% 100%; - background-image: url("./images/SSCD/yemian.png"); - z-index: 68; - position: relative;/*定位位置*/ - -webkit-transition: opacity 1s ease-in-out; - -moz-transition: opacity 1s ease-in-out; - -o-transition: opacity 1s ease-in-out; - transition: opacity 1s ease-in-out; +.yemian { + --w: 566px; + --h: calc(var(--w) * 360 / 1560); /*高和长*/ + width: var(--w); /*按比例调节*/ + height: var(--h); /*同理*/ + top: 0%; + left: calc(100% - 562px); + background-size: 100% 100%; + background-image: url("./images/SSCD/yemian.png"); + z-index: 68; + position: relative; /*定位位置*/ + -webkit-transition: opacity 1s ease-in-out; + -moz-transition: opacity 1s ease-in-out; + -o-transition: opacity 1s ease-in-out; + transition: opacity 1s ease-in-out; } /*元素·设置*/ -.shezhi{ - --w: 65px; - --h: calc(var(--w) * 82/107); - width: var(--w); - height: var(--h); - bottom: calc(100% - 69px);/*calc提高位置布局精度*/ - left: calc(100% - 498px); - background-size: 100% 100%; - background-image: url("./images/SSCD/shezhi.png");/*图片路径*/ - z-index: 99;/*元素堆叠层级,越大越往前*/ - position:fixed;/*固定位置,防止元素乱跑*/ +.shezhi { + --w: 65px; + --h: calc(var(--w) * 82 / 107); + width: var(--w); + height: var(--h); + bottom: calc(100% - 69px); /*calc提高位置布局精度*/ + left: calc(100% - 498px); + background-size: 100% 100%; + background-image: url("./images/SSCD/shezhi.png"); /*图片路径*/ + z-index: 99; /*元素堆叠层级,越大越往前*/ + position: fixed; /*固定位置,防止元素乱跑*/ } /*元素·退出*/ -.tuichu{ - --w: 65px; - --h: calc(var(--w) * 82/107); - width: var(--w); - height: var(--h); - bottom: calc(100% - 69px); - left: calc(100% - 418px); - background-size: 100% 100%; - background-image: url("./images/SSCD/tuichu.png"); - z-index: 99; - position:fixed;/*固定位置防止元素乱跑*/ +.tuichu { + --w: 65px; + --h: calc(var(--w) * 82 / 107); + width: var(--w); + height: var(--h); + bottom: calc(100% - 69px); + left: calc(100% - 418px); + background-size: 100% 100%; + background-image: url("./images/SSCD/tuichu.png"); + z-index: 99; + position: fixed; /*固定位置防止元素乱跑*/ } /*元素·逃跑*/ -.taopao{ - --w: 65px; - --h: calc(var(--w) * 82/107); - width: var(--w); - height: var(--h); - bottom: calc(100% - 69px); - left: calc(100% - 338px); - background-size: 100% 100%; - background-image: url("./images/SSCD/taopao.png"); - z-index: 99; - position:fixed; +.taopao { + --w: 65px; + --h: calc(var(--w) * 82 / 107); + width: var(--w); + height: var(--h); + bottom: calc(100% - 69px); + left: calc(100% - 338px); + background-size: 100% 100%; + background-image: url("./images/SSCD/taopao.png"); + z-index: 99; + position: fixed; } /*元素·投降*/ -.touxiang{ - --w: 65px; - --h: calc(var(--w) * 82/107); - width: var(--w); - height: var(--h); - bottom: calc(100% - 69px); - left: calc(100% - 260px); - background-size: 100% 100%; - background-image: url("./images/SSCD/touxiang.png"); - z-index: 99; - position:fixed; +.touxiang { + --w: 65px; + --h: calc(var(--w) * 82 / 107); + width: var(--w); + height: var(--h); + bottom: calc(100% - 69px); + left: calc(100% - 260px); + background-size: 100% 100%; + background-image: url("./images/SSCD/touxiang.png"); + z-index: 99; + position: fixed; } /*元素·托管*/ -.tuoguan{ - --w: 65px; - --h: calc(var(--w) * 82/107); - width: var(--w); - height: var(--h); - bottom: calc(100% - 69px); - left: calc(100% - 184px); - background-size: 100% 100%; - background-image: url("./images/SSCD/tuoguan.png"); - z-index: 99; - position:fixed; +.tuoguan { + --w: 65px; + --h: calc(var(--w) * 82 / 107); + width: var(--w); + height: var(--h); + bottom: calc(100% - 69px); + left: calc(100% - 184px); + background-size: 100% 100%; + background-image: url("./images/SSCD/tuoguan.png"); + z-index: 99; + position: fixed; } - - #arena:not(.single-handcard):not(.chess).cxy-new-ui > .lbtn-controls ~ #mebg, #arena:not(.single-handcard):not(.chess).cxy-new-ui > .lbtn-controls ~ #me { left: 40px !important; @@ -114,27 +113,25 @@ .lbtn-control { width: 68px; height: 55px; - background-image:none; + background-image: none; left: 1.6%; - font-size: 19px;/*字体大小*/ + font-size: 19px; /*字体大小*/ background-size: 100% 100%; background-color: transparent; line-height: 45px; - text-align: center;/*使文本位于元素中心*/ + text-align: center; /*使文本位于元素中心*/ white-space: nowrap; - color: #a08850;/*颜色色值*/ - font-family: 'shousha';/*字体*/ - font-weight: bold;/*字体加粗*/ - -webkit-text-stroke: 1.5px rgba(43,31,25,0.4);/*描边*/ - text-shadow:none;/*文字阴影*/ - border-radius: 0px;/*元素边缘圆角大小*/ + color: #a08850; /*颜色色值*/ + font-family: "shousha"; /*字体*/ + font-weight: bold; /*字体加粗*/ + -webkit-text-stroke: 1.5px rgba(43, 31, 25, 0.4); /*描边*/ + text-shadow: none; /*文字阴影*/ + border-radius: 0px; /*元素边缘圆角大小*/ } .lbtn-control + .lbtn-control { margin-top: 1px; } - - /*牌序*/ .lbtn-paixu { width: 68px; @@ -142,19 +139,19 @@ background-image: url("./images/uibutton/btn-paixu.png"); left: 1.6%; bottom: 23.2%; - z-index:5; - font-size: 18.1px;/*字体大小*/ + z-index: 5; + font-size: 18.1px; /*字体大小*/ background-size: 100% 100%; background-color: transparent; line-height: 45px; - text-align: center;/*使文本位于元素中心*/ + text-align: center; /*使文本位于元素中心*/ white-space: nowrap; - color: #c5af88;/*颜色色值*/ - font-family: 'shousha';/*字体*/ - font-weight: bold;/*字体加粗*/ - -webkit-text-stroke: 1.1px rgba(43,31,25,0.5);/*描边*/ - text-shadow:none;/*文字阴影*/ - border-radius: 0px;/*元素边缘圆角大小*/ + color: #c5af88; /*颜色色值*/ + font-family: "shousha"; /*字体*/ + font-weight: bold; /*字体加粗*/ + -webkit-text-stroke: 1.1px rgba(43, 31, 25, 0.5); /*描边*/ + text-shadow: none; /*文字阴影*/ + border-radius: 0px; /*元素边缘圆角大小*/ } .lbtn-control + .lbtn-control { margin-top: 1px; @@ -162,20 +159,20 @@ /*记录*/ .latn-jilu { - display: block; + display: block; position: absolute; left: 1.6%; background-size: 100% 100%; border-radius: 1px; width: 68px; height: 55px; - /*--w: 68px; + /*--w: 68px; --h: calc(var(--w) * 78/91); width: var(--w); height: var(--h);*/ - background-image: url("./images/uibutton/btn-jilu.png"); - bottom: 15%; - z-index:5; + background-image: url("./images/uibutton/btn-jilu.png"); + bottom: 15%; + z-index: 5; } .lbtn-confirm:not(.closing).removing { @@ -183,7 +180,7 @@ } .control { - --height: 40px;/*40*/ + --height: 40px; /*40*/ width: auto !important; background: transparent; box-shadow: none; @@ -192,21 +189,21 @@ } /*无懈按钮位置*/ -#arena>#dui-controls>.control.stayleft { +#arena > #dui-controls > .control.stayleft { left: calc(50% - 440px) !important; margin-bottom: 0vmin !important; } -.control.dou3> div { - /*无懈按钮*/ +.control.dou3 > div { + /*无懈按钮*/ background-size: contain; font-size: 0px; /*字体大小*/ - margin-top:3px!important; - margin-left:152px!important; - background-repeat:no-repeat; + margin-top: 3px !important; + margin-left: 152px !important; + background-repeat: no-repeat; padding: 6px 24px !important; /*按钮高度+宽度 建议别调*/ - } -.control > div { /*其他按钮(与下面的相反)*/ +.control > div { + /*其他按钮(与下面的相反)*/ background-image: url("./images/uibutton/cbtn.png"); background-size: 100% 100%; line-height: 30px; @@ -215,25 +212,15 @@ min-width: 140px !important; /*限制最小宽度*/ min-height: 18px !important; /*限制最大高度*/ /*margin: 0px 5px !important;/*与其他按钮之间的距离,越小越靠近0 5*/ - margin-left:5px !important; - margin-right:5px !important; - margin-top:0px !important; + margin-left: 5px !important; + margin-right: 5px !important; + margin-top: 0px !important; margin-bottom: 12px !important; - text-shadow: 0 0 1.3px #5b6727, - 0 0 1.3px #5b6727, - 0 0 1.3px #5b6727, - 0 0 1.3px #5b6727, - 0 0 1.3px #5b6727, - 0 0 1.3px #5b6727, - 0 0 1.3px #5b6727, - 0 0 1.3px #5b6727, - 0 0 1.3px #5b6727, - 0 0 1.3px #5b6727, - 0 0 1.3px #5b6727; + text-shadow: 0 0 1.3px #5b6727, 0 0 1.3px #5b6727, 0 0 1.3px #5b6727, 0 0 1.3px #5b6727, 0 0 1.3px #5b6727, 0 0 1.3px #5b6727, 0 0 1.3px #5b6727, 0 0 1.3px #5b6727, 0 0 1.3px #5b6727, 0 0 1.3px #5b6727, 0 0 1.3px #5b6727; color: #c2c374; - font-family: 'HYZLSJ'; + font-family: "HYZLSJ"; font-size: 24px; - font-weight:500; + font-weight: 500; border-radius: 4px; overflow: visible; transition: none; @@ -244,7 +231,8 @@ } /*分离选项类名*/ -.control > div.choice { /*其他按钮(确认/取消除外)*/ +.control > div.choice { + /*其他按钮(确认/取消除外)*/ background-image: url("./images/uibutton/cbtn.png"); background-size: 100% 100%; text-align: center; @@ -252,22 +240,11 @@ min-width: 120px !important; /*限制最小宽度*/ min-height: 25px !important; /*限制最小高度*/ margin: 2px 20px 3px 20px !important; /*外边距,别管*/ - font-family: 'shousha'; /*字体样式*/ + font-family: "shousha"; /*字体样式*/ font-size: 24px; /*字体大小*/ border-radius: 4px; - color:#D9D190; - text-shadow: 1px 0 1.5px #646224, - 1px 0 1.5px #646224, - -1px 0 1.5px #646224, - -1px 0 1.5px #646224, - 0 1px 1.5px #646224, - 0 1px 1.5px #646224, - 0 -1px 1.5px #646224, - 0 -1px 1.5px #646224, - 1px 0 1.5px #646224, - 0 1px 1.5px #646224, - 0 -1px 1.5px #646224, - -1px 0 1.5px #646224; + color: #d9d190; + text-shadow: 1px 0 1.5px #646224, 1px 0 1.5px #646224, -1px 0 1.5px #646224, -1px 0 1.5px #646224, 0 1px 1.5px #646224, 0 1px 1.5px #646224, 0 -1px 1.5px #646224, 0 -1px 1.5px #646224, 1px 0 1.5px #646224, 0 1px 1.5px #646224, 0 -1px 1.5px #646224, -1px 0 1.5px #646224; overflow: visible; transition: none; } @@ -276,10 +253,8 @@ .control > div.primary2 { font-size: 30px !important; /*字体大小*/ background-image: url("./images/uibutton/confirm-bg-c.png"); - } - .control > div + div { margin-left: 15px; } @@ -288,19 +263,20 @@ .control > div.disabled:not([data-type="endButton"]) { background-size: 100% 100%; filter: grayscale(100%); - -webkit-filter: grayscale(100%);/*按钮变灰*/ + -webkit-filter: grayscale(100%); /*按钮变灰*/ } -.control > div > span { /*确认按钮*/ +.control > div > span { + /*确认按钮*/ --sh: calc(var(--h) - 6px); display: block; font-size: 40px; line-height: var(--sh); /*top: calc(100% - 44px);/*按钮位置数字越小越往下*/ - margin: 0px 35px !important;/*0 35*/ + margin: 0px 35px !important; /*0 35*/ background-image: url("./images/uibutton/btn.png"); - padding: 22px 68px !important;/*按钮高度+宽度 建议别调22 68*/ + padding: 22px 68px !important; /*按钮高度+宽度 建议别调22 68*/ min-height: 22px; /*限制最小高度*/ - min-width: 68px; /*限制最小宽度*/ + min-width: 68px; /*限制最小宽度*/ background-size: 100% 108%; text-shadow: 1px 1px 2.5px rgba(62, 57, 38, 0.1); bottom: 0px; @@ -313,13 +289,13 @@ /*手牌*/ /*这里给这个元素设置了一些默认值,如果在这个标签下的元素,不再设置其他值时,将调用这些默认值*/ .handcardNumber { - bottom: 2px; + bottom: 2px; right: 275px; - font-family: 'HYZLSJ'; + font-family: "HYZLSJ"; color: #ffffff; font-weight: 100 !important; font-size: 13px !important; -/* text-shadow: #F5D78E 0 0 1px, + /* text-shadow: #F5D78E 0 0 1px, black 0 0 2px, black 0 0 2px, black 0 0 2px, @@ -333,23 +309,23 @@ left: 335px; bottom: -16px; --w: 417px; - --h: calc(var(--w) * 235/ 500);/*宽和长*/ + --h: calc(var(--w) * 235 / 500); /*宽和长*/ width: var(--w); height: var(--h); background-image: url("./images/uibutton/shoupai1.png"); background-size: 100% 100%; -/* box-shadow: 2px 2px 1px #2b2219;*/ + /* box-shadow: 2px 2px 1px #2b2219;*/ position: relative; - z-index: -1; + z-index: -1; } /*手牌数值 /*由于重新设置了数值,所以不调用默认值*/ .handcardNumber > .cardNumber { - left: 470px; + left: 470px; bottom: 12px; height: 8px; - font-family: 'HYZLSJ'; + font-family: "HYZLSJ"; font-weight: 100 !important; text-align: center; font-size: 18px !important; @@ -361,12 +337,9 @@ /*同理,定义整体*/ .cardRoundNumber { top: 30px; - right: 123px;/*牌堆数及游戏时间,轮数整体。越大越往左*/ - font-family: 'shousha'; - text-shadow: black 1px 1px 1px, - black 1px -1px 1px, - black -1px 1px 1px, - black -1px -1px 1px; + right: 123px; /*牌堆数及游戏时间,轮数整体。越大越往左*/ + font-family: "shousha"; + text-shadow: black 1px 1px 1px, black 1px -1px 1px, black -1px 1px 1px, black -1px -1px 1px; } /*牌堆图片*/ .cardRoundNumber > .cardPileNumber { @@ -377,330 +350,326 @@ background-size: 100% 100%; left: 1px; position: relative; - z-index:92px;/*为了兼容武将界面*/ + z-index: 92px; /*为了兼容武将界面*/ } .cardRoundNumber > .cardPileNumber > span { - left: 3.7px; - bottom: 31.2px; - width: 100%; - color: #e2d3c2; - display: block; - position: absolute; - line-height: 18px; - text-align: center; - font-family: 'HYZLSJ'; - font-stretch: ultra-condensed; - font-size: 29px;/*牌堆数*/ - filter:drop-shadow(0 0 0.5px #2b1f19) drop-shadow(0 0 0.5px #2b1f19); - text-shadow:-1.5px 0px 1.5px #2b1f19, 0px -1.5px 1.5px #2b1f19, 1.5px 0px 1.5px #2b1f19 ,0px 1.5px 1.5px #2b1f19; - font-weight: 600; + left: 3.7px; + bottom: 31.2px; + width: 100%; + color: #e2d3c2; + display: block; + position: absolute; + line-height: 18px; + text-align: center; + font-family: "HYZLSJ"; + font-stretch: ultra-condensed; + font-size: 29px; /*牌堆数*/ + filter: drop-shadow(0 0 0.5px #2b1f19) drop-shadow(0 0 0.5px #2b1f19); + text-shadow: -1.5px 0px 1.5px #2b1f19, 0px -1.5px 1.5px #2b1f19, 1.5px 0px 1.5px #2b1f19, 0px 1.5px 1.5px #2b1f19; + font-weight: 600; } /*游戏轮数和时间*/ /*这里要为轮数和时间一起设置参数,但又不能调用默认值,所以用,连写*/ .cardRoundNumber > .roundNumber, .cardRoundNumber > .time { - /*游戏轮数显示*/ - left: -66px; - bottom: 83px; - height: 16px; - line-height: 16px; - letter-spacing: 3.2px; - font-family: 'shousha'; - font-size: 21px; - font-weight: 900; - text-shadow:-1.7px 0px 3px #2b1f19, 0px -1.7px 3px #2b1f19, 1.7px 0px 3px #2b1f19 ,0px 1.7px 3px #2b1f19;/*这个是文字阴影*/ - filter:drop-shadow(0 0 0.5px #2b1f19) drop-shadow(0 0 0.5px #2b1f19); - white-space: nowrap; - color: #97856a; + /*游戏轮数显示*/ + left: -66px; + bottom: 83px; + height: 16px; + line-height: 16px; + letter-spacing: 3.2px; + font-family: "shousha"; + font-size: 21px; + font-weight: 900; + text-shadow: -1.7px 0px 3px #2b1f19, 0px -1.7px 3px #2b1f19, 1.7px 0px 3px #2b1f19, 0px 1.7px 3px #2b1f19; /*这个是文字阴影*/ + filter: drop-shadow(0 0 0.5px #2b1f19) drop-shadow(0 0 0.5px #2b1f19); + white-space: nowrap; + color: #97856a; } /*游戏时间显示*/ /*Q:可能有小伙伴不李姐了,说上面不是定义了游戏时间的参数了吗?为啥这里又来一遍?A:js里创造了两个布局一个是时间,另一个是游戏轮数。关于位置关系,不能一同用一种参数调用,不然会叠在一起(不信你试试),当然下面的颜色属性是可以删掉的,不影响。*/ .cardRoundNumber > .time { - bottom: 83px; - font-size: 21px; - font-family: 'shousha'; - line-height: 16px;/*文字行高*/ - letter-spacing: 3.2px; - left: -136px; - color: #97856a; - /*font-size: 0px;*/ + bottom: 83px; + font-size: 21px; + font-family: "shousha"; + line-height: 16px; /*文字行高*/ + letter-spacing: 3.2px; + left: -136px; + color: #97856a; + /*font-size: 0px;*/ } - - - - /*假装无敌牌堆计数*/ .card-statistics { - width: 85%; - height: 75%; - left: 50%; - top: 50%; - border: 3px solid rgb(213 194 179); - border-radius: 10px; - font-size: 48px !important; - transform: translate(-50%, -50%); - text-align: center; - background: #231A1B; + width: 85%; + height: 75%; + left: 50%; + top: 50%; + border: 3px solid rgb(213 194 179); + border-radius: 10px; + font-size: 48px !important; + transform: translate(-50%, -50%); + text-align: center; + background: #231a1b; } .card-statistics-title { - display: flex; - position: relative; - width: 100%; - height: 10%; - align-items: center; - justify-items: center; - /*background: #372E1F;*/ - background-size: 100% 100%; - background-image: url("./images/uibutton/paiduiming.png"); + display: flex; + position: relative; + width: 100%; + height: 10%; + align-items: center; + justify-items: center; + /*background: #372E1F;*/ + background-size: 100% 100%; + background-image: url("./images/uibutton/paiduiming.png"); } .card-statistics-title > div { - position: relative; - flex: 1; - text-align: center; - color: #7F7768; - font-family: xinwei; - font-size: 25px; - align-items: center; - justify-items: center; - text-shadow: none; + position: relative; + flex: 1; + text-align: center; + color: #7f7768; + font-family: xinwei; + font-size: 25px; + align-items: center; + justify-items: center; + text-shadow: none; } .card-statistics-content { - display: flex; - width: 100%; - height: 80%; - font-size: 18px;/*单个项目文字大小*/ - position: relative; + display: flex; + width: 100%; + height: 80%; + font-size: 18px; /*单个项目文字大小*/ + position: relative; } .card-statistics-content > div { - overflow: auto; - flex: 1; - position: relative; - border-right: 3px solid; - border-image-slice: 0 100% 0 0; - border-image-source: url("./images/uibutton/paiduixian.png"); - height: 96%;/*明细项目长度*/ + overflow: auto; + flex: 1; + position: relative; + border-right: 3px solid; + border-image-slice: 0 100% 0 0; + border-image-source: url("./images/uibutton/paiduixian.png"); + height: 96%; /*明细项目长度*/ } .card-statistics-content .items { -/*单个卡牌名*/ - margin: 5px 0; - height: 30px; - position: relative; - color: #000000; - width: 100%; - display: flex; - align-items: center; - justify-items: center; + /*单个卡牌名*/ + margin: 5px 0; + height: 30px; + position: relative; + color: #000000; + width: 100%; + display: flex; + align-items: center; + justify-items: center; } .card-statistics-content .items .item { - position: relative; - flex: .8; - /*background: #C5BA9A;*/ - background-size: 90% 100%; - background-repeat: no-repeat; - background-position: center; - background-image: url("./images/uibutton/shousha.png"); - line-height: 2; - border-radius: 6px; + position: relative; + flex: 0.8; + /*background: #C5BA9A;*/ + background-size: 90% 100%; + background-repeat: no-repeat; + background-position: center; + background-image: url("./images/uibutton/shousha.png"); + line-height: 2; + border-radius: 6px; } .card-statistics-content .items .item-num { - position: relative; - color: #BDAF92; - flex: .2; + position: relative; + color: #bdaf92; + flex: 0.2; } /*托管中图片(手杀)*/ -#autonode>div:last-child{ - z-index: 10; +#autonode > div:last-child { + z-index: 10; top: calc(100% - 180px); left: calc(50% - 530px); font-size: 0px; text-shadow: none; --w: 306px; - --h: calc(var(--w) * 169/365);/*高和长*/ - width: var(--w);/*按比例调节*/ - height: var(--h);/*同理*/ + --h: calc(var(--w) * 169 / 365); /*高和长*/ + width: var(--w); /*按比例调节*/ + height: var(--h); /*同理*/ /*display: table;*/ background-image: url("./images/SSCD/tuoguan2.png"); - background-size:100% 100%; - -webkit-text-fill-color: transparent; - text-shadow:none!important; + background-size: 100% 100%; + -webkit-text-fill-color: transparent; + text-shadow: none !important; } /*------身份任务提示-------*/ /*身份任务主公*/ -.sfrwzhugong{ - position:fixed; - background-color: none; - background-repeat: no-repeat; - background-image: url('./images/JSJM/zhugong.png')!important; - background-size: 100% 100%; - width:750px; - height:400px; - left: 230px; - bottom: 80px; +.sfrwzhugong { + position: fixed; + background-color: none; + background-repeat: no-repeat; + background-image: url("./images/JSJM/zhugong.png") !important; + background-size: 100% 100%; + width: 750px; + height: 400px; + left: 230px; + bottom: 80px; } /*身份任务忠臣*/ -.sfrwchongchen{ - position:fixed; - background-color: none; - background-repeat: no-repeat; - background-image: url('./images/JSJM/zhongchen.png')!important; - background-size: 100% 100%; - width:750px; - height:400px; - left: 230px; - bottom: 80px; +.sfrwchongchen { + position: fixed; + background-color: none; + background-repeat: no-repeat; + background-image: url("./images/JSJM/zhongchen.png") !important; + background-size: 100% 100%; + width: 750px; + height: 400px; + left: 230px; + bottom: 80px; } /*身份任务反贼*/ -.sfrwfanzei{ - position:fixed; - background-color: none; - background-repeat: no-repeat; - background-image: url('./images/JSJM/fanzei.png')!important; - background-size: 100% 100%; - width:750px; - height:400px; - left: 230px; - bottom: 80px; +.sfrwfanzei { + position: fixed; + background-color: none; + background-repeat: no-repeat; + background-image: url("./images/JSJM/fanzei.png") !important; + background-size: 100% 100%; + width: 750px; + height: 400px; + left: 230px; + bottom: 80px; } /*身份任务内奸*/ -.sfrwneijian{ - position:fixed; - background-color: none; - background-repeat: no-repeat; - background-image: url('./images/JSJM/neijian.png')!important; - background-size: 100% 100%; - width:750px; - height:400px; - left: 230px; - bottom: 80px; +.sfrwneijian { + position: fixed; + background-color: none; + background-repeat: no-repeat; + background-image: url("./images/JSJM/neijian.png") !important; + background-size: 100% 100%; + width: 750px; + height: 400px; + left: 230px; + bottom: 80px; } /*身份任务地主*/ -.sfrwdizhu{ - position:fixed; - background-color: none; - background-repeat: no-repeat; - background-image: url('./images/JSJM/dizhu.png')!important; - background-size: 100% 100%; - width:750px; - height:400px; - left: 230px; - bottom: 80px; +.sfrwdizhu { + position: fixed; + background-color: none; + background-repeat: no-repeat; + background-image: url("./images/JSJM/dizhu.png") !important; + background-size: 100% 100%; + width: 750px; + height: 400px; + left: 230px; + bottom: 80px; } /*身份任务农民*/ -.sfrwnongmin{ - position:fixed; - background-color: none; - background-repeat: no-repeat; - background-image: url('./images/JSJM/nongmin.png')!important; - background-size: 100% 100%; - width:750px; - height:400px; - left: 230px; - bottom: 80px; +.sfrwnongmin { + position: fixed; + background-color: none; + background-repeat: no-repeat; + background-image: url("./images/JSJM/nongmin.png") !important; + background-size: 100% 100%; + width: 750px; + height: 400px; + left: 230px; + bottom: 80px; } /*身份任务虎队*/ -.sfrwhu{ - position:fixed; - background-color: none; - background-repeat: no-repeat; - background-image: url('./images/JSJM/hu.png')!important; - background-size: 100% 100%; - width:750px; - height:400px; - left: 230px; - bottom: 80px; +.sfrwhu { + position: fixed; + background-color: none; + background-repeat: no-repeat; + background-image: url("./images/JSJM/hu.png") !important; + background-size: 100% 100%; + width: 750px; + height: 400px; + left: 230px; + bottom: 80px; } /*身份任务魏国*/ -.sfrwweiguo{ - position:fixed; - background-color: none; - background-repeat: no-repeat; - background-image: url('./images/JSJM/weiguo.png')!important; - background-size: 100% 100%; - width:750px; - height:400px; - left: 230px; - bottom: 80px; +.sfrwweiguo { + position: fixed; + background-color: none; + background-repeat: no-repeat; + background-image: url("./images/JSJM/weiguo.png") !important; + background-size: 100% 100%; + width: 750px; + height: 400px; + left: 230px; + bottom: 80px; } /*身份任务蜀国*/ -.sfrwshuguo{ - position:fixed; - background-color: none; - background-repeat: no-repeat; - background-image: url('./images/JSJM/shuguo.png')!important; - background-size: 100% 100%; - width:750px; - height:400px; - left: 230px; - bottom: 80px; +.sfrwshuguo { + position: fixed; + background-color: none; + background-repeat: no-repeat; + background-image: url("./images/JSJM/shuguo.png") !important; + background-size: 100% 100%; + width: 750px; + height: 400px; + left: 230px; + bottom: 80px; } /*身份任务吴国*/ -.sfrwwuguo{ - position:fixed; - background-color: none; - background-repeat: no-repeat; - background-image: url('./images/JSJM/wuguo.png')!important; - background-size: 100% 100%; - width:750px; - height:400px; - left: 230px; - bottom: 80px; +.sfrwwuguo { + position: fixed; + background-color: none; + background-repeat: no-repeat; + background-image: url("./images/JSJM/wuguo.png") !important; + background-size: 100% 100%; + width: 750px; + height: 400px; + left: 230px; + bottom: 80px; } /*身份任务晋国*/ -.sfrwjinguo{ - position:fixed; - background-color: none; - background-repeat: no-repeat; - background-image: url('./images/JSJM/jinguo.png')!important; - background-size: 100% 100%; - width:750px; - height:400px; - left: 230px; - bottom: 80px; +.sfrwjinguo { + position: fixed; + background-color: none; + background-repeat: no-repeat; + background-image: url("./images/JSJM/jinguo.png") !important; + background-size: 100% 100%; + width: 750px; + height: 400px; + left: 230px; + bottom: 80px; } /*身份任务野心家*/ -.sfrwyexinjia{ - position:fixed; - background-color: none; - background-repeat: no-repeat; - background-image: url('./images/JSJM/yexinjia.png')!important; - background-size: 100% 100%; - width:750px; - height:400px; - left: 230px; - bottom: 80px; +.sfrwyexinjia { + position: fixed; + background-color: none; + background-repeat: no-repeat; + background-image: url("./images/JSJM/yexinjia.png") !important; + background-size: 100% 100%; + width: 750px; + height: 400px; + left: 230px; + bottom: 80px; } /*身份任务群雄*/ -.sfrwqunxiong{ - position:fixed; - background-color: none; - background-repeat: no-repeat; - background-image: url('./images/JSJM/qunxiong.png')!important; - background-size: 100% 100%; - width:750px; - height:400px; - left: 230px; - bottom: 80px; +.sfrwqunxiong { + position: fixed; + background-color: none; + background-repeat: no-repeat; + background-image: url("./images/JSJM/qunxiong.png") !important; + background-size: 100% 100%; + width: 750px; + height: 400px; + left: 230px; + bottom: 80px; } /*身份任务未知*/ -.sfrwundefined{ - position:fixed; - background-color: none; - background-repeat: no-repeat; - background-image: url('./images/JSJM/undefined.png')!important; - background-size: 100% 100%; - width:720px; - height:420px; - left: 230px; - bottom: 80px; -} \ No newline at end of file +.sfrwundefined { + position: fixed; + background-color: none; + background-repeat: no-repeat; + background-image: url("./images/JSJM/undefined.png") !important; + background-size: 100% 100%; + width: 720px; + height: 420px; + left: 230px; + bottom: 80px; +} diff --git a/shoushaUI/lbtn/main2.js b/shoushaUI/lbtn/main2.js index d09b38b..b3899ce 100644 --- a/shoushaUI/lbtn/main2.js +++ b/shoushaUI/lbtn/main2.js @@ -1,641 +1,521 @@ app.import(function (lib, game, ui, get, ai, _status, app) { - lib.arenaReady.push(function () { - //更新轮次 - var originUpdateRoundNumber = game.updateRoundNumber; - game.updateRoundNumber = function () { - originUpdateRoundNumber.apply(this, arguments); - if (ui.cardRoundTime) ui.cardRoundTime.updateRoundCard(); - }; + lib.arenaReady.push(function () { + //更新轮次 + var originUpdateRoundNumber = game.updateRoundNumber; + game.updateRoundNumber = function () { + originUpdateRoundNumber.apply(this, arguments); + if (ui.cardRoundTime) ui.cardRoundTime.updateRoundCard(); + }; - if ( - lib.config.mode == "identity" || - lib.config.mode == "doudizhu" || - lib.config.mode == "guozhan" || - lib.config.mode == "versus" || - lib.config.mode == "single" || - lib.config.mode == "martial" - ) { - var wenhao = ui.create.node("img"); - wenhao.src = - lib.assetURL + "extension/十周年UI/shoushaUI/lbtn/images/CD/wenhao.png"; - wenhao.style.cssText = - "display: block;width: 40px;height: 29px;position: absolute;bottom: calc(100% - 55px);left: calc(100% - 159.5px);background-color: transparent;z-index:3"; + if (lib.config.mode == "identity" || lib.config.mode == "doudizhu" || lib.config.mode == "guozhan" || lib.config.mode == "versus" || lib.config.mode == "single" || lib.config.mode == "martial") { + var wenhao = ui.create.node("img"); + wenhao.src = lib.assetURL + "extension/十周年UI/shoushaUI/lbtn/images/CD/wenhao.png"; + wenhao.style.cssText = "display: block;width: 40px;height: 29px;position: absolute;bottom: calc(100% - 55px);left: calc(100% - 159.5px);background-color: transparent;z-index:3"; - //--------------// - if ( - lib.config.mode == "identity" || - lib.config.mode == "doudizhu" || - lib.config.mode == "versus" || - lib.config.mode == "guozhan" - ) { - wenhao.onclick = function () { - var popuperContainer = ui.create.div(".popup-container", ui.window); - game.playAudio( - "../extension/十周年UI/shoushaUI/lbtn/images/SSCD/label.mp3" - ); + //--------------// + if (lib.config.mode == "identity" || lib.config.mode == "doudizhu" || lib.config.mode == "versus" || lib.config.mode == "guozhan") { + wenhao.onclick = function () { + var popuperContainer = ui.create.div(".popup-container", ui.window); + game.playAudio("../extension/十周年UI/shoushaUI/lbtn/images/SSCD/label.mp3"); - if (lib.config.mode == "identity") { - if (game.me.identity == "zhu") { - ui.create.div(".Tipzhugong", popuperContainer); - } else if (game.me.identity == "zhong") { - ui.create.div(".Tipzhongchen", popuperContainer); - } else if (game.me.identity == "fan") { - ui.create.div(".Tipfanzei", popuperContainer); - } else if (game.me.identity == "nei") { - ui.create.div(".Tipneijian", popuperContainer); - } - } - if (lib.config.mode == "doudizhu") { - if (game.me.identity == "zhu") { - ui.create.div(".Tipdizhu", popuperContainer); - } else if (game.me.identity == "fan") { - ui.create.div(".Tipnongmin", popuperContainer); - } - } + if (lib.config.mode == "identity") { + if (game.me.identity == "zhu") { + ui.create.div(".Tipzhugong", popuperContainer); + } else if (game.me.identity == "zhong") { + ui.create.div(".Tipzhongchen", popuperContainer); + } else if (game.me.identity == "fan") { + ui.create.div(".Tipfanzei", popuperContainer); + } else if (game.me.identity == "nei") { + ui.create.div(".Tipneijian", popuperContainer); + } + } + if (lib.config.mode == "doudizhu") { + if (game.me.identity == "zhu") { + ui.create.div(".Tipdizhu", popuperContainer); + } else if (game.me.identity == "fan") { + ui.create.div(".Tipnongmin", popuperContainer); + } + } - if (lib.config.mode == "versus") { - ui.create.div(".Tiphu", popuperContainer); - } + if (lib.config.mode == "versus") { + ui.create.div(".Tiphu", popuperContainer); + } - if (lib.config.mode == "guozhan") { - if (game.me.group == "unknown" || game.me.group == "undefined") { - //未选择身份势力 - ui.create.div(".Tipundefined", popuperContainer); - } else if (game.me.group == "wei") { - ui.create.div(".Tipweiguo", popuperContainer); - } else if (game.me.group == "shu") { - ui.create.div(".Tipshuguo", popuperContainer); - } else if (game.me.group == "wu") { - ui.create.div(".Tipwuguo", popuperContainer); - } else if (game.me.group == "qun") { - ui.create.div(".Tipqunxiong", popuperContainer); - } else if (game.me.group == "jin") { - ui.create.div(".Tipjinguo", popuperContainer); - } else if (game.me.group == "ye") { - ui.create.div(".Tipyexinjia", popuperContainer); - } - //容错选项 - else { - ui.create.div(".Tipweizhi", popuperContainer); - } - } - popuperContainer.addEventListener("click", (event) => { - game.playAudio( - "../extension/十周年UI/shoushaUI/lbtn/images/SSCD/caidan.mp3" - ); - popuperContainer.delete(200); - }); - }; - } - document.body.appendChild(wenhao); - } - //手牌排序 - var head = ui.create.node("img"); - head.src = - lib.assetURL + - "extension/十周年UI/shoushaUI/lbtn/images/uibutton/zhengli.png"; - head.style.cssText = - "display: block;--w: 88px;--h: calc(var(--w) * 81/247);width: var(--w);height: var(--h);position: absolute;top: calc(100% - 33px);left: calc(100% - 376.2px);background-color: transparent;z-index:7"; - head.onclick = function () { - //head.onclick=ui.click.sortCard; - if (!game.me || game.me.hasSkillTag("noSortCard")) return; - var cards = game.me.getCards("hs"); - var sort2 = function (b, a) { - if (a.name != b.name) return lib.sort.card(a.name, b.name); - else if (a.suit != b.suit) - return lib.suit.indexOf(a) - lib.suit.indexOf(b); - else return a.number - b.number; - }; - if (cards.length > 1) { - cards.sort(sort2); - cards.forEach(function (i, j) { - game.me.node.handcards1.insertBefore( - cards[j], - game.me.node.handcards1.firstChild - ); - }); - dui.queueNextFrameTick(dui.layoutHand, dui); - } - }; - document.body.appendChild(head); - //右上角菜单 - var head = ui.create.node("img"); - head.src = - lib.assetURL + - "extension/十周年UI/shoushaUI/lbtn/images/uibutton/yinying.png"; - head.style.cssText = - "display: block;width: 100%;height: 30%;position: absolute;bottom: 0px;background-color: transparent;z-index:-4"; - document.body.appendChild(head); + if (lib.config.mode == "guozhan") { + if (game.me.group == "unknown" || game.me.group == "undefined") { + //未选择身份势力 + ui.create.div(".Tipundefined", popuperContainer); + } else if (game.me.group == "wei") { + ui.create.div(".Tipweiguo", popuperContainer); + } else if (game.me.group == "shu") { + ui.create.div(".Tipshuguo", popuperContainer); + } else if (game.me.group == "wu") { + ui.create.div(".Tipwuguo", popuperContainer); + } else if (game.me.group == "qun") { + ui.create.div(".Tipqunxiong", popuperContainer); + } else if (game.me.group == "jin") { + ui.create.div(".Tipjinguo", popuperContainer); + } else if (game.me.group == "ye") { + ui.create.div(".Tipyexinjia", popuperContainer); + } + //容错选项 + else { + ui.create.div(".Tipweizhi", popuperContainer); + } + } + popuperContainer.addEventListener("click", event => { + game.playAudio("../extension/十周年UI/shoushaUI/lbtn/images/SSCD/caidan.mp3"); + popuperContainer.delete(200); + }); + }; + } + document.body.appendChild(wenhao); + } + //手牌排序 + var head = ui.create.node("img"); + head.src = lib.assetURL + "extension/十周年UI/shoushaUI/lbtn/images/uibutton/zhengli.png"; + head.style.cssText = "display: block;--w: 88px;--h: calc(var(--w) * 81/247);width: var(--w);height: var(--h);position: absolute;top: calc(100% - 33px);left: calc(100% - 376.2px);background-color: transparent;z-index:7"; + head.onclick = function () { + //head.onclick=ui.click.sortCard; + if (!game.me || game.me.hasSkillTag("noSortCard")) return; + var cards = game.me.getCards("hs"); + var sort2 = function (b, a) { + if (a.name != b.name) return lib.sort.card(a.name, b.name); + else if (a.suit != b.suit) return lib.suit.indexOf(a) - lib.suit.indexOf(b); + else return a.number - b.number; + }; + if (cards.length > 1) { + cards.sort(sort2); + cards.forEach(function (i, j) { + game.me.node.handcards1.insertBefore(cards[j], game.me.node.handcards1.firstChild); + }); + dui.queueNextFrameTick(dui.layoutHand, dui); + } + }; + document.body.appendChild(head); + //右上角菜单 + var head = ui.create.node("img"); + head.src = lib.assetURL + "extension/十周年UI/shoushaUI/lbtn/images/uibutton/yinying.png"; + head.style.cssText = "display: block;width: 100%;height: 30%;position: absolute;bottom: 0px;background-color: transparent;z-index:-4"; + document.body.appendChild(head); - var head = ui.create.node("img"); - head.src = - lib.assetURL + "extension/十周年UI/shoushaUI/lbtn/images/CD/button3.png"; - head.style.cssText = - "display: block;--w: 56px;--h: calc(var(--w) * 74/71);width: var(--w);height: var(--h);position: absolute;bottom: calc(100% - 69px);left: calc(100% - 112.5px);background-color: transparent;z-index:1"; - head.onclick = function () { - head.style.transform = "scale(0.95)"; - }; - document.body.appendChild(head); + var head = ui.create.node("img"); + head.src = lib.assetURL + "extension/十周年UI/shoushaUI/lbtn/images/CD/button3.png"; + head.style.cssText = "display: block;--w: 56px;--h: calc(var(--w) * 74/71);width: var(--w);height: var(--h);position: absolute;bottom: calc(100% - 69px);left: calc(100% - 112.5px);background-color: transparent;z-index:1"; + head.onclick = function () { + head.style.transform = "scale(0.95)"; + }; + document.body.appendChild(head); - var head = ui.create.node("div"); - head.style.cssText = - "display: block;--w: 56px;--h: calc(var(--w) * 74/71);width: var(--w);height: var(--h);position: absolute;bottom: calc(100% - 69px);left: calc(100% - 112.5px);background-color: transparent;z-index:1"; - head.onclick = function () { - game.playAudio( - "../extension/十周年UI/shoushaUI/lbtn/images/CD/click.mp3" - ); - var popuperContainer = ui.create.div( - ".popup-container", - { background: "rgb(0,0,0,0)" }, - ui.window - ); - popuperContainer.addEventListener("click", (event) => { - game.playAudio( - "../extension/十周年UI/shoushaUI/lbtn/images/CD/back.mp3" - ); + var head = ui.create.node("div"); + head.style.cssText = "display: block;--w: 56px;--h: calc(var(--w) * 74/71);width: var(--w);height: var(--h);position: absolute;bottom: calc(100% - 69px);left: calc(100% - 112.5px);background-color: transparent;z-index:1"; + head.onclick = function () { + game.playAudio("../extension/十周年UI/shoushaUI/lbtn/images/CD/click.mp3"); + var popuperContainer = ui.create.div(".popup-container", { background: "rgb(0,0,0,0)" }, ui.window); + popuperContainer.addEventListener("click", event => { + game.playAudio("../extension/十周年UI/shoushaUI/lbtn/images/CD/back.mp3"); - event.stopPropagation(); - popuperContainer.delete(200); - }); - var HOME = ui.create.div(".HOME", popuperContainer); - var SZ = ui.create.div(".SZ", popuperContainer); - SZ.addEventListener("click", (event) => { - game.playAudio( - "../extension/十周年UI/shoushaUI/lbtn/images/CD/button.mp3" - ); + event.stopPropagation(); + popuperContainer.delete(200); + }); + var HOME = ui.create.div(".HOME", popuperContainer); + var SZ = ui.create.div(".SZ", popuperContainer); + SZ.addEventListener("click", event => { + game.playAudio("../extension/十周年UI/shoushaUI/lbtn/images/CD/button.mp3"); - if (!ui.click.configMenu) return; - game.closePopped(); - game.pause2(); - ui.click.configMenu(); - ui.system1.classList.remove("shown"); - ui.system2.classList.remove("shown"); - }); - var LK = ui.create.div(".LK", popuperContainer); - LK.addEventListener("click", (event) => { - game.playAudio( - "../extension/十周年UI/shoushaUI/lbtn/images/CD/button.mp3" - ); + if (!ui.click.configMenu) return; + game.closePopped(); + game.pause2(); + ui.click.configMenu(); + ui.system1.classList.remove("shown"); + ui.system2.classList.remove("shown"); + }); + var LK = ui.create.div(".LK", popuperContainer); + LK.addEventListener("click", event => { + game.playAudio("../extension/十周年UI/shoushaUI/lbtn/images/CD/button.mp3"); - window.location.reload(); - }); - var BJ = ui.create.div(".BJ", popuperContainer); - BJ.addEventListener("click", (event) => { - game.playAudio( - "../extension/十周年UI/shoushaUI/lbtn/images/CD/button.mp3" - ); + window.location.reload(); + }); + var BJ = ui.create.div(".BJ", popuperContainer); + BJ.addEventListener("click", event => { + game.playAudio("../extension/十周年UI/shoushaUI/lbtn/images/CD/button.mp3"); - //换背景 - var Backgrounds = [ - "人间安乐", - "兵临城下", - "兵荒马乱", - "三国开黑节", - "华灯初上", - "天书乱斗", - "朝堂之上", - "校园行", - "桃园风格", - "汉室当兴", - "游卡桌游", - "十周年", - ]; + //换背景 + var Backgrounds = ["人间安乐", "兵临城下", "兵荒马乱", "三国开黑节", "华灯初上", "天书乱斗", "朝堂之上", "校园行", "桃园风格", "汉室当兴", "游卡桌游", "十周年"]; - ui.background.setBackgroundImage( - "extension/十周年UI/shoushaUI/lbtn/images/background/" + - Backgrounds.randomGet() + - ".jpg" - ); - }); - var TX = ui.create.div(".TX", popuperContainer); - TX.addEventListener("click", (event) => { - game.playAudio( - "../extension/十周年UI/shoushaUI/lbtn/images/CD/button.mp3" - ); + ui.background.setBackgroundImage("extension/十周年UI/shoushaUI/lbtn/images/background/" + Backgrounds.randomGet() + ".jpg"); + }); + var TX = ui.create.div(".TX", popuperContainer); + TX.addEventListener("click", event => { + game.playAudio("../extension/十周年UI/shoushaUI/lbtn/images/CD/button.mp3"); - game.over(); - }); - var TG = ui.create.div(".TG", popuperContainer); - TG.addEventListener("click", (event) => { - game.playAudio( - "../extension/十周年UI/shoushaUI/lbtn/images/CD/button.mp3" - ); + game.over(); + }); + var TG = ui.create.div(".TG", popuperContainer); + TG.addEventListener("click", event => { + game.playAudio("../extension/十周年UI/shoushaUI/lbtn/images/CD/button.mp3"); - ui.click.auto(); - }); - }; - document.body.appendChild(head); - }); + ui.click.auto(); + }); + }; + document.body.appendChild(head); + }); - var plugin = { - name: "lbtn", - filter: function () { - return !["chess", "tafang"].includes(get.mode()); - }, - content: function (next) { - lib.skill._uicardupdate = { - trigger: { player: "phaseJieshuBegin" }, - forced: true, - unique: true, - popup: false, - silent: true, - noLose: true, - noGain: true, - noDeprive: true, - priority: -Infinity, - filter: function (event, player) { - return player == game.me; - }, - content: function () { - if (ui.updateSkillControl) ui.updateSkillControl(game.me, true); - }, - }; - }, - precontent: function () { - Object.assign(game.videoContent, { - createCardRoundTime: function () { - ui.cardRoundTime = plugin.create.cardRoundTime(); - }, - createhandcardNumber: function () { - ui.handcardNumber = plugin.create.handcardNumber(); - }, - updateCardRoundTime: function (opts) { - if (!ui.cardRoundTime) return; - ui.cardRoundTime.node.roundNumber.innerHTML = - "第" + game.roundNumber + "轮"; - ui.cardRoundTime.setNumberAnimation(opts.cardNumber); - }, - updateCardnumber: function (opts) { - if (!ui.handcardNumber) return; - // ui.handcardNumber.setNumberAnimation(opts.cardNumber); - }, - }); - app.reWriteFunction(ui.create, { - me: [ - function () { - plugin.create.control(); - }, - null, - ], - arena: [ - null, - function () { - if (ui.time3) { - clearInterval(ui.time3.interval); - ui.time3.delete(); - } - if (ui.cardPileNumber) ui.cardPileNumber.delete(); - ui.cardRoundTime = plugin.create.cardRoundTime(); - ui.handcardNumber = plugin.create.handcardNumber(); - }, - ], - cards: [ - null, - function () { - if (ui.cardRoundTime) { - ui.cardRoundTime.updateRoundCard(); - } - }, - ], - }); - app.reWriteFunction(lib.configMenu.appearence.config, { - update: [ - null, - function (res, config, map) { - map.control_style.hide(); - map.custom_button.hide(); - map.custom_button_system_top.hide(); - map.custom_button_system_bottom.hide(); - map.custom_button_control_top.hide(); - map.custom_button_control_bottom.hide(); - map.radius_size.hide(); - }, - ], - }); + var plugin = { + name: "lbtn", + filter: function () { + return !["chess", "tafang"].includes(get.mode()); + }, + content: function (next) { + lib.skill._uicardupdate = { + trigger: { player: "phaseJieshuBegin" }, + forced: true, + unique: true, + popup: false, + silent: true, + noLose: true, + noGain: true, + noDeprive: true, + priority: -Infinity, + filter: function (event, player) { + return player == game.me; + }, + content: function () { + if (ui.updateSkillControl) ui.updateSkillControl(game.me, true); + }, + }; + }, + precontent: function () { + Object.assign(game.videoContent, { + createCardRoundTime: function () { + ui.cardRoundTime = plugin.create.cardRoundTime(); + }, + createhandcardNumber: function () { + ui.handcardNumber = plugin.create.handcardNumber(); + }, + updateCardRoundTime: function (opts) { + if (!ui.cardRoundTime) return; + ui.cardRoundTime.node.roundNumber.innerHTML = "第" + game.roundNumber + "轮"; + ui.cardRoundTime.setNumberAnimation(opts.cardNumber); + }, + updateCardnumber: function (opts) { + if (!ui.handcardNumber) return; + // ui.handcardNumber.setNumberAnimation(opts.cardNumber); + }, + }); + app.reWriteFunction(ui.create, { + me: [ + function () { + plugin.create.control(); + }, + null, + ], + arena: [ + null, + function () { + if (ui.time3) { + clearInterval(ui.time3.interval); + ui.time3.delete(); + } + if (ui.cardPileNumber) ui.cardPileNumber.delete(); + ui.cardRoundTime = plugin.create.cardRoundTime(); + ui.handcardNumber = plugin.create.handcardNumber(); + }, + ], + cards: [ + null, + function () { + if (ui.cardRoundTime) { + ui.cardRoundTime.updateRoundCard(); + } + }, + ], + }); + app.reWriteFunction(lib.configMenu.appearence.config, { + update: [ + null, + function (res, config, map) { + map.control_style.hide(); + map.custom_button.hide(); + map.custom_button_system_top.hide(); + map.custom_button_system_bottom.hide(); + map.custom_button_control_top.hide(); + map.custom_button_control_bottom.hide(); + map.radius_size.hide(); + }, + ], + }); - ui.create.confirm = function (str, func) { - var confirm = ui.confirm; - if (!confirm) { - confirm = ui.confirm = plugin.create.confirm(); - } - confirm.node.ok.classList.add("disabled"); - confirm.node.cancel.classList.add("disabled"); - if (_status.event.endButton) { - ui.confirm.node.cancel.classList.remove("disabled"); - } - if (str) { - if (str.indexOf("o") !== -1) { - confirm.node.ok.classList.remove("disabled"); - } - if (str.indexOf("c") !== -1) { - confirm.node.cancel.classList.remove("disabled"); - } - confirm.str = str; - } + ui.create.confirm = function (str, func) { + var confirm = ui.confirm; + if (!confirm) { + confirm = ui.confirm = plugin.create.confirm(); + } + confirm.node.ok.classList.add("disabled"); + confirm.node.cancel.classList.add("disabled"); + if (_status.event.endButton) { + ui.confirm.node.cancel.classList.remove("disabled"); + } + if (str) { + if (str.indexOf("o") !== -1) { + confirm.node.ok.classList.remove("disabled"); + } + if (str.indexOf("c") !== -1) { + confirm.node.cancel.classList.remove("disabled"); + } + confirm.str = str; + } - if (func) { - confirm.custom = func; - } - ui.updatec(); - confirm.update(); - }; - }, - create: { - control: function () {}, - confirm: function () { - var confirm = ui.create.control("确定", "cancel"); - confirm.classList.add("lbtn-confirm"); - confirm.node = { - ok: confirm.firstChild, - cancel: confirm.lastChild, - }; - if (_status.event.endButton) { - _status.event.endButton.close(); - // delete event.endButton; - } - confirm.node.ok.link = "ok"; - confirm.node.ok.classList.add("primary"); - confirm.node.cancel.classList.add("primary2"); - confirm.custom = plugin.click.confirm; - app.reWriteFunction(confirm, { - close: [ - function () { - this.classList.add("closing"); - }, - ], - }); - for (var k in confirm.node) { - confirm.node[k].classList.add("disabled"); - confirm.node[k].removeEventListener( - lib.config.touchscreen ? "touchend" : "click", - ui.click.control - ); - confirm.node[k].addEventListener( - lib.config.touchscreen ? "touchend" : "click", - function (e) { - e.stopPropagation(); - if (this.classList.contains("disabled")) { - if ( - this.link === "cancel" && - this.dataset.type === "endButton" && - _status.event.endButton - ) { - _status.event.endButton.custom(); - ui.confirm.close(); - // ui.updatec(); - } - return; - } + if (func) { + confirm.custom = func; + } + ui.updatec(); + confirm.update(); + }; + }, + create: { + control: function () {}, + confirm: function () { + var confirm = ui.create.control("确定", "cancel"); + confirm.classList.add("lbtn-confirm"); + confirm.node = { + ok: confirm.firstChild, + cancel: confirm.lastChild, + }; + if (_status.event.endButton) { + _status.event.endButton.close(); + // delete event.endButton; + } + confirm.node.ok.link = "ok"; + confirm.node.ok.classList.add("primary"); + confirm.node.cancel.classList.add("primary2"); + confirm.custom = plugin.click.confirm; + app.reWriteFunction(confirm, { + close: [ + function () { + this.classList.add("closing"); + }, + ], + }); + for (var k in confirm.node) { + confirm.node[k].classList.add("disabled"); + confirm.node[k].removeEventListener(lib.config.touchscreen ? "touchend" : "click", ui.click.control); + confirm.node[k].addEventListener(lib.config.touchscreen ? "touchend" : "click", function (e) { + e.stopPropagation(); + if (this.classList.contains("disabled")) { + if (this.link === "cancel" && this.dataset.type === "endButton" && _status.event.endButton) { + _status.event.endButton.custom(); + ui.confirm.close(); + // ui.updatec(); + } + return; + } - if (this.parentNode.custom) { - this.parentNode.custom(this.link, this); - } - } - ); - } + if (this.parentNode.custom) { + this.parentNode.custom(this.link, this); + } + }); + } - if (ui.skills2 && ui.skills2.skills.length) { - var skills = ui.skills2.skills; - confirm.skills2 = []; - for (var i = 0; i < skills.length; i++) { - var item = document.createElement("div"); - item.link = skills[i]; - item.innerHTML = get.translation(skills[i]); - item.addEventListener( - lib.config.touchscreen ? "touchend" : "click", - function (e) { - e.stopPropagation(); - ui.click.skill(this.link); - } - ); + if (ui.skills2 && ui.skills2.skills.length) { + var skills = ui.skills2.skills; + confirm.skills2 = []; + for (var i = 0; i < skills.length; i++) { + var item = document.createElement("div"); + item.link = skills[i]; + item.innerHTML = get.translation(skills[i]); + item.addEventListener(lib.config.touchscreen ? "touchend" : "click", function (e) { + e.stopPropagation(); + ui.click.skill(this.link); + }); - item.dataset.type = "skill2"; - if (ui.updateSkillControl) ui.updateSkillControl(game.me, true); /* + item.dataset.type = "skill2"; + if (ui.updateSkillControl) ui.updateSkillControl(game.me, true); /* confirm.insertBefore(item, confirm.firstChild);*/ - } - } + } + } - confirm.update = function () { - if (confirm.skills2) { - if ( - _status.event.skill && - _status.event.skill !== confirm.dataset.skill - ) { - confirm.dataset.skill = _status.event.skill; - confirm.skills2.forEach(function (item) { - item.remove(); - }); - ui.updatec(); - } else if (!_status.event.skill && confirm.dataset.skill) { - delete confirm.dataset.skill; - confirm.skills2.forEach(function (item) { - confirm.insertBefore(item, confirm.firstChild); - }); - ui.updatec(); - } - } - if (ui.updateSkillControl) ui.updateSkillControl(game.me, true); - }; - return confirm; - }, + confirm.update = function () { + if (confirm.skills2) { + if (_status.event.skill && _status.event.skill !== confirm.dataset.skill) { + confirm.dataset.skill = _status.event.skill; + confirm.skills2.forEach(function (item) { + item.remove(); + }); + ui.updatec(); + } else if (!_status.event.skill && confirm.dataset.skill) { + delete confirm.dataset.skill; + confirm.skills2.forEach(function (item) { + confirm.insertBefore(item, confirm.firstChild); + }); + ui.updatec(); + } + } + if (ui.updateSkillControl) ui.updateSkillControl(game.me, true); + }; + return confirm; + }, - handcardNumber: function () { - var node3 = ui.create.div( - ".settingButton", - ui.arena, - plugin.click.setting - ); + handcardNumber: function () { + var node3 = ui.create.div(".settingButton", ui.arena, plugin.click.setting); - /*ui.create.div('.lbtn-controls', ui.arena);*/ - //-------原版---------// - if (lib.config.extension_十周年UI_XPJ == "on") { - var node5 = ui.create.div( - ".huanfuButton", - ui.arena, - plugin.click.huanfu - ); - var node2 = ui.create.div(".jiluButton", ui.arena, ui.click.pause); - //-------------------// - } else { - //-------新版----------// - var node6 = ui.create.div( - ".huanfuButton_new", - ui.arena, - plugin.click.huanfu - ); - var node7 = ui.create.div( - ".jiluButton_new", - ui.arena, - ui.click.pause - ); - var node8 = ui.create.div(".meiguiButton_new", ui.arena); - var node9 = ui.create.div(".xiaolianButton_new", ui.arena); - //---------------------// - } - var node4 = ui.create.div(".tuoguanButton", ui.arena, ui.click.auto); - var node = ui.create.div(".handcardNumber", ui.arena).hide(); - node.node = { - cardPicture: ui.create.div(".cardPicture", node), - cardNumber: ui.create.div(".cardNumber", node), - }; - node.updateCardnumber = function () { - if (!game.me) return; + /*ui.create.div('.lbtn-controls', ui.arena);*/ + //-------原版---------// + if (lib.config.extension_十周年UI_XPJ == "on") { + var node5 = ui.create.div(".huanfuButton", ui.arena, plugin.click.huanfu); + var node2 = ui.create.div(".jiluButton", ui.arena, ui.click.pause); + //-------------------// + } else { + //-------新版----------// + var node6 = ui.create.div(".huanfuButton_new", ui.arena, plugin.click.huanfu); + var node7 = ui.create.div(".jiluButton_new", ui.arena, ui.click.pause); + var node8 = ui.create.div(".meiguiButton_new", ui.arena); + var node9 = ui.create.div(".xiaolianButton_new", ui.arena); + //---------------------// + } + var node4 = ui.create.div(".tuoguanButton", ui.arena, ui.click.auto); + var node = ui.create.div(".handcardNumber", ui.arena).hide(); + node.node = { + cardPicture: ui.create.div(".cardPicture", node), + cardNumber: ui.create.div(".cardNumber", node), + }; + node.updateCardnumber = function () { + if (!game.me) return; - var cardNumber2 = game.me.countCards("h") || 0; - var cardNumber = game.me.getHandcardLimit() || 0; - var numbercolor = "white"; - if (cardNumber2 > cardNumber) numbercolor = "red"; - if (cardNumber == Infinity) cardNumber = "∞"; - this.node.cardNumber.innerHTML = - "" + - " " + - cardNumber2 + - "" + - '' + - " / " + - "" + - cardNumber + - ""; /*手牌数参数*/ - // this.setNumberAnimation(cardNumber); - this.show(); + var cardNumber2 = game.me.countCards("h") || 0; + var cardNumber = game.me.getHandcardLimit() || 0; + var numbercolor = "white"; + if (cardNumber2 > cardNumber) numbercolor = "red"; + if (cardNumber == Infinity) cardNumber = "∞"; + this.node.cardNumber.innerHTML = "" + " " + cardNumber2 + "" + '' + " / " + "" + cardNumber + ""; /*手牌数参数*/ + // this.setNumberAnimation(cardNumber); + this.show(); - game.addVideo("updateCardnumber", null, { - cardNumber: cardNumber, - }); - }; - node.node.cardNumber.interval = setInterval(function () { - ui.handcardNumber.updateCardnumber(); - }, 1000); - // game.addVideo('createCardRoundTime'); - game.addVideo("createhandcardNumber"); - return node; - }, - cardRoundTime: function () { - var node = ui.create.div(".cardRoundNumber", ui.arena).hide(); - node.node = { - cardPileNumber: ui.create.div(".cardPileNumber", node), - roundNumber: ui.create.div(".roundNumber", node), - time: ui.create.div(".time", node), - }; + game.addVideo("updateCardnumber", null, { + cardNumber: cardNumber, + }); + }; + node.node.cardNumber.interval = setInterval(function () { + ui.handcardNumber.updateCardnumber(); + }, 1000); + // game.addVideo('createCardRoundTime'); + game.addVideo("createhandcardNumber"); + return node; + }, + cardRoundTime: function () { + var node = ui.create.div(".cardRoundNumber", ui.arena).hide(); + node.node = { + cardPileNumber: ui.create.div(".cardPileNumber", node), + roundNumber: ui.create.div(".roundNumber", node), + time: ui.create.div(".time", node), + }; - node.updateRoundCard = function () { - var cardNumber = ui.cardPile.childNodes.length || 0; - var roundNumber = game.roundNumber || 0; - this.node.roundNumber.innerHTML = - "第" + game.roundNumber + "轮"; - this.setNumberAnimation(cardNumber); - this.show(); - game.addVideo("updateCardRoundTime", null, { - cardNumber: cardNumber, - roundNumber: roundNumber, - }); - }; + node.updateRoundCard = function () { + var cardNumber = ui.cardPile.childNodes.length || 0; + var roundNumber = game.roundNumber || 0; + this.node.roundNumber.innerHTML = "第" + game.roundNumber + "轮"; + this.setNumberAnimation(cardNumber); + this.show(); + game.addVideo("updateCardRoundTime", null, { + cardNumber: cardNumber, + roundNumber: roundNumber, + }); + }; - node.setNumberAnimation = function (num, step) { - var item = this.node.cardPileNumber; - clearTimeout(item.interval); - if (!item._num) { - item.innerHTML = "" + num + ""; - item._num = num; - } else { - if (item._num !== num) { - if (!step) step = 500 / Math.abs(item._num - num); - if (item._num > num) item._num--; - else item._num++; - item.innerHTML = "" + item._num + ""; - if (item._num !== num) { - item.interval = setTimeout(function () { - node.setNumberAnimation(num, step); - }, step); - } - } - } - }; + node.setNumberAnimation = function (num, step) { + var item = this.node.cardPileNumber; + clearTimeout(item.interval); + if (!item._num) { + item.innerHTML = "" + num + ""; + item._num = num; + } else { + if (item._num !== num) { + if (!step) step = 500 / Math.abs(item._num - num); + if (item._num > num) item._num--; + else item._num++; + item.innerHTML = "" + item._num + ""; + if (item._num !== num) { + item.interval = setTimeout(function () { + node.setNumberAnimation(num, step); + }, step); + } + } + } + }; - ui.time4 = node.node.time; - ui.time4.starttime = get.utc(); - ui.time4.interval = setInterval(function () { - var num = Math.round((get.utc() - ui.time4.starttime) / 1000); - if (num >= 3600) { - var num1 = Math.floor(num / 3600); - var num2 = Math.floor((num - num1 * 3600) / 60); - var num3 = num - num1 * 3600 - parseInt(num2) * 60; - if (num1 < 10) { - num1 = "0" + num1.toString(); - } - if (num2 < 10) { - num2 = "0" + num2.toString(); - } - if (num3 < 10) { - num3 = "0" + num3.toString(); - } - ui.time4.innerHTML = - "" + num1 + ":" + num2 + ":" + num3 + ""; - } else { - var num1 = Math.floor(num / 60); - var num2 = num - num1 * 60; - if (num1 < 10) { - num1 = "0" + num1.toString(); - } - if (num2 < 10) { - num2 = "0" + num2.toString(); - } - ui.time4.innerHTML = "" + num1 + ":" + num2 + ""; - } - }, 1000); - game.addVideo("createCardRoundTime"); - return node; - }, - }, - click: { - huanfu: function () { - game.playAudio( - "../extension/十周年UI/shoushaUI/lbtn/images/CD/huanfu.mp3" - ); - window.zyile_charactercard - ? window.zyile_charactercard(player, false) - : ui.click.charactercard( - game.me.name, - game.zhu, - lib.config.mode == "mode_guozhan" ? "guozhan" : true - ); - }, - confirm: function (link, target) { - if (link === "ok") { - ui.click.ok(target); - } else if (link === "cancel") { - ui.click.cancel(target); - } else if (target.custom) { - target.custom(link); - } - }, - }, - compare: { - type: function (a, b) { - if (a === b) return 0; - var types = ["basic", "trick", "delay", "equip"].addArray([a, b]); - return types.indexOf(a) - types.indexOf(b); - }, - name: function (a, b) { - if (a === b) return 0; - return a > b ? 1 : -1; - }, - nature: function (a, b) { - if (a === b) return 0; - var nature = [undefined, "fire", "thunder"].addArray([a, b]); - return nature.indexOf(a) - nature.indexOf(b); - }, - suit: function (a, b) { - if (a === b) return 0; - var suit = ["diamond", "heart", "club", "spade"].addArray([a, b]); - return suit.indexOf(a) - suit.indexOf(b); - }, - number: function (a, b) { - return a - b; - }, - }, - }; - return plugin; + ui.time4 = node.node.time; + ui.time4.starttime = get.utc(); + ui.time4.interval = setInterval(function () { + var num = Math.round((get.utc() - ui.time4.starttime) / 1000); + if (num >= 3600) { + var num1 = Math.floor(num / 3600); + var num2 = Math.floor((num - num1 * 3600) / 60); + var num3 = num - num1 * 3600 - parseInt(num2) * 60; + if (num1 < 10) { + num1 = "0" + num1.toString(); + } + if (num2 < 10) { + num2 = "0" + num2.toString(); + } + if (num3 < 10) { + num3 = "0" + num3.toString(); + } + ui.time4.innerHTML = "" + num1 + ":" + num2 + ":" + num3 + ""; + } else { + var num1 = Math.floor(num / 60); + var num2 = num - num1 * 60; + if (num1 < 10) { + num1 = "0" + num1.toString(); + } + if (num2 < 10) { + num2 = "0" + num2.toString(); + } + ui.time4.innerHTML = "" + num1 + ":" + num2 + ""; + } + }, 1000); + game.addVideo("createCardRoundTime"); + return node; + }, + }, + click: { + huanfu: function () { + game.playAudio("../extension/十周年UI/shoushaUI/lbtn/images/CD/huanfu.mp3"); + window.zyile_charactercard ? window.zyile_charactercard(player, false) : ui.click.charactercard(game.me.name, game.zhu, lib.config.mode == "mode_guozhan" ? "guozhan" : true); + }, + confirm: function (link, target) { + if (link === "ok") { + ui.click.ok(target); + } else if (link === "cancel") { + ui.click.cancel(target); + } else if (target.custom) { + target.custom(link); + } + }, + }, + compare: { + type: function (a, b) { + if (a === b) return 0; + var types = ["basic", "trick", "delay", "equip"].addArray([a, b]); + return types.indexOf(a) - types.indexOf(b); + }, + name: function (a, b) { + if (a === b) return 0; + return a > b ? 1 : -1; + }, + nature: function (a, b) { + if (a === b) return 0; + var nature = [undefined, "fire", "thunder"].addArray([a, b]); + return nature.indexOf(a) - nature.indexOf(b); + }, + suit: function (a, b) { + if (a === b) return 0; + var suit = ["diamond", "heart", "club", "spade"].addArray([a, b]); + return suit.indexOf(a) - suit.indexOf(b); + }, + number: function (a, b) { + return a - b; + }, + }, + }; + return plugin; }); diff --git a/shoushaUI/lbtn/main3.css b/shoushaUI/lbtn/main3.css index 022e071..3da857a 100644 --- a/shoushaUI/lbtn/main3.css +++ b/shoushaUI/lbtn/main3.css @@ -1,8 +1,9 @@ -.lbtn-controls {/*牌序,记录按钮*/ - --width: 80px;/*按钮宽度*/ - --height: 58.6px;/*按钮高度*/ - left: 0;/*左边距,越大越靠右*/ - bottom: 15%;/*整体上移*/ +.lbtn-controls { + /*牌序,记录按钮*/ + --width: 80px; /*按钮宽度*/ + --height: 58.6px; /*按钮高度*/ + left: 0; /*左边距,越大越靠右*/ + bottom: 15%; /*整体上移*/ z-index: 3; } #arena:not(.single-handcard):not(.chess).cxy-new-ui > .lbtn-controls ~ #mebg, @@ -18,93 +19,93 @@ position: relative; } /*二级菜单页面*/ -.HOME{ - --w: 69px; - --h: calc(var(--w) * 446/81);/*高和长*/ +.HOME { + --w: 69px; + --h: calc(var(--w) * 446 / 81); /*高和长*/ width: var(--w); height: var(--h); - top: 0%; - left: calc(100% - 119px); - background-size: 100% 100%; - background-image: url("./images/CD/HOME.png"); - z-index: 68; - position: relative; - transition:all 1s; + top: 0%; + left: calc(100% - 119px); + background-size: 100% 100%; + background-image: url("./images/CD/HOME.png"); + z-index: 68; + position: relative; + transition: all 1s; } /*设置*/ -.SZ{ - --w: 56px; - --h: calc(var(--w) * 73/71); - width: var(--w); - height: var(--h); - bottom: calc(100% - 373px); - left: calc(100% - 112.5px); - background-size: 100% 100%; - background-image: url("./images/CD/SZ.png"); - z-index: 99; - position:fixed; +.SZ { + --w: 56px; + --h: calc(var(--w) * 73 / 71); + width: var(--w); + height: var(--h); + bottom: calc(100% - 373px); + left: calc(100% - 112.5px); + background-size: 100% 100%; + background-image: url("./images/CD/SZ.png"); + z-index: 99; + position: fixed; } /*离开*/ -.LK{ - --w: 56px; - --h: calc(var(--w) * 73/71); - width: var(--w); - height: var(--h); - bottom: calc(100% - 248px); - left: calc(100% - 112.5px); - background-size: 100% 100%; - background-image: url("./images/CD/LK.png"); - z-index: 99; - position:fixed; +.LK { + --w: 56px; + --h: calc(var(--w) * 73 / 71); + width: var(--w); + height: var(--h); + bottom: calc(100% - 248px); + left: calc(100% - 112.5px); + background-size: 100% 100%; + background-image: url("./images/CD/LK.png"); + z-index: 99; + position: fixed; } /*背景*/ -.BJ{ - --w: 56px; - --h: calc(var(--w) * 73/71); - width: var(--w); - height: var(--h); - bottom: calc(100% - 310px); - left: calc(100% - 112.5px); - background-size: 100% 100%; - background-image: url("./images/CD/BJ.png"); - z-index: 99; - position:fixed; +.BJ { + --w: 56px; + --h: calc(var(--w) * 73 / 71); + width: var(--w); + height: var(--h); + bottom: calc(100% - 310px); + left: calc(100% - 112.5px); + background-size: 100% 100%; + background-image: url("./images/CD/BJ.png"); + z-index: 99; + position: fixed; } /*投降*/ -.TX{ - --w: 56px; - --h: calc(var(--w) * 73/71); - width: var(--w); - height: var(--h); - bottom: calc(100% - 187px); - left: calc(100% - 112.5px); - background-size: 100% 100%; - background-image: url("./images/CD/TX.png"); - z-index: 99; - position:fixed; +.TX { + --w: 56px; + --h: calc(var(--w) * 73 / 71); + width: var(--w); + height: var(--h); + bottom: calc(100% - 187px); + left: calc(100% - 112.5px); + background-size: 100% 100%; + background-image: url("./images/CD/TX.png"); + z-index: 99; + position: fixed; } /*托管*/ -.TG{ - --w: 56px; - --h: calc(var(--w) * 74/71); - width: var(--w); - height: var(--h); - bottom: calc(100% - 126px); - left: calc(100% - 112.5px); - background-size: 100% 100%; - background-image: url("./images/CD/TG.png"); - z-index: 99; - position:fixed; +.TG { + --w: 56px; + --h: calc(var(--w) * 74 / 71); + width: var(--w); + height: var(--h); + bottom: calc(100% - 126px); + left: calc(100% - 112.5px); + background-size: 100% 100%; + background-image: url("./images/CD/TG.png"); + z-index: 99; + position: fixed; } /*---------新版小配件--------*/ .jiluButton_new { - display: block; + display: block; --w: 53px; --h: 53px; width: var(--w); @@ -115,42 +116,40 @@ background-image: url("./images/uibutton/new_jilu_new.png"); background-size: 100% 100%; border-radius: 1px; - z-index:4; + z-index: 4; margin-left: 10px; - } .huanfuButton_new { - display: block; - --w: 53px; + display: block; + --w: 53px; --h: 53px; width: var(--w); height: var(--h); - position: absolute; - bottom: 24.5%; - left: 3%; - background-image: url("./images/uibutton/new_huanfu_new.png"); + position: absolute; + bottom: 24.5%; + left: 3%; + background-image: url("./images/uibutton/new_huanfu_new.png"); background-size: 100% 100%; - z-index:3; - margin-left: 10px; + z-index: 3; + margin-left: 10px; } .xiaolianButton_new { - display: block; - --w: 53px; - --h: 53px; - width: var(--w); - height: var(--h); - position: absolute; - bottom: 13.5%; - left: 3%; - background-image: url("./images/uibutton/new_xiaolian_new.png"); - background-size: 100% 100%; - z-index:3; - margin-left: 10px; + display: block; + --w: 53px; + --h: 53px; + width: var(--w); + height: var(--h); + position: absolute; + bottom: 13.5%; + left: 3%; + background-image: url("./images/uibutton/new_xiaolian_new.png"); + background-size: 100% 100%; + z-index: 3; + margin-left: 10px; } - /*-----------------------------*/ .lbtn-confirm:not(.closing).removing { @@ -165,9 +164,8 @@ padding: 0; } - .control > div { - /*选将按钮,提示之类*/ + /*选将按钮,提示之类*/ /*height: var(--h) !important; width: calc(var(--h)*90/32) !important;*/ background-image: url("./images/uibutton/new_btnn2.png"); @@ -177,12 +175,12 @@ min-width: 100px !important; /*限制最小宽度100*/ max-height: 50px !important; /*限制最大高度35*/ text-align: center; - margin-top:0px !important; + margin-top: 0px !important; margin-bottom: -15px !important; - color: #2F4F4F; - -webkit-text-stroke: 0.4px #803B02; - font-family: 'yuanli'; - text-shadow: 0 0 2px #FFFFD5, 0 0 2px #FFFFD5; + color: #2f4f4f; + -webkit-text-stroke: 0.4px #803b02; + font-family: "yuanli"; + text-shadow: 0 0 2px #ffffd5, 0 0 2px #ffffd5; /*text-shadow: #F5D78E 1px 1px 1px, #F5D78E 1px -1px 1px, #F5D78E -1px 1px 1px, @@ -191,21 +189,22 @@ } /*无懈按钮位置*/ -#arena>#dui-controls>.control.stayleft { +#arena > #dui-controls > .control.stayleft { left: calc(50% - 420px) !important; margin-bottom: 5px !important; order: 3; } -.control > div.primary2 {/*(取消/结束)按钮*/ +.control > div.primary2 { + /*(取消/结束)按钮*/ /*width: 100px; --p: calc(var(--h) * 11 / 75);*/ color: rgb(250, 250, 200); /*margin-left: 50px;*/ bottom: 1.8px; - color: #2F4F4F; - -webkit-text-stroke: 0.4px #803B02; - text-shadow: 0 0 2px #FFFFD5, 0 0 2px #FFFFD5; + color: #2f4f4f; + -webkit-text-stroke: 0.4px #803b02; + text-shadow: 0 0 2px #ffffd5, 0 0 2px #ffffd5; /*text-shadow: #AB9372 1px 1px 1px, #AB9372 1px -1px 1px, #AB9372 -1px 1px 1px, @@ -213,22 +212,23 @@ font-size: 25px; /*字体大小*/ line-height: 35px; /*建议别调*/ padding: 2.6px 25px !important; /*按钮高度+宽度 (前置定位条件:字体大小) 建议别调1 10*/ - margin-left:55px !important; - margin-right:0px !important; - margin-top:0px !important; + margin-left: 55px !important; + margin-right: 0px !important; + margin-top: 0px !important; margin-bottom: -15px !important; background-size: 100% 100%; background-image: url("./images/uibutton/new_btnn.png"); overflow: visible; transition: none; } -.control > div.primary {/*确认按钮*/ +.control > div.primary { + /*确认按钮*/ /*width: 100px; --p: calc(var(--h) * 11 / 75);*/ /*color: rgb(250, 250, 200);*/ - color: #2F4F4F; - -webkit-text-stroke: 0.4px #803B02; - text-shadow: 0 0 2px #FFFFD5, 0 0 2px #FFFFD5; + color: #2f4f4f; + -webkit-text-stroke: 0.4px #803b02; + text-shadow: 0 0 2px #ffffd5, 0 0 2px #ffffd5; /*text-shadow: #F5D78E 1px 1px 1px, #F5D78E 1px -1px 1px, #F5D78E -1px 1px 1px, @@ -237,15 +237,14 @@ line-height: 35px; /*建议别调*/ padding: 2.6px 25px !important; /*按钮高度+宽度 (前置定位条件:字体大小) 建议别调0 10*/ /*margin: 0px 55px !important;*/ - margin-left:10px !important; - margin-right:10px !important; - margin-top:0px !important; + margin-left: 10px !important; + margin-right: 10px !important; + margin-top: 0px !important; margin-bottom: -15px !important; background-size: 100% 100%; background-image: url("./images/uibutton/new_btnn2.png"); } - .control > div.disabled:not([data-type="endButton"]) { background-size: 100% 100%; } @@ -259,20 +258,13 @@ display: none; } - /*------有点懒具体看main1.css---------------*/ .handcardNumber { bottom: 0px; right: 230px; - font-family: 'yuanli'; - text-shadow: #F5D78E 0 0 1px, - black 0 0 2px, - black 0 0 2px, - black 0 0 2px, - black 0 0 2px, - black 0 0 2px, - black 0 0 2px; - color: #F5D78E; + font-family: "yuanli"; + text-shadow: #f5d78e 0 0 1px, black 0 0 2px, black 0 0 2px, black 0 0 2px, black 0 0 2px, black 0 0 2px, black 0 0 2px; + color: #f5d78e; z-index: 1; } @@ -280,13 +272,13 @@ left: 90px; bottom: -6px; --w: 130px; - --h: calc(var(--w) * 92/400);/*宽和长*/ + --h: calc(var(--w) * 92 / 400); /*宽和长*/ width: var(--w); height: var(--h); background-image: url("./images/uibutton/new_count1.png"); background-size: 100% 100%; position: relative; - z-index: -1; + z-index: -1; } /*手牌数参数*/ .handcardNumber > .cardNumber { @@ -295,38 +287,35 @@ height: 8px; line-height: 25px; text-align: center; - color: #FFFCF5; + color: #fffcf5; font-size: 20px; white-space: nowrap; - letter-spacing: 0.35px;/*字体间距*/ + letter-spacing: 0.35px; /*字体间距*/ } .cardRoundNumber { top: 16px; left: 25px; - font-weight:400; - font-family: 'yuanli'; - text-shadow: #B4A993 0.2px 0.2px 0.2px, - #B4A993 0.2px -0.2px 0.2px, - #B4A993 -0.2px 0.2px 0.2px, - #B4A993 -0.2px -0.2px 0.2px; + font-weight: 400; + font-family: "yuanli"; + text-shadow: #b4a993 0.2px 0.2px 0.2px, #b4a993 0.2px -0.2px 0.2px, #b4a993 -0.2px 0.2px 0.2px, #b4a993 -0.2px -0.2px 0.2px; } .cardRoundNumber > .cardPileNumber { - left:20px; + left: 20px; top: -15px; --w: 65px; - --h: calc(var(--w) * 173/ 127); + --h: calc(var(--w) * 173 / 127); width: var(--w); height: var(--h); background-image: url("./images/uibutton/new_cardback3.png"); background-size: 100% 100%; background-color: transparent; position: relative; - z-index: 2; + z-index: 2; } .cardRoundNumber > .cardPileNumber > span { - left: 12px;/*牌堆数右移,越大越靠右*/ + left: 12px; /*牌堆数右移,越大越靠右*/ top: 6px; width: 100%; display: block; @@ -337,253 +326,251 @@ font-size: 18px; } .cardRoundNumber > .roundNumber, -.cardRoundNumber > .time {/*游戏时间*/ - left: 32px;/*牌堆数/时间右移,越大越靠右*/ +.cardRoundNumber > .time { + /*游戏时间*/ + left: 32px; /*牌堆数/时间右移,越大越靠右*/ top: 24px; height: 20px; - line-height: 16px;/*游戏轮数/时间间隔*/ + line-height: 16px; /*游戏轮数/时间间隔*/ white-space: nowrap; color: #fae2bc; z-index: 3; } -.cardRoundNumber > .time {/*游戏时间*/ - top: 48px;/*高度*/ +.cardRoundNumber > .time { + /*游戏时间*/ + top: 48px; /*高度*/ left: 34px; font-size: 17px; color: #e0c192; } - - /*托管中图片()*/ -#autonode>div:last-child{ - z-index: 10; - margin-bottom:-75px!important; +#autonode > div:last-child { + z-index: 10; + margin-bottom: -75px !important; left: calc(50% - 440px); font-size: 0px; text-shadow: none; --w: 400px; - --h: calc(var(--w) * 149/598);/*高和长*/ - width: var(--w);/*按比例调节*/ - height: var(--h);/*同理*/ + --h: calc(var(--w) * 149 / 598); /*高和长*/ + width: var(--w); /*按比例调节*/ + height: var(--h); /*同理*/ /*display: table;*/ background-image: url("./images/CD/tuoguan2.png"); - background-size:100% 100%; - -webkit-text-fill-color: transparent; - text-shadow:none!important; + background-size: 100% 100%; + -webkit-text-fill-color: transparent; + text-shadow: none !important; } - /*身份任务主公*/ -.Tipzhugong{ - position:fixed; - background-color: none; - background-repeat: no-repeat; - background-image: url('./images/SFTS/Tipzhugong.png')!important; - background-size: 100% 100%; - --w: 269px; - --h: calc(var(--w) * 214/600);/*高和长*/ +.Tipzhugong { + position: fixed; + background-color: none; + background-repeat: no-repeat; + background-image: url("./images/SFTS/Tipzhugong.png") !important; + background-size: 100% 100%; + --w: 269px; + --h: calc(var(--w) * 214 / 600); /*高和长*/ width: var(--w); height: var(--h); - left: calc(100% - 400.5px); - bottom: calc(100% - 145px); + left: calc(100% - 400.5px); + bottom: calc(100% - 145px); } /*身份任务忠臣*/ -.Tipzhongchen{ - position:fixed; - background-color: none; - background-repeat: no-repeat; - background-image: url('./images/SFTS/Tipzhongchen.png')!important; - background-size: 100% 100%; - --w: 269px; - --h: calc(var(--w) * 214/600);/*高和长*/ +.Tipzhongchen { + position: fixed; + background-color: none; + background-repeat: no-repeat; + background-image: url("./images/SFTS/Tipzhongchen.png") !important; + background-size: 100% 100%; + --w: 269px; + --h: calc(var(--w) * 214 / 600); /*高和长*/ width: var(--w); height: var(--h); - left: calc(100% - 400.5px); - bottom: calc(100% - 145px); + left: calc(100% - 400.5px); + bottom: calc(100% - 145px); } /*身份任务反贼*/ -.Tipfanzei{ - position:fixed; - background-color: none; - background-repeat: no-repeat; - background-image: url('./images/SFTS/Tipfanzei.png')!important; - background-size: 100% 100%; - --w: 269px; - --h: calc(var(--w) * 214/600);/*高和长*/ +.Tipfanzei { + position: fixed; + background-color: none; + background-repeat: no-repeat; + background-image: url("./images/SFTS/Tipfanzei.png") !important; + background-size: 100% 100%; + --w: 269px; + --h: calc(var(--w) * 214 / 600); /*高和长*/ width: var(--w); height: var(--h); - left: calc(100% - 400.5px); - bottom: calc(100% - 145px); + left: calc(100% - 400.5px); + bottom: calc(100% - 145px); } /*身份任务内奸*/ -.Tipneijian{ - position:fixed; - background-color: none; - background-repeat: no-repeat; - background-image: url('./images/SFTS/Tipneijian.png')!important; - background-size: 100% 100%; - --w: 269px; - --h: calc(var(--w) * 214/600);/*高和长*/ +.Tipneijian { + position: fixed; + background-color: none; + background-repeat: no-repeat; + background-image: url("./images/SFTS/Tipneijian.png") !important; + background-size: 100% 100%; + --w: 269px; + --h: calc(var(--w) * 214 / 600); /*高和长*/ width: var(--w); height: var(--h); - left: calc(100% - 400.5px); - bottom: calc(100% - 145px); + left: calc(100% - 400.5px); + bottom: calc(100% - 145px); } /*身份任务地主*/ -.Tipdizhu{ - position:fixed; - background-color: none; - background-repeat: no-repeat; - background-image: url('./images/SFTS/Tipdizhu.png')!important; - background-size: 100% 100%; - --w: 269px; - --h: calc(var(--w) * 214/600);/*高和长*/ +.Tipdizhu { + position: fixed; + background-color: none; + background-repeat: no-repeat; + background-image: url("./images/SFTS/Tipdizhu.png") !important; + background-size: 100% 100%; + --w: 269px; + --h: calc(var(--w) * 214 / 600); /*高和长*/ width: var(--w); height: var(--h); - left: calc(100% - 400.5px); - bottom: calc(100% - 145px); + left: calc(100% - 400.5px); + bottom: calc(100% - 145px); } /*身份任务农民*/ -.Tipnongmin{ - position:fixed; - background-color: none; - background-repeat: no-repeat; - background-image: url('./images/SFTS/Tipnongmin.png')!important; - background-size: 100% 100%; - --w: 269px; - --h: calc(var(--w) * 214/600);/*高和长*/ +.Tipnongmin { + position: fixed; + background-color: none; + background-repeat: no-repeat; + background-image: url("./images/SFTS/Tipnongmin.png") !important; + background-size: 100% 100%; + --w: 269px; + --h: calc(var(--w) * 214 / 600); /*高和长*/ width: var(--w); height: var(--h); - left: calc(100% - 400.5px); - bottom: calc(100% - 145px); + left: calc(100% - 400.5px); + bottom: calc(100% - 145px); } /*身份任务虎队*/ -.Tiphu{ - position:fixed; - background-color: none; - background-repeat: no-repeat; - background-image: url('./images/SFTS/hu.png')!important; - background-size: 100% 100%; - --w: 269px; - --h: calc(var(--w) * 214/600);/*高和长*/ +.Tiphu { + position: fixed; + background-color: none; + background-repeat: no-repeat; + background-image: url("./images/SFTS/hu.png") !important; + background-size: 100% 100%; + --w: 269px; + --h: calc(var(--w) * 214 / 600); /*高和长*/ width: var(--w); height: var(--h); - left: calc(100% - 400.5px); - bottom: calc(100% - 145px); + left: calc(100% - 400.5px); + bottom: calc(100% - 145px); } /*身份任务魏国*/ -.Tipweiguo{ - position:fixed; - background-color: none; - background-repeat: no-repeat; - background-image: url('./images/SFTS/Tipweiguo.png')!important; - background-size: 100% 100%; - --w: 269px; - --h: calc(var(--w) * 214/600);/*高和长*/ +.Tipweiguo { + position: fixed; + background-color: none; + background-repeat: no-repeat; + background-image: url("./images/SFTS/Tipweiguo.png") !important; + background-size: 100% 100%; + --w: 269px; + --h: calc(var(--w) * 214 / 600); /*高和长*/ width: var(--w); height: var(--h); - left: calc(100% - 400.5px); - bottom: calc(100% - 145px); + left: calc(100% - 400.5px); + bottom: calc(100% - 145px); } /*身份任务蜀国*/ -.Tipshuguo{ - position:fixed; - background-color: none; - background-repeat: no-repeat; - background-image: url('./images/SFTS/Tipshuguo.png')!important; - background-size: 100% 100%; - --w: 269px; - --h: calc(var(--w) * 214/600);/*高和长*/ +.Tipshuguo { + position: fixed; + background-color: none; + background-repeat: no-repeat; + background-image: url("./images/SFTS/Tipshuguo.png") !important; + background-size: 100% 100%; + --w: 269px; + --h: calc(var(--w) * 214 / 600); /*高和长*/ width: var(--w); height: var(--h); - left: calc(100% - 400.5px); - bottom: calc(100% - 145px); + left: calc(100% - 400.5px); + bottom: calc(100% - 145px); } /*身份任务吴国*/ -.Tipwuguo{ - position:fixed; - background-color: none; - background-repeat: no-repeat; - background-image: url('./images/SFTS/Tipwuguo.png')!important; - background-size: 100% 100%; - --w: 269px; - --h: calc(var(--w) * 214/600);/*高和长*/ +.Tipwuguo { + position: fixed; + background-color: none; + background-repeat: no-repeat; + background-image: url("./images/SFTS/Tipwuguo.png") !important; + background-size: 100% 100%; + --w: 269px; + --h: calc(var(--w) * 214 / 600); /*高和长*/ width: var(--w); height: var(--h); - left: calc(100% - 400.5px); - bottom: calc(100% - 145px); + left: calc(100% - 400.5px); + bottom: calc(100% - 145px); } /*身份任务晋国*/ -.Tipjinguo{ - position:fixed; - background-color: none; - background-repeat: no-repeat; - background-image: url('./images/SFTS/Tipjinguo.png')!important; - background-size: 100% 100%; - --w: 269px; - --h: calc(var(--w) * 214/600);/*高和长*/ +.Tipjinguo { + position: fixed; + background-color: none; + background-repeat: no-repeat; + background-image: url("./images/SFTS/Tipjinguo.png") !important; + background-size: 100% 100%; + --w: 269px; + --h: calc(var(--w) * 214 / 600); /*高和长*/ width: var(--w); height: var(--h); - left: calc(100% - 400.5px); - bottom: calc(100% - 145px); + left: calc(100% - 400.5px); + bottom: calc(100% - 145px); } /*身份任务野心家*/ -.Tipyexinjia{ - position:fixed; - background-color: none; - background-repeat: no-repeat; - background-image: url('./images/SFTS/Tipye.png')!important; - background-size: 100% 100%; - --w: 269px; - --h: calc(var(--w) * 214/600);/*高和长*/ +.Tipyexinjia { + position: fixed; + background-color: none; + background-repeat: no-repeat; + background-image: url("./images/SFTS/Tipye.png") !important; + background-size: 100% 100%; + --w: 269px; + --h: calc(var(--w) * 214 / 600); /*高和长*/ width: var(--w); height: var(--h); - left: calc(100% - 400.5px); - bottom: calc(100% - 145px); + left: calc(100% - 400.5px); + bottom: calc(100% - 145px); } /*身份任务群雄*/ -.Tipqunxiong{ - position:fixed; - background-color: none; - background-repeat: no-repeat; - background-image: url('./images/SFTS/Tipqunxiong.png')!important; - background-size: 100% 100%; - --w: 269px; - --h: calc(var(--w) * 214/600);/*高和长*/ +.Tipqunxiong { + position: fixed; + background-color: none; + background-repeat: no-repeat; + background-image: url("./images/SFTS/Tipqunxiong.png") !important; + background-size: 100% 100%; + --w: 269px; + --h: calc(var(--w) * 214 / 600); /*高和长*/ width: var(--w); height: var(--h); - left: calc(100% - 400.5px); - bottom: calc(100% - 145px); + left: calc(100% - 400.5px); + bottom: calc(100% - 145px); } /*身份任务未选择*/ -.Tipundefined{ - position:fixed; - background-color: none; - background-repeat: no-repeat; - background-image: url('./images/SFTS/Tipyinbi.png')!important; - background-size: 100% 100%; - --w: 269px; - --h: calc(var(--w) * 214/600);/*高和长*/ +.Tipundefined { + position: fixed; + background-color: none; + background-repeat: no-repeat; + background-image: url("./images/SFTS/Tipyinbi.png") !important; + background-size: 100% 100%; + --w: 269px; + --h: calc(var(--w) * 214 / 600); /*高和长*/ width: var(--w); height: var(--h); - left: calc(100% - 400.5px); - bottom: calc(100% - 145px); + left: calc(100% - 400.5px); + bottom: calc(100% - 145px); } /*容错选项*/ -.Tipweizhi{ - position:fixed; - background-color: none; - background-repeat: no-repeat; - background-image: url('./images/SFTS/Tipweizhi.png')!important; - background-size: 100% 100%; - --w: 269px; - --h: calc(var(--w) * 214/600);/*高和长*/ +.Tipweizhi { + position: fixed; + background-color: none; + background-repeat: no-repeat; + background-image: url("./images/SFTS/Tipweizhi.png") !important; + background-size: 100% 100%; + --w: 269px; + --h: calc(var(--w) * 214 / 600); /*高和长*/ width: var(--w); height: var(--h); - left: calc(100% - 400.5px); - bottom: calc(100% - 145px); + left: calc(100% - 400.5px); + bottom: calc(100% - 145px); } - diff --git a/shoushaUI/lbtn/main3.js b/shoushaUI/lbtn/main3.js index 05f6ac2..020ca05 100644 --- a/shoushaUI/lbtn/main3.js +++ b/shoushaUI/lbtn/main3.js @@ -1,522 +1,512 @@ app.import(function (lib, game, ui, get, ai, _status, app) { - - lib.arenaReady.push(function () { - //更新轮次 - var originUpdateRoundNumber = game.updateRoundNumber; - game.updateRoundNumber = function () { - originUpdateRoundNumber.apply(this, arguments); - if (ui.cardRoundTime) ui.cardRoundTime.updateRoundCard(); - }; - if (lib.config.mode == 'identity' || lib.config.mode == 'doudizhu' || lib.config.mode == 'guozhan' || lib.config.mode == 'versus' || lib.config.mode == 'single' || lib.config.mode == 'martial') { - var wenhao = ui.create.node('img'); - wenhao.src = lib.assetURL + "extension/十周年UI/shoushaUI/lbtn/images/CD/new_wenhao.png" - wenhao.style.cssText = "display: block;width: 40px;height: 29px;position: absolute;bottom: calc(100% - 55px);left: calc(100% - 159.5px);background-color: transparent;z-index:3" - - //--------------// - if (lib.config.mode == 'identity' || lib.config.mode == 'doudizhu' || lib.config.mode == 'versus' || lib.config.mode == 'guozhan') { - wenhao.onclick = function () { - var popuperContainer = ui.create.div('.popup-container', ui.window); - game.playAudio('../extension/十周年UI/shoushaUI/lbtn/images/SSCD/label.mp3'); - - if (lib.config.mode == 'identity') { - if (game.me.identity == 'zhu') { - ui.create.div('.Tipzhugong', popuperContainer); - } - else if (game.me.identity == 'zhong') { - ui.create.div('.Tipzhongchen', popuperContainer); - } - else if (game.me.identity == 'fan') { - ui.create.div('.Tipfanzei', popuperContainer); - } - else if (game.me.identity == 'nei') { - ui.create.div('.Tipneijian', popuperContainer); - } - } - if (lib.config.mode == 'doudizhu') { - if (game.me.identity == 'zhu') { - ui.create.div('.Tipdizhu', popuperContainer); - } - else if (game.me.identity == 'fan') { - ui.create.div('.Tipnongmin', popuperContainer); - } - } - - if (lib.config.mode == 'versus') { - ui.create.div('.Tiphu', popuperContainer); - } - - if (lib.config.mode == 'guozhan') { - if (game.me.group == 'unknown' || game.me.group == 'undefined') { - //未选择身份势力 - ui.create.div('.Tipundefined', popuperContainer); - } - else if (game.me.group == 'wei') { - ui.create.div('.Tipweiguo', popuperContainer); - } - else if (game.me.group == 'shu') { - ui.create.div('.Tipshuguo', popuperContainer); - } - else if (game.me.group == 'wu') { - ui.create.div('.Tipwuguo', popuperContainer); - } - else if (game.me.group == 'qun') { - ui.create.div('.Tipqunxiong', popuperContainer); - } - else if (game.me.group == 'jin') { - ui.create.div('.Tipjinguo', popuperContainer); - } - else if (game.me.group == 'ye') { - ui.create.div('.Tipyexinjia', popuperContainer); - } - //容错选项 - else { ui.create.div('.Tipweizhi', popuperContainer); } - } - popuperContainer.addEventListener('click', event => { - game.playAudio('../extension/十周年UI/shoushaUI/lbtn/images/SSCD/caidan.mp3'); - popuperContainer.delete(200); - }); - }; - } - document.body.appendChild(wenhao); - } - - var head = ui.create.node('img'); - head.src = lib.assetURL + "extension/十周年UI/shoushaUI/lbtn/images/uibutton/yinying.png" - head.style.cssText = "display: block;width: 100%;height: 30%;position: absolute;bottom: 0px;background-color: transparent;z-index:-1" - document.body.appendChild(head); - - - var head = ui.create.node('img'); - head.src = lib.assetURL + "extension/十周年UI/shoushaUI/lbtn/images/CD/new_button3.png" - head.style.cssText = "display: block;--w: 56px;--h: calc(var(--w) * 74/71);width: var(--w);height: var(--h);position: absolute;bottom: calc(100% - 69px);left: calc(100% - 112.5px);background-color: transparent;z-index:1" - head.onclick = function () { - - head.style.transform = 'scale(0.95)'; - - } - document.body.appendChild(head); - - var head = ui.create.node('div'); - head.style.cssText = "display: block;--w: 56px;--h: calc(var(--w) * 74/71);width: var(--w);height: var(--h);position: absolute;bottom: calc(100% - 69px);left: calc(100% - 112.5px);background-color: transparent;z-index:1" - head.onclick = function () { - game.playAudio('../extension/十周年UI/shoushaUI/lbtn/images/CD/click.mp3'); - var popuperContainer = ui.create.div('.popup-container', { background: "rgb(0,0,0,0)" }, ui.window); - popuperContainer.addEventListener('click', event => { - game.playAudio('../extension/十周年UI/shoushaUI/lbtn/images/CD/back.mp3'); - - event.stopPropagation(); - popuperContainer.delete(200); - }); - var HOME = ui.create.div('.HOME', popuperContainer); - var SZ = ui.create.div('.SZ', popuperContainer); - SZ.addEventListener('click', event => { - game.playAudio('../extension/十周年UI/shoushaUI/lbtn/images/CD/button.mp3'); - - if (!ui.click.configMenu) return; - game.closePopped(); - game.pause2(); - ui.click.configMenu(); - ui.system1.classList.remove('shown'); - ui.system2.classList.remove('shown'); - }); - var LK = ui.create.div('.LK', popuperContainer); - LK.addEventListener('click', event => { - game.playAudio('../extension/十周年UI/shoushaUI/lbtn/images/CD/button.mp3'); - - window.location.reload(); - }); - var BJ = ui.create.div('.BJ', popuperContainer); - BJ.addEventListener('click', event => { - game.playAudio('../extension/十周年UI/shoushaUI/lbtn/images/CD/button.mp3'); - - //换背景 - var Backgrounds = ["一将成名", "新十周年"]; - - ui.background.setBackgroundImage("extension/十周年UI/shoushaUI/lbtn/images/background/" + Backgrounds.randomGet() + ".jpg"); - - }); - var TX = ui.create.div('.TX', popuperContainer); - TX.addEventListener('click', event => { - game.playAudio('../extension/十周年UI/shoushaUI/lbtn/images/CD/button.mp3'); - - game.over(); - }); - var TG = ui.create.div('.TG', popuperContainer); - TG.addEventListener('click', event => { - game.playAudio('../extension/十周年UI/shoushaUI/lbtn/images/CD/button.mp3'); - - ui.click.auto(); - }); - - } - document.body.appendChild(head); - - - - var head = ui.create.node('img'); - head.src = lib.assetURL + "extension/十周年UI/shoushaUI/lbtn/images/uibutton/new_zhengli.png" - head.style.cssText = "display: block;--w: 85px;--h: calc(var(--w) * 81/247);width: var(--w);height: var(--h)+4px;position: absolute;top: calc(100% - 30px);left: calc(100% - 390.2px);background-color: transparent;z-index:4" - head.onclick = function () { - //head.onclick=ui.click.sortCard; - if (!game.me || game.me.hasSkillTag("noSortCard")) return; - var cards = game.me.getCards("hs"); - var sort2 = function (b, a) { - if (a.name != b.name) return lib.sort.card(a.name, b.name); - else if (a.suit != b.suit) return lib.suit.indexOf(a) - lib.suit.indexOf(b); - else return a.number - b.number; - }; - if (cards.length > 1) { - cards.sort(sort2); - cards.forEach(function (i, j) { - game.me.node.handcards1.insertBefore(cards[j], game.me.node.handcards1.firstChild); - }); - dui.queueNextFrameTick(dui.layoutHand, dui); - } - } - document.body.appendChild(head); - }); - var plugin = { - name: 'lbtn', - filter: function () { - return !['chess', 'tafang'].contains(get.mode()); - }, - content: function (next) { - lib.skill._uicardupdate = { - trigger: { player: 'phaseJieshuBegin' }, - forced: true, - unique: true, - popup: false, - silent: true, - noLose: true, - noGain: true, - noDeprive: true, - priority: -Infinity, - filter: function (event, player) { - return player == game.me - }, - content: function () { - if (ui.updateSkillControl) ui.updateSkillControl(game.me, true); - } - } - }, - precontent: function () { - Object.assign(game.videoContent, { - createCardRoundTime: function () { - ui.cardRoundTime = plugin.create.cardRoundTime(); - }, - createhandcardNumber: function () { - ui.handcardNumber = plugin.create.handcardNumber(); - }, - updateCardRoundTime: function (opts) { - if (!ui.cardRoundTime) return; - ui.cardRoundTime.node.roundNumber.innerHTML = '第' + game.roundNumber + '轮'; - ui.cardRoundTime.setNumberAnimation(opts.cardNumber); - }, - updateCardnumber: function (opts) { - if (!ui.handcardNumber) return; - // ui.handcardNumber.setNumberAnimation(opts.cardNumber); - }, - }); - app.reWriteFunction(ui.create, { - me: [function () { - plugin.create.control(); - }, null], - arena: [null, function () { - if (ui.time3) { - clearInterval(ui.time3.interval); - ui.time3.delete(); - } - if (ui.cardPileNumber) ui.cardPileNumber.delete(); - ui.cardRoundTime = plugin.create.cardRoundTime(); - ui.handcardNumber = plugin.create.handcardNumber(); - }], - cards: [null, function () { - if (ui.cardRoundTime) { - ui.cardRoundTime.updateRoundCard(); - } - }], - }); - app.reWriteFunction(lib.configMenu.appearence.config, { - update: [null, function (res, config, map) { - map.control_style.hide(); - map.custom_button.hide(); - map.custom_button_system_top.hide(); - map.custom_button_system_bottom.hide(); - map.custom_button_control_top.hide(); - map.custom_button_control_bottom.hide(); - map.radius_size.hide(); - }], - }); - - - ui.create.confirm = function (str, func) { - var confirm = ui.confirm; - if (!confirm) { - confirm = ui.confirm = plugin.create.confirm(); - } - confirm.node.ok.classList.add('disabled'); - confirm.node.cancel.classList.add('disabled'); - if (_status.event.endButton) { - ui.confirm.node.cancel.classList.remove('disabled'); - } - if (str) { - if (str.indexOf('o') !== -1) { - confirm.node.ok.classList.remove('disabled'); - } - if (str.indexOf('c') !== -1) { - confirm.node.cancel.classList.remove('disabled'); - } - confirm.str = str; - } - - if (func) { - confirm.custom = func; - } - ui.updatec(); - confirm.update(); - }; - }, - create: { - control: function () { - - }, - confirm: function () { - - var confirm = ui.create.control('确定', 'cancel'); - confirm.classList.add('lbtn-confirm'); - confirm.node = { - ok: confirm.firstChild, - cancel: confirm.lastChild, - }; - if (_status.event.endButton) { - _status.event.endButton.close(); - // delete event.endButton; - } - confirm.node.ok.link = 'ok'; - confirm.node.ok.classList.add('primary'); - confirm.node.cancel.classList.add('primary2'); - confirm.custom = plugin.click.confirm; - app.reWriteFunction(confirm, { - close: [function () { - this.classList.add('closing'); - }], - }); - for (var k in confirm.node) { - confirm.node[k].classList.add('disabled'); - confirm.node[k].removeEventListener(lib.config.touchscreen ? 'touchend' : 'click', ui.click.control); - confirm.node[k].addEventListener(lib.config.touchscreen ? 'touchend' : 'click', function (e) { - e.stopPropagation(); - if (this.classList.contains('disabled')) { - if (this.link === 'cancel' && this.dataset.type === 'endButton' && _status.event.endButton) { - - _status.event.endButton.custom(); - ui.confirm.close(); - // ui.updatec(); - } - return; - } - - if (this.parentNode.custom) { - this.parentNode.custom(this.link, this); - } - }); - } - - if (ui.skills2 && ui.skills2.skills.length) { - var skills = ui.skills2.skills; - confirm.skills2 = []; - for (var i = 0; i < skills.length; i++) { - var item = document.createElement('div'); - item.link = skills[i]; - item.innerHTML = get.translation(skills[i]); - item.addEventListener(lib.config.touchscreen ? 'touchend' : 'click', function (e) { - e.stopPropagation(); - ui.click.skill(this.link); - }); - - item.dataset.type = 'skill2'; - if (ui.updateSkillControl) ui.updateSkillControl(game.me, true);/* + lib.arenaReady.push(function () { + //更新轮次 + var originUpdateRoundNumber = game.updateRoundNumber; + game.updateRoundNumber = function () { + originUpdateRoundNumber.apply(this, arguments); + if (ui.cardRoundTime) ui.cardRoundTime.updateRoundCard(); + }; + if (lib.config.mode == "identity" || lib.config.mode == "doudizhu" || lib.config.mode == "guozhan" || lib.config.mode == "versus" || lib.config.mode == "single" || lib.config.mode == "martial") { + var wenhao = ui.create.node("img"); + wenhao.src = lib.assetURL + "extension/十周年UI/shoushaUI/lbtn/images/CD/new_wenhao.png"; + wenhao.style.cssText = "display: block;width: 40px;height: 29px;position: absolute;bottom: calc(100% - 55px);left: calc(100% - 159.5px);background-color: transparent;z-index:3"; + + //--------------// + if (lib.config.mode == "identity" || lib.config.mode == "doudizhu" || lib.config.mode == "versus" || lib.config.mode == "guozhan") { + wenhao.onclick = function () { + var popuperContainer = ui.create.div(".popup-container", ui.window); + game.playAudio("../extension/十周年UI/shoushaUI/lbtn/images/SSCD/label.mp3"); + + if (lib.config.mode == "identity") { + if (game.me.identity == "zhu") { + ui.create.div(".Tipzhugong", popuperContainer); + } else if (game.me.identity == "zhong") { + ui.create.div(".Tipzhongchen", popuperContainer); + } else if (game.me.identity == "fan") { + ui.create.div(".Tipfanzei", popuperContainer); + } else if (game.me.identity == "nei") { + ui.create.div(".Tipneijian", popuperContainer); + } + } + if (lib.config.mode == "doudizhu") { + if (game.me.identity == "zhu") { + ui.create.div(".Tipdizhu", popuperContainer); + } else if (game.me.identity == "fan") { + ui.create.div(".Tipnongmin", popuperContainer); + } + } + + if (lib.config.mode == "versus") { + ui.create.div(".Tiphu", popuperContainer); + } + + if (lib.config.mode == "guozhan") { + if (game.me.group == "unknown" || game.me.group == "undefined") { + //未选择身份势力 + ui.create.div(".Tipundefined", popuperContainer); + } else if (game.me.group == "wei") { + ui.create.div(".Tipweiguo", popuperContainer); + } else if (game.me.group == "shu") { + ui.create.div(".Tipshuguo", popuperContainer); + } else if (game.me.group == "wu") { + ui.create.div(".Tipwuguo", popuperContainer); + } else if (game.me.group == "qun") { + ui.create.div(".Tipqunxiong", popuperContainer); + } else if (game.me.group == "jin") { + ui.create.div(".Tipjinguo", popuperContainer); + } else if (game.me.group == "ye") { + ui.create.div(".Tipyexinjia", popuperContainer); + } + //容错选项 + else { + ui.create.div(".Tipweizhi", popuperContainer); + } + } + popuperContainer.addEventListener("click", event => { + game.playAudio("../extension/十周年UI/shoushaUI/lbtn/images/SSCD/caidan.mp3"); + popuperContainer.delete(200); + }); + }; + } + document.body.appendChild(wenhao); + } + + var head = ui.create.node("img"); + head.src = lib.assetURL + "extension/十周年UI/shoushaUI/lbtn/images/uibutton/yinying.png"; + head.style.cssText = "display: block;width: 100%;height: 30%;position: absolute;bottom: 0px;background-color: transparent;z-index:-1"; + document.body.appendChild(head); + + var head = ui.create.node("img"); + head.src = lib.assetURL + "extension/十周年UI/shoushaUI/lbtn/images/CD/new_button3.png"; + head.style.cssText = "display: block;--w: 56px;--h: calc(var(--w) * 74/71);width: var(--w);height: var(--h);position: absolute;bottom: calc(100% - 69px);left: calc(100% - 112.5px);background-color: transparent;z-index:1"; + head.onclick = function () { + head.style.transform = "scale(0.95)"; + }; + document.body.appendChild(head); + + var head = ui.create.node("div"); + head.style.cssText = "display: block;--w: 56px;--h: calc(var(--w) * 74/71);width: var(--w);height: var(--h);position: absolute;bottom: calc(100% - 69px);left: calc(100% - 112.5px);background-color: transparent;z-index:1"; + head.onclick = function () { + game.playAudio("../extension/十周年UI/shoushaUI/lbtn/images/CD/click.mp3"); + var popuperContainer = ui.create.div(".popup-container", { background: "rgb(0,0,0,0)" }, ui.window); + popuperContainer.addEventListener("click", event => { + game.playAudio("../extension/十周年UI/shoushaUI/lbtn/images/CD/back.mp3"); + + event.stopPropagation(); + popuperContainer.delete(200); + }); + var HOME = ui.create.div(".HOME", popuperContainer); + var SZ = ui.create.div(".SZ", popuperContainer); + SZ.addEventListener("click", event => { + game.playAudio("../extension/十周年UI/shoushaUI/lbtn/images/CD/button.mp3"); + + if (!ui.click.configMenu) return; + game.closePopped(); + game.pause2(); + ui.click.configMenu(); + ui.system1.classList.remove("shown"); + ui.system2.classList.remove("shown"); + }); + var LK = ui.create.div(".LK", popuperContainer); + LK.addEventListener("click", event => { + game.playAudio("../extension/十周年UI/shoushaUI/lbtn/images/CD/button.mp3"); + + window.location.reload(); + }); + var BJ = ui.create.div(".BJ", popuperContainer); + BJ.addEventListener("click", event => { + game.playAudio("../extension/十周年UI/shoushaUI/lbtn/images/CD/button.mp3"); + + //换背景 + var Backgrounds = ["一将成名", "新十周年"]; + + ui.background.setBackgroundImage("extension/十周年UI/shoushaUI/lbtn/images/background/" + Backgrounds.randomGet() + ".jpg"); + }); + var TX = ui.create.div(".TX", popuperContainer); + TX.addEventListener("click", event => { + game.playAudio("../extension/十周年UI/shoushaUI/lbtn/images/CD/button.mp3"); + + game.over(); + }); + var TG = ui.create.div(".TG", popuperContainer); + TG.addEventListener("click", event => { + game.playAudio("../extension/十周年UI/shoushaUI/lbtn/images/CD/button.mp3"); + + ui.click.auto(); + }); + }; + document.body.appendChild(head); + + var head = ui.create.node("img"); + head.src = lib.assetURL + "extension/十周年UI/shoushaUI/lbtn/images/uibutton/new_zhengli.png"; + head.style.cssText = "display: block;--w: 85px;--h: calc(var(--w) * 81/247);width: var(--w);height: var(--h)+4px;position: absolute;top: calc(100% - 30px);left: calc(100% - 390.2px);background-color: transparent;z-index:4"; + head.onclick = function () { + //head.onclick=ui.click.sortCard; + if (!game.me || game.me.hasSkillTag("noSortCard")) return; + var cards = game.me.getCards("hs"); + var sort2 = function (b, a) { + if (a.name != b.name) return lib.sort.card(a.name, b.name); + else if (a.suit != b.suit) return lib.suit.indexOf(a) - lib.suit.indexOf(b); + else return a.number - b.number; + }; + if (cards.length > 1) { + cards.sort(sort2); + cards.forEach(function (i, j) { + game.me.node.handcards1.insertBefore(cards[j], game.me.node.handcards1.firstChild); + }); + dui.queueNextFrameTick(dui.layoutHand, dui); + } + }; + document.body.appendChild(head); + }); + var plugin = { + name: "lbtn", + filter: function () { + return !["chess", "tafang"].contains(get.mode()); + }, + content: function (next) { + lib.skill._uicardupdate = { + trigger: { player: "phaseJieshuBegin" }, + forced: true, + unique: true, + popup: false, + silent: true, + noLose: true, + noGain: true, + noDeprive: true, + priority: -Infinity, + filter: function (event, player) { + return player == game.me; + }, + content: function () { + if (ui.updateSkillControl) ui.updateSkillControl(game.me, true); + }, + }; + }, + precontent: function () { + Object.assign(game.videoContent, { + createCardRoundTime: function () { + ui.cardRoundTime = plugin.create.cardRoundTime(); + }, + createhandcardNumber: function () { + ui.handcardNumber = plugin.create.handcardNumber(); + }, + updateCardRoundTime: function (opts) { + if (!ui.cardRoundTime) return; + ui.cardRoundTime.node.roundNumber.innerHTML = "第" + game.roundNumber + "轮"; + ui.cardRoundTime.setNumberAnimation(opts.cardNumber); + }, + updateCardnumber: function (opts) { + if (!ui.handcardNumber) return; + // ui.handcardNumber.setNumberAnimation(opts.cardNumber); + }, + }); + app.reWriteFunction(ui.create, { + me: [ + function () { + plugin.create.control(); + }, + null, + ], + arena: [ + null, + function () { + if (ui.time3) { + clearInterval(ui.time3.interval); + ui.time3.delete(); + } + if (ui.cardPileNumber) ui.cardPileNumber.delete(); + ui.cardRoundTime = plugin.create.cardRoundTime(); + ui.handcardNumber = plugin.create.handcardNumber(); + }, + ], + cards: [ + null, + function () { + if (ui.cardRoundTime) { + ui.cardRoundTime.updateRoundCard(); + } + }, + ], + }); + app.reWriteFunction(lib.configMenu.appearence.config, { + update: [ + null, + function (res, config, map) { + map.control_style.hide(); + map.custom_button.hide(); + map.custom_button_system_top.hide(); + map.custom_button_system_bottom.hide(); + map.custom_button_control_top.hide(); + map.custom_button_control_bottom.hide(); + map.radius_size.hide(); + }, + ], + }); + + ui.create.confirm = function (str, func) { + var confirm = ui.confirm; + if (!confirm) { + confirm = ui.confirm = plugin.create.confirm(); + } + confirm.node.ok.classList.add("disabled"); + confirm.node.cancel.classList.add("disabled"); + if (_status.event.endButton) { + ui.confirm.node.cancel.classList.remove("disabled"); + } + if (str) { + if (str.indexOf("o") !== -1) { + confirm.node.ok.classList.remove("disabled"); + } + if (str.indexOf("c") !== -1) { + confirm.node.cancel.classList.remove("disabled"); + } + confirm.str = str; + } + + if (func) { + confirm.custom = func; + } + ui.updatec(); + confirm.update(); + }; + }, + create: { + control: function () {}, + confirm: function () { + var confirm = ui.create.control("确定", "cancel"); + confirm.classList.add("lbtn-confirm"); + confirm.node = { + ok: confirm.firstChild, + cancel: confirm.lastChild, + }; + if (_status.event.endButton) { + _status.event.endButton.close(); + // delete event.endButton; + } + confirm.node.ok.link = "ok"; + confirm.node.ok.classList.add("primary"); + confirm.node.cancel.classList.add("primary2"); + confirm.custom = plugin.click.confirm; + app.reWriteFunction(confirm, { + close: [ + function () { + this.classList.add("closing"); + }, + ], + }); + for (var k in confirm.node) { + confirm.node[k].classList.add("disabled"); + confirm.node[k].removeEventListener(lib.config.touchscreen ? "touchend" : "click", ui.click.control); + confirm.node[k].addEventListener(lib.config.touchscreen ? "touchend" : "click", function (e) { + e.stopPropagation(); + if (this.classList.contains("disabled")) { + if (this.link === "cancel" && this.dataset.type === "endButton" && _status.event.endButton) { + _status.event.endButton.custom(); + ui.confirm.close(); + // ui.updatec(); + } + return; + } + + if (this.parentNode.custom) { + this.parentNode.custom(this.link, this); + } + }); + } + + if (ui.skills2 && ui.skills2.skills.length) { + var skills = ui.skills2.skills; + confirm.skills2 = []; + for (var i = 0; i < skills.length; i++) { + var item = document.createElement("div"); + item.link = skills[i]; + item.innerHTML = get.translation(skills[i]); + item.addEventListener(lib.config.touchscreen ? "touchend" : "click", function (e) { + e.stopPropagation(); + ui.click.skill(this.link); + }); + + item.dataset.type = "skill2"; + if (ui.updateSkillControl) ui.updateSkillControl(game.me, true); /* confirm.insertBefore(item, confirm.firstChild);*/ - } - } - - confirm.update = function () { - if (confirm.skills2) { - if (_status.event.skill && _status.event.skill !== confirm.dataset.skill) { - confirm.dataset.skill = _status.event.skill; - confirm.skills2.forEach(function (item) { - item.remove(); - }); - ui.updatec(); - } else if (!_status.event.skill && confirm.dataset.skill) { - delete confirm.dataset.skill; - confirm.skills2.forEach(function (item) { - confirm.insertBefore(item, confirm.firstChild); - }); - ui.updatec(); - } - } - if (ui.updateSkillControl) ui.updateSkillControl(game.me, true); - }; - return confirm; - }, - - - handcardNumber: function () { - var node3 = ui.create.div('.settingButton', ui.arena, plugin.click.setting); - - /*ui.create.div('.lbtn-controls', ui.arena);*/ - //-------新版----------// - var node6 = ui.create.div('.huanfuButton_new', ui.arena, plugin.click.huanfu); - var node7 = ui.create.div('.jiluButton_new', ui.arena, ui.click.pause); - var node8 = ui.create.div('.meiguiButton_new', ui.arena); - var node9 = ui.create.div('.xiaolianButton_new', ui.arena); - //---------------------// - var node4 = ui.create.div('.tuoguanButton', ui.arena, ui.click.auto); - var node = ui.create.div('.handcardNumber', ui.arena).hide(); - node.node = { - cardPicture: ui.create.div('.cardPicture', node), - cardNumber: ui.create.div('.cardNumber', node), - - }; - node.updateCardnumber = function () { - if (!game.me) return; - - var cardNumber2 = game.me.countCards('h') || 0; - var cardNumber = game.me.getHandcardLimit() || 0; - var numbercolor = 'white'; - if (cardNumber2 > cardNumber) numbercolor = 'red'; - if (cardNumber == Infinity) cardNumber = '∞' - this.node.cardNumber.innerHTML = '' + ' ' + cardNumber2 + '' + '' + ' / ' + '' + cardNumber + '';/*手牌数参数*/ - // this.setNumberAnimation(cardNumber); - this.show(); - - game.addVideo('updateCardnumber', null, { - cardNumber: cardNumber, - }); - }; - node.node.cardNumber.interval = setInterval(function () { - ui.handcardNumber.updateCardnumber() - }, 1000); - // game.addVideo('createCardRoundTime'); - game.addVideo('createhandcardNumber'); - return node; - }, - cardRoundTime: function () { - var node = ui.create.div('.cardRoundNumber', ui.arena).hide(); - node.node = { - cardPileNumber: ui.create.div('.cardPileNumber', node), - roundNumber: ui.create.div('.roundNumber', node), - time: ui.create.div('.time', node), - }; - - node.updateRoundCard = function () { - var cardNumber = ui.cardPile.childNodes.length || 0; - var roundNumber = game.roundNumber || 0; - this.node.roundNumber.innerHTML = '第' + game.roundNumber + '轮'; - this.setNumberAnimation(cardNumber); - this.show(); - game.addVideo('updateCardRoundTime', null, { - cardNumber: cardNumber, - roundNumber: roundNumber, - }); - }; - - node.setNumberAnimation = function (num, step) { - var item = this.node.cardPileNumber; - clearTimeout(item.interval); - if (!item._num) { - item.innerHTML = '' + num + ''; - item._num = num; - } else { - if (item._num !== num) { - if (!step) step = 500 / Math.abs(item._num - num); - if (item._num > num) item._num--; - else item._num++; - item.innerHTML = '' + item._num + ''; - if (item._num !== num) { - item.interval = setTimeout(function () { - node.setNumberAnimation(num, step); - }, step); - } - } - } - }; - - ui.time4 = node.node.time; - ui.time4.starttime = get.utc(); - ui.time4.interval = setInterval(function () { - var num = Math.round((get.utc() - ui.time4.starttime) / 1000); - if (num >= 3600) { - var num1 = Math.floor(num / 3600); - var num2 = Math.floor((num - num1 * 3600) / 60); - var num3 = num - num1 * 3600 - parseInt(num2) * 60; - if (num1 < 10) { - num1 = '0' + num1.toString(); - } - if (num2 < 10) { - num2 = '0' + num2.toString(); - } - if (num3 < 10) { - num3 = '0' + num3.toString(); - } - ui.time4.innerHTML = '' + num1 + ':' + num2 + ':' + num3 + ''; - } - else { - var num1 = Math.floor(num / 60); - var num2 = num - num1 * 60; - if (num1 < 10) { - num1 = '0' + num1.toString(); - } - if (num2 < 10) { - num2 = '0' + num2.toString(); - } - ui.time4.innerHTML = '' + num1 + ':' + num2 + ''; - } - }, 1000); - game.addVideo('createCardRoundTime'); - return node; - }, - }, - click: { - huanfu: function () { - game.playAudio('../extension/十周年UI/shoushaUI/lbtn/images/CD/huanfu.mp3'); - window.zyile_charactercard ? window.zyile_charactercard(player, false) : ui.click.charactercard(game.me.name, game.zhu, lib.config.mode == 'mode_guozhan' ? 'guozhan' : true); - }, - confirm: function (link, target) { - if (link === 'ok') { - ui.click.ok(target); - } else if (link === 'cancel') { - ui.click.cancel(target); - } else if (target.custom) { - target.custom(link); - } - }, - }, - compare: { - type: function (a, b) { - if (a === b) return 0; - var types = ['basic', 'trick', 'delay', 'equip'].addArray([a, b]); - return types.indexOf(a) - types.indexOf(b); - }, - name: function (a, b) { - if (a === b) return 0; - return a > b ? 1 : -1; - }, - nature: function (a, b) { - if (a === b) return 0; - var nature = [undefined, 'fire', 'thunder'].addArray([a, b]); - return nature.indexOf(a) - nature.indexOf(b); - }, - suit: function (a, b) { - if (a === b) return 0; - var suit = ['diamond', 'heart', 'club', 'spade'].addArray([a, b]); - return suit.indexOf(a) - suit.indexOf(b); - }, - number: function (a, b) { - return a - b; - }, - }, - }; - return plugin; + } + } + + confirm.update = function () { + if (confirm.skills2) { + if (_status.event.skill && _status.event.skill !== confirm.dataset.skill) { + confirm.dataset.skill = _status.event.skill; + confirm.skills2.forEach(function (item) { + item.remove(); + }); + ui.updatec(); + } else if (!_status.event.skill && confirm.dataset.skill) { + delete confirm.dataset.skill; + confirm.skills2.forEach(function (item) { + confirm.insertBefore(item, confirm.firstChild); + }); + ui.updatec(); + } + } + if (ui.updateSkillControl) ui.updateSkillControl(game.me, true); + }; + return confirm; + }, + + handcardNumber: function () { + var node3 = ui.create.div(".settingButton", ui.arena, plugin.click.setting); + + /*ui.create.div('.lbtn-controls', ui.arena);*/ + //-------新版----------// + var node6 = ui.create.div(".huanfuButton_new", ui.arena, plugin.click.huanfu); + var node7 = ui.create.div(".jiluButton_new", ui.arena, ui.click.pause); + var node8 = ui.create.div(".meiguiButton_new", ui.arena); + var node9 = ui.create.div(".xiaolianButton_new", ui.arena); + //---------------------// + var node4 = ui.create.div(".tuoguanButton", ui.arena, ui.click.auto); + var node = ui.create.div(".handcardNumber", ui.arena).hide(); + node.node = { + cardPicture: ui.create.div(".cardPicture", node), + cardNumber: ui.create.div(".cardNumber", node), + }; + node.updateCardnumber = function () { + if (!game.me) return; + + var cardNumber2 = game.me.countCards("h") || 0; + var cardNumber = game.me.getHandcardLimit() || 0; + var numbercolor = "white"; + if (cardNumber2 > cardNumber) numbercolor = "red"; + if (cardNumber == Infinity) cardNumber = "∞"; + this.node.cardNumber.innerHTML = "" + " " + cardNumber2 + "" + '' + " / " + "" + cardNumber + ""; /*手牌数参数*/ + // this.setNumberAnimation(cardNumber); + this.show(); + + game.addVideo("updateCardnumber", null, { + cardNumber: cardNumber, + }); + }; + node.node.cardNumber.interval = setInterval(function () { + ui.handcardNumber.updateCardnumber(); + }, 1000); + // game.addVideo('createCardRoundTime'); + game.addVideo("createhandcardNumber"); + return node; + }, + cardRoundTime: function () { + var node = ui.create.div(".cardRoundNumber", ui.arena).hide(); + node.node = { + cardPileNumber: ui.create.div(".cardPileNumber", node), + roundNumber: ui.create.div(".roundNumber", node), + time: ui.create.div(".time", node), + }; + + node.updateRoundCard = function () { + var cardNumber = ui.cardPile.childNodes.length || 0; + var roundNumber = game.roundNumber || 0; + this.node.roundNumber.innerHTML = "第" + game.roundNumber + "轮"; + this.setNumberAnimation(cardNumber); + this.show(); + game.addVideo("updateCardRoundTime", null, { + cardNumber: cardNumber, + roundNumber: roundNumber, + }); + }; + + node.setNumberAnimation = function (num, step) { + var item = this.node.cardPileNumber; + clearTimeout(item.interval); + if (!item._num) { + item.innerHTML = "" + num + ""; + item._num = num; + } else { + if (item._num !== num) { + if (!step) step = 500 / Math.abs(item._num - num); + if (item._num > num) item._num--; + else item._num++; + item.innerHTML = "" + item._num + ""; + if (item._num !== num) { + item.interval = setTimeout(function () { + node.setNumberAnimation(num, step); + }, step); + } + } + } + }; + + ui.time4 = node.node.time; + ui.time4.starttime = get.utc(); + ui.time4.interval = setInterval(function () { + var num = Math.round((get.utc() - ui.time4.starttime) / 1000); + if (num >= 3600) { + var num1 = Math.floor(num / 3600); + var num2 = Math.floor((num - num1 * 3600) / 60); + var num3 = num - num1 * 3600 - parseInt(num2) * 60; + if (num1 < 10) { + num1 = "0" + num1.toString(); + } + if (num2 < 10) { + num2 = "0" + num2.toString(); + } + if (num3 < 10) { + num3 = "0" + num3.toString(); + } + ui.time4.innerHTML = "" + num1 + ":" + num2 + ":" + num3 + ""; + } else { + var num1 = Math.floor(num / 60); + var num2 = num - num1 * 60; + if (num1 < 10) { + num1 = "0" + num1.toString(); + } + if (num2 < 10) { + num2 = "0" + num2.toString(); + } + ui.time4.innerHTML = "" + num1 + ":" + num2 + ""; + } + }, 1000); + game.addVideo("createCardRoundTime"); + return node; + }, + }, + click: { + huanfu: function () { + game.playAudio("../extension/十周年UI/shoushaUI/lbtn/images/CD/huanfu.mp3"); + window.zyile_charactercard ? window.zyile_charactercard(player, false) : ui.click.charactercard(game.me.name, game.zhu, lib.config.mode == "mode_guozhan" ? "guozhan" : true); + }, + confirm: function (link, target) { + if (link === "ok") { + ui.click.ok(target); + } else if (link === "cancel") { + ui.click.cancel(target); + } else if (target.custom) { + target.custom(link); + } + }, + }, + compare: { + type: function (a, b) { + if (a === b) return 0; + var types = ["basic", "trick", "delay", "equip"].addArray([a, b]); + return types.indexOf(a) - types.indexOf(b); + }, + name: function (a, b) { + if (a === b) return 0; + return a > b ? 1 : -1; + }, + nature: function (a, b) { + if (a === b) return 0; + var nature = [undefined, "fire", "thunder"].addArray([a, b]); + return nature.indexOf(a) - nature.indexOf(b); + }, + suit: function (a, b) { + if (a === b) return 0; + var suit = ["diamond", "heart", "club", "spade"].addArray([a, b]); + return suit.indexOf(a) - suit.indexOf(b); + }, + number: function (a, b) { + return a - b; + }, + }, + }; + return plugin; }); diff --git a/shoushaUI/skill/main1.css b/shoushaUI/skill/main1.css index e28d606..236092f 100644 --- a/shoushaUI/skill/main1.css +++ b/shoushaUI/skill/main1.css @@ -1,35 +1,31 @@ -.skill-control {/*技能按钮*/ - max-width: 191px;/*同列技能可容纳最大宽度,建议别调180*/ - bottom: 30px;/*整体上移,建议别调*/ - right: 175px;/*技能显示右移,越小越靠右,建议别调*/ +.skill-control { + /*技能按钮*/ + max-width: 191px; /*同列技能可容纳最大宽度,建议别调180*/ + bottom: 30px; /*整体上移,建议别调*/ + right: 175px; /*技能显示右移,越小越靠右,建议别调*/ /*border: 3px solid rgb(255, 255, 255);/*调试用*/ - z-index: 6; + z-index: 6; } .skill-control div { position: relative; - height: 40px; - width: 75px; - display: flex; - justify-content: center; - align-items: center; -} -.skill-control .trigger,.skill-control .enable{ - height: auto; - width: auto; - justify-content: right;/*自动向右对齐*/ -} -.skill-control . { + height: 40px; + width: 75px; + display: flex; + justify-content: center; + align-items: center; +} +.skill-control .trigger, +.skill-control .enable { + height: auto; + width: auto; + justify-content: right; /*自动向右对齐*/ +} +.skill-control { float: right; - white-space: nowrap; - font-family: 'HYZLSJ'; - color: yellow; - text-shadow: #F5D78E 0 0 2px, - black 0 0 3px, - black 0 0 3px, - black 0 0 3px, - black 0 0 3px, - black 0 0 3px, - black 0 0 3px; + white-space: nowrap; + font-family: "HYZLSJ"; + color: yellow; + text-shadow: #f5d78e 0 0 2px, black 0 0 3px, black 0 0 3px, black 0 0 3px, black 0 0 3px, black 0 0 3px, black 0 0 3px; font-size: 24px; /*字体渐变色,色调*/ } @@ -40,40 +36,40 @@ } /*伪类*/ .skill-control > div::after { - content: '';/*防止元素浮动*/ + content: ""; /*防止元素浮动*/ display: block; clear: both; } .skill-control > .enable { margin: 0 0 0 auto; - font-size:20.5px; - font-weight:bold; - font-family: 'HYZLSJ'; + font-size: 20.5px; + font-weight: bold; + font-family: "HYZLSJ"; } -.skill-control> .trigger >* .skillitem-child { +.skill-control > .trigger > * .skillitem-child { position: absolute; - -webkit-text-stroke: 4.3px #102030;/*5.1px #40404096*/ - opacity:0.5; + -webkit-text-stroke: 4.3px #102030; /*5.1px #40404096*/ + opacity: 0.5; z-index: -1; } -.skill-control> .enable >* .skillitem-child { +.skill-control > .enable > * .skillitem-child { position: absolute; - -webkit-text-stroke: 4.3px rgba(2,3,2);/*#575755;/*#686860;/*5.1px #40404096*/ - opacity:0.35; + -webkit-text-stroke: 4.3px rgba(2, 3, 2); /*#575755;/*#686860;/*5.1px #40404096*/ + opacity: 0.35; z-index: -1; } .skill-control > .trigger > div { margin: -6px 2px; - font-family: 'HYZLSJ'; + font-family: "HYZLSJ"; text-align: center; - -webkit-text-stroke: 0px rgba(38,37,34,0.5); + -webkit-text-stroke: 0px rgba(38, 37, 34, 0.5); text-shadow: none; - background-image: linear-gradient(180deg, #f0d775 30%, #ab8c31 57%, #b0a04d 67%); /*字体渐变色,色调*/ - font-weight:lighter; - /*background-image: url("./images/底图.png");*/ + background-image: linear-gradient(180deg, #f0d775 30%, #ab8c31 57%, #b0a04d 67%); /*字体渐变色,色调*/ + font-weight: lighter; + /*background-image: url("./images/底图.png");*/ -webkit-background-clip: text; -webkit-text-fill-color: transparent; white-space: nowrap; @@ -81,15 +77,13 @@ width: auto; } - - .skill-control > .enable > * { /*-webkit-text-stroke: 0.8px rgba(38,37,34,0.5); text-shadow: none;*/ - background-size: 100% 100%; - background-image: linear-gradient(180deg, #f0d775 30%, #ab8c31 57%, #b0a04d 67%);/*字体渐变色,色调*/ - /*background-image: url("./images/底图.png");*/ - -webkit-text-stroke: 0.5px #3e362a; + background-size: 100% 100%; + background-image: linear-gradient(180deg, #f0d775 30%, #ab8c31 57%, #b0a04d 67%); /*字体渐变色,色调*/ + /*background-image: url("./images/底图.png");*/ + -webkit-text-stroke: 0.5px #3e362a; text-shadow: none; /*background: linear-gradient(180deg, #fcfcbf 40%, #b58b59 50%);*/ -webkit-background-clip: text; @@ -97,98 +91,96 @@ position: relative; font-size: 22px; white-space: nowrap; - margin: 1px 9px;/*上下 左右间隔*/ + margin: 1px 9px; /*上下 左右间隔*/ margin-top: 3px; - /*width: auto;*//*此数值控制技能按文本与按钮之间的关联性,但不美观。*/ - index:4; + /*width: auto;*/ /*此数值控制技能按文本与按钮之间的关联性,但不美观。*/ + index: 4; -webkit-background-clip: text; -webkit-text-fill-color: transparent; } /*---司马徽按钮分离--*/ .skill-control > .enable > .skillitem_smh_lianhuan::before { - z-index: -1; - content: ''; - text-align: center; - display: block; - position: absolute; - margin: 1px 12px; - width: 147%; - height: 170%; - - font-family: 'HanYiZhongLiShuFan','HYZLSJ'; - background-image: url("./images/feng.png"); - background-size: 100% 100%; - } - .skill-control > .enable > *.select:not(.skillitem_smh_yeyan):not(.skillitem_smh_huoji)::before { - background-image: url("./images/feng_selected.png"); - } - .skill-control > .enable > .skillitem_smh_lianhuan:not(.usable):not(.select)::before { - background-image: url("./images/feng_no.png"); - } - /*司马徽火计*/ - .skill-control > .enable > .skillitem_smh_huoji::before { - z-index: -1; - content: ''; - text-align: center; - display: block; - position: absolute; - margin: 1px 12px; - width: 147%; - height: 170%; - - font-family: 'HanYiZhongLiShuFan','HYZLSJ'; - background-image: url("./images/long.png"); - background-size: 100% 100%; - } - .skill-control > .enable > *.select:not(.skillitem_smh_yeyan):not(.skillitem_smh_lianhuan)::before { - background-image: url("./images/long_selected.png"); - } - .skill-control > .enable > .skillitem_smh_huoji:not(.usable):not(.select)::before { - background-image: url("./images/long_no.png"); - } - /*司马徽业炎*/ - .skill-control > .enable > .skillitem_smh_yeyan::before { - z-index: -1; - content: ''; - --w: auto; - --h: calc(var(--w) * 1045/ 669); - line-height: var(--h); - text-align: center; - display: block; - position: absolute; - margin: 1px 12px; - width: 147%; - height: 170%; - font-family: 'HanYiZhongLiShuFan','HYZLSJ'; - background-image: url("./images/longfeng.png"); - background-size: 100% 100%; - } - .skill-control > .enable > *.select:not(.skillitem_smh_huoji):not(.skillitem_smh_lianhuan)::before { - background-image: url("./images/longfeng_selected.png"); - } - .skill-control > .enable > .skillitem_smh_yeyan:not(.usable):not(.select)::before { - background-image: url("./images/longfeng_no.png"); - } -/*-----*/ + z-index: -1; + content: ""; + text-align: center; + display: block; + position: absolute; + margin: 1px 12px; + width: 147%; + height: 170%; + font-family: "HanYiZhongLiShuFan", "HYZLSJ"; + background-image: url("./images/feng.png"); + background-size: 100% 100%; +} +.skill-control > .enable > *.select:not(.skillitem_smh_yeyan):not(.skillitem_smh_huoji)::before { + background-image: url("./images/feng_selected.png"); +} +.skill-control > .enable > .skillitem_smh_lianhuan:not(.usable):not(.select)::before { + background-image: url("./images/feng_no.png"); +} +/*司马徽火计*/ +.skill-control > .enable > .skillitem_smh_huoji::before { + z-index: -1; + content: ""; + text-align: center; + display: block; + position: absolute; + margin: 1px 12px; + width: 147%; + height: 170%; + font-family: "HanYiZhongLiShuFan", "HYZLSJ"; + background-image: url("./images/long.png"); + background-size: 100% 100%; +} +.skill-control > .enable > *.select:not(.skillitem_smh_yeyan):not(.skillitem_smh_lianhuan)::before { + background-image: url("./images/long_selected.png"); +} +.skill-control > .enable > .skillitem_smh_huoji:not(.usable):not(.select)::before { + background-image: url("./images/long_no.png"); +} +/*司马徽业炎*/ +.skill-control > .enable > .skillitem_smh_yeyan::before { + z-index: -1; + content: ""; + --w: auto; + --h: calc(var(--w) * 1045 / 669); + line-height: var(--h); + text-align: center; + display: block; + position: absolute; + margin: 1px 12px; + width: 147%; + height: 170%; + font-family: "HanYiZhongLiShuFan", "HYZLSJ"; + background-image: url("./images/longfeng.png"); + background-size: 100% 100%; +} +.skill-control > .enable > *.select:not(.skillitem_smh_huoji):not(.skillitem_smh_lianhuan)::before { + background-image: url("./images/longfeng_selected.png"); +} +.skill-control > .enable > .skillitem_smh_yeyan:not(.usable):not(.select)::before { + background-image: url("./images/longfeng_no.png"); +} +/*-----*/ -.skill-control > .enable> .skillitem::before { - z-index: -1; - content: ''; - --w: auto; - --h: calc(var(--w) * 1045/ 669); +.skill-control > .enable > .skillitem::before { + z-index: -1; + content: ""; + --w: auto; + --h: calc(var(--w) * 1045 / 669); line-height: var(--h); text-align: center; - display: block; - position: absolute; - margin: 1px 12px; - width: 147%; - height: 170%; - font-family: 'HYZLSJ'; - background-image: url("./images/btn0.png"); - background-size: 100% 100%; + display: block; + position: absolute; + margin: 1px 12px; + width: 147%; + height: 170%; + font-family: "HYZLSJ"; + background-image: url("./images/btn0.png"); + background-size: 100% 100%; /*border: 1px solid rgb(3,4,5);/*调试用*/ } @@ -203,182 +195,152 @@ -webkit-filter: grayscale(100%);*/ } - - -.skillMarks{ -max-height: 80px; -overflow-y: auto; -right: -13px; -top: 26px; -z-index: 99 !important; -justify-content: center; +.skillMarks { + max-height: 80px; + overflow-y: auto; + right: -13px; + top: 26px; + z-index: 99 !important; + justify-content: center; align-items: center; } .skillMarks > .skillMarkItem { - --h: 19px; - width: 34px; - height: 20px; - right: 0px; - line-height: 22px; - text-align: center; - display: block; - position: relative; - justify-content: center; + --h: 19px; + width: 34px; + height: 20px; + right: 0px; + line-height: 22px; + text-align: center; + display: block; + position: relative; + justify-content: center; align-items: center; - letter-spacing: -1px; - white-space: nowrap; - border-radius: 50%; - font-family: 'HYZLSJ'; - font-size: 15.5px; - + letter-spacing: -1px; + white-space: nowrap; + border-radius: 50%; + font-family: "HYZLSJ"; + font-size: 15.5px; } .skillMarkItem.xiandingji { - - background-image: url("./images/xianding.png"); - background-size: 100% 100%; - text-shadow:none; - font-family: 'HYZLSJ'; - font-weight: 500;/*字体加粗*/ - text-shadow:0px 0px 1px #b80b0b, - 0px 0px 1px #b80b0b, - 0px 0px 1px #b80b0b, - 0px 0px 1px #b80b0b, - 0px 0px 1px #b80b0b, - 0px 0px 1px #b80b0b, - 0px 0px 1px #b80b0b, - 0px 0px 1px #b80b0b, - 0px 0px 1px #b80b0b; - --w: 45px; - font-size:16px; - --h: calc(var(--w) * 90/165);/*高和长*/ - width: var(--w);/*按比例调节*/ - height: var(--h);/*同理*/ + background-image: url("./images/xianding.png"); + background-size: 100% 100%; + text-shadow: none; + font-family: "HYZLSJ"; + font-weight: 500; /*字体加粗*/ + text-shadow: 0px 0px 1px #b80b0b, 0px 0px 1px #b80b0b, 0px 0px 1px #b80b0b, 0px 0px 1px #b80b0b, 0px 0px 1px #b80b0b, 0px 0px 1px #b80b0b, 0px 0px 1px #b80b0b, 0px 0px 1px #b80b0b, 0px 0px 1px #b80b0b; + --w: 45px; + font-size: 16px; + --h: calc(var(--w) * 90 / 165); /*高和长*/ + width: var(--w); /*按比例调节*/ + height: var(--h); /*同理*/ } /*转换技*/ -.skillMarkItem.zhuanhuanji{ - background-size: 100% 100%; - background-repeat:no-repeat; - text-shadow:0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C, - 0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C, - 0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C, - 0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C, - 0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C, - 0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C, - 0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C, - 0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C, - 0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C, - 0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C, - 0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C, - 0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C, - 0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C, - 0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C, - 0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C, - 0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C, - 0 0 1.3px #3C3C3C; - --w: 45px; - font-size:13px; - font-family: 'FZLBJW'; - font-weight:bold; - --h: calc(var(--w) * 85/165);/*高和长*/ - width: var(--w);/*按比例调节*/ - height: var(--h);/*同理*/ +.skillMarkItem.zhuanhuanji { + background-size: 100% 100%; + background-repeat: no-repeat; + text-shadow: 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c; + --w: 45px; + font-size: 13px; + font-family: "FZLBJW"; + font-weight: bold; + --h: calc(var(--w) * 85 / 165); /*高和长*/ + width: var(--w); /*按比例调节*/ + height: var(--h); /*同理*/ } .skillMarkItem.xiandingji.used { - position: relative; - - --w: 45px; - --h: calc(var(--w) * 85/165);/*高和长*/ - width: var(--w);/*按比例调节*/ - height: var(--h);/*同理*/ - background-image: url("./images/used.png"); - background-size:100% 100%; - text-shadow:none; - font-family: 'HYZLSJ'; - font-weight: bold;/*字体加粗*/ - -webkit-text-stroke: 1px #51524C; - font-size: 16px; -} + position: relative; + --w: 45px; + --h: calc(var(--w) * 85 / 165); /*高和长*/ + width: var(--w); /*按比例调节*/ + height: var(--h); /*同理*/ + background-image: url("./images/used.png"); + background-size: 100% 100%; + text-shadow: none; + font-family: "HYZLSJ"; + font-weight: bold; /*字体加粗*/ + -webkit-text-stroke: 1px #51524c; + font-size: 16px; +} .skillMarkItem.xiandingji.used::before { - content: ''; - z-index: 100; - display: block; - position: absolute; - --w: 45.5px; - --h: calc(var(--w) * 36/56);/*高和长*/ - width: var(--w);/*按比例调节*/ - height: var(--h);/*同理*/ - background-image: url("./images/noxianding.png"); - background-size:100% 100%; - right: -2px; - top:-4.4px; - pointer-events: none; + content: ""; + z-index: 100; + display: block; + position: absolute; + --w: 45.5px; + --h: calc(var(--w) * 36 / 56); /*高和长*/ + width: var(--w); /*按比例调节*/ + height: var(--h); /*同理*/ + background-image: url("./images/noxianding.png"); + background-size: 100% 100%; + right: -2px; + top: -4.4px; + pointer-events: none; } .skillMarkItem.juexingji { - /*background-image: linear-gradient(to bottom right, #437cbe 27%, #5183bc 50%, #012a3a 68%); + /*background-image: linear-gradient(to bottom right, #437cbe 27%, #5183bc 50%, #012a3a 68%); box-shadow: 0px -2px 3px #5a4a31 , 0px 2px 3px #5a4a31 ,2px 0px 3px #5a4a31 ,2px 0px 3px #5a4a31, 0.6px 0.6px 1.5px #a1fafa inset, 0.3px -0.5px 1px #a1fafa inset , 1px 1px 1.5px #a1fafa inset;*/ background-image: url("./images/juexing.png"); - background-size: 100% 100%; + background-size: 100% 100%; width: 43px; height: 24px !important; - font-size:16px; - text-shadow:none; - font-family: 'HYZLSJ'; - font-weight: bold;/*字体加粗*/ - -webkit-text-stroke: 1px #483D8B; + font-size: 16px; + text-shadow: none; + font-family: "HYZLSJ"; + font-weight: bold; /*字体加粗*/ + -webkit-text-stroke: 1px #483d8b; } .skillMarkItem.duty { - /*background-image: linear-gradient(to bottom right, #437cbe 27%, #5183bc 50%, #012a3a 68%); + /*background-image: linear-gradient(to bottom right, #437cbe 27%, #5183bc 50%, #012a3a 68%); box-shadow: 0px -2px 3px #5a4a31 , 0px 2px 3px #5a4a31 ,2px 0px 3px #5a4a31 ,2px 0px 3px #5a4a31, 0.6px 0.6px 1.5px #a1fafa inset, 0.3px -0.5px 1px #a1fafa inset , 1px 1px 1.5px #a1fafa inset;*/ background-image: url("./images/duty.png"); - background-size: 100% 100%; + background-size: 100% 100%; width: 43px; height: 24px !important; - font-size:16px; - text-shadow:none; - font-family: 'HYZLSJ'; - font-weight: bold;/*字体加粗*/ - -webkit-text-stroke: 1px #DC143C; - + font-size: 16px; + text-shadow: none; + font-family: "HYZLSJ"; + font-weight: bold; /*字体加粗*/ + -webkit-text-stroke: 1px #dc143c; } .skillMarkItem.duty.fail { - position: relative; - - --w: 45px; - --h: calc(var(--w) * 85/165);/*高和长*/ - width: var(--w);/*按比例调节*/ - height: var(--h);/*同理*/ - background-image: url("./images/used.png"); - background-size:100% 100%; - text-shadow:none; - font-family: 'HYZLSJ'; - font-size:16px; - font-weight: bold;/*字体加粗*/ - -webkit-text-stroke: 1px #51524C; + position: relative; + + --w: 45px; + --h: calc(var(--w) * 85 / 165); /*高和长*/ + width: var(--w); /*按比例调节*/ + height: var(--h); /*同理*/ + background-image: url("./images/used.png"); + background-size: 100% 100%; + text-shadow: none; + font-family: "HYZLSJ"; + font-size: 16px; + font-weight: bold; /*字体加粗*/ + -webkit-text-stroke: 1px #51524c; } .skillMarkItem.duty.fail::before { - content: ''; - z-index: 100; - display: block; - position: absolute; - --w: 45.5px; - --h: calc(var(--w) * 36/56);/*高和长*/ - width: var(--w);/*按比例调节*/ - height: var(--h);/*同理*/ - background-image: url("./images/noxianding.png"); - background-size:100% 100%; - right: -2px; - top:-4.4px; - pointer-events: none; + content: ""; + z-index: 100; + display: block; + position: absolute; + --w: 45.5px; + --h: calc(var(--w) * 36 / 56); /*高和长*/ + width: var(--w); /*按比例调节*/ + height: var(--h); /*同理*/ + background-image: url("./images/noxianding.png"); + background-size: 100% 100%; + right: -2px; + top: -4.4px; + pointer-events: none; } .skillMarkItem + .skillMarkItem { - margin-top: 3.5px; + margin-top: 3.5px; } /*技能失效*/ -.skillitem .suo{ +.skillitem .suo { height: 30px; width: 30px; background-image: url("./images/suo.png"); @@ -388,7 +350,7 @@ justify-content: center; z-index: 6; } -.skillitem .suo1{ +.skillitem .suo1 { height: 35px; width: 35px; background-image: url("./images/suo.png"); @@ -397,10 +359,10 @@ justify-content: center; left: 20px; z-index: 6; filter: grayscale(100%); - -webkit-filter: grayscale(100%);/*按钮变灰*/ + -webkit-filter: grayscale(100%); /*按钮变灰*/ } -.skillitem .yang{ -/* height: 80px;*/ +.skillitem .yang { + /* height: 80px;*/ width: 90px; background-image: url("./images/yang.png"); background-size: 100% 100%; @@ -408,8 +370,8 @@ justify-content: center; /*left: 20px;*/ z-index: 6; } -.skillitem .ying{ -/* height: 80px;*/ +.skillitem .ying { + /* height: 80px;*/ width: 90px; background-image: url("./images/ying.png"); background-size: 100% 100%; @@ -417,7 +379,7 @@ justify-content: center; /*left: 20px;*/ z-index: 6; } -.trigger .yang{ +.trigger .yang { height: 20px; width: 60px; background-image: url("./images/Tyang.png"); @@ -426,7 +388,7 @@ justify-content: center; left: -7px; z-index: -1; } -.trigger .ying{ +.trigger .ying { height: 20px; width: 60px; background-image: url("./images/Tying.png"); @@ -435,7 +397,7 @@ justify-content: center; left: -7px; z-index: -1; } -.trigger .suo1{ +.trigger .suo1 { height: 35px; width: 35px; background-image: url("./images/suo.png"); @@ -443,21 +405,21 @@ justify-content: center; position: absolute; left: 7px; z-index: 6; - bottom:5.5px; + bottom: 5.5px; filter: grayscale(100%); - -webkit-filter: grayscale(100%);/*按钮变灰*/ + -webkit-filter: grayscale(100%); /*按钮变灰*/ } -.skill-control >.enable >.skillitem_smh_huoji>.numText{ -font-size: 16px; +.skill-control > .enable > .skillitem_smh_huoji > .numText { + font-size: 16px; right: 3px; top: 5px; - font-family: 'HYZLSJ'; + font-family: "HYZLSJ"; text-align: center; - -webkit-text-stroke: 0px rgba(38,37,34,0.5); + -webkit-text-stroke: 0px rgba(38, 37, 34, 0.5); text-shadow: none; - background-image: linear-gradient(180deg, #f0d775 30%, #ab8c31 57%, #b0a04d 67%); - font-weight:bold; + background-image: linear-gradient(180deg, #f0d775 30%, #ab8c31 57%, #b0a04d 67%); + font-weight: bold; /*background-image: url("./images/底图.png");*/ -webkit-background-clip: text; -webkit-text-fill-color: transparent; @@ -465,16 +427,16 @@ font-size: 16px; position: absolute; } /* 技能剩余次数 */ -.skill-control>.enable>.skillitem>.numText{ +.skill-control > .enable > .skillitem > .numText { font-size: 16px; right: 3px; top: 5px; - font-family: 'HYZLSJ'; + font-family: "HYZLSJ"; text-align: center; - -webkit-text-stroke: 0px rgba(38,37,34,0.5); + -webkit-text-stroke: 0px rgba(38, 37, 34, 0.5); text-shadow: none; - background-image: linear-gradient(180deg, #f0d775 30%, #ab8c31 57%, #b0a04d 67%); - font-weight:bold; + background-image: linear-gradient(180deg, #f0d775 30%, #ab8c31 57%, #b0a04d 67%); + font-weight: bold; /*background-image: url("./images/底图.png");*/ -webkit-background-clip: text; -webkit-text-fill-color: transparent; @@ -482,16 +444,16 @@ font-size: 16px; position: absolute; } -.skill-control>.trigger>.skillitem>.numText{ +.skill-control > .trigger > .skillitem > .numText { font-size: 16px; right: -9px; top: 5px; - font-family: 'HYZLSJ'; + font-family: "HYZLSJ"; text-align: center; - -webkit-text-stroke: 0px rgba(38,37,34,0.5); + -webkit-text-stroke: 0px rgba(38, 37, 34, 0.5); text-shadow: none; - background-image: linear-gradient(180deg, #f0d775 30%, #ab8c31 57%, #b0a04d 67%); - font-weight:bold; + background-image: linear-gradient(180deg, #f0d775 30%, #ab8c31 57%, #b0a04d 67%); + font-weight: bold; /*background-image: url("./images/底图.png");*/ -webkit-background-clip: text; -webkit-text-fill-color: transparent; @@ -499,16 +461,16 @@ font-size: 16px; position: absolute; } -.skill-control>.enable>.skillitemxianding>.numText{ - font-size: 16px; +.skill-control > .enable > .skillitemxianding > .numText { + font-size: 16px; right: 3px; top: 5px; - font-family: 'HYZLSJ'; + font-family: "HYZLSJ"; text-align: center; - -webkit-text-stroke: 0px rgba(38,37,34,0.5); + -webkit-text-stroke: 0px rgba(38, 37, 34, 0.5); text-shadow: none; - background-image: linear-gradient(180deg, #f0d775 30%, #ab8c31 57%, #b0a04d 67%); - font-weight:bold; + background-image: linear-gradient(180deg, #f0d775 30%, #ab8c31 57%, #b0a04d 67%); + font-weight: bold; /*background-image: url("./images/底图.png");*/ -webkit-background-clip: text; -webkit-text-fill-color: transparent; @@ -516,17 +478,16 @@ font-size: 16px; position: absolute; } - -.skill-control>.trigger>.skillitemxianding>.numText{ +.skill-control > .trigger > .skillitemxianding > .numText { font-size: 16px; right: -9px; top: 5px; - font-family: 'HYZLSJ'; + font-family: "HYZLSJ"; text-align: center; - -webkit-text-stroke: 0px rgba(38,37,34,0.5); + -webkit-text-stroke: 0px rgba(38, 37, 34, 0.5); text-shadow: none; - background-image: linear-gradient(180deg, #f0d775 30%, #ab8c31 57%, #b0a04d 67%); - font-weight:bold; + background-image: linear-gradient(180deg, #f0d775 30%, #ab8c31 57%, #b0a04d 67%); + font-weight: bold; /*background-image: url("./images/底图.png");*/ -webkit-background-clip: text; -webkit-text-fill-color: transparent; @@ -534,90 +495,87 @@ font-size: 16px; position: absolute; } - - -.skill-control>.enable>.skillitem>.numText-child{ +.skill-control > .enable > .skillitem > .numText-child { font-size: 16px; right: 3px; top: 5px; - font-family: 'HYZLSJ'; + font-family: "HYZLSJ"; text-align: center; - -webkit-text-stroke: 2.7px #102030;/*5.1px #40404096*/ - opacity:0.5; + -webkit-text-stroke: 2.7px #102030; /*5.1px #40404096*/ + opacity: 0.5; z-index: -1; text-shadow: none; - font-weight:bold; + font-weight: bold; -webkit-background-clip: text; -webkit-text-fill-color: transparent; white-space: nowrap; position: absolute; } -.skill-control>.enable>.skillitem_smh_huoji>.numText-child{ +.skill-control > .enable > .skillitem_smh_huoji > .numText-child { font-size: 16px; right: 3px; top: 5px; - font-family: 'HYZLSJ'; + font-family: "HYZLSJ"; text-align: center; - -webkit-text-stroke: 2.7px #102030;/*5.1px #40404096*/ - opacity:0.5; + -webkit-text-stroke: 2.7px #102030; /*5.1px #40404096*/ + opacity: 0.5; z-index: -1; text-shadow: none; - font-weight:bold; + font-weight: bold; -webkit-background-clip: text; -webkit-text-fill-color: transparent; white-space: nowrap; position: absolute; } -.skill-control>.trigger>.skillitem>.numText-child{ +.skill-control > .trigger > .skillitem > .numText-child { font-size: 16px; right: 3px; top: 5px; - font-family: 'HYZLSJ'; + font-family: "HYZLSJ"; text-align: center; - -webkit-text-stroke: 2.7px #102030;/*5.1px #40404096*/ - opacity:0.5; + -webkit-text-stroke: 2.7px #102030; /*5.1px #40404096*/ + opacity: 0.5; z-index: -1; text-shadow: none; - font-weight:bold; + font-weight: bold; -webkit-background-clip: text; -webkit-text-fill-color: transparent; white-space: nowrap; position: absolute; } -.skill-control>.enable>.skillitemxianding>.numText-child{ - font-size: 16px; +.skill-control > .enable > .skillitemxianding > .numText-child { + font-size: 16px; right: 3px; top: 5px; - font-family: 'HYZLSJ'; + font-family: "HYZLSJ"; text-align: center; - -webkit-text-stroke: 2.7px #102030;/*5.1px #40404096*/ - opacity:0.5; + -webkit-text-stroke: 2.7px #102030; /*5.1px #40404096*/ + opacity: 0.5; z-index: -1; text-shadow: none; - font-weight:bold; + font-weight: bold; -webkit-background-clip: text; -webkit-text-fill-color: transparent; white-space: nowrap; position: absolute; } - -.skill-control>.trigger>.skillitemxianding>.numText-child{ - font-size: 16px; +.skill-control > .trigger > .skillitemxianding > .numText-child { + font-size: 16px; right: 3px; top: 5px; - font-family: 'HYZLSJ'; + font-family: "HYZLSJ"; text-align: center; - -webkit-text-stroke: 2.7px #102030;/*5.1px #40404096*/ - opacity:0.5; + -webkit-text-stroke: 2.7px #102030; /*5.1px #40404096*/ + opacity: 0.5; z-index: -1; text-shadow: none; - font-weight:bold; + font-weight: bold; -webkit-background-clip: text; -webkit-text-fill-color: transparent; white-space: nowrap; position: absolute; -} \ No newline at end of file +} diff --git a/shoushaUI/skill/main1.js b/shoushaUI/skill/main1.js index 5e82774..32c91ea 100644 --- a/shoushaUI/skill/main1.js +++ b/shoushaUI/skill/main1.js @@ -1,853 +1,742 @@ app.import(function (lib, game, ui, get, ai, _status, app) { - var plugin = { - name: "skill", - filter: function () { - return !["chess", "tafang"].includes(get.mode()); - }, - content: function (next) { }, - precontent: function () { - Object.assign(ui.create, { - skills: function (skills) { - ui.skills = plugin.createSkills(skills, ui.skills); - ui.skillControl.update(); - return ui.skills; - }, - skills2: function (skills) { - ui.skills2 = plugin.createSkills(skills, ui.skills2); - ui.skillControl.update(); - return ui.skills2; - }, - skills3: function (skills) { - ui.skills3 = plugin.createSkills(skills, ui.skills3); - ui.skillControl.update(); - return ui.skills3; - }, - skillControl: function (clear) { - if (!ui.skillControl) { - var node = ui.create.div(".skill-control", ui.arena); - node.node = { - enable: ui.create.div(".enable", node), - trigger: ui.create.div(".trigger", node), - }; - for (var i in plugin.controlElement) { - node[i] = plugin.controlElement[i]; - } - ui.skillControl = node; - } - if (clear) { - ui.skillControl.node.enable.innerHTML = ""; - ui.skillControl.node.trigger.innerHTML = ""; - } - return ui.skillControl; - }, - }); - - Object.assign(ui, { - updateSkillControl: function (player, clear) { - var eSkills = player.getSkills("e", true, false).slice(0); - var skills = app.get.playerSkills(player, true); - - for (var i = 0; i < skills.length; i++) { - var info = get.info(skills[i]); - if (info && info.nopop) skills.splice(i--, 1); - } - - var iSkills = player.invisibleSkills.slice(0); - game.expandSkills(iSkills); - - skills.addArray( - iSkills.filter(function (skill) { - var info = get.info(skill); - return info && info.enable; - }) - ); - - if (player === game.me) { - var skillControl = ui.create.skillControl(clear); - skillControl.add(skills, eSkills); - skillControl.update(); - game.addVideo("updateSkillControl", player, clear); - } - - var juexingji = {}; - var xiandingji = {}; - app.get.playerSkills(player).forEach(function (skill) { - var info = get.info(skill); - if (!info) return; - //这里修改1{这里是分离转换技,限定技,觉醒技,使命技 - if ( - get.is.zhuanhuanji(skill, player) || - info.limited || - (info.intro && info.intro.content === "limited") - ) { - xiandingji[skill] = player.awakenedSkills.includes(skill); - } - if (info.juexingji || info.dutySkill) - juexingji[skill] = player.awakenedSkills.includes(skill); - //这里结束1} - }); - plugin.updateSkillMarks(player, xiandingji, juexingji); - }, - }); - - app.reWriteFunction(lib.element.player, { - addSkill: [ - null, - function () { - ui.updateSkillControl(this, true); - }, - ], - removeSkill: [ - null, - function () { - ui.updateSkillControl(this, true); - }, - ], - addSkillTrigger: [ - null, - function () { - ui.updateSkillControl(this, true); - }, - ], - removeSkillTrigger: [ - null, - function () { - ui.updateSkillControl(this, true); - }, - ], - awakenSkill: [ - null, - function () { - ui.updateSkillControl(this); - }, - ], - restoreSkill: [ - null, - function () { - ui.updateSkillControl(this); - }, - ], - }); - app.reWriteFunction(lib.element.control, { - close: [ - null, - function () { - if (this.classList.contains("skillControl")) { - ui.skillControl.update(); - } - }, - ], - }); - - app.reWriteFunction(game, { - loop: [ - function () { - if (game.boss && !ui.skillControl) { - ui.updateSkillControl(game.me); - } - if (ui.skillControl) { - ui.skillControl.update(); - } - }, - null, - ], - swapControl: [ - null, - function () { - ui.updateSkillControl(game.me, true); - }, - ], - swapPlayer: [ - null, - function () { - ui.updateSkillControl(game.me, true); - }, - ], - }); - - Object.assign(game.videoContent, { - updateSkillControl: function (player, clear) { - ui.updateSkillControl(player, clear); - }, - }); - ui.skillControlArea = ui.create.div(); - }, - controlElement: { - add: function (skill, eSkills) { - var addSpan = function (node, num) { - var numArray = ["", "①", "②", "③", "④", "⑤", "⑥", "⑦", "⑧", "⑨", "⑩", "⑪", "⑫", "⑬", "⑭", "⑮", "⑯", "⑰", "⑱", "⑲", "⑳"]; - var text = document.createElement("span"); - text.classList.add("numText"); - var numTextChild = document.createElement("span"); - //数字阴影 - numTextChild.classList.add("numText-child"); - numTextChild.innerText = numArray[num] || ('(' + num + ')'); - node.appendChild(numTextChild); - node.appendChild(text); - text.innerText = numArray[num] || ('(' + num + ')'); - }; - //白板锁 - var baibanSkillBlocker = []; - var fengyinSkillBlocker = []; - if (game.me.hasSkill("baiban")) { - baibanSkillBlocker = game.me - .getSkills(null, false, false) - .filter((skill) => lib.skill.baiban.skillBlocker(skill, game.me)); - baibanSkillBlocker.sort(); - - baibanSkillBlocker.forEach(function (item) { - if (Array.isArray(skill) && !skill.includes(item)) { - skill.unshift(item); - } - }); - } - //封印锁 - if (game.me.hasSkill("fengyin")) { - fengyinSkillBlocker = game.me - .getSkills(null, false, false) - .filter((skill) => lib.skill.fengyin.skillBlocker(skill, game.me)); - fengyinSkillBlocker.sort(); - fengyinSkillBlocker.forEach(function (item) { - if (Array.isArray(skill) && !skill.includes(item)) { - skill.unshift(item); - } - }); - } - - if (Array.isArray(skill)) { - var node = this; - skill.forEach(function (item) { - node.add(item, eSkills); - }); - return this; - } - - var self = this; - var skills = game.expandSkills([skill]).map(function (item) { - return app.get.skillInfo(item); - }); - var hasSame = false; - var enableSkills = skills.filter(function (item) { - if (item.type !== "enable") return false; - if (item.name === skills[0].name) hasSame = true; - return true; - }); - - if (!hasSame) enableSkills.unshift(skills[0]); - var showSkills = enableSkills.length ? enableSkills : skills; - - showSkills.forEach(function (item) { - //势力技能筛选 - if (lib.skill[item.id].filter) { - if ( - (lib.skill[item.id].filter + "").indexOf("player.group") != -1 - ) { - var str = (lib.skill[item.id].filter + "").substr( - (lib.skill[item.id].filter + "").indexOf("player.group") - ); - if (str.indexOf("'") != -1) { - str = str.substr(str.indexOf("'") + 1); - - if (str.indexOf("'") != -1) { - var group = str.substr(0, str.indexOf("'")); - if (group != game.me.group) { - return; - } - } - } - if (str.indexOf('"') != -1) { - str = str.substr(str.indexOf('"') + 1); - - if (str.indexOf('"') != -1) { - var group = str.substr(0, str.indexOf('"')); - if (group != game.me.group) { - return; - } - } - } - } - } - - if (lib.skill[item.id].viewAsFilter) { - if ( - (lib.skill[item.id].viewAsFilter + "").indexOf("player.group") != - -1 - ) { - var str = (lib.skill[item.id].viewAsFilter + "").substr( - (lib.skill[item.id].viewAsFilter + "").indexOf("player.group") - ); - if (str.indexOf("'") != -1) { - str = str.substr(str.indexOf("'") + 1); - - if (str.indexOf("'") != -1) { - var group = str.substr(0, str.indexOf("'")); - if (group != game.me.group) { - return; - } - } - } - if (str.indexOf('"') != -1) { - str = str.substr(str.indexOf('"') + 1); - - if (str.indexOf('"') != -1) { - var group = str.substr(0, str.indexOf('"')); - if (group != game.me.group) { - return; - } - } - } - } - } - //势力技能筛选 - - var node = self.querySelector('[data-id="' + item.id + '"]'); - if (node) return; - if (item.type === "enable") { - let name = get.translation(item.name); /*.slice(0, 4)*/ - //修改司马徽技能单独分离 - if (item.id.indexOf("jianjie_huoji") != -1) { - node = ui.create.div( - ".skillitem_smh_huoji", - self.node.enable, - name - ); - } else if (item.id.indexOf("jianjie_lianhuan") != -1) { - node = ui.create.div( - ".skillitem_smh_lianhuan", - self.node.enable, - name - ); - } else if (item.id.indexOf("jianjie_yeyan") != -1) { - node = ui.create.div( - ".skillitem_smh_yeyan", - self.node.enable, - name - ); - } else { - // if (item.info && item.info.limited) { - // node = ui.create.div('.skillitemxianding.skillitem', self.node.enable, get.translation(item.name).slice(0, 4)); - // } else { - node = ui.create.div( - ".skillitem", - self.node.enable, - get.translation(item.name) /*.slice(0, 4)*/ - ); - //} - } - //--------0---------// - //技能剩余次数 - if (game.me.hasSkill(item.id)) { - let skills = [item.id], player = game.me; - if (item.info.group) skills.add(...item.info.group); - skills = skills.filter(skill => (get.info(skill) || {}.usable) !== undefined); - if (skills.length) { - for (const skill of skills) { - let num = get.info(skill).usable; - if (typeof num === 'function') num = num(skill, player); - if (typeof num === 'number' && (skill === 'dbquedi' || num > 1)) { - let used = 0; - used += get.skillCount(skill, player); - used += player?.storage?.counttrigger?.[skill] || 0; - addSpan(node, num - used); - } - } - } - } - //---------0--------// - - //这里修改2{//这里是主动技失效上锁和转换技阴阳按钮 - if (item.id) { - if ( - game.me.hasSkill("baiban") && - baibanSkillBlocker && - baibanSkillBlocker.includes(item.id) - ) { - //白板锁 - var img = ui.create.div(".suo1.baibansuo", node, ""); - img.style.position = "absolute"; - node.style["-webkit-text-fill-color"] = "silver"; //失效变灰 - node.style["-webkit-text-stroke"] = "0.8px rgba(0,0,0,0.55)"; - } else if ( - game.me.hasSkill("fengyin") && - fengyinSkillBlocker && - fengyinSkillBlocker.includes(item.id) - ) { - //封印锁 - var img = ui.create.div(".suo1.fengyinsuo", node, ""); - img.style.position = "absolute"; - node.style["-webkit-text-fill-color"] = "silver"; //失效变灰 - node.style["-webkit-text-stroke"] = "0.8px rgba(0,0,0,0.55)"; - } - - //这是定义的失效函数,在使命技成功或者失败,芳踪,滔乱,竣攻等技能的函数里补上一个shixiao,按钮就会检测到自动上锁 - if ( - item.info.zhuanhuanji && - !game.me.yangedSkills.includes(item.id) - ) { - var img = ui.create.div(".yang", node, ""); - // console.log(node); - img.style.position = "absolute"; - } - //这是定义的阳按钮函数,如果一个技能是转换技,并且不在阴按钮函数里就给他创建一个阳按钮,这种检测是为了开局能正常显示 - if (game.me.yangedSkills.includes(item.id)) { - var img = ui.create.div(".ying", node, ""); - img.style.position = "absolute"; - } - //如果一个技能在阴按钮函数集合里就创建一个阴按钮 - } - //这里结束2} - - //--------------------------// - ui.create.div(".skillitem-child", node, name); - //--------------------------// - node.dataset.id = item.id; - app.listen(node, plugin.clickSkill); - return; - } - - if (!item.info) return; - if (!item.translation) return; - if (item.id == "jiu") return false; //--------改酒 - if (eSkills && eSkills.includes(item.id)) return; - node = ui.create.div( - ".skillitem", - self.node.trigger, - item.name /*.slice(0, 4)*/ - ); - - if (item.id) { - //这里修改5{//这是被动技能的上锁和按钮切换 - - if ( - game.me.hasSkill("baiban") && - baibanSkillBlocker && - baibanSkillBlocker.includes(item.id) - ) { - //白板锁 - var img = ui.create.div(".suo1.baibansuo", node, ""); - img.style.position = "absolute"; - node.style["-webkit-text-fill-color"] = "silver"; //失效变灰 - node.style["-webkit-text-stroke"] = "0.8px rgba(0,0,0,0.55)"; - } else if ( - game.me.hasSkill("fengyin") && - fengyinSkillBlocker && - fengyinSkillBlocker.includes(item.id) - ) { - //封印锁 - var img = ui.create.div(".suo1.fengyinsuo", node, ""); - img.style.position = "absolute"; - node.style["-webkit-text-fill-color"] = "silver"; //失效变灰 - node.style["-webkit-text-stroke"] = "0.8px rgba(0,0,0,0.55)"; - } - - if ( - item.info.zhuanhuanji && - !game.me.yangedSkills.includes(item.id) - ) { - var img = ui.create.div(".yang", node, ""); - img.style.position = "absolute"; - // console.log(node); - } - if (game.me.yangedSkills.includes(item.id)) { - var img = ui.create.div(".ying", node, ""); - img.style.position = "absolute"; - } - - //--------0---------// - //技能剩余次数 - if (game.me.hasSkill(item.id)) { - let skills = [item.id], player = game.me; - if (item.info.group) skills.add(...item.info.group); - skills = skills.filter(skill => (get.info(skill) || {}.usable) !== undefined); - if (skills.length) { - for (const skill of skills) { - let num = get.info(skill).usable; - if (typeof num === 'function') num = num(skill, player); - if (typeof num === 'number' && (skill === 'dbquedi' || num > 1)) { - let used = 0; - used += get.skillCount(skill, player); - used += player?.storage?.counttrigger?.[skill] || 0; - addSpan(node, num - used); - } - } - } - } - //---------0--------// - } //这里修改5} - - //------skill的main1.js----需要添加-----------------// - ui.create.div(".skillitem-child", node, item.name); - node.dataset.id = item.id; - }); - return this; - }, - update: function () { - var skills = []; - if (ui.skills) skills.addArray(ui.skills.skills); - if (ui.skills2) skills.addArray(ui.skills2.skills); - if (ui.skills3) skills.addArray(ui.skills3.skills); - - Array.from(this.node.enable.childNodes).forEach(function (item) { - if (skills.includes(item.dataset.id)) { - item.classList.add("usable"); - } else { - item.classList.remove("usable"); - } - - if (_status.event.skill === item.dataset.id) { - item.classList.add("select"); - } else { - item.classList.remove("select"); - } - }); - - ui.skillControl.node.enable.style.width = - ui.skillControl.node.enable.childNodes.length > 2 - ? "200px" - : ui.skillControl.node.enable.childNodes.length > 0 - ? "114px" - : "0px"; - - var level1 = Math.min(4, this.node.trigger.childNodes.length); - var level2 = - this.node.enable.childNodes.length > 2 - ? 4 - : this.node.enable.childNodes.length > 0 - ? 2 - : 0; - var level = Math.max(level1, level2); - ui.arena.dataset.sclevel = level; - }, - }, - checkSkill: function (skill) { - var info = lib.skill[skill]; - if (!info) return -1; - if (info.enable) return 1; - return 0; - }, - clickSkill: function (e) { - if (this.classList.contains("usable")) { - var skill = this.dataset.id; - var item = ui.skillControlArea.querySelector( - '[data-id="' + skill + '"]' - ); - item && app.mockTouch(item); - } - }, - createSkills: function (skills, node) { - var same = true; - if (node) { - if (skills && skills.length) { - for (var i = 0; i < node.skills.length; i++) { - if (node.skills[i] !== skills[i]) { - same = false; - break; - } - } - } - if (same) return node; - node.close(); - node.delete(); - } - if (!skills && !skills.length) return; - - node = ui.create.div(".control.skillControl", ui.skillControlArea); - Object.assign(node, lib.element.control); - skills.forEach(function (skill) { - var item = ui.create.div(node); - item.link = skill; - item.dataset.id = skill; - item.addEventListener( - lib.config.touchscreen ? "touchend" : "click", - ui.click.control - ); - }); - node.skills = skills; - node.custom = ui.click.skill; - return node; - }, - updateSkillMarks: function (player, skills1, skills2) { - var node = player.node.xSkillMarks; - if (!node) { - node = player.node.xSkillMarks = ui.create.div(".skillMarks", player); - } - - Array.from(node.childNodes).forEach(function (item) { - if (skills1.hasOwnProperty(item.dataset.id)) return; - if (skills2[item.dataset.id]) return; - item.remove(); - }); - //这里修改3{这里是使限定技和转换技显示不同的样式 - for (var k in skills1) { - var info = lib.skill[k]; - var item = node.querySelector('[data-id="' + k + '"]'); - if (!item) { - if (!info.zhuanhuanji) - item = ui.create.div( - ".skillMarkItem.xiandingji", - node, - get.skillTranslation(k, player) - ); - //如果不是转换技就调用限定技的标记 - else { - //判断图片存在,不存在就用底图 - var url = - lib.assetURL + - "extension/十周年UI/shoushaUI/skill/images/" + - k + - "_yang.png"; - function ImageIsExist(url) { - let xmlHttp = new XMLHttpRequest(); - xmlHttp.open("Get", url, false); - xmlHttp.send(); - if (xmlHttp.status === 404) return false; - else return true; - } - try { - //容错函数,优先执行try的内容,try报错时自动执行catch内容 - var a = ImageIsExist(url); - if (a) { - item = ui.create.div(".skillMarkItem.zhuanhuanji", node, ""); - item.setBackgroundImage( - "extension/十周年UI/shoushaUI/skill/images/" + k + "_yang.png" - ); - } - } catch (err) { - item = ui.create.div( - ".skillMarkItem.zhuanhuanji", - node, - get.skillTranslation(k, player) - ); - item.setBackgroundImage( - "extension/十周年UI/shoushaUI/skill/images/ditu_yang.png" - ); - item.style.setProperty("--w", "42px"); - } - //如果是转换技就调用转换技标记并设置背景图 - } - } - if (skills1[k]) item.classList.add("used"); - else item.classList.remove("used"); - item.dataset.id = k; - } - //这里结束3} - Array.from(node.querySelectorAll(".juexingji")).forEach(function (item) { - if (!skills2[item.dataset.id]) { - item.remove(); - } - }); - //这里修改4{这里是使觉醒技和使命技不同 - for (var k in skills2) { - if (!skills2[k]) continue; - var info = lib.skill[k]; - if (node.querySelector('[data-id="' + k + '"]')) continue; - var item; - if (info.dutySkill) { - item = ui.create.div( - ".skillMarkItem.duty", - node, - get.skillTranslation(k, player) - ); - } else - item = ui.create.div( - ".skillMarkItem.juexingji", - node, - get.skillTranslation(k, player) - ); - item.dataset.id = k; - } - //这里结束4} - }, - recontent: function () { - app.reWriteFunction(ui.create, { - dialog: [ - null, - function (dialog) { - dialog.classList.add("xdialog"); - app.reWriteFunction(dialog, { - hide: [ - null, - function () { - app.emit("dialog:change", dialog); - }, - ], - }); - }, - ], - }); - - app.reWriteFunction(lib.element.dialog, { - open: [ - null, - function () { - app.emit("dialog:change", this); - }, - ], - close: [ - null, - function () { - app.emit("dialog:change", this); - }, - ], - }); - - app.reWriteFunction(lib.element.player, { - markSkill: [ - function (args, name) { - var info = lib.skill[name]; - if (!info) return; - if (info.limited) return this; - if (info.intro && info.intro.content === "limited") return this; - }, - ], - }); - - app.reWriteFunction(lib.configMenu.appearence.config, { - update: [ - null, - function (res, config, map) { - map.button_press.hide(); - }, - ], - }); - - app.on("playerUpdateE", function (player) { - plugin.updateMark(player); - }); - }, - element: { - mark: { - delete: function () { - this.remove(); - }, - setName: function (name) { - name = get.translation(name) || name; - if (!name || !name.trim()) { - this.classList.add("unshow"); - this.node.name.innerHTML = ""; - } else { - this.classList.remove("unshow"); - this.node.name.innerHTML = get.translation(name) || name; - } - return this; - }, - setCount: function (count) { - if (typeof count === "number") { - this.node.count.innerHTML = count; - this.node.count.classList.remove("unshow"); - } else { - this.node.count.innerHTML = ""; - this.node.count.classList.add("unshow"); - } - return this; - }, - setExtra: function (extra) { - var str = ""; - - if (!Array.isArray(extra)) extra = [extra]; - extra.forEach(function (item) { - if (!item || typeof item !== "string") return this; - if (item.indexOf("#") === 0) { - item = item.substr(1); - str += "
"; - } - str += "
" + item + "
"; - }); - - if (str) { - this.node.extra.classList.remove("unshow"); - this.node.extra.innerHTML = str; - } else if (!this._characterMark) { - this.node.extra.innerHTML = ""; - this.node.extra.classList.add("unshow"); - } - return this; - }, - setBackground: function (name, type) { - var skill = lib.skill[this.name]; - if (skill && skill.intro && skill.intro.markExtra) return this; - if (type === "character") { - name = get.translation(name) || name; - this._characterMark = true; - return this.setExtra(name); - } - return this; - }, - _customintro: function (uiintro) { - var node = this; - var info = node.info; - var player = node.parentNode.parentNode; - if (info.name) { - if (typeof info.name == "function") { - var named = info.name(player.storage[node.skill], player); - if (named) { - uiintro.add(named); - } - } else { - uiintro.add(info.name); - } - } else if (info.name !== false) { - uiintro.add(get.translation(node.skill)); - } - - if (typeof info.mark == "function") { - var stint = info.mark(uiintro, player.storage[node.skill], player); - if (stint) { - var placetext = uiintro.add( - '
' + stint + "
" - ); - if (stint.indexOf('
' + stint.slice(1) + "
" - ); - } else { - var placetext = uiintro.add( - '
' + stint + "
" - ); - if (stint.indexOf('
lib.skill.baiban.skillBlocker(skill, game.me)); + baibanSkillBlocker.sort(); + + baibanSkillBlocker.forEach(function (item) { + if (Array.isArray(skill) && !skill.includes(item)) { + skill.unshift(item); + } + }); + } + //封印锁 + if (game.me.hasSkill("fengyin")) { + fengyinSkillBlocker = game.me.getSkills(null, false, false).filter(skill => lib.skill.fengyin.skillBlocker(skill, game.me)); + fengyinSkillBlocker.sort(); + fengyinSkillBlocker.forEach(function (item) { + if (Array.isArray(skill) && !skill.includes(item)) { + skill.unshift(item); + } + }); + } + + if (Array.isArray(skill)) { + var node = this; + skill.forEach(function (item) { + node.add(item, eSkills); + }); + return this; + } + + var self = this; + var skills = game.expandSkills([skill]).map(function (item) { + return app.get.skillInfo(item); + }); + var hasSame = false; + var enableSkills = skills.filter(function (item) { + if (item.type !== "enable") return false; + if (item.name === skills[0].name) hasSame = true; + return true; + }); + + if (!hasSame) enableSkills.unshift(skills[0]); + var showSkills = enableSkills.length ? enableSkills : skills; + + showSkills.forEach(function (item) { + //势力技能筛选 + if (lib.skill[item.id].filter) { + if ((lib.skill[item.id].filter + "").indexOf("player.group") != -1) { + var str = (lib.skill[item.id].filter + "").substr((lib.skill[item.id].filter + "").indexOf("player.group")); + if (str.indexOf("'") != -1) { + str = str.substr(str.indexOf("'") + 1); + + if (str.indexOf("'") != -1) { + var group = str.substr(0, str.indexOf("'")); + if (group != game.me.group) { + return; + } + } + } + if (str.indexOf('"') != -1) { + str = str.substr(str.indexOf('"') + 1); + + if (str.indexOf('"') != -1) { + var group = str.substr(0, str.indexOf('"')); + if (group != game.me.group) { + return; + } + } + } + } + } + + if (lib.skill[item.id].viewAsFilter) { + if ((lib.skill[item.id].viewAsFilter + "").indexOf("player.group") != -1) { + var str = (lib.skill[item.id].viewAsFilter + "").substr((lib.skill[item.id].viewAsFilter + "").indexOf("player.group")); + if (str.indexOf("'") != -1) { + str = str.substr(str.indexOf("'") + 1); + + if (str.indexOf("'") != -1) { + var group = str.substr(0, str.indexOf("'")); + if (group != game.me.group) { + return; + } + } + } + if (str.indexOf('"') != -1) { + str = str.substr(str.indexOf('"') + 1); + + if (str.indexOf('"') != -1) { + var group = str.substr(0, str.indexOf('"')); + if (group != game.me.group) { + return; + } + } + } + } + } + //势力技能筛选 + + var node = self.querySelector('[data-id="' + item.id + '"]'); + if (node) return; + if (item.type === "enable") { + let name = get.translation(item.name); /*.slice(0, 4)*/ + //修改司马徽技能单独分离 + if (item.id.indexOf("jianjie_huoji") != -1) { + node = ui.create.div(".skillitem_smh_huoji", self.node.enable, name); + } else if (item.id.indexOf("jianjie_lianhuan") != -1) { + node = ui.create.div(".skillitem_smh_lianhuan", self.node.enable, name); + } else if (item.id.indexOf("jianjie_yeyan") != -1) { + node = ui.create.div(".skillitem_smh_yeyan", self.node.enable, name); + } else { + // if (item.info && item.info.limited) { + // node = ui.create.div('.skillitemxianding.skillitem', self.node.enable, get.translation(item.name).slice(0, 4)); + // } else { + node = ui.create.div(".skillitem", self.node.enable, get.translation(item.name) /*.slice(0, 4)*/); + //} + } + //--------0---------// + //技能剩余次数 + if (game.me.hasSkill(item.id)) { + let skills = [item.id], + player = game.me; + if (item.info.group) skills.add(...item.info.group); + skills = skills.filter(skill => (get.info(skill) || {}.usable) !== undefined); + if (skills.length) { + for (const skill of skills) { + let num = get.info(skill).usable; + if (typeof num === "function") num = num(skill, player); + if (typeof num === "number" && (skill === "dbquedi" || num > 1)) { + let used = 0; + used += get.skillCount(skill, player); + used += player?.storage?.counttrigger?.[skill] || 0; + addSpan(node, num - used); + } + } + } + } + //---------0--------// + + //这里修改2{//这里是主动技失效上锁和转换技阴阳按钮 + if (item.id) { + if (game.me.hasSkill("baiban") && baibanSkillBlocker && baibanSkillBlocker.includes(item.id)) { + //白板锁 + var img = ui.create.div(".suo1.baibansuo", node, ""); + img.style.position = "absolute"; + node.style["-webkit-text-fill-color"] = "silver"; //失效变灰 + node.style["-webkit-text-stroke"] = "0.8px rgba(0,0,0,0.55)"; + } else if (game.me.hasSkill("fengyin") && fengyinSkillBlocker && fengyinSkillBlocker.includes(item.id)) { + //封印锁 + var img = ui.create.div(".suo1.fengyinsuo", node, ""); + img.style.position = "absolute"; + node.style["-webkit-text-fill-color"] = "silver"; //失效变灰 + node.style["-webkit-text-stroke"] = "0.8px rgba(0,0,0,0.55)"; + } + + //这是定义的失效函数,在使命技成功或者失败,芳踪,滔乱,竣攻等技能的函数里补上一个shixiao,按钮就会检测到自动上锁 + if (item.info.zhuanhuanji && !game.me.yangedSkills.includes(item.id)) { + var img = ui.create.div(".yang", node, ""); + // console.log(node); + img.style.position = "absolute"; + } + //这是定义的阳按钮函数,如果一个技能是转换技,并且不在阴按钮函数里就给他创建一个阳按钮,这种检测是为了开局能正常显示 + if (game.me.yangedSkills.includes(item.id)) { + var img = ui.create.div(".ying", node, ""); + img.style.position = "absolute"; + } + //如果一个技能在阴按钮函数集合里就创建一个阴按钮 + } + //这里结束2} + + //--------------------------// + ui.create.div(".skillitem-child", node, name); + //--------------------------// + node.dataset.id = item.id; + app.listen(node, plugin.clickSkill); + return; + } + + if (!item.info) return; + if (!item.translation) return; + if (item.id == "jiu") return false; //--------改酒 + if (eSkills && eSkills.includes(item.id)) return; + node = ui.create.div(".skillitem", self.node.trigger, item.name /*.slice(0, 4)*/); + + if (item.id) { + //这里修改5{//这是被动技能的上锁和按钮切换 + + if (game.me.hasSkill("baiban") && baibanSkillBlocker && baibanSkillBlocker.includes(item.id)) { + //白板锁 + var img = ui.create.div(".suo1.baibansuo", node, ""); + img.style.position = "absolute"; + node.style["-webkit-text-fill-color"] = "silver"; //失效变灰 + node.style["-webkit-text-stroke"] = "0.8px rgba(0,0,0,0.55)"; + } else if (game.me.hasSkill("fengyin") && fengyinSkillBlocker && fengyinSkillBlocker.includes(item.id)) { + //封印锁 + var img = ui.create.div(".suo1.fengyinsuo", node, ""); + img.style.position = "absolute"; + node.style["-webkit-text-fill-color"] = "silver"; //失效变灰 + node.style["-webkit-text-stroke"] = "0.8px rgba(0,0,0,0.55)"; + } + + if (item.info.zhuanhuanji && !game.me.yangedSkills.includes(item.id)) { + var img = ui.create.div(".yang", node, ""); + img.style.position = "absolute"; + // console.log(node); + } + if (game.me.yangedSkills.includes(item.id)) { + var img = ui.create.div(".ying", node, ""); + img.style.position = "absolute"; + } + + //--------0---------// + //技能剩余次数 + if (game.me.hasSkill(item.id)) { + let skills = [item.id], + player = game.me; + if (item.info.group) skills.add(...item.info.group); + skills = skills.filter(skill => (get.info(skill) || {}.usable) !== undefined); + if (skills.length) { + for (const skill of skills) { + let num = get.info(skill).usable; + if (typeof num === "function") num = num(skill, player); + if (typeof num === "number" && (skill === "dbquedi" || num > 1)) { + let used = 0; + used += get.skillCount(skill, player); + used += player?.storage?.counttrigger?.[skill] || 0; + addSpan(node, num - used); + } + } + } + } + //---------0--------// + } //这里修改5} + + //------skill的main1.js----需要添加-----------------// + ui.create.div(".skillitem-child", node, item.name); + node.dataset.id = item.id; + }); + return this; + }, + update: function () { + var skills = []; + if (ui.skills) skills.addArray(ui.skills.skills); + if (ui.skills2) skills.addArray(ui.skills2.skills); + if (ui.skills3) skills.addArray(ui.skills3.skills); + + Array.from(this.node.enable.childNodes).forEach(function (item) { + if (skills.includes(item.dataset.id)) { + item.classList.add("usable"); + } else { + item.classList.remove("usable"); + } + + if (_status.event.skill === item.dataset.id) { + item.classList.add("select"); + } else { + item.classList.remove("select"); + } + }); + + ui.skillControl.node.enable.style.width = ui.skillControl.node.enable.childNodes.length > 2 ? "200px" : ui.skillControl.node.enable.childNodes.length > 0 ? "114px" : "0px"; + + var level1 = Math.min(4, this.node.trigger.childNodes.length); + var level2 = this.node.enable.childNodes.length > 2 ? 4 : this.node.enable.childNodes.length > 0 ? 2 : 0; + var level = Math.max(level1, level2); + ui.arena.dataset.sclevel = level; + }, + }, + checkSkill: function (skill) { + var info = lib.skill[skill]; + if (!info) return -1; + if (info.enable) return 1; + return 0; + }, + clickSkill: function (e) { + if (this.classList.contains("usable")) { + var skill = this.dataset.id; + var item = ui.skillControlArea.querySelector('[data-id="' + skill + '"]'); + item && app.mockTouch(item); + } + }, + createSkills: function (skills, node) { + var same = true; + if (node) { + if (skills && skills.length) { + for (var i = 0; i < node.skills.length; i++) { + if (node.skills[i] !== skills[i]) { + same = false; + break; + } + } + } + if (same) return node; + node.close(); + node.delete(); + } + if (!skills && !skills.length) return; + + node = ui.create.div(".control.skillControl", ui.skillControlArea); + Object.assign(node, lib.element.control); + skills.forEach(function (skill) { + var item = ui.create.div(node); + item.link = skill; + item.dataset.id = skill; + item.addEventListener(lib.config.touchscreen ? "touchend" : "click", ui.click.control); + }); + node.skills = skills; + node.custom = ui.click.skill; + return node; + }, + updateSkillMarks: function (player, skills1, skills2) { + var node = player.node.xSkillMarks; + if (!node) { + node = player.node.xSkillMarks = ui.create.div(".skillMarks", player); + } + + Array.from(node.childNodes).forEach(function (item) { + if (skills1.hasOwnProperty(item.dataset.id)) return; + if (skills2[item.dataset.id]) return; + item.remove(); + }); + //这里修改3{这里是使限定技和转换技显示不同的样式 + for (var k in skills1) { + var info = lib.skill[k]; + var item = node.querySelector('[data-id="' + k + '"]'); + if (!item) { + if (!info.zhuanhuanji) item = ui.create.div(".skillMarkItem.xiandingji", node, get.skillTranslation(k, player)); + //如果不是转换技就调用限定技的标记 + else { + //判断图片存在,不存在就用底图 + var url = lib.assetURL + "extension/十周年UI/shoushaUI/skill/images/" + k + "_yang.png"; + function ImageIsExist(url) { + let xmlHttp = new XMLHttpRequest(); + xmlHttp.open("Get", url, false); + xmlHttp.send(); + if (xmlHttp.status === 404) return false; + else return true; + } + try { + //容错函数,优先执行try的内容,try报错时自动执行catch内容 + var a = ImageIsExist(url); + if (a) { + item = ui.create.div(".skillMarkItem.zhuanhuanji", node, ""); + item.setBackgroundImage("extension/十周年UI/shoushaUI/skill/images/" + k + "_yang.png"); + } + } catch (err) { + item = ui.create.div(".skillMarkItem.zhuanhuanji", node, get.skillTranslation(k, player)); + item.setBackgroundImage("extension/十周年UI/shoushaUI/skill/images/ditu_yang.png"); + item.style.setProperty("--w", "42px"); + } + //如果是转换技就调用转换技标记并设置背景图 + } + } + if (skills1[k]) item.classList.add("used"); + else item.classList.remove("used"); + item.dataset.id = k; + } + //这里结束3} + Array.from(node.querySelectorAll(".juexingji")).forEach(function (item) { + if (!skills2[item.dataset.id]) { + item.remove(); + } + }); + //这里修改4{这里是使觉醒技和使命技不同 + for (var k in skills2) { + if (!skills2[k]) continue; + var info = lib.skill[k]; + if (node.querySelector('[data-id="' + k + '"]')) continue; + var item; + if (info.dutySkill) { + item = ui.create.div(".skillMarkItem.duty", node, get.skillTranslation(k, player)); + } else item = ui.create.div(".skillMarkItem.juexingji", node, get.skillTranslation(k, player)); + item.dataset.id = k; + } + //这里结束4} + }, + recontent: function () { + app.reWriteFunction(ui.create, { + dialog: [ + null, + function (dialog) { + dialog.classList.add("xdialog"); + app.reWriteFunction(dialog, { + hide: [ + null, + function () { + app.emit("dialog:change", dialog); + }, + ], + }); + }, + ], + }); + + app.reWriteFunction(lib.element.dialog, { + open: [ + null, + function () { + app.emit("dialog:change", this); + }, + ], + close: [ + null, + function () { + app.emit("dialog:change", this); + }, + ], + }); + + app.reWriteFunction(lib.element.player, { + markSkill: [ + function (args, name) { + var info = lib.skill[name]; + if (!info) return; + if (info.limited) return this; + if (info.intro && info.intro.content === "limited") return this; + }, + ], + }); + + app.reWriteFunction(lib.configMenu.appearence.config, { + update: [ + null, + function (res, config, map) { + map.button_press.hide(); + }, + ], + }); + + app.on("playerUpdateE", function (player) { + plugin.updateMark(player); + }); + }, + element: { + mark: { + delete: function () { + this.remove(); + }, + setName: function (name) { + name = get.translation(name) || name; + if (!name || !name.trim()) { + this.classList.add("unshow"); + this.node.name.innerHTML = ""; + } else { + this.classList.remove("unshow"); + this.node.name.innerHTML = get.translation(name) || name; + } + return this; + }, + setCount: function (count) { + if (typeof count === "number") { + this.node.count.innerHTML = count; + this.node.count.classList.remove("unshow"); + } else { + this.node.count.innerHTML = ""; + this.node.count.classList.add("unshow"); + } + return this; + }, + setExtra: function (extra) { + var str = ""; + + if (!Array.isArray(extra)) extra = [extra]; + extra.forEach(function (item) { + if (!item || typeof item !== "string") return this; + if (item.indexOf("#") === 0) { + item = item.substr(1); + str += "
"; + } + str += "
" + item + "
"; + }); + + if (str) { + this.node.extra.classList.remove("unshow"); + this.node.extra.innerHTML = str; + } else if (!this._characterMark) { + this.node.extra.innerHTML = ""; + this.node.extra.classList.add("unshow"); + } + return this; + }, + setBackground: function (name, type) { + var skill = lib.skill[this.name]; + if (skill && skill.intro && skill.intro.markExtra) return this; + if (type === "character") { + name = get.translation(name) || name; + this._characterMark = true; + return this.setExtra(name); + } + return this; + }, + _customintro: function (uiintro) { + var node = this; + var info = node.info; + var player = node.parentNode.parentNode; + if (info.name) { + if (typeof info.name == "function") { + var named = info.name(player.storage[node.skill], player); + if (named) { + uiintro.add(named); + } + } else { + uiintro.add(info.name); + } + } else if (info.name !== false) { + uiintro.add(get.translation(node.skill)); + } + + if (typeof info.mark == "function") { + var stint = info.mark(uiintro, player.storage[node.skill], player); + if (stint) { + var placetext = uiintro.add('
' + stint + "
"); + if (stint.indexOf('
' + stint.slice(1) + "
"); + } else { + var placetext = uiintro.add('
' + stint + "
"); + if (stint.indexOf('
div { @@ -39,40 +35,40 @@ } /*伪类*/ .skill-control > div::after { - content: '';/*防止元素浮动*/ + content: ""; /*防止元素浮动*/ display: block; clear: both; } .skill-control > .enable { margin: 0 0 0 auto; - font-size:20.5px; - font-weight:500; - font-family: 'HYZLSJ'; + font-size: 20.5px; + font-weight: 500; + font-family: "HYZLSJ"; } -.skill-control> .trigger >* .skillitem-child { +.skill-control > .trigger > * .skillitem-child { position: absolute; - -webkit-text-stroke: 5.3px #102030;/*5.1px #40404096*/ - opacity:0.5; + -webkit-text-stroke: 5.3px #102030; /*5.1px #40404096*/ + opacity: 0.5; z-index: -1; } -.skill-control> .enable >* .skillitem-child { +.skill-control > .enable > * .skillitem-child { position: absolute; - -webkit-text-stroke: 4.7px rgba(2,3,2);/*#575755;/*#686860;/*5.1px #40404096*/ - opacity:0.35; + -webkit-text-stroke: 4.7px rgba(2, 3, 2); /*#575755;/*#686860;/*5.1px #40404096*/ + opacity: 0.35; z-index: -1; } .skill-control > .trigger > div { margin: -6px 6px; - font-family: 'HYZLSJ'; + font-family: "HYZLSJ"; text-align: center; - -webkit-text-stroke: 0px rgba(38,37,34,0.5); + -webkit-text-stroke: 0px rgba(38, 37, 34, 0.5); text-shadow: none; - background-image: linear-gradient(180deg, #f0d775 30%, #ab8c31 57%, #b0a04d 67%); /*字体渐变色,色调*/ - font-weight:lighter; - /*background-image: url("./images/底图.png");*/ + background-image: linear-gradient(180deg, #f0d775 30%, #ab8c31 57%, #b0a04d 67%); /*字体渐变色,色调*/ + font-weight: lighter; + /*background-image: url("./images/底图.png");*/ -webkit-background-clip: text; -webkit-text-fill-color: transparent; white-space: nowrap; @@ -80,112 +76,108 @@ width: auto; } - - .skill-control > .enable > * { /*-webkit-text-stroke: 0.8px rgba(38,37,34,0.5); text-shadow: none;*/ - background-size: 100% 100%; - background-image: linear-gradient(180deg, #f0d775 30%, #ab8c31 57%, #b0a04d 67%);/*字体渐变色,色调*/ - /*background-image: url("./images/底图.png");*/ - -webkit-text-stroke: 0.2px #3e362a; + background-size: 100% 100%; + background-image: linear-gradient(180deg, #f0d775 30%, #ab8c31 57%, #b0a04d 67%); /*字体渐变色,色调*/ + /*background-image: url("./images/底图.png");*/ + -webkit-text-stroke: 0.2px #3e362a; text-shadow: none; /*background: linear-gradient(180deg, #fcfcbf 40%, #b58b59 50%);*/ -webkit-text-fill-color: transparent; position: relative; font-size: 18px; white-space: nowrap; - margin: 5px 12px;/*上下 左右间隔*/ + margin: 5px 12px; /*上下 左右间隔*/ margin-top: 3px; - /*width: auto;*//*此数值控制技能按文本与按钮之间的关联性,但不美观。*/ + /*width: auto;*/ /*此数值控制技能按文本与按钮之间的关联性,但不美观。*/ -webkit-background-clip: text; -webkit-text-fill-color: transparent; } /*---司马徽按钮分离--*/ .skill-control > .enable > .skillitem_smh_lianhuan::before { - z-index: -1; - content: ''; - text-align: center; - display: block; - position: absolute; - margin: 1px 12px; - width: 147%; - height: 170%; - - font-family: 'HanYiZhongLiShuFan','HYZLSJ'; - background-image: url("./images/feng.png"); - background-size: 100% 100%; - } - .skill-control > .enable > *.select:not(.skillitem_smh_yeyan):not(.skillitem_smh_huoji)::before { - background-image: url("./images/feng_selected.png"); - } - .skill-control > .enable > .skillitem_smh_lianhuan:not(.usable):not(.select)::before { - background-image: url("./images/feng_no.png"); - } - /*司马徽火计*/ - .skill-control > .enable > .skillitem_smh_huoji::before { - z-index: -1; - content: ''; - text-align: center; - display: block; - position: absolute; - margin: 1px 12px; - width: 147%; - height: 170%; - - font-family: 'HanYiZhongLiShuFan','HYZLSJ'; - background-image: url("./images/long.png"); - background-size: 100% 100%; - } - .skill-control > .enable > *.select:not(.skillitem_smh_yeyan):not(.skillitem_smh_lianhuan)::before { - background-image: url("./images/long_selected.png"); - } - .skill-control > .enable > .skillitem_smh_huoji:not(.usable):not(.select)::before { - background-image: url("./images/long_no.png"); - } - /*司马徽业炎*/ - .skill-control > .enable > .skillitem_smh_yeyan::before { - z-index: -1; - content: ''; - --w: auto; - --h: calc(var(--w) * 1045/ 669); - line-height: var(--h); - text-align: center; - display: block; - position: absolute; - margin: 1px 12px; - width: 147%; - height: 170%; - font-family: 'HanYiZhongLiShuFan','HYZLSJ'; - background-image: url("./images/longfeng.png"); - background-size: 100% 100%; - } - .skill-control > .enable > *.select:not(.skillitem_smh_huoji):not(.skillitem_smh_lianhuan)::before { - background-image: url("./images/longfeng_selected.png"); - } - .skill-control > .enable > .skillitem_smh_yeyan:not(.usable):not(.select)::before { - background-image: url("./images/longfeng_no.png"); - } -/*-----*/ + z-index: -1; + content: ""; + text-align: center; + display: block; + position: absolute; + margin: 1px 12px; + width: 147%; + height: 170%; + font-family: "HanYiZhongLiShuFan", "HYZLSJ"; + background-image: url("./images/feng.png"); + background-size: 100% 100%; +} +.skill-control > .enable > *.select:not(.skillitem_smh_yeyan):not(.skillitem_smh_huoji)::before { + background-image: url("./images/feng_selected.png"); +} +.skill-control > .enable > .skillitem_smh_lianhuan:not(.usable):not(.select)::before { + background-image: url("./images/feng_no.png"); +} +/*司马徽火计*/ +.skill-control > .enable > .skillitem_smh_huoji::before { + z-index: -1; + content: ""; + text-align: center; + display: block; + position: absolute; + margin: 1px 12px; + width: 147%; + height: 170%; + font-family: "HanYiZhongLiShuFan", "HYZLSJ"; + background-image: url("./images/long.png"); + background-size: 100% 100%; +} +.skill-control > .enable > *.select:not(.skillitem_smh_yeyan):not(.skillitem_smh_lianhuan)::before { + background-image: url("./images/long_selected.png"); +} +.skill-control > .enable > .skillitem_smh_huoji:not(.usable):not(.select)::before { + background-image: url("./images/long_no.png"); +} +/*司马徽业炎*/ +.skill-control > .enable > .skillitem_smh_yeyan::before { + z-index: -1; + content: ""; + --w: auto; + --h: calc(var(--w) * 1045 / 669); + line-height: var(--h); + text-align: center; + display: block; + position: absolute; + margin: 1px 12px; + width: 147%; + height: 170%; + font-family: "HanYiZhongLiShuFan", "HYZLSJ"; + background-image: url("./images/longfeng.png"); + background-size: 100% 100%; +} +.skill-control > .enable > *.select:not(.skillitem_smh_huoji):not(.skillitem_smh_lianhuan)::before { + background-image: url("./images/longfeng_selected.png"); +} +.skill-control > .enable > .skillitem_smh_yeyan:not(.usable):not(.select)::before { + background-image: url("./images/longfeng_no.png"); +} +/*-----*/ -.skill-control > .enable> .skillitem::before { - z-index: -1; - content: ''; - --w: auto; - --h: calc(var(--w) * 1045/ 669); +.skill-control > .enable > .skillitem::before { + z-index: -1; + content: ""; + --w: auto; + --h: calc(var(--w) * 1045 / 669); line-height: var(--h); text-align: center; - display: block; - position: absolute; - margin: 1px 12px; - width: 147%; - height: 170%; - font-family: 'HYZLSJ'; - background-image: url("./images/btn0.png"); - background-size: 100% 100%; + display: block; + position: absolute; + margin: 1px 12px; + width: 147%; + height: 170%; + font-family: "HYZLSJ"; + background-image: url("./images/btn0.png"); + background-size: 100% 100%; /*border: 1px solid rgb(3,4,5);/*调试用*/ } @@ -200,214 +192,153 @@ -webkit-filter: grayscale(100%);*/ } - - -.skillMarks{ -max-height: 80px; -overflow-y: auto; -right: -13px; -top: 26px; -z-index: 89 !important; -justify-content: center; +.skillMarks { + max-height: 80px; + overflow-y: auto; + right: -13px; + top: 26px; + z-index: 89 !important; + justify-content: center; align-items: center; } .skillMarks > .skillMarkItem { - --h: 19px; - width: 34px; - height: 20px; - right: 0px; - line-height: 22px; - text-align: center; - display: block; - position: relative; - justify-content: center; + --h: 19px; + width: 34px; + height: 20px; + right: 0px; + line-height: 22px; + text-align: center; + display: block; + position: relative; + justify-content: center; align-items: center; - letter-spacing: -1px; - white-space: nowrap; - border-radius: 50%; - font-family: 'HYZLSJ'; - font-size: 15.5px; - + letter-spacing: -1px; + white-space: nowrap; + border-radius: 50%; + font-family: "HYZLSJ"; + font-size: 15.5px; } .skillMarkItem.xiandingji { - /* background-image: linear-gradient(#c5870a 31%, #4a2a00 86%, #1b0b05 95%); + /* background-image: linear-gradient(#c5870a 31%, #4a2a00 86%, #1b0b05 95%); box-shadow: 0px -2px 3px #5a4a31 , 0px 2px 3px #5a4a31 ,2px 0px 3px #5a4a31 , -2px 0px 3px #5a4a31 ,0px 2px 3px #f9ec39 inset , -1.5px 0px 3px #f9ec39 inset;*/ - background-image: url("./images/xianding.png"); - background-size: 100% 100%; - text-shadow:none; - font-family: 'HYZLSJ'; - font-weight: 500;/*字体加粗*/ - text-shadow:0px 0px 1px #b80b0b, - 0px 0px 1px #b80b0b, - 0px 0px 1px #b80b0b, - 0px 0px 1px #b80b0b, - 0px 0px 1px #b80b0b, - 0px 0px 1px #b80b0b, - 0px 0px 1px #b80b0b, - 0px 0px 1px #b80b0b, - 0px 0px 1px #b80b0b; - --w: 45px; - font-size:16px; - --h: calc(var(--w) * 90/165);/*高和长*/ - width: var(--w);/*按比例调节*/ - height: var(--h);/*同理*/ + background-image: url("./images/xianding.png"); + background-size: 100% 100%; + text-shadow: none; + font-family: "HYZLSJ"; + font-weight: 500; /*字体加粗*/ + text-shadow: 0px 0px 1px #b80b0b, 0px 0px 1px #b80b0b, 0px 0px 1px #b80b0b, 0px 0px 1px #b80b0b, 0px 0px 1px #b80b0b, 0px 0px 1px #b80b0b, 0px 0px 1px #b80b0b, 0px 0px 1px #b80b0b, 0px 0px 1px #b80b0b; + --w: 45px; + font-size: 16px; + --h: calc(var(--w) * 90 / 165); /*高和长*/ + width: var(--w); /*按比例调节*/ + height: var(--h); /*同理*/ } /*转换技*/ -.skillMarkItem.zhuanhuanji{ - background-size: 100% 100%; - background-repeat:no-repeat; - text-shadow:0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C, - 0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C, - 0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C, - 0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C, - 0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C, - 0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C, - 0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C, - 0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C, - 0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C, - 0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C, - 0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C, - 0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C, - 0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C, - 0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C, - 0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C, - 0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C,0 0 1.3px #3C3C3C, - 0 0 1.3px #3C3C3C; - --w: 45px; - font-size:13px; - font-family: 'FZLBJW'; - font-weight:bold; - --h: calc(var(--w) * 85/165);/*高和长*/ - width: var(--w);/*按比例调节*/ - height: var(--h);/*同理*/ +.skillMarkItem.zhuanhuanji { + background-size: 100% 100%; + background-repeat: no-repeat; + text-shadow: 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c, 0 0 1.3px #3c3c3c; + --w: 45px; + font-size: 13px; + font-family: "FZLBJW"; + font-weight: bold; + --h: calc(var(--w) * 85 / 165); /*高和长*/ + width: var(--w); /*按比例调节*/ + height: var(--h); /*同理*/ } .skillMarkItem.xiandingji.used { - position: relative; - - --w: 45px; - --h: calc(var(--w) * 85/165);/*高和长*/ - width: var(--w);/*按比例调节*/ - height: var(--h);/*同理*/ - background-image: url("./images/used.png"); - background-size:100% 100%; - text-shadow:0 0 1.2px #404040, - 0 0 1.2px #404040, - 0 0 1.2px #404040, - 0 0 1.2px #404040, - 0 0 1.2px #404040, - 0 0 1.2px #404040, - 0 0 1.2px #404040, - 0 0 1.2px #404040, - 0 0 1.2px #404040;; - font-family: 'HYZLSJ'; - font-weight: 500;/*字体加粗*/ - font-size: 16px; -} + position: relative; + --w: 45px; + --h: calc(var(--w) * 85 / 165); /*高和长*/ + width: var(--w); /*按比例调节*/ + height: var(--h); /*同理*/ + background-image: url("./images/used.png"); + background-size: 100% 100%; + text-shadow: 0 0 1.2px #404040, 0 0 1.2px #404040, 0 0 1.2px #404040, 0 0 1.2px #404040, 0 0 1.2px #404040, 0 0 1.2px #404040, 0 0 1.2px #404040, 0 0 1.2px #404040, 0 0 1.2px #404040; + font-family: "HYZLSJ"; + font-weight: 500; /*字体加粗*/ + font-size: 16px; +} .skillMarkItem.xiandingji.used::before { - content: ''; - z-index: 100; - display: block; - position: absolute; - --w: 35.5px; - --h: calc(var(--w) * 36/56);/*高和长*/ - width: var(--w);/*按比例调节*/ - height: var(--h);/*同理*/ - background-image: url("./images/noxianding.png"); - background-size:100% 100%; - right: -2px; - top:-0.4px; - pointer-events: none; + content: ""; + z-index: 100; + display: block; + position: absolute; + --w: 35.5px; + --h: calc(var(--w) * 36 / 56); /*高和长*/ + width: var(--w); /*按比例调节*/ + height: var(--h); /*同理*/ + background-image: url("./images/noxianding.png"); + background-size: 100% 100%; + right: -2px; + top: -0.4px; + pointer-events: none; } .skillMarkItem.juexingji { - /*background-image: linear-gradient(to bottom right, #437cbe 27%, #5183bc 50%, #012a3a 68%); + /*background-image: linear-gradient(to bottom right, #437cbe 27%, #5183bc 50%, #012a3a 68%); box-shadow: 0px -2px 3px #5a4a31 , 0px 2px 3px #5a4a31 ,2px 0px 3px #5a4a31 ,2px 0px 3px #5a4a31, 0.6px 0.6px 1.5px #a1fafa inset, 0.3px -0.5px 1px #a1fafa inset , 1px 1px 1.5px #a1fafa inset;*/ background-image: url("./images/juexing.png"); - background-size: 100% 100%; + background-size: 100% 100%; width: 43px; height: 24px !important; - font-size:16px; - text-shadow:none; - font-family: 'HYZLSJ'; - font-weight: 500;/*字体加粗*/ - text-shadow: 0 0 1.2px #483D8B, - 0 0 1.2px #483D8B, - 0 0 1.2px #483D8B, - 0 0 1.2px #483D8B, - 0 0 1.2px #483D8B, - 0 0 1.2px #483D8B, - 0 0 1.2px #483D8B, - 0 0 1.2px #483D8B, - 0 0 1.2px #483D8B; + font-size: 16px; + text-shadow: none; + font-family: "HYZLSJ"; + font-weight: 500; /*字体加粗*/ + text-shadow: 0 0 1.2px #483d8b, 0 0 1.2px #483d8b, 0 0 1.2px #483d8b, 0 0 1.2px #483d8b, 0 0 1.2px #483d8b, 0 0 1.2px #483d8b, 0 0 1.2px #483d8b, 0 0 1.2px #483d8b, 0 0 1.2px #483d8b; } .skillMarkItem.duty { - /*background-image: linear-gradient(to bottom right, #437cbe 27%, #5183bc 50%, #012a3a 68%); + /*background-image: linear-gradient(to bottom right, #437cbe 27%, #5183bc 50%, #012a3a 68%); box-shadow: 0px -2px 3px #5a4a31 , 0px 2px 3px #5a4a31 ,2px 0px 3px #5a4a31 ,2px 0px 3px #5a4a31, 0.6px 0.6px 1.5px #a1fafa inset, 0.3px -0.5px 1px #a1fafa inset , 1px 1px 1.5px #a1fafa inset;*/ background-image: url("./images/duty.png"); - background-size: 100% 100%; + background-size: 100% 100%; width: 43px; height: 24px !important; - font-size:16px; - text-shadow:none; - font-family: 'HYZLSJ'; - font-weight: 500;/*字体加粗*/ - text-shadow: 0 0 1.2px #DC143C, - 0 0 1.2px #DC143C, - 0 0 1.2px #DC143C, - 0 0 1.2px #DC143C, - 0 0 1.2px #DC143C, - 0 0 1.2px #DC143C, - 0 0 1.2px #DC143C, - 0 0 1.2px #DC143C, - 0 0 1.2px #DC143C; - + font-size: 16px; + text-shadow: none; + font-family: "HYZLSJ"; + font-weight: 500; /*字体加粗*/ + text-shadow: 0 0 1.2px #dc143c, 0 0 1.2px #dc143c, 0 0 1.2px #dc143c, 0 0 1.2px #dc143c, 0 0 1.2px #dc143c, 0 0 1.2px #dc143c, 0 0 1.2px #dc143c, 0 0 1.2px #dc143c, 0 0 1.2px #dc143c; } .skillMarkItem.duty.fail { - position: relative; - - --w: 45px; - --h: calc(var(--w) * 85/165);/*高和长*/ - width: var(--w);/*按比例调节*/ - height: var(--h);/*同理*/ - background-image: url("./images/used.png"); - background-size:100% 100%; - -webkit-filter:brightness(25%); - font-family: 'HYZLSJ'; - font-size:16px; - font-weight: 500;/*字体加粗*/ - text-shadow: 0 0 1.2px #404040, - 0 0 1.2px #404040, - 0 0 1.2px #404040, - 0 0 1.2px #404040, - 0 0 1.2px #404040, - 0 0 1.2px #404040, - 0 0 1.2px #404040, - 0 0 1.2px #404040, - 0 0 1.2px #404040; + position: relative; + + --w: 45px; + --h: calc(var(--w) * 85 / 165); /*高和长*/ + width: var(--w); /*按比例调节*/ + height: var(--h); /*同理*/ + background-image: url("./images/used.png"); + background-size: 100% 100%; + -webkit-filter: brightness(25%); + font-family: "HYZLSJ"; + font-size: 16px; + font-weight: 500; /*字体加粗*/ + text-shadow: 0 0 1.2px #404040, 0 0 1.2px #404040, 0 0 1.2px #404040, 0 0 1.2px #404040, 0 0 1.2px #404040, 0 0 1.2px #404040, 0 0 1.2px #404040, 0 0 1.2px #404040, 0 0 1.2px #404040; } .skillMarkItem.duty.fail::before { - content: ''; - z-index: 100; - display: block; - position: absolute; - --w: 45.5px; - --h: calc(var(--w) * 36/56);/*高和长*/ - width: var(--w);/*按比例调节*/ - height: var(--h);/*同理*/ - background-image: url("./images/noxianding.png"); - background-size:100% 100%; - right: -2px; - top:-4.4px; - pointer-events: none; + content: ""; + z-index: 100; + display: block; + position: absolute; + --w: 45.5px; + --h: calc(var(--w) * 36 / 56); /*高和长*/ + width: var(--w); /*按比例调节*/ + height: var(--h); /*同理*/ + background-image: url("./images/noxianding.png"); + background-size: 100% 100%; + right: -2px; + top: -4.4px; + pointer-events: none; } .skillMarkItem + .skillMarkItem { - margin-top: 3.5px; + margin-top: 3.5px; } /*技能失效*/ -.skillitem .suo{ +.skillitem .suo { height: 30px; width: 30px; background-image: url("./images/suo.png"); @@ -417,7 +348,7 @@ justify-content: center; z-index: 6; } -.skillitem .suo1{ +.skillitem .suo1 { height: 35px; width: 35px; background-image: url("./images/suo.png"); @@ -426,10 +357,10 @@ justify-content: center; left: 20px; z-index: 6; filter: grayscale(100%); - -webkit-filter: grayscale(100%);/*按钮变灰*/ + -webkit-filter: grayscale(100%); /*按钮变灰*/ } -.skillitem .yang{ -/* height: 80px;*/ +.skillitem .yang { + /* height: 80px;*/ width: 90px; background-image: url("./images/yang.png"); background-size: 100% 100%; @@ -437,8 +368,8 @@ justify-content: center; /*left: 20px;*/ z-index: 6; } -.skillitem .ying{ -/* height: 80px;*/ +.skillitem .ying { + /* height: 80px;*/ width: 90px; background-image: url("./images/ying.png"); background-size: 100% 100%; @@ -446,7 +377,7 @@ justify-content: center; /*left: 20px;*/ z-index: 6; } -.trigger .yang{ +.trigger .yang { height: 20px; width: 60px; background-image: url("./images/Tyang.png"); @@ -455,7 +386,7 @@ justify-content: center; left: -10px; z-index: -1; } -.trigger .ying{ +.trigger .ying { height: 20px; width: 60px; background-image: url("./images/Tying.png"); @@ -464,7 +395,7 @@ justify-content: center; left: -10px; z-index: -1; } -.trigger .suo1{ +.trigger .suo1 { height: 35px; width: 35px; background-image: url("./images/suo.png"); @@ -472,21 +403,21 @@ justify-content: center; position: absolute; left: 7px; z-index: 6; - bottom:5.5px; + bottom: 5.5px; filter: grayscale(100%); - -webkit-filter: grayscale(100%);/*按钮变灰*/ + -webkit-filter: grayscale(100%); /*按钮变灰*/ } -.skill-control >.enable >.skillitem_smh_huoji>.numText{ -font-size: 16px; +.skill-control > .enable > .skillitem_smh_huoji > .numText { + font-size: 16px; right: 3px; top: 5px; - font-family: 'HYZLSJ'; + font-family: "HYZLSJ"; text-align: center; - -webkit-text-stroke: 0px rgba(38,37,34,0.5); + -webkit-text-stroke: 0px rgba(38, 37, 34, 0.5); text-shadow: none; - background-image: linear-gradient(180deg, #f0d775 30%, #ab8c31 57%, #b0a04d 67%); - font-weight:bold; + background-image: linear-gradient(180deg, #f0d775 30%, #ab8c31 57%, #b0a04d 67%); + font-weight: bold; /*background-image: url("./images/底图.png");*/ -webkit-background-clip: text; -webkit-text-fill-color: transparent; @@ -494,16 +425,16 @@ font-size: 16px; position: absolute; } /* 技能剩余次数 */ -.skill-control>.enable>.skillitem>.numText{ +.skill-control > .enable > .skillitem > .numText { font-size: 16px; right: 3px; top: 5px; - font-family: 'HYZLSJ'; + font-family: "HYZLSJ"; text-align: center; - -webkit-text-stroke: 0px rgba(38,37,34,0.5); + -webkit-text-stroke: 0px rgba(38, 37, 34, 0.5); text-shadow: none; - background-image: linear-gradient(180deg, #f0d775 30%, #ab8c31 57%, #b0a04d 67%); - font-weight:bold; + background-image: linear-gradient(180deg, #f0d775 30%, #ab8c31 57%, #b0a04d 67%); + font-weight: bold; /*background-image: url("./images/底图.png");*/ -webkit-background-clip: text; -webkit-text-fill-color: transparent; @@ -511,16 +442,16 @@ font-size: 16px; position: absolute; } -.skill-control>.trigger>.skillitem>.numText{ +.skill-control > .trigger > .skillitem > .numText { font-size: 16px; right: -9px; top: 5px; - font-family: 'HYZLSJ'; + font-family: "HYZLSJ"; text-align: center; - -webkit-text-stroke: 0px rgba(38,37,34,0.5); + -webkit-text-stroke: 0px rgba(38, 37, 34, 0.5); text-shadow: none; - background-image: linear-gradient(180deg, #f0d775 30%, #ab8c31 57%, #b0a04d 67%); - font-weight:bold; + background-image: linear-gradient(180deg, #f0d775 30%, #ab8c31 57%, #b0a04d 67%); + font-weight: bold; /*background-image: url("./images/底图.png");*/ -webkit-background-clip: text; -webkit-text-fill-color: transparent; @@ -528,16 +459,16 @@ font-size: 16px; position: absolute; } -.skill-control>.enable>.skillitemxianding>.numText{ - font-size: 16px; +.skill-control > .enable > .skillitemxianding > .numText { + font-size: 16px; right: 3px; top: 5px; - font-family: 'HYZLSJ'; + font-family: "HYZLSJ"; text-align: center; - -webkit-text-stroke: 0px rgba(38,37,34,0.5); + -webkit-text-stroke: 0px rgba(38, 37, 34, 0.5); text-shadow: none; - background-image: linear-gradient(180deg, #f0d775 30%, #ab8c31 57%, #b0a04d 67%); - font-weight:bold; + background-image: linear-gradient(180deg, #f0d775 30%, #ab8c31 57%, #b0a04d 67%); + font-weight: bold; /*background-image: url("./images/底图.png");*/ -webkit-background-clip: text; -webkit-text-fill-color: transparent; @@ -545,17 +476,16 @@ font-size: 16px; position: absolute; } - -.skill-control>.trigger>.skillitemxianding>.numText{ +.skill-control > .trigger > .skillitemxianding > .numText { font-size: 16px; right: -9px; top: 5px; - font-family: 'HYZLSJ'; + font-family: "HYZLSJ"; text-align: center; - -webkit-text-stroke: 0px rgba(38,37,34,0.5); + -webkit-text-stroke: 0px rgba(38, 37, 34, 0.5); text-shadow: none; - background-image: linear-gradient(180deg, #f0d775 30%, #ab8c31 57%, #b0a04d 67%); - font-weight:bold; + background-image: linear-gradient(180deg, #f0d775 30%, #ab8c31 57%, #b0a04d 67%); + font-weight: bold; /*background-image: url("./images/底图.png");*/ -webkit-background-clip: text; -webkit-text-fill-color: transparent; @@ -563,90 +493,87 @@ font-size: 16px; position: absolute; } - - -.skill-control>.enable>.skillitem>.numText-child{ +.skill-control > .enable > .skillitem > .numText-child { font-size: 16px; right: 3px; top: 5px; - font-family: 'HYZLSJ'; + font-family: "HYZLSJ"; text-align: center; - -webkit-text-stroke: 2.7px #102030;/*5.1px #40404096*/ - opacity:0.5; + -webkit-text-stroke: 2.7px #102030; /*5.1px #40404096*/ + opacity: 0.5; z-index: -1; text-shadow: none; - font-weight:bold; + font-weight: bold; -webkit-background-clip: text; -webkit-text-fill-color: transparent; white-space: nowrap; position: absolute; } -.skill-control>.enable>.skillitem_smh_huoji>.numText-child{ +.skill-control > .enable > .skillitem_smh_huoji > .numText-child { font-size: 16px; right: 3px; top: 5px; - font-family: 'HYZLSJ'; + font-family: "HYZLSJ"; text-align: center; - -webkit-text-stroke: 2.7px #102030;/*5.1px #40404096*/ - opacity:0.5; + -webkit-text-stroke: 2.7px #102030; /*5.1px #40404096*/ + opacity: 0.5; z-index: -1; text-shadow: none; - font-weight:bold; + font-weight: bold; -webkit-background-clip: text; -webkit-text-fill-color: transparent; white-space: nowrap; position: absolute; } -.skill-control>.trigger>.skillitem>.numText-child{ +.skill-control > .trigger > .skillitem > .numText-child { font-size: 16px; right: 3px; top: 5px; - font-family: 'HYZLSJ'; + font-family: "HYZLSJ"; text-align: center; - -webkit-text-stroke: 2.7px #102030;/*5.1px #40404096*/ - opacity:0.5; + -webkit-text-stroke: 2.7px #102030; /*5.1px #40404096*/ + opacity: 0.5; z-index: -1; text-shadow: none; - font-weight:bold; + font-weight: bold; -webkit-background-clip: text; -webkit-text-fill-color: transparent; white-space: nowrap; position: absolute; } -.skill-control>.enable>.skillitemxianding>.numText-child{ - font-size: 16px; +.skill-control > .enable > .skillitemxianding > .numText-child { + font-size: 16px; right: 3px; top: 5px; - font-family: 'HYZLSJ'; + font-family: "HYZLSJ"; text-align: center; - -webkit-text-stroke: 2.7px #102030;/*5.1px #40404096*/ - opacity:0.5; + -webkit-text-stroke: 2.7px #102030; /*5.1px #40404096*/ + opacity: 0.5; z-index: -1; text-shadow: none; - font-weight:bold; + font-weight: bold; -webkit-background-clip: text; -webkit-text-fill-color: transparent; white-space: nowrap; position: absolute; } - -.skill-control>.trigger>.skillitemxianding>.numText-child{ - font-size: 16px; +.skill-control > .trigger > .skillitemxianding > .numText-child { + font-size: 16px; right: 3px; top: 5px; - font-family: 'HYZLSJ'; + font-family: "HYZLSJ"; text-align: center; - -webkit-text-stroke: 2.7px #102030;/*5.1px #40404096*/ - opacity:0.5; + -webkit-text-stroke: 2.7px #102030; /*5.1px #40404096*/ + opacity: 0.5; z-index: -1; text-shadow: none; - font-weight:bold; + font-weight: bold; -webkit-background-clip: text; -webkit-text-fill-color: transparent; white-space: nowrap; position: absolute; -} \ No newline at end of file +} diff --git a/shoushaUI/skill/main2.js b/shoushaUI/skill/main2.js index a6b1848..e7edc25 100644 --- a/shoushaUI/skill/main2.js +++ b/shoushaUI/skill/main2.js @@ -1,537 +1,501 @@ app.import(function (lib, game, ui, get, ai, _status, app) { - var plugin = { - name: "skill", - filter: function () { - return !["chess", "tafang"].includes(get.mode()); - }, - content: function (next) {}, - precontent: function () { - Object.assign(ui.create, { - skills: function (skills) { - ui.skills = plugin.createSkills(skills, ui.skills); - ui.skillControl.update(); - return ui.skills; - }, - skills2: function (skills) { - ui.skills2 = plugin.createSkills(skills, ui.skills2); - ui.skillControl.update(); - return ui.skills2; - }, - skills3: function (skills) { - ui.skills3 = plugin.createSkills(skills, ui.skills3); - ui.skillControl.update(); - return ui.skills3; - }, - skillControl: function (clear) { - if (!ui.skillControl) { - var node = ui.create.div(".skill-control", ui.arena); - node.node = { - enable: ui.create.div(".enable", node), - trigger: ui.create.div(".trigger", node), - }; - for (var i in plugin.controlElement) { - node[i] = plugin.controlElement[i]; - } - ui.skillControl = node; - } - if (clear) { - ui.skillControl.node.enable.innerHTML = ""; - ui.skillControl.node.trigger.innerHTML = ""; - } - return ui.skillControl; - }, - }); + var plugin = { + name: "skill", + filter: function () { + return !["chess", "tafang"].includes(get.mode()); + }, + content: function (next) {}, + precontent: function () { + Object.assign(ui.create, { + skills: function (skills) { + ui.skills = plugin.createSkills(skills, ui.skills); + ui.skillControl.update(); + return ui.skills; + }, + skills2: function (skills) { + ui.skills2 = plugin.createSkills(skills, ui.skills2); + ui.skillControl.update(); + return ui.skills2; + }, + skills3: function (skills) { + ui.skills3 = plugin.createSkills(skills, ui.skills3); + ui.skillControl.update(); + return ui.skills3; + }, + skillControl: function (clear) { + if (!ui.skillControl) { + var node = ui.create.div(".skill-control", ui.arena); + node.node = { + enable: ui.create.div(".enable", node), + trigger: ui.create.div(".trigger", node), + }; + for (var i in plugin.controlElement) { + node[i] = plugin.controlElement[i]; + } + ui.skillControl = node; + } + if (clear) { + ui.skillControl.node.enable.innerHTML = ""; + ui.skillControl.node.trigger.innerHTML = ""; + } + return ui.skillControl; + }, + }); - Object.assign(ui, { - updateSkillControl: function (player, clear) { - var eSkills = player.getSkills("e", true, false).slice(0); - var skills = app.get.playerSkills(player, true); /*国战隐匿技能*/ - if (ui.skills2 && ui.skills2.skills.length) { - var gSkills = ui.skills2.skills; - } + Object.assign(ui, { + updateSkillControl: function (player, clear) { + var eSkills = player.getSkills("e", true, false).slice(0); + var skills = app.get.playerSkills(player, true); /*国战隐匿技能*/ + if (ui.skills2 && ui.skills2.skills.length) { + var gSkills = ui.skills2.skills; + } - for (var i = 0; i < skills.length; i++) { - var info = get.info(skills[i]); - if (info && info.nopop) skills.splice(i--, 1); - } + for (var i = 0; i < skills.length; i++) { + var info = get.info(skills[i]); + if (info && info.nopop) skills.splice(i--, 1); + } - var iSkills = player.invisibleSkills.slice(0); - game.expandSkills(iSkills); - skills.addArray( - iSkills.filter(function (skill) { - var info = get.info(skill); - return info && info.enable; - }) - ); + var iSkills = player.invisibleSkills.slice(0); + game.expandSkills(iSkills); + skills.addArray( + iSkills.filter(function (skill) { + var info = get.info(skill); + return info && info.enable; + }) + ); - if (player === game.me) { - var skillControl = ui.create.skillControl(clear); - skillControl.add(skills, eSkills); - if (gSkills) skillControl.add(gSkills); - skillControl.update(); - game.addVideo("updateSkillControl", player, clear); - } + if (player === game.me) { + var skillControl = ui.create.skillControl(clear); + skillControl.add(skills, eSkills); + if (gSkills) skillControl.add(gSkills); + skillControl.update(); + game.addVideo("updateSkillControl", player, clear); + } - var juexingji = {}; - var xiandingji = {}; - app.get.playerSkills(player).forEach(function (skill) { - var info = get.info(skill); - if (!info) return; - if ( - get.is.zhuanhuanji(skill, player) || - info.limited || - (info.intro && info.intro.content === "limited") - ) { - xiandingji[skill] = player.awakenedSkills.includes(skill); - } - if (info.juexingji || info.dutySkill) - juexingji[skill] = player.awakenedSkills.includes(skill); - }); - plugin.updateSkillMarks(player, xiandingji, juexingji); - }, - }); + var juexingji = {}; + var xiandingji = {}; + app.get.playerSkills(player).forEach(function (skill) { + var info = get.info(skill); + if (!info) return; + if (get.is.zhuanhuanji(skill, player) || info.limited || (info.intro && info.intro.content === "limited")) { + xiandingji[skill] = player.awakenedSkills.includes(skill); + } + if (info.juexingji || info.dutySkill) juexingji[skill] = player.awakenedSkills.includes(skill); + }); + plugin.updateSkillMarks(player, xiandingji, juexingji); + }, + }); - app.reWriteFunction(lib.element.player, { - addSkill: [ - null, - function () { - ui.updateSkillControl(this); - }, - ], - removeSkill: [ - null, - function () { - ui.updateSkillControl(this, true); - }, - ], - addSkillTrigger: [ - null, - function () { - ui.updateSkillControl(this); - }, - ], - removeSkillTrigger: [ - null, - function () { - ui.updateSkillControl(this, true); - }, - ], - awakenSkill: [ - null, - function () { - ui.updateSkillControl(this); - }, - ], - restoreSkill: [ - null, - function () { - ui.updateSkillControl(this); - }, - ], - }); - app.reWriteFunction(lib.element.control, { - close: [ - null, - function () { - if (this.classList.contains("skillControl")) { - ui.skillControl.update(); - } - }, - ], - }); + app.reWriteFunction(lib.element.player, { + addSkill: [ + null, + function () { + ui.updateSkillControl(this); + }, + ], + removeSkill: [ + null, + function () { + ui.updateSkillControl(this, true); + }, + ], + addSkillTrigger: [ + null, + function () { + ui.updateSkillControl(this); + }, + ], + removeSkillTrigger: [ + null, + function () { + ui.updateSkillControl(this, true); + }, + ], + awakenSkill: [ + null, + function () { + ui.updateSkillControl(this); + }, + ], + restoreSkill: [ + null, + function () { + ui.updateSkillControl(this); + }, + ], + }); + app.reWriteFunction(lib.element.control, { + close: [ + null, + function () { + if (this.classList.contains("skillControl")) { + ui.skillControl.update(); + } + }, + ], + }); - app.reWriteFunction(game, { - loop: [ - function () { - if (game.boss && !ui.skillControl) { - ui.updateSkillControl(game.me); - } - if (ui.skillControl) { - ui.skillControl.update(); - } - }, - null, - ], - swapControl: [ - null, - function () { - ui.updateSkillControl(game.me, true); - }, - ], - swapPlayer: [ - null, - function () { - ui.updateSkillControl(game.me, true); - }, - ], - }); + app.reWriteFunction(game, { + loop: [ + function () { + if (game.boss && !ui.skillControl) { + ui.updateSkillControl(game.me); + } + if (ui.skillControl) { + ui.skillControl.update(); + } + }, + null, + ], + swapControl: [ + null, + function () { + ui.updateSkillControl(game.me, true); + }, + ], + swapPlayer: [ + null, + function () { + ui.updateSkillControl(game.me, true); + }, + ], + }); - Object.assign(game.videoContent, { - updateSkillControl: function (player, clear) { - ui.updateSkillControl(player, clear); - }, - }); - ui.skillControlArea = ui.create.div(); - }, - controlElement: { - add: function (skill, eSkills) { - if (Array.isArray(skill)) { - var node = this; - skill.forEach(function (item) { - node.add(item, eSkills); - }); - return this; - } + Object.assign(game.videoContent, { + updateSkillControl: function (player, clear) { + ui.updateSkillControl(player, clear); + }, + }); + ui.skillControlArea = ui.create.div(); + }, + controlElement: { + add: function (skill, eSkills) { + if (Array.isArray(skill)) { + var node = this; + skill.forEach(function (item) { + node.add(item, eSkills); + }); + return this; + } - var self = this; - var skills = game.expandSkills([skill]).map(function (item) { - return app.get.skillInfo(item); - }); - var hasSame = false; - var enableSkills = skills.filter(function (item) { - if (item.type !== "enable") return false; - if (item.name === skills[0].name) hasSame = true; - return true; - }); + var self = this; + var skills = game.expandSkills([skill]).map(function (item) { + return app.get.skillInfo(item); + }); + var hasSame = false; + var enableSkills = skills.filter(function (item) { + if (item.type !== "enable") return false; + if (item.name === skills[0].name) hasSame = true; + return true; + }); - if (!hasSame) enableSkills.unshift(skills[0]); - var showSkills = enableSkills.length ? enableSkills : skills; - showSkills.forEach(function (item) { - var node = self.querySelector('[data-id="' + item.id + '"]'); - if (node) return; - if (item.type === "enable") { - node = ui.create.div( - lib.skill[item.id].limited ? ".xiandingji" : ".skillitem", - self.node.enable, - get.translation(item.name) /*.slice(0, 2)*/ - ); //咸鱼大佬提供代码 - node.dataset.id = item.id; - app.listen(node, plugin.clickSkill); - return; - } - if (!item.info) return; - if (!item.translation) return; - if (eSkills && eSkills.includes(item.id)) return; - node = ui.create.div( - ".skillitem", - self.node[get.is.phoneLayout() ? "trigger" : "enable"], - item.name - ); - node.dataset.id = item.id; - }); - return this; - }, - update: function () { - var skills = []; - if (ui.skills) skills.addArray(ui.skills.skills); - if (ui.skills2) skills.addArray(ui.skills2.skills); - if (ui.skills3) skills.addArray(ui.skills3.skills); + if (!hasSame) enableSkills.unshift(skills[0]); + var showSkills = enableSkills.length ? enableSkills : skills; + showSkills.forEach(function (item) { + var node = self.querySelector('[data-id="' + item.id + '"]'); + if (node) return; + if (item.type === "enable") { + node = ui.create.div(lib.skill[item.id].limited ? ".xiandingji" : ".skillitem", self.node.enable, get.translation(item.name) /*.slice(0, 2)*/); //咸鱼大佬提供代码 + node.dataset.id = item.id; + app.listen(node, plugin.clickSkill); + return; + } + if (!item.info) return; + if (!item.translation) return; + if (eSkills && eSkills.includes(item.id)) return; + node = ui.create.div(".skillitem", self.node[get.is.phoneLayout() ? "trigger" : "enable"], item.name); + node.dataset.id = item.id; + }); + return this; + }, + update: function () { + var skills = []; + if (ui.skills) skills.addArray(ui.skills.skills); + if (ui.skills2) skills.addArray(ui.skills2.skills); + if (ui.skills3) skills.addArray(ui.skills3.skills); - Array.from(this.node.enable.childNodes).forEach(function (item) { - if (skills.includes(item.dataset.id)) { - item.classList.add("usable"); - } else { - item.classList.remove("usable"); - } + Array.from(this.node.enable.childNodes).forEach(function (item) { + if (skills.includes(item.dataset.id)) { + item.classList.add("usable"); + } else { + item.classList.remove("usable"); + } - if (_status.event.skill === item.dataset.id) { - item.classList.add("select"); - } else { - item.classList.remove("select"); - } - }); + if (_status.event.skill === item.dataset.id) { + item.classList.add("select"); + } else { + item.classList.remove("select"); + } + }); - var level1 = Math.min(4, this.node.trigger.childNodes.length); - var level2 = - this.node.enable.childNodes.length > 2 - ? 4 - : this.node.enable.childNodes.length > 0 - ? 2 - : 0; - var level = Math.max(level1, level2); - ui.arena.dataset.sclevel = level; - }, - }, - checkSkill: function (skill) { - var info = lib.skill[skill]; - if (!info) return -1; - if (info.enable) return 1; - return 0; - }, - clickSkill: function (e) { - if (this.classList.contains("usable")) { - var skill = this.dataset.id; - var item = ui.skillControlArea.querySelector( - '[data-id="' + skill + '"]' - ); - item && app.mockTouch(item); - } - }, - createSkills: function (skills, node) { - var same = true; - if (node) { - if (skills && skills.length) { - for (var i = 0; i < node.skills.length; i++) { - if (node.skills[i] !== skills[i]) { - same = false; - break; - } - } - } - if (same) return node; - node.close(); - node.delete(); - } - if (!skills && !skills.length) return; + var level1 = Math.min(4, this.node.trigger.childNodes.length); + var level2 = this.node.enable.childNodes.length > 2 ? 4 : this.node.enable.childNodes.length > 0 ? 2 : 0; + var level = Math.max(level1, level2); + ui.arena.dataset.sclevel = level; + }, + }, + checkSkill: function (skill) { + var info = lib.skill[skill]; + if (!info) return -1; + if (info.enable) return 1; + return 0; + }, + clickSkill: function (e) { + if (this.classList.contains("usable")) { + var skill = this.dataset.id; + var item = ui.skillControlArea.querySelector('[data-id="' + skill + '"]'); + item && app.mockTouch(item); + } + }, + createSkills: function (skills, node) { + var same = true; + if (node) { + if (skills && skills.length) { + for (var i = 0; i < node.skills.length; i++) { + if (node.skills[i] !== skills[i]) { + same = false; + break; + } + } + } + if (same) return node; + node.close(); + node.delete(); + } + if (!skills && !skills.length) return; - node = ui.create.div(".control.skillControl", ui.skillControlArea); - Object.assign(node, lib.element.control); - skills.forEach(function (skill) { - var item = ui.create.div(node); - item.link = skill; - item.dataset.id = skill; - item.addEventListener( - lib.config.touchscreen ? "touchend" : "click", - ui.click.control - ); - }); - node.skills = skills; - node.custom = ui.click.skill; - return node; - }, - updateSkillMarks: function (player, skills1, skills2) { - var node = player.node.xSkillMarks; - if (!node) { - node = player.node.xSkillMarks = ui.create.div(".skillMarks", player); - } + node = ui.create.div(".control.skillControl", ui.skillControlArea); + Object.assign(node, lib.element.control); + skills.forEach(function (skill) { + var item = ui.create.div(node); + item.link = skill; + item.dataset.id = skill; + item.addEventListener(lib.config.touchscreen ? "touchend" : "click", ui.click.control); + }); + node.skills = skills; + node.custom = ui.click.skill; + return node; + }, + updateSkillMarks: function (player, skills1, skills2) { + var node = player.node.xSkillMarks; + if (!node) { + node = player.node.xSkillMarks = ui.create.div(".skillMarks", player); + } - Array.from(node.childNodes).forEach(function (item) { - if (skills1.hasOwnProperty(item.dataset.id)) return; - if (skills2[item.dataset.id]) return; - item.remove(); - }); - //使限定技和转换技显示不同的样式 - for (var k in skills1) { - var info = lib.skill[k]; - var item = node.querySelector('[data-id="' + k + '"]'); - if (!item) { - if (!info.zhuanhuanji) - item = ui.create.div(".skillMarkItem.xiandingji", node, ""); - else item = ui.create.div(".skillMarkItem.zhuanhuanji", node, ""); - //如果不是转换技就调用限定技的标记 - } - if (skills1[k]) item.classList.add("used"); - else item.classList.remove("used"); - item.dataset.id = k; - } - //这里结束3} - Array.from(node.querySelectorAll(".juexingji")).forEach(function (item) { - if (!skills2[item.dataset.id]) { - item.remove(); - } - }); - //使觉醒技和使命技不同 - for (var k in skills2) { - if (!skills2[k]) continue; - var info = lib.skill[k]; - if (node.querySelector('[data-id="' + k + '"]')) continue; - var item; - if (info.dutySkill) { - item = ui.create.div(".skillMarkItem.duty", node, ""); - } else item = ui.create.div(".skillMarkItem.juexingji", node, ""); - item.dataset.id = k; - } - }, - recontent: function () { - app.reWriteFunction(ui.create, { - dialog: [ - null, - function (dialog) { - dialog.classList.add("xdialog"); - app.reWriteFunction(dialog, { - hide: [ - null, - function () { - app.emit("dialog:change", dialog); - }, - ], - }); - }, - ], - }); + Array.from(node.childNodes).forEach(function (item) { + if (skills1.hasOwnProperty(item.dataset.id)) return; + if (skills2[item.dataset.id]) return; + item.remove(); + }); + //使限定技和转换技显示不同的样式 + for (var k in skills1) { + var info = lib.skill[k]; + var item = node.querySelector('[data-id="' + k + '"]'); + if (!item) { + if (!info.zhuanhuanji) item = ui.create.div(".skillMarkItem.xiandingji", node, ""); + else item = ui.create.div(".skillMarkItem.zhuanhuanji", node, ""); + //如果不是转换技就调用限定技的标记 + } + if (skills1[k]) item.classList.add("used"); + else item.classList.remove("used"); + item.dataset.id = k; + } + //这里结束3} + Array.from(node.querySelectorAll(".juexingji")).forEach(function (item) { + if (!skills2[item.dataset.id]) { + item.remove(); + } + }); + //使觉醒技和使命技不同 + for (var k in skills2) { + if (!skills2[k]) continue; + var info = lib.skill[k]; + if (node.querySelector('[data-id="' + k + '"]')) continue; + var item; + if (info.dutySkill) { + item = ui.create.div(".skillMarkItem.duty", node, ""); + } else item = ui.create.div(".skillMarkItem.juexingji", node, ""); + item.dataset.id = k; + } + }, + recontent: function () { + app.reWriteFunction(ui.create, { + dialog: [ + null, + function (dialog) { + dialog.classList.add("xdialog"); + app.reWriteFunction(dialog, { + hide: [ + null, + function () { + app.emit("dialog:change", dialog); + }, + ], + }); + }, + ], + }); - app.reWriteFunction(lib.element.dialog, { - open: [ - null, - function () { - app.emit("dialog:change", this); - }, - ], - close: [ - null, - function () { - app.emit("dialog:change", this); - }, - ], - }); + app.reWriteFunction(lib.element.dialog, { + open: [ + null, + function () { + app.emit("dialog:change", this); + }, + ], + close: [ + null, + function () { + app.emit("dialog:change", this); + }, + ], + }); - app.reWriteFunction(lib.element.player, { - markSkill: [ - function (args, name) { - var info = lib.skill[name]; - if (!info) return; - if (info.limited) return this; - if (info.intro && info.intro.content === "limited") return this; - }, - ], - }); + app.reWriteFunction(lib.element.player, { + markSkill: [ + function (args, name) { + var info = lib.skill[name]; + if (!info) return; + if (info.limited) return this; + if (info.intro && info.intro.content === "limited") return this; + }, + ], + }); - app.reWriteFunction(lib.configMenu.appearence.config, { - update: [ - null, - function (res, config, map) { - map.button_press.hide(); - }, - ], - }); + app.reWriteFunction(lib.configMenu.appearence.config, { + update: [ + null, + function (res, config, map) { + map.button_press.hide(); + }, + ], + }); - app.on("playerUpdateE", function (player) { - plugin.updateMark(player); - }); - }, - element: { - mark: { - delete: function () { - this.remove(); - }, - setName: function (name) { - name = get.translation(name) || name; - if (!name || !name.trim()) { - this.classList.add("unshow"); - this.node.name.innerHTML = ""; - } else { - this.classList.remove("unshow"); - this.node.name.innerHTML = get.translation(name) || name; - } - return this; - }, - setCount: function (count) { - if (typeof count === "number") { - this.node.count.innerHTML = count; - this.node.count.classList.remove("unshow"); - } else { - this.node.count.innerHTML = ""; - this.node.count.classList.add("unshow"); - } - return this; - }, - setExtra: function (extra) { - var str = ""; + app.on("playerUpdateE", function (player) { + plugin.updateMark(player); + }); + }, + element: { + mark: { + delete: function () { + this.remove(); + }, + setName: function (name) { + name = get.translation(name) || name; + if (!name || !name.trim()) { + this.classList.add("unshow"); + this.node.name.innerHTML = ""; + } else { + this.classList.remove("unshow"); + this.node.name.innerHTML = get.translation(name) || name; + } + return this; + }, + setCount: function (count) { + if (typeof count === "number") { + this.node.count.innerHTML = count; + this.node.count.classList.remove("unshow"); + } else { + this.node.count.innerHTML = ""; + this.node.count.classList.add("unshow"); + } + return this; + }, + setExtra: function (extra) { + var str = ""; - if (!Array.isArray(extra)) extra = [extra]; - extra.forEach(function (item) { - if (!item || typeof item !== "string") return this; - if (item.indexOf("#") === 0) { - item = item.substr(1); - str += "
"; - } - str += "
" + item + "
"; - }); + if (!Array.isArray(extra)) extra = [extra]; + extra.forEach(function (item) { + if (!item || typeof item !== "string") return this; + if (item.indexOf("#") === 0) { + item = item.substr(1); + str += "
"; + } + str += "
" + item + "
"; + }); - if (str) { - this.node.extra.classList.remove("unshow"); - this.node.extra.innerHTML = str; - } else if (!this._characterMark) { - this.node.extra.innerHTML = ""; - this.node.extra.classList.add("unshow"); - } - return this; - }, - setBackground: function (name, type) { - var skill = lib.skill[this.name]; - if (skill && skill.intro && skill.intro.markExtra) return this; - if (type === "character") { - name = get.translation(name) || name; - this._characterMark = true; - return this.setExtra(name); - } - return this; - }, - _customintro: function (uiintro) { - var node = this; - var info = node.info; - var player = node.parentNode.parentNode; - if (info.name) { - if (typeof info.name == "function") { - var named = info.name(player.storage[node.skill], player); - if (named) { - uiintro.add(named); - } - } else { - uiintro.add(info.name); - } - } else if (info.name !== false) { - uiintro.add(get.translation(node.skill)); - } + if (str) { + this.node.extra.classList.remove("unshow"); + this.node.extra.innerHTML = str; + } else if (!this._characterMark) { + this.node.extra.innerHTML = ""; + this.node.extra.classList.add("unshow"); + } + return this; + }, + setBackground: function (name, type) { + var skill = lib.skill[this.name]; + if (skill && skill.intro && skill.intro.markExtra) return this; + if (type === "character") { + name = get.translation(name) || name; + this._characterMark = true; + return this.setExtra(name); + } + return this; + }, + _customintro: function (uiintro) { + var node = this; + var info = node.info; + var player = node.parentNode.parentNode; + if (info.name) { + if (typeof info.name == "function") { + var named = info.name(player.storage[node.skill], player); + if (named) { + uiintro.add(named); + } + } else { + uiintro.add(info.name); + } + } else if (info.name !== false) { + uiintro.add(get.translation(node.skill)); + } - if (typeof info.mark == "function") { - var stint = info.mark(uiintro, player.storage[node.skill], player); - if (stint) { - var placetext = uiintro.add( - '
' + stint + "
" - ); - if (stint.indexOf('
' + stint.slice(1) + "
" - ); - } else { - var placetext = uiintro.add( - '
' + stint + "
" - ); - if (stint.indexOf('
' + stint + "
"); + if (stint.indexOf('
' + stint.slice(1) + "
"); + } else { + var placetext = uiintro.add('
' + stint + "
"); + if (stint.indexOf('
2 - ? 4 - : this.node.enable.childNodes.length > 0 - ? 2 - : 0; - var level = Math.max(level1, level2); - ui.arena.dataset.sclevel = level; - }, - }, - checkSkill: function (skill) { - var info = lib.skill[skill]; - if (!info) return -1; - if (info.enable) return 1; - return 0; - }, - clickSkill: function (e) { - if (this.classList.contains("usable")) { - var skill = this.dataset.id; - var item = ui.skillControlArea.querySelector( - '[data-id="' + skill + '"]' - ); - item && app.mockTouch(item); - } - }, - createSkills: function (skills, node) { - var same = true; - if (node) { - if (skills && skills.length) { - for (var i = 0; i < node.skills.length; i++) { - if (node.skills[i] !== skills[i]) { - same = false; - break; - } - } - } - if (same) return node; - node.close(); - node.delete(); - } - if (!skills && !skills.length) return; + var level1 = Math.min(4, this.node.trigger.childNodes.length); + var level2 = this.node.enable.childNodes.length > 2 ? 4 : this.node.enable.childNodes.length > 0 ? 2 : 0; + var level = Math.max(level1, level2); + ui.arena.dataset.sclevel = level; + }, + }, + checkSkill: function (skill) { + var info = lib.skill[skill]; + if (!info) return -1; + if (info.enable) return 1; + return 0; + }, + clickSkill: function (e) { + if (this.classList.contains("usable")) { + var skill = this.dataset.id; + var item = ui.skillControlArea.querySelector('[data-id="' + skill + '"]'); + item && app.mockTouch(item); + } + }, + createSkills: function (skills, node) { + var same = true; + if (node) { + if (skills && skills.length) { + for (var i = 0; i < node.skills.length; i++) { + if (node.skills[i] !== skills[i]) { + same = false; + break; + } + } + } + if (same) return node; + node.close(); + node.delete(); + } + if (!skills && !skills.length) return; - node = ui.create.div(".control.skillControl", ui.skillControlArea); - Object.assign(node, lib.element.control); - skills.forEach(function (skill) { - var item = ui.create.div(node); - item.link = skill; - item.dataset.id = skill; - item.addEventListener( - lib.config.touchscreen ? "touchend" : "click", - ui.click.control - ); - }); - node.skills = skills; - node.custom = ui.click.skill; - return node; - }, - updateSkillMarks: function (player, skills1, skills2) { - var node = player.node.xSkillMarks; - if (!node) { - node = player.node.xSkillMarks = ui.create.div(".skillMarks", player); - } + node = ui.create.div(".control.skillControl", ui.skillControlArea); + Object.assign(node, lib.element.control); + skills.forEach(function (skill) { + var item = ui.create.div(node); + item.link = skill; + item.dataset.id = skill; + item.addEventListener(lib.config.touchscreen ? "touchend" : "click", ui.click.control); + }); + node.skills = skills; + node.custom = ui.click.skill; + return node; + }, + updateSkillMarks: function (player, skills1, skills2) { + var node = player.node.xSkillMarks; + if (!node) { + node = player.node.xSkillMarks = ui.create.div(".skillMarks", player); + } - Array.from(node.childNodes).forEach(function (item) { - if (skills1.hasOwnProperty(item.dataset.id)) return; - if (skills2[item.dataset.id]) return; - item.remove(); - }); - //使限定技和转换技显示不同的样式 - for (var k in skills1) { - var info = lib.skill[k]; - var item = node.querySelector('[data-id="' + k + '"]'); - if (!item) { - if (!info.zhuanhuanji) - item = ui.create.div(".skillMarkItem.xiandingji", node, ""); - else item = ui.create.div(".skillMarkItem.zhuanhuanji", node, ""); - //如果不是转换技就调用限定技的标记 - } - if (skills1[k]) item.classList.add("used"); - else item.classList.remove("used"); - item.dataset.id = k; - } - //这里结束3} - Array.from(node.querySelectorAll(".juexingji")).forEach(function (item) { - if (!skills2[item.dataset.id]) { - item.remove(); - } - }); - //使觉醒技和使命技不同 - for (var k in skills2) { - if (!skills2[k]) continue; - var info = lib.skill[k]; - if (node.querySelector('[data-id="' + k + '"]')) continue; - var item; - if (info.dutySkill) { - item = ui.create.div(".skillMarkItem.duty", node, ""); - } else item = ui.create.div(".skillMarkItem.juexingji", node, ""); - item.dataset.id = k; - } - }, - recontent: function () { - app.reWriteFunction(ui.create, { - dialog: [ - null, - function (dialog) { - dialog.classList.add("xdialog"); - app.reWriteFunction(dialog, { - hide: [ - null, - function () { - app.emit("dialog:change", dialog); - }, - ], - }); - }, - ], - }); + Array.from(node.childNodes).forEach(function (item) { + if (skills1.hasOwnProperty(item.dataset.id)) return; + if (skills2[item.dataset.id]) return; + item.remove(); + }); + //使限定技和转换技显示不同的样式 + for (var k in skills1) { + var info = lib.skill[k]; + var item = node.querySelector('[data-id="' + k + '"]'); + if (!item) { + if (!info.zhuanhuanji) item = ui.create.div(".skillMarkItem.xiandingji", node, ""); + else item = ui.create.div(".skillMarkItem.zhuanhuanji", node, ""); + //如果不是转换技就调用限定技的标记 + } + if (skills1[k]) item.classList.add("used"); + else item.classList.remove("used"); + item.dataset.id = k; + } + //这里结束3} + Array.from(node.querySelectorAll(".juexingji")).forEach(function (item) { + if (!skills2[item.dataset.id]) { + item.remove(); + } + }); + //使觉醒技和使命技不同 + for (var k in skills2) { + if (!skills2[k]) continue; + var info = lib.skill[k]; + if (node.querySelector('[data-id="' + k + '"]')) continue; + var item; + if (info.dutySkill) { + item = ui.create.div(".skillMarkItem.duty", node, ""); + } else item = ui.create.div(".skillMarkItem.juexingji", node, ""); + item.dataset.id = k; + } + }, + recontent: function () { + app.reWriteFunction(ui.create, { + dialog: [ + null, + function (dialog) { + dialog.classList.add("xdialog"); + app.reWriteFunction(dialog, { + hide: [ + null, + function () { + app.emit("dialog:change", dialog); + }, + ], + }); + }, + ], + }); - app.reWriteFunction(lib.element.dialog, { - open: [ - null, - function () { - app.emit("dialog:change", this); - }, - ], - close: [ - null, - function () { - app.emit("dialog:change", this); - }, - ], - }); + app.reWriteFunction(lib.element.dialog, { + open: [ + null, + function () { + app.emit("dialog:change", this); + }, + ], + close: [ + null, + function () { + app.emit("dialog:change", this); + }, + ], + }); - app.reWriteFunction(lib.element.player, { - markSkill: [ - function (args, name) { - var info = lib.skill[name]; - if (!info) return; - if (info.limited) return this; - if (info.intro && info.intro.content === "limited") return this; - }, - ], - }); + app.reWriteFunction(lib.element.player, { + markSkill: [ + function (args, name) { + var info = lib.skill[name]; + if (!info) return; + if (info.limited) return this; + if (info.intro && info.intro.content === "limited") return this; + }, + ], + }); - app.reWriteFunction(lib.configMenu.appearence.config, { - update: [ - null, - function (res, config, map) { - map.button_press.hide(); - }, - ], - }); + app.reWriteFunction(lib.configMenu.appearence.config, { + update: [ + null, + function (res, config, map) { + map.button_press.hide(); + }, + ], + }); - app.on("playerUpdateE", function (player) { - plugin.updateMark(player); - }); - }, - element: { - mark: { - delete: function () { - this.remove(); - }, - setName: function (name) { - name = get.translation(name) || name; - if (!name || !name.trim()) { - this.classList.add("unshow"); - this.node.name.innerHTML = ""; - } else { - this.classList.remove("unshow"); - this.node.name.innerHTML = get.translation(name) || name; - } - return this; - }, - setCount: function (count) { - if (typeof count === "number") { - this.node.count.innerHTML = count; - this.node.count.classList.remove("unshow"); - } else { - this.node.count.innerHTML = ""; - this.node.count.classList.add("unshow"); - } - return this; - }, - setExtra: function (extra) { - var str = ""; + app.on("playerUpdateE", function (player) { + plugin.updateMark(player); + }); + }, + element: { + mark: { + delete: function () { + this.remove(); + }, + setName: function (name) { + name = get.translation(name) || name; + if (!name || !name.trim()) { + this.classList.add("unshow"); + this.node.name.innerHTML = ""; + } else { + this.classList.remove("unshow"); + this.node.name.innerHTML = get.translation(name) || name; + } + return this; + }, + setCount: function (count) { + if (typeof count === "number") { + this.node.count.innerHTML = count; + this.node.count.classList.remove("unshow"); + } else { + this.node.count.innerHTML = ""; + this.node.count.classList.add("unshow"); + } + return this; + }, + setExtra: function (extra) { + var str = ""; - if (!Array.isArray(extra)) extra = [extra]; - extra.forEach(function (item) { - if (!item || typeof item !== "string") return this; - if (item.indexOf("#") === 0) { - item = item.substr(1); - str += "
"; - } - str += "
" + item + "
"; - }); + if (!Array.isArray(extra)) extra = [extra]; + extra.forEach(function (item) { + if (!item || typeof item !== "string") return this; + if (item.indexOf("#") === 0) { + item = item.substr(1); + str += "
"; + } + str += "
" + item + "
"; + }); - if (str) { - this.node.extra.classList.remove("unshow"); - this.node.extra.innerHTML = str; - } else if (!this._characterMark) { - this.node.extra.innerHTML = ""; - this.node.extra.classList.add("unshow"); - } - return this; - }, - setBackground: function (name, type) { - var skill = lib.skill[this.name]; - if (skill && skill.intro && skill.intro.markExtra) return this; - if (type === "character") { - name = get.translation(name) || name; - this._characterMark = true; - return this.setExtra(name); - } - return this; - }, - _customintro: function (uiintro) { - var node = this; - var info = node.info; - var player = node.parentNode.parentNode; - if (info.name) { - if (typeof info.name == "function") { - var named = info.name(player.storage[node.skill], player); - if (named) { - uiintro.add(named); - } - } else { - uiintro.add(info.name); - } - } else if (info.name !== false) { - uiintro.add(get.translation(node.skill)); - } + if (str) { + this.node.extra.classList.remove("unshow"); + this.node.extra.innerHTML = str; + } else if (!this._characterMark) { + this.node.extra.innerHTML = ""; + this.node.extra.classList.add("unshow"); + } + return this; + }, + setBackground: function (name, type) { + var skill = lib.skill[this.name]; + if (skill && skill.intro && skill.intro.markExtra) return this; + if (type === "character") { + name = get.translation(name) || name; + this._characterMark = true; + return this.setExtra(name); + } + return this; + }, + _customintro: function (uiintro) { + var node = this; + var info = node.info; + var player = node.parentNode.parentNode; + if (info.name) { + if (typeof info.name == "function") { + var named = info.name(player.storage[node.skill], player); + if (named) { + uiintro.add(named); + } + } else { + uiintro.add(info.name); + } + } else if (info.name !== false) { + uiintro.add(get.translation(node.skill)); + } - if (typeof info.mark == "function") { - var stint = info.mark(uiintro, player.storage[node.skill], player); - if (stint) { - var placetext = uiintro.add( - '
' + stint + "
" - ); - if (stint.indexOf('
' + stint.slice(1) + "
" - ); - } else { - var placetext = uiintro.add( - '
' + stint + "
" - ); - if (stint.indexOf('
' + stint + "
"); + if (stint.indexOf('
' + stint.slice(1) + "
"); + } else { + var placetext = uiintro.add('
' + stint + "
"); + if (stint.indexOf('
player.hasMark('xinfu_falu_' + suit)).length); + player.chooseToGuanxing(lib.suit.filter(suit => player.hasMark("xinfu_falu_" + suit)).length); }, }, identity_junshi: { @@ -868,7 +868,7 @@ decadeModule.import(function (lib, game, ui, get, ai, _status) { }, }, xz_xunxun: { - inherit: 'xunxun', + inherit: "xunxun", filter(event, player) { return game.hasPlayer(current => current.isDamaged()) && !player.hasSkill("xunxun"); }, @@ -1490,7 +1490,7 @@ decadeModule.import(function (lib, game, ui, get, ai, _status) { next.set("_backupevent", "twtanfeng_backup"); next.set("custom", { add: {}, - replace: { window: function () { } }, + replace: { window: function () {} }, }); next.backup("twtanfeng_backup"); next.set("targetRequired", true);