diff --git a/game/asset.js b/game/asset.js index 5b4bbb669..2c6c0f80b 100644 --- a/game/asset.js +++ b/game/asset.js @@ -2625,6 +2625,7 @@ window.noname_asset_list=[ 'theme/music/wood.png', 'theme/music/wood3.png', 'theme/simple/card.png', + 'theme/simple/card2.png', 'theme/simple/grid.png', 'theme/simple/unknown.png', 'theme/simple/wood.png', diff --git a/game/game.js b/game/game.js index 679bf321b..77a80524f 100644 --- a/game/game.js +++ b/game/game.js @@ -38750,31 +38750,116 @@ } } else{ - var nodes=[]; - _status.clickingidentity=[this.parentNode,nodes]; - var num=1; - var dy=30; - if(get.is.phoneLayout()){ - dy=40; + var list2=get.copy(list); + if(game.getIdentityList2){ + game.getIdentityList2(list2); } - for(var i in list){ - if(this.firstChild.innerHTML!=list[i]){ - var node=ui.create.div('.identity.hidden.pointerdiv',this.parentNode,ui.click.identity2); - ui.create.div(node).innerHTML=list[i]; - node.dataset.color=i; - ui.refresh(node); - node.show(); - var transstr='translateY('+((num++)*dy)+'px)'; - if(get.is.phoneLayout()){ - transstr+=' scale(1.3)'; - } - if(get.is.newLayout()&&this.parentNode.classList.contains('linked')){ - transstr+=' rotate(90deg)'; - } - node.style.transform=transstr; - nodes.push(node); - } - } + var rect=this.getBoundingClientRect(); + this._customintro=function(uiintro){ + if(get.mode()=='guozhan'){ + uiintro.clickintro=true; + } + else{ + uiintro.touchclose=true; + } + // if(lib.config.theme!='woodden'){ + uiintro.classList.add('woodbg'); + // } + if(get.is.phoneLayout()){ + uiintro.style.width='100px'; + } + else{ + uiintro.style.width='85px'; + } + var source=this.parentNode; + for(var i in list){ + var node=ui.create.div(); + node.classList.add('guessidentity'); + node.classList.add('pointerdiv'); + ui.create.div('.menubutton.large',list2[i],node); + if(!get.is.phoneLayout()){ + node.firstChild.style.fontSize='24px'; + node.firstChild.style.lineHeight='24px'; + } + if(get.mode()=='guozhan'){ + if(source._guozhanguess){ + if(!source._guozhanguess.contains(i)){ + node.classList.add('transparent'); + } + } + node.listen(function(){ + var list=[]; + if(this.link[2]!='unknown'){ + this.classList.toggle('transparent'); + if(!this.classList.contains('transparent')){ + var info=this.link; + info[0].firstChild.innerHTML=info[1]; + info[0].dataset.color=info[2]; + list.add(info[2]); + } + } + else{ + var info=this.link; + info[0].firstChild.innerHTML=info[1]; + info[0].dataset.color=info[2]; + return; + } + for(var i=0;i.menubutton.large{ + display: block; + position: relative; +} +/*.guessidentity>.menubutton.large:not(*[data-nature="none"]){ + color:white; +}*/ div[data-decoration="gold"]::before, diff --git a/mode/guozhan.js b/mode/guozhan.js index 7de00d825..1e31e954e 100644 --- a/mode/guozhan.js +++ b/mode/guozhan.js @@ -2144,6 +2144,16 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ } return list; }, + getIdentityList2:function(list){ + for(var i in list){ + switch(i){ + case 'unknown':list[i]='未知';break; + case 'ye':list[i]='野心家';break; + case 'qun':list[i]+='雄';break; + default:list[i]+='国'; + } + } + }, getVideoName:function(){ var str=get.translation(game.me.name1)+'/'+get.translation(game.me.name2); var str2=get.cnNumber(parseInt(get.config('player_number')))+'人'+ diff --git a/mode/identity.js b/mode/identity.js index 347201e00..37966f695 100644 --- a/mode/identity.js +++ b/mode/identity.js @@ -390,6 +390,17 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ } } }, + getIdentityList2:function(list){ + for(var i in list){ + switch(i){ + case 'fan':list[i]='反贼';break; + case 'zhong':list[i]='忠臣';break; + case 'nei':list[i]='内奸';break; + case 'zhu':list[i]='主公';break; + case 'cai':list[i]='未知';break; + } + } + }, getVideoName:function(){ var str=get.translation(game.me.name); if(game.me.name2){ @@ -1633,7 +1644,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ if(this.ai.shown<-0.5) this.ai.shown=-0.5; var marknow=(!_status.connectMode&&this!=game.me&&get.config('auto_mark_identity')&&this.ai.identity_mark!='finished'); - if(true){ + // if(true){ if(marknow&&_status.clickingidentity&&_status.clickingidentity[0]==this){ for(var i=0;i<_status.clickingidentity[1].length;i++){ _status.clickingidentity[1][i].delete(); @@ -1704,7 +1715,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ this.ai.identity_mark='finished'; } } - } + // } }, } diff --git a/theme/music/style.css b/theme/music/style.css index 6437653b1..aa0ee1a32 100644 --- a/theme/music/style.css +++ b/theme/music/style.css @@ -109,6 +109,15 @@ body[data-background_color_music='blue'] #arena.mobile:not(.chess) .player[data- background-position: -6px -6px; } +.woodbg{ + color:rgba(77, 60, 51,0.8) !important; + text-shadow:none !important; +} +.woodbg .menubutton.large{ + background: url('wood3.png') !important; + box-shadow: rgba(0, 0, 0, 0.3) 0 0 0 1px, rgba(0, 0, 0, 0.3) 0 0 5px !important; +} + #window .player.minskin.obstacle[data-obscolor='blue']{ background: repeating-linear-gradient( 135deg, diff --git a/theme/simple/card2.png b/theme/simple/card2.png new file mode 100644 index 000000000..643b76209 Binary files /dev/null and b/theme/simple/card2.png differ diff --git a/theme/simple/style.css b/theme/simple/style.css index 3093bc3ba..7e28d08cf 100644 --- a/theme/simple/style.css +++ b/theme/simple/style.css @@ -159,6 +159,17 @@ body{ box-shadow: rgba(0,0,0,0.6) 0 0 5px inset; } + +.woodbg{ + color:rgba(77, 60, 51,1) !important; + text-shadow:none !important; +} +.woodbg .menubutton.large{ + background: url('card2.png') !important; + background-size: 100% 100% !important; + box-shadow: rgba(0, 0, 0, 0.3) 0 0 0 1px, rgba(0, 0, 0, 0.3) 0 0 5px !important; +} + .player>.glassbg{ left: 0; top: 0;