diff --git a/character/rank.js b/character/rank.js index d2fbcd727..787645bcd 100644 --- a/character/rank.js +++ b/character/rank.js @@ -495,6 +495,7 @@ window.characterRank={ 'zhangliang', 'xiaoqiao', 'xiahouyuan', + 'yanwen', ], c:[ 'old_xusheng', @@ -507,7 +508,6 @@ window.characterRank={ 'caohong', 'caocao', 'lvbu', - 'yanwen', 'yujin', ], d:[ diff --git a/game/game.js b/game/game.js index 52598d5b3..e323b3cc7 100644 --- a/game/game.js +++ b/game/game.js @@ -4368,8 +4368,8 @@ delete game.onover; } lib.config.current_mode=mode[lib.config.mode].config||[]; - lib.config.banned=get.config('banned')||[]; - lib.config.bannedcards=get.config('bannedcards')||[]; + lib.config.banned=lib.config[lib.config.mode+'_banned']||[]; + lib.config.bannedcards=lib.config[lib.config.mode+'_bannedcards']||[]; lib.rank=window.characterRank; delete window.characterRank; @@ -4418,14 +4418,14 @@ character[i][j][k][4].contains('hiddenboss')){ lib.config.forbidai.add(k); } - if(lib.config.banned.contains(k)&&lib.config.mode!='connect'){ - if(lib.config.mode=='chess'&&get.config('chess_mode')=='leader'){ - lib.hiddenCharacters.push(k); - } - else{ - continue; - } - } + // if(lib.config.banned.contains(k)&&lib.config.mode!='connect'){ + // if(lib.config.mode=='chess'&&get.config('chess_mode')=='leader'){ + // lib.hiddenCharacters.push(k); + // } + // else{ + // continue; + // } + // } for(var l=0;l
【'+translation+'】
'+lib.translate[skills[i]+'_info']+'
'); - } - } - var modepack=lib.characterPack['mode_'+get.mode()]; - if((node.parentNode.classList.contains('menu-buttons')||lib.config.show_favourite)&& - lib.character[node.link]&&(!modepack||!modepack[node.link])){ - var addFavourite=ui.create.div('.text.center'); - addFavourite.link=node.link; - addFavourite.style.marginBottom='15px'; - if(lib.config.favouriteCharacter.contains(node.link)){ - addFavourite.innerHTML='移除收藏'; } - else{ - addFavourite.innerHTML='添加收藏'; + var page=ui.create.div('.menu-buttons.configpopped',uiintro.content); + for(var i=0;i更改皮肤'); + var infoitem=lib.character[character]; + if(!infoitem){ + for(var itemx in lib.characterPack){ + if(lib.characterPack[itemx][character]){ + infoitem=lib.characterPack[itemx][character];break; + } + } + } + var skills=infoitem[3]; + for(i=0;i
【'+translation+'】
'+lib.translate[skills[i]+'_info']+'
'); + } + } + var modepack=lib.characterPack['mode_'+get.mode()]; + if((node.parentNode.classList.contains('menu-buttons')||lib.config.show_favourite)&& + lib.character[node.link]&&(!modepack||!modepack[node.link])){ + var addFavourite=ui.create.div('.text.center'); + addFavourite.link=node.link; + addFavourite.style.marginBottom='15px'; + if(lib.config.favouriteCharacter.contains(node.link)){ + addFavourite.innerHTML='移除收藏'; } - var buttons=ui.create.div('.buttons.smallzoom'); - for(var i=0;i<=num;i++){ - var button=ui.create.div('.button.character',buttons,function(){ - if(this._link){ - lib.config.skin[node.link]=this._link; - node.style.backgroundImage=this.style.backgroundImage; - game.saveConfig('skin',lib.config.skin); + else{ + addFavourite.innerHTML='添加收藏'; + } + addFavourite.listen(ui.click.favouriteCharacter) + uiintro.add(addFavourite); + } + else{ + uiintro.add(ui.create.div('.placeholder.slim')); + } + if(lib.config.change_skin||(lib.skin&&node.parentNode.classList.contains('menu-buttons'))){ + var num=1; + var introadded=false; + var createButtons=function(num){ + if(!num) return; + if(!introadded){ + introadded=true; + uiintro.add('
更改皮肤
'); + } + var buttons=ui.create.div('.buttons.smallzoom'); + for(var i=0;i<=num;i++){ + var button=ui.create.div('.button.character',buttons,function(){ + if(this._link){ + lib.config.skin[node.link]=this._link; + node.style.backgroundImage=this.style.backgroundImage; + game.saveConfig('skin',lib.config.skin); + } + else{ + delete lib.config.skin[node.link]; + node.setBackground(node.link,'character'); + game.saveConfig('skin',lib.config.skin); + } + }); + button._link=i; + if(i){ + button.setBackgroundImage('image/skin/'+node.link+'/'+i+'.jpg'); } else{ - delete lib.config.skin[node.link]; - node.setBackground(node.link,'character'); - game.saveConfig('skin',lib.config.skin); + button.setBackgroundImage('image/character/'+node.link+'.jpg'); } - }); - button._link=i; - if(i){ - button.setBackgroundImage('image/skin/'+node.link+'/'+i+'.jpg'); } + uiintro.add(buttons); + }; + var loadImage=function(){ + var img=new Image(); + img.onload=function(){ + num++; + loadImage(); + } + img.onerror=function(){ + num--; + createButtons(num); + } + img.src=lib.assetURL+'image/skin/'+node.link+'/'+num+'.jpg'; + } + if(lib.config.change_skin){ + if(!node.classList.contains('unseen')){ + loadImage(); + } else{ - button.setBackgroundImage('image/character/'+node.link+'.jpg'); + loadImage(true); } } - uiintro.add(buttons); - }; - var loadImage=function(){ - var img=new Image(); - img.onload=function(){ - num++; - loadImage(); - } - img.onerror=function(){ - num--; - createButtons(num); - } - img.src=lib.assetURL+'image/skin/'+node.link+'/'+num+'.jpg'; - } - if(lib.config.change_skin){ - if(!node.classList.contains('unseen')){ - loadImage(); - } - else{ - loadImage(true); + else{ + createButtons(lib.skin[node.link]); } - } - else{ - createButtons(lib.skin[node.link]); - } - } + } + } } else if(node.classList.contains('identity')&&node.dataset.career){ var career=node.dataset.career; diff --git a/game/update.js b/game/update.js index c3e6bca31..65ab597c2 100644 --- a/game/update.js +++ b/game/update.js @@ -3,7 +3,7 @@ window.noname_update={ update:'1.9.6.5', changeLog:[ 'bug修复', - '牌堆设置改进(旧版牌堆设置将被清除)', + '禁将设置改进(旧设置将被清除)', ], files:[ 'game/game.js', @@ -16,7 +16,7 @@ window.noname_update={ 'card/gujian.js', // 'card/sp.js', // 'card/guozhan.js', - // 'character/rank.js', + 'character/rank.js', // 'character/extra.js', 'character/ow.js', // 'character/hearth.js', @@ -28,12 +28,12 @@ window.noname_update={ // 'character/yxs.js', 'character/yijiang.js', // 'mode/boss.js', - // 'mode/versus.js', - // 'mode/guozhan.js', - // 'mode/identity.js', + 'mode/versus.js', + 'mode/guozhan.js', + 'mode/identity.js', // 'mode/stone.js', // 'theme/simple/style.css', - // 'layout/default/layout.css', + 'layout/default/layout.css', // 'layout/long/layout.css', // 'layout/long2/layout.css', // 'layout/mobile/layout.css', diff --git a/layout/default/layout.css b/layout/default/layout.css index a4a856d55..25a57fa72 100644 --- a/layout/default/layout.css +++ b/layout/default/layout.css @@ -1007,6 +1007,8 @@ margin-bottom: 5px; .config>div>div{position: relative;padding-right: 10px;height:20px} .dialog>.content>.config{width:300px;left:calc(50% - 150px);} .toggle{right: 16px;left: auto !important;min-width: 16px;text-align: right !important;} +.menu-buttons.configpopped{margin-top: 10px} +.menu-buttons.configpopped>.toggle{text-align: left !important;margin-left: 21px !important;width: calc(100% - 15px) !important;overflow: visible;} .switcher{width: 88%;position: relative;} .dialog.popped .caption{transition: all 0s;} .caption{padding-top: 8px;font-size: 20px;display: block;} diff --git a/mode/guozhan.js b/mode/guozhan.js index c9e39584e..59bc08fa5 100644 --- a/mode/guozhan.js +++ b/mode/guozhan.js @@ -199,7 +199,11 @@ mode.guozhan={ uiintro.add('
珠联璧合:'+(lib.configOL.zhulian?'开启':'关闭')); uiintro.add('
出牌时限:'+lib.configOL.choose_timeout+'秒'); uiintro.add('
屏蔽弱将:'+(lib.configOL.ban_weak?'开启':'关闭')); - uiintro.add('
屏蔽强将:'+(lib.configOL.ban_strong?'开启':'关闭')).style.paddingBottom='8px'; + var last=uiintro.add('
屏蔽强将:'+(lib.configOL.ban_strong?'开启':'关闭')); + if(lib.configOL.banned.length){ + last=uiintro.add('
禁用武将:'+get.translation(lib.configOL.banned)); + } + last.style.paddingBottom='8px'; }, addRecord:function(bool){ if(typeof bool=='boolean'){ diff --git a/mode/identity.js b/mode/identity.js index e0097ad9a..d5a4f1ef4 100644 --- a/mode/identity.js +++ b/mode/identity.js @@ -308,7 +308,11 @@ mode.identity={ } uiintro.add('
出牌时限:'+lib.configOL.choose_timeout+'秒'); uiintro.add('
屏蔽弱将:'+(lib.configOL.ban_weak?'开启':'关闭')); - uiintro.add('
屏蔽强将:'+(lib.configOL.ban_strong?'开启':'关闭')).style.paddingBottom='8px'; + var last=uiintro.add('
屏蔽强将:'+(lib.configOL.ban_strong?'开启':'关闭')); + if(lib.configOL.banned.length){ + last=uiintro.add('
禁用武将:'+get.translation(lib.configOL.banned)); + } + last.style.paddingBottom='8px'; }, getIdentityList:function(player){ if(player.identityShown) return; diff --git a/mode/versus.js b/mode/versus.js index 47c1325da..35cb7e14c 100644 --- a/mode/versus.js +++ b/mode/versus.js @@ -399,7 +399,11 @@ mode.versus={ } uiintro.add('
出牌时限:'+lib.configOL.choose_timeout+'秒'); uiintro.add('
屏蔽弱将:'+(lib.configOL.ban_weak?'开启':'关闭')); - uiintro.add('
屏蔽强将:'+(lib.configOL.ban_strong?'开启':'关闭')).style.paddingBottom='8px'; + var last=uiintro.add('
屏蔽强将:'+(lib.configOL.ban_strong?'开启':'关闭')); + if(lib.configOL.banned.length){ + last=uiintro.add('
禁用武将:'+get.translation(lib.configOL.banned)); + } + last.style.paddingBottom='8px'; }, getVideoName:function(){ var str=get.translation(game.me.name);