diff --git a/card/extra.js b/card/extra.js index 8c8c01ed4..6d57653fe 100755 --- a/card/extra.js +++ b/card/extra.js @@ -14,7 +14,12 @@ card.extra={ return target==player; }, content:function(){ - if(target==_status.dying) target.recover(); + if(target==_status.dying){ + target.recover(); + if(_status.currentPhase==target){ + target.getStat().card.jiu--; + } + } else{ target.addSkill('jiu'); if(!player.node.jiu&&lib.config.jiu_effect){ diff --git a/character/refresh.js b/character/refresh.js index 3436f8ded..809711040 100755 --- a/character/refresh.js +++ b/character/refresh.js @@ -756,6 +756,7 @@ character.refresh={ trigger:{global:'phaseAfter'}, forced:true, mark:true, + audio:false, content:function(){ delete player.disabledSkills.yijue; player.removeSkill('yijue2'); diff --git a/character/woods.js b/character/woods.js index b5aa9e226..141c57499 100755 --- a/character/woods.js +++ b/character/woods.js @@ -372,12 +372,16 @@ character.woods={ }, multitarget:true, content:function(){ - var cards0=targets[0].get('h'); - var cards1=targets[1].get('h'); - targets[0].gain(cards1); - targets[1].gain(cards0); - targets[0].$give(cards0.length,targets[1]); - targets[1].$give(cards1.length,targets[0]); + 'step 0' + event.cards0=targets[0].get('h'); + event.cards1=targets[1].get('h'); + targets[0].lose(event.cards0,ui.special); + targets[1].lose(event.cards1,ui.special); + 'step 1' + targets[0].gain(event.cards1); + targets[1].gain(event.cards0); + targets[0].$give(event.cards0.length,targets[1]); + targets[1].$give(event.cards1.length,targets[0]); }, check:function(card){ var list=[],player=_status.event.player; diff --git a/game/game.js b/game/game.js index 33066a0bf..010ed2aef 100755 --- a/game/game.js +++ b/game/game.js @@ -37,6 +37,9 @@ if(node._onEndMoveDelete){ node.moveDelete(node._onEndMoveDelete); } + else if(node._onEndDelete){ + node.delete(); + } node._transitionEnded=true; }); } @@ -75,9 +78,18 @@ game.saveConfig('low_performance',bool); if(bool){ ui.arena.classList.add('low_performance'); + ui.updatehl(); } else{ ui.arena.classList.remove('low_performance'); + var hs=ui.me.querySelectorAll('.handcards>.card'); + for(var i=0;i0){ @@ -5309,7 +5324,7 @@ this.node.handcards2.appendChild(cards[i]); } } - ui.updatehl(this); + if(this==game.me) ui.updatehl(); if(!_status.video){ game.addVideo('directgain',this,get.cardsInfo(cards)); this.update(); @@ -6092,8 +6107,8 @@ } return null; }, - $draw:function(num,init){ - // if(lib.config.low_performance){ + $draw:function(num,init,config){ + // if(lib.config.low_performance&&lib.config.mode!='chess'){ // this.$gain(num,false,init); // return; // } @@ -6123,15 +6138,51 @@ } node.fixed=true; node.hide(); - // node.dataset.position=this.dataset.position; + node.style.left='calc(50% - 52px)'; node.style.top='calc(50% - 52px)'; + this.parentNode.appendChild(node); - node.style.transitionDuration='1s'; + if(!lib.config.low_performance){ + node.style.transitionDuration='1s'; + } + else{ + node.style.transitionDuration='0.8s'; + } ui.refresh(node); var dx=this.offsetLeft+this.offsetWidth/2-52-node.offsetLeft; var dy=this.offsetTop+this.offsetHeight/2-52-node.offsetTop; + var num3; + if(lib.config.low_performance&&typeof num=='number'&&init!==false){ + config={ + total:num, + current:1 + } + } + if(config&&config.total>1){ + var total=config.total,current=config.current; + var dxtotal; + if(total<=5){ + dxtotal=Math.min(80,(total-1)*20); + dx+=-dxtotal+2*dxtotal*(current-1)/(total-1) + } + else{ + var total2=Math.floor(total/2); + if(current<=total2){ + total=total2; + dy-=20; + } + else{ + current-=total2; + total-=total2; + dy+=20; + } + dxtotal=Math.min(80,(total-1)*20); + dx+=-dxtotal+2*dxtotal*(current-1)/(total-1) + } + config.current++; + } if(node.style.transform&&node.style.transform!='none'&&node.style.transform.indexOf('translate')==-1){ node.style.transform+=' translate('+dx+'px,'+dy+'px)'; } @@ -6140,20 +6191,37 @@ } node.show(); - setTimeout(function(){ - node.style.transitionDuration='0.5s'; + node.addEventListener('webkitTransitionEnd',function(){ node.delete(); - },700); + }); + if(!lib.config.low_performance){ + setTimeout(function(){ + node.style.transitionDuration='0.5s'; + node.hide(); + },700); + } var that=this; if(num&&num>1){ - setTimeout(function(){ - if(cards){ - that.$draw(cards,false) - } - else{ - that.$draw(num-1,false) - } - },200); + if(config&&config.total>1){ + setTimeout(function(){ + if(cards){ + that.$draw(cards,false,config) + } + else{ + that.$draw(num-1,false,config) + } + },50) + } + else{ + setTimeout(function(){ + if(cards){ + that.$draw(cards,false,config) + } + else{ + that.$draw(num-1,false,config) + } + },200); + } } }, $compare:function(card1,target,card2){ @@ -6563,9 +6631,7 @@ // node.style.left='calc(50% - 52px '+((Math.random()-0.5<0)?'+':'-')+' '+Math.random()*100+'px)'; // node.style.top='calc(50% - 52px '+((Math.random()-0.5<0)?'+':'-')+' '+Math.random()*80+'px)'; - setTimeout(function(){ - // node.removeAttribute('style'); - // node.dataset.position=player.dataset.position; + node.addEventListener('webkitTransitionEnd',function(){ var dx=player.offsetLeft+player.offsetWidth/2-52-node.offsetLeft; var dy=player.offsetTop+player.offsetHeight/2-52-node.offsetTop; if(node.style.transform&&node.style.transform!='none'&&node.style.transform.indexOf('translate')==-1){ @@ -6576,7 +6642,21 @@ } node.delete(); - },700); + }); + // setTimeout(function(){ + // // node.removeAttribute('style'); + // // node.dataset.position=player.dataset.position; + // var dx=player.offsetLeft+player.offsetWidth/2-52-node.offsetLeft; + // var dy=player.offsetTop+player.offsetHeight/2-52-node.offsetTop; + // if(node.style.transform&&node.style.transform!='none'&&node.style.transform.indexOf('translate')==-1){ + // node.style.transform+=' translate('+dx+'px,'+dy+'px)'; + // } + // else{ + // node.style.transform='translate('+dx+'px,'+dy+'px)'; + // } + // + // node.delete(); + // },700); } } }, @@ -6592,7 +6672,7 @@ break; } } - game.print(card.name) + // game.print(card.name,card.timeout,card.className) if(!equipped){ player.node.equips.appendChild(card); } @@ -7149,6 +7229,7 @@ node.classList.remove('selectable'); node.classList.remove('selected'); node.classList.remove('removing'); + node.classList.remove('drawinghidden'); node.node={ name:node.querySelector('.name'), info:node.querySelector('.info'), @@ -7520,11 +7601,9 @@ } } if(!nc){ - var width=that.offsetWidth; - that.style.marginLeft=(-width/2)+'px'; - that.style.marginRight=(-width/2)+'px'; - that.animate('removing2'); + that.style.transform='scale(0.8)'; } + ui.updatec(); },100); @@ -7548,14 +7627,11 @@ if(this.childNodes.length){ var width=0; for(i=0;i0){ + width+=6; + } + } + if(!controls.length) return; + var offset=-length/2; + var control=controls.shift(); + control.style.transform='translateX('+offset+'px)'; + while(controls.length){ + var control=controls.shift(); + var width=widths.shift(); + offset+=width+6; + control.style.transform='translateX('+offset+'px)'; + } + }, updatex:function(){ ui.update.apply(this,arguments); ui.updateh(true); }, - updatehl:function(player){ + updatehl:function(){ + if(!game.me) return; if(!lib.config.low_performance) return; - if(player!=game.me) return; var hs1=[],hs2=[]; - for(var i=0;i.fold1>.card:not(.selected){margin-right: -15px;} -#arena:not(.low_performance) #me>.fold2>.card:not(.selected){margin-right: -30px;} -#arena:not(.low_performance) #me>.fold3>.card:not(.selected){margin-right: -45px;} +#arena:not(.low_performance) #me>div>.fold1>.card:not(.selected){margin-right: -15px;} +#arena:not(.low_performance) #me>div>.fold2>.card:not(.selected){margin-right: -30px;} +#arena:not(.low_performance) #me>div>.fold3>.card:not(.selected){margin-right: -45px;} -#arena:not(.low_performance) #me>.fold1>.card:not(.selected):hover, -#arena:not(.low_performance) #me>.fold2>.card:not(.selected):hover, -#arena:not(.low_performance) #me>.fold3>.card:not(.selected):hover{margin-right: 0;} +#arena:not(.low_performance) #me>div>.fold1>.card:not(.selected):hover, +#arena:not(.low_performance) #me>div>.fold2>.card:not(.selected):hover, +#arena:not(.low_performance) #me>div>.fold3>.card:not(.selected):hover{margin-right: 0;} -#arena:not(.low_performance) #me>div>.card:last-child{margin-right: 0 !important;} -#arena:not(.low_performance) #me>div>.card.last{margin-right: 0 !important;} -#arena:not(.low_performance) #me>div>.card.removing{margin-right: -52px !important;} +#arena:not(.low_performance) #me>div>div>.card:last-child{margin-right: 0 !important;} +#arena:not(.low_performance) #me>div>div>.card.last{margin-right: 0 !important;} +#arena:not(.low_performance) #me>div>div>.card.removing{margin-right: -52px !important;} diff --git a/layout/default/fold2.css b/layout/default/fold2.css index c0f13a8d7..f8c452796 100755 --- a/layout/default/fold2.css +++ b/layout/default/fold2.css @@ -1,15 +1,15 @@ -#me>.fold1>.card:not(.selected){margin-right: -30px;transform:perspective(1000px) rotateY(30deg);} -#me>.fold2>.card:not(.selected){margin-right: -38px;transform:perspective(1000px) rotateY(38deg);} -#me>.fold3>.card:not(.selected){margin-right: -45px;transform:perspective(1000px) rotateY(45deg);} +#me>div>.fold1>.card:not(.selected){margin-right: -30px;transform:perspective(1000px) rotateY(30deg);} +#me>div>.fold2>.card:not(.selected){margin-right: -38px;transform:perspective(1000px) rotateY(38deg);} +#me>div>.fold3>.card:not(.selected){margin-right: -45px;transform:perspective(1000px) rotateY(45deg);} -#me>.fold1>.card:not(.selected):hover, -#me>.fold2>.card:not(.selected):hover, -#me>.fold3>.card:not(.selected):hover{margin-right: -8px;transform:perspective(1000px) rotateY(0);} +#me>div>.fold1>.card:not(.selected):hover, +#me>div>.fold2>.card:not(.selected):hover, +#me>div>.fold3>.card:not(.selected):hover{margin-right: -8px;transform:perspective(1000px) rotateY(0);} -#me>.fold1>.card.start, -#me>.fold2>.card.start, -#me>.fold3>.card.start{transform:none;} +#me>div>.fold1>.card.start, +#me>div>.fold2>.card.start, +#me>div>.fold3>.card.start{transform:none;} -#me>div>.card:last-child{margin-right: -8px;} -#me>div>.card.last{margin-right: -8px;} -#me>div>.card.removing{margin-right: -52px !important;} +#me>div>div>.card:last-child{margin-right: -8px;} +#me>div>div>.card.last{margin-right: -8px;} +#me>div>div>.card.removing{margin-right: -52px !important;} diff --git a/layout/default/layout.css b/layout/default/layout.css index 6d482634f..99d52ef0a 100755 --- a/layout/default/layout.css +++ b/layout/default/layout.css @@ -34,7 +34,7 @@ table{table-layout: fixed;} #arena.playerfocus #chess>div:not(.playerfocus):not(.removing){ opacity: 0.3 !important; } -#arena.low_performance #me>div>.card{ +#arena.low_performance #me>div>div>.card{ position: absolute; left:8px; } @@ -52,6 +52,22 @@ table{table-layout: fixed;} #handcards1,#handcards2{white-space:nowrap;overflow-x: scroll;overflow-y:hidden;display: block;text-align: center;} #handcards1{left: 0;top:calc(100% - 140px);} #handcards2{left: calc(50% + 120px);top:calc(100% - 140px);} +#arena #handcards1>div, +#arena #handcards2>div{ + height: 100%; + position: relative; + margin-right: 15px; + margin-left: -7px; +} +#arena.low_performance #handcards1, +#arena.low_performance #handcards2{ + text-align: left; +} +#arena.low_performance #handcards1>div, +#arena.low_performance #handcards2>div{ + margin-left: 2px; + margin-right: 10px; +} #arena.single-handcard #handcards1{width: 100%;} #arena.single-handcard #handcards2{display: none;} #system{padding: 6px;width: calc(100% - 12px);white-space: nowrap;z-index: 3;pointer-events: none} @@ -184,6 +200,7 @@ body>.background{z-index:-2} .card.center{top:calc(50% - 52px);left:calc(50% - 52px);} .card>.background{font-size: 80px;height: 80px;padding-top: 14px;text-align: center;} .equips>.card>.background{font-size: 36px;height: 36px;padding-top: 3px;} +#arena.low_performance .player .equips{transition: all 0s} .judges>.card>.background,.marks>.card>.background{font-size: 20px;height: 20px;padding-top: 3px;} .button.card>.background{font-size: 68px;height: 68px;padding-top: 12px;} .card>.background{font-family:'xiaozhuan'} @@ -277,11 +294,16 @@ margin-bottom: 5px; /*--------确认--------*/ #control{text-align: center;z-index: 5;top: calc(200% / 3);left: calc(5% + 240px);width: calc(90% - 480px);pointer-events: none} #control>*{pointer-events: auto;} -.control{padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;margin-left: 4px;margin-right: 4px;} -.control{font-size: 18px;white-space: nowrap;position: relative;overflow: hidden;opacity:0} +#control.nozoom>div{transition-property: opacity} +.control{padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;} +.control{font-size: 18px;white-space: nowrap;overflow: hidden;opacity:0} /*.control:not(.nozoom){width:0}*/ -.control.removing.removing2{transform: scale(0.8)} -.control>div{position: relative;padding: 3px;} +.control.removing.removing2{transform: scale(0.2)} +.control>div{position: relative;padding: 3px;margin: 0} +#control>div{ + position: absolute; + left: 50%; +} /*--------角色--------*/ .player>.avatar>.action{ margin: 5px; @@ -582,16 +604,16 @@ margin-bottom: 5px; animation: card_judgestart 1s; -webkit-animation: card_judgestart 1s; } -#me>div>.card.start{ +#me>div>div>.card.start{ animation: card_start2 0.5s; -webkit-animation: card_start2 0.5s; } -.card.drawinghidden{ +#me>div>div>.card.drawinghidden{ opacity: 0; - transform: scale(0.8); + transform: scale(0.2) !important; } .card.removing{transform:scale(0);} -#me>div>.card.removing{margin-left: -52px;margin-right: -52px;} +#me>div>div>.card.removing{margin-left: -52px;margin-right: -52px;} .card.thrown.removing{width: 104px;height: 104px;transform:none} #sidebar.sidebar{ animation:sidebar 0.5s; diff --git a/manifest.json b/manifest.json index 149f2fd56..66cfc64de 100644 --- a/manifest.json +++ b/manifest.json @@ -1,28 +1,28 @@ { "name": "noname", - "xwalk_version": "1.5.7", + "xwalk_version": "1.5.8", "start_url": "index.html", "icons": [ { - "src": "image/meta/iconset/icon-256.png", + "src": "image/meta/iconset-android/icon-256.png", "sizes": "192x192", "type": "image/png", "density": "1.3" }, { - "src": "image/meta/iconset/icon-256.png", + "src": "image/meta/iconset-android/icon-256.png", "sizes": "144x144", "type": "image/png", "density": "1.8" }, { - "src": "image/meta/iconset/icon-256.png", + "src": "image/meta/iconset-android/icon-256.png", "sizes": "96x96", "type": "image/png", "density": "2.7" }, { - "src": "image/meta/iconset/icon-256.png", + "src": "image/meta/iconset-android/icon-256.png", "sizes": "72x72", "type": "image/png", "density": "3.6" diff --git a/mode/chess.js b/mode/chess.js index af05d4802..1387969bc 100755 --- a/mode/chess.js +++ b/mode/chess.js @@ -1137,8 +1137,8 @@ mode.chess={ ui.create.fakeme(); ui.handcards1=player.node.handcards1.animate('start').fix(); ui.handcards2=player.node.handcards2.animate('start').fix(); - ui.me.appendChild(ui.handcards1); - ui.me.appendChild(ui.handcards2); + ui.handcards1Container.appendChild(ui.handcards1); + ui.handcards2Container.appendChild(ui.handcards2); ui.updateh(true); game.setChessInfo(); game.addVideo('tafangMe',player); diff --git a/package.json b/package.json index 07769f381..e2baafcf7 100755 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { "name" : "无名杀", - "version" : "1.5.7", + "version" : "1.5.8", "main" : "main.js" } diff --git a/theme/music/style.css b/theme/music/style.css index cd1bed5f5..7a2b4b2bd 100755 --- a/theme/music/style.css +++ b/theme/music/style.css @@ -33,7 +33,7 @@ html{ text-shadow: black 0 0 2px; background: linear-gradient(#4b4b4b, #464646); } -#me>div>.card,#arena>.card:not(*:empty){ +#me>div>div>.card,#arena>.card:not(*:empty){ box-shadow: rgba(0, 0, 0, 0.2) 0 0 0 1px, rgba(0, 0, 0, 0.45) 0 3px 10px; } .fire{ diff --git a/theme/simple/style.css b/theme/simple/style.css index a44874c14..8977a2369 100755 --- a/theme/simple/style.css +++ b/theme/simple/style.css @@ -48,7 +48,7 @@ body{ background: url('card.png'); background-size:cover; } -#me>div>.card,#arena>.card:not(*:empty){ +#me>div>div>.card,#arena>.card:not(*:empty){ box-shadow: rgba(0, 0, 0, 0.2) 0 0 0 1px, rgba(0, 0, 0, 0.45) 0 3px 10px; } /*.player{