From 314a9006a96d2230ce69541d0b7c658090d99c11 Mon Sep 17 00:00:00 2001 From: libccy Date: Thu, 7 May 2015 12:48:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=A7bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- card/qimou.js | 3 +++ game/game.js | 51 ++++++++++++++++++++++++++++----------- layout/default/fold.css | 12 ++++----- layout/default/fold2.css | 18 +++++++------- layout/default/layout.css | 28 +-------------------- layout/mode/stone.css | 25 +++++++++++++++++++ mode/stone.js | 1 + mode/versus.js | 5 +--- 8 files changed, 83 insertions(+), 60 deletions(-) create mode 100644 layout/mode/stone.css diff --git a/card/qimou.js b/card/qimou.js index a7e71f1e5..4492203e8 100644 --- a/card/qimou.js +++ b/card/qimou.js @@ -236,6 +236,9 @@ card.qimou={ } "step 1" if(targets[1].num('h')){ + if(_status.auto&&targets[1]==game.me){ + game.delay(); + } targets[1].chooseCard(true,event.num,'选择'+get.cnNumber(event.num)+'张手牌还给'+get.translation(targets[0])).ai=ai.get.disvalue; } else{ diff --git a/game/game.js b/game/game.js index da0b297a0..423219fde 100644 --- a/game/game.js +++ b/game/game.js @@ -2196,10 +2196,7 @@ window.play={}; } this.node.equips.dataset.number=this.num('e'); if(this==game.me){ - this.node.handcards1.dataset.number=Math.min(6,this.node.handcards1.childNodes.length- - this.node.handcards1.getElementsByClassName('removing').length)-1; - this.node.handcards2.dataset.number=Math.min(6,this.node.handcards2.childNodes.length- - this.node.handcards2.getElementsByClassName('removing').length)-1; + ui.updateh(); } if(this.updates){ for(var i=0;i=width){ + node.dataset.fold=3; + } + else if(num*93+25>=width){ + node.dataset.fold=2; + } + else if(num*112+6>=width){ + node.dataset.fold=1; + } + else{ + node.dataset.fold=0; + } + }, update:function(){ for(var i=0;i[data-number='3']>.card:not(.selected){margin-right: -15px;} -#me>[data-number='4']>.card:not(.selected){margin-right: -30px;} -#me>[data-number='5']>.card:not(.selected){margin-right: -45px;} +#me>[data-fold='1']>.card:not(.selected){margin-right: -15px;} +#me>[data-fold='2']>.card:not(.selected){margin-right: -30px;} +#me>[data-fold='3']>.card:not(.selected){margin-right: -45px;} -#me>[data-number='3']>.card:not(.selected):hover, -#me>[data-number='4']>.card:not(.selected):hover, -#me>[data-number='5']>.card:not(.selected):hover{margin-right: 0;} +#me>[data-fold='1']>.card:not(.selected):hover, +#me>[data-fold='2']>.card:not(.selected):hover, +#me>[data-fold='3']>.card:not(.selected):hover{margin-right: 0;} #me>div>.card:last-child{margin-right: 0 !important;} #me>div>.card.last{margin-right: 0 !important;} diff --git a/layout/default/fold2.css b/layout/default/fold2.css index 84e6efb35..09ebd0a9e 100644 --- a/layout/default/fold2.css +++ b/layout/default/fold2.css @@ -1,14 +1,14 @@ -#me>[data-number='3']>.card:not(.selected){margin-right: -30px;-webkit-transform:perspective(1000px) rotateY(30deg);} -#me>[data-number='4']>.card:not(.selected){margin-right: -38px;-webkit-transform:perspective(1000px) rotateY(38deg);} -#me>[data-number='5']>.card:not(.selected){margin-right: -45px;-webkit-transform:perspective(1000px) rotateY(45deg);} +#me>[data-fold='1']>.card:not(.selected){margin-right: -30px;-webkit-transform:perspective(1000px) rotateY(30deg);} +#me>[data-fold='2']>.card:not(.selected){margin-right: -38px;-webkit-transform:perspective(1000px) rotateY(38deg);} +#me>[data-fold='3']>.card:not(.selected){margin-right: -45px;-webkit-transform:perspective(1000px) rotateY(45deg);} -#me>[data-number='3']>.card:not(.selected):hover, -#me>[data-number='4']>.card:not(.selected):hover, -#me>[data-number='5']>.card:not(.selected):hover{margin-right: -8px;-webkit-transform:perspective(1000px) rotateY(0);} +#me>[data-fold='1']>.card:not(.selected):hover, +#me>[data-fold='2']>.card:not(.selected):hover, +#me>[data-fold='3']>.card:not(.selected):hover{margin-right: -8px;-webkit-transform:perspective(1000px) rotateY(0);} -#me>[data-number='3']>.card.start, -#me>[data-number='4']>.card.start, -#me>[data-number='5']>.card.start{-webkit-transform:none;} +#me>[data-fold='1']>.card.start, +#me>[data-fold='2']>.card.start, +#me>[data-fold='3']>.card.start{-webkit-transform:none;} #me>div>.card:last-child{margin-right: -8px;} #me>div>.card.last{margin-right: -8px;} diff --git a/layout/default/layout.css b/layout/default/layout.css index 862a1536d..12b91110b 100644 --- a/layout/default/layout.css +++ b/layout/default/layout.css @@ -69,7 +69,7 @@ body>.background{z-index:-2} .background,.button,.avatar,.avatar2{transition-property: top,box-shadow,opacity,-webkit-transform;transition-duration:0.5s;} .intro{width: 20px;height: 20px;} /*--------卡牌--------*/ -.card{width: 104px;height: 104px;margin-top:8px;margin-left:8px;margin-right: 8px;position: relative;overflow: hidden;} +.card{width: 104px;height: 104px;margin-top:8px;margin-left:4px;margin-right: 4px;position: relative;overflow: hidden;} .card>.info{right: 6px;top: 9px;white-space: nowrap;} .card>.name{top:9px;left: 6px;text-align: center;} .card>.name2{display:none;} @@ -273,32 +273,6 @@ margin-bottom: 5px; .linked>.count{right: 154px;} .acted>.identity{-webkit-transform:rotate(180deg);} -/*--------位置(炉石)------*/ -#arena.stone>.player.minskin[data-position='4']{top:calc(100% - 305px);left:calc(100% - 120px);} -#arena.stone>.card[data-position='4']{top:calc(100% - 297px);left:calc(100% - 112px);} -#arena.stone>.popup[data-position='4']{top:calc(100% - 340px);left:calc(100% - 112px);} -#arena.stone>.player.minskin[data-position='6']{top:calc(100% - 305px);left:calc(100% - 260px);} -#arena.stone>.card[data-position='6']{top:calc(100% - 297px);left:calc(100% - 252px);} -#arena.stone>.popup[data-position='6']{top:calc(100% - 340px);left:calc(100% - 252px);} -#arena.stone>.player.minskin[data-position='7']{top:calc(100% - 305px);left:140px;} -#arena.stone>.card[data-position='7']{top:calc(100% - 297px);left:148px;} -#arena.stone>.popup[data-position='7']{top:calc(100% - 340px);left:148px;} -#arena.stone>.player.minskin[data-position='5']{top:calc(100% - 305px);left:0;} -#arena.stone>.card[data-position='5']{top:calc(100% - 297px);left:8px;} -#arena.stone>.popup[data-position='5']{top:calc(100% - 340px);left:8px;} - -#arena>.player.minskin[data-position='9']{top:30px;left:calc(100% - 120px);} -#arena.stone>.card[data-position='9']{top:38px;left:calc(100% - 112px);} -#arena.stone>.popup[data-position='9']{top:160px;left:calc(100% - 112px);} -#arena>.player.minskin[data-position='11']{top:10px;left:calc(100% - 260px);} -#arena.stone>.card[data-position='11']{top:18px;left:calc(100% - 252px);} -#arena.stone>.popup[data-position='11']{top:140px;left:calc(100% - 252px);} -#arena>.player.minskin[data-position='10']{top:10px;left:140px;} -#arena.stone>.card[data-position='10']{top:18px;left:148px;} -#arena.stone>.popup[data-position='10']{top:140px;left:148px;} -#arena>.player.minskin[data-position='8']{top:30px;left:0;} -#arena.stone>.card[data-position='8']{top:38px;left:8px;} -#arena.stone>.popup[data-position='8']{top:160px;left:8px;} /*--------位置(8人)------*/ [data-number='8']>.player[data-position='1']{top:calc(200% / 3 - 90px);left:calc(100% - 240px);} [data-number='8']>.player[data-position='2']{top:calc(100% / 3 - 40px);left:calc(100% - 240px);} diff --git a/layout/mode/stone.css b/layout/mode/stone.css new file mode 100644 index 000000000..40b4894a6 --- /dev/null +++ b/layout/mode/stone.css @@ -0,0 +1,25 @@ +#arena.stone>.player.minskin[data-position='4']{top:calc(100% - 305px);left:calc(100% - 120px);} +#arena.stone>.card[data-position='4']{top:calc(100% - 297px);left:calc(100% - 112px);} +#arena.stone>.popup[data-position='4']{top:calc(100% - 340px);left:calc(100% - 112px);} +#arena.stone>.player.minskin[data-position='6']{top:calc(100% - 305px);left:calc(100% - 260px);} +#arena.stone>.card[data-position='6']{top:calc(100% - 297px);left:calc(100% - 252px);} +#arena.stone>.popup[data-position='6']{top:calc(100% - 340px);left:calc(100% - 252px);} +#arena.stone>.player.minskin[data-position='7']{top:calc(100% - 305px);left:140px;} +#arena.stone>.card[data-position='7']{top:calc(100% - 297px);left:148px;} +#arena.stone>.popup[data-position='7']{top:calc(100% - 340px);left:148px;} +#arena.stone>.player.minskin[data-position='5']{top:calc(100% - 305px);left:0;} +#arena.stone>.card[data-position='5']{top:calc(100% - 297px);left:8px;} +#arena.stone>.popup[data-position='5']{top:calc(100% - 340px);left:8px;} + +#arena.stone>.player.minskin[data-position='9']{top:30px;left:calc(100% - 120px);} +#arena.stone>.card[data-position='9']{top:38px;left:calc(100% - 112px);} +#arena.stone>.popup[data-position='9']{top:160px;left:calc(100% - 112px);} +#arena.stone>.player.minskin[data-position='11']{top:10px;left:calc(100% - 260px);} +#arena.stone>.card[data-position='11']{top:18px;left:calc(100% - 252px);} +#arena.stone>.popup[data-position='11']{top:140px;left:calc(100% - 252px);} +#arena.stone>.player.minskin[data-position='10']{top:10px;left:140px;} +#arena.stone>.card[data-position='10']{top:18px;left:148px;} +#arena.stone>.popup[data-position='10']{top:140px;left:148px;} +#arena.stone>.player.minskin[data-position='8']{top:30px;left:0;} +#arena.stone>.card[data-position='8']{top:38px;left:8px;} +#arena.stone>.popup[data-position='8']{top:160px;left:8px;} diff --git a/mode/stone.js b/mode/stone.js index 9f3efeaf5..4828bd66f 100644 --- a/mode/stone.js +++ b/mode/stone.js @@ -284,6 +284,7 @@ mode.stone={ var next=game.createEvent('game',false); next.content=function(){ "step 0" + lib.init.css('layout/mode/','stone'); game.initStone(); game.prepareArena(2); ui.arena.classList.add('stone'); diff --git a/mode/versus.js b/mode/versus.js index d57613f72..62b1b4a45 100644 --- a/mode/versus.js +++ b/mode/versus.js @@ -1011,8 +1011,5 @@ mode.versus={ }, } }, - config:{ - change_choice:true, - ban_weak:true, - } + config:['change_choice','ban_weak'] }