|
@ -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){
|
||||
|
|
|
@ -756,6 +756,7 @@ character.refresh={
|
|||
trigger:{global:'phaseAfter'},
|
||||
forced:true,
|
||||
mark:true,
|
||||
audio:false,
|
||||
content:function(){
|
||||
delete player.disabledSkills.yijue;
|
||||
player.removeSkill('yijue2');
|
||||
|
|
|
@ -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;
|
||||
|
|
295
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;i<hs.length;i++){
|
||||
hs[i].style.transform='';
|
||||
hs[i].classList.remove('drawinghidden');
|
||||
}
|
||||
ui.handcards1.style.width='';
|
||||
ui.handcards2.style.width='';
|
||||
ui.updateh(true);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -2064,6 +2076,7 @@
|
|||
game.saveConfig('totouched',true);
|
||||
if(totouch){
|
||||
game.saveConfig('touchscreen',true);
|
||||
game.saveConfig('low_performance',true);
|
||||
game.saveConfig('fold_card',false);
|
||||
game.reload();
|
||||
}
|
||||
|
@ -3500,7 +3513,7 @@
|
|||
if(!lib.config.low_performance){
|
||||
cards[num].animate('start');
|
||||
}
|
||||
else{
|
||||
else if(player==game.me){
|
||||
cards[num].classList.add('drawinghidden');
|
||||
}
|
||||
|
||||
|
@ -3520,7 +3533,7 @@
|
|||
player.node.handcards1.insertBefore(frag1,player.node.handcards1.firstChild);
|
||||
player.node.handcards2.insertBefore(frag2,player.node.handcards2.firstChild);
|
||||
player.update();
|
||||
ui.updatehl(player);
|
||||
if(player==game.me) ui.updatehl();
|
||||
},500);
|
||||
}
|
||||
else if(event.animate=='gain'){
|
||||
|
@ -3531,7 +3544,7 @@
|
|||
player.node.handcards1.insertBefore(frag1,player.node.handcards1.firstChild);
|
||||
player.node.handcards2.insertBefore(frag2,player.node.handcards2.firstChild);
|
||||
player.update();
|
||||
ui.updatehl(player);
|
||||
if(player==game.me) ui.updatehl();
|
||||
},700);
|
||||
}
|
||||
else if(event.animate=='gain2'||event.animate=='draw2'){
|
||||
|
@ -3542,7 +3555,7 @@
|
|||
player.node.handcards1.insertBefore(frag1,player.node.handcards1.firstChild);
|
||||
player.node.handcards2.insertBefore(frag2,player.node.handcards2.firstChild);
|
||||
player.update();
|
||||
ui.updatehl(player);
|
||||
if(player==game.me) ui.updatehl();
|
||||
},500);
|
||||
}
|
||||
else{
|
||||
|
@ -3550,7 +3563,7 @@
|
|||
player.node.handcards1.insertBefore(frag1,player.node.handcards1.firstChild);
|
||||
player.node.handcards2.insertBefore(frag2,player.node.handcards2.firstChild);
|
||||
player.update();
|
||||
ui.updatehl(player);
|
||||
if(player==game.me) ui.updatehl();
|
||||
}
|
||||
},
|
||||
lose:function(){
|
||||
|
@ -3566,7 +3579,7 @@
|
|||
cards[i].original='j';
|
||||
js.push(cards[i]);
|
||||
}
|
||||
else if(cards[i].parentNode.id=='handcards1'||cards[i].parentNode.id=='handcards2'){
|
||||
else if(cards[i].parentNode.classList.contains('handcards')){
|
||||
cards[i].original='h';
|
||||
hs.push(cards[i]);
|
||||
}
|
||||
|
@ -3575,7 +3588,7 @@
|
|||
}
|
||||
}
|
||||
if(lib.config.low_performance){
|
||||
cards[i].style.transform+=' scale(0.8)';
|
||||
cards[i].style.transform+=' scale(0.2)';
|
||||
}
|
||||
if(event.position){
|
||||
cards[i].goto(event.position);
|
||||
|
@ -3584,7 +3597,7 @@
|
|||
cards[i].delete();
|
||||
}
|
||||
}
|
||||
ui.updatehl(player);
|
||||
if(player==game.me) ui.updatehl();
|
||||
game.addVideo('lose',player,[get.cardsInfo(hs),get.cardsInfo(es),get.cardsInfo(js)]);
|
||||
player.update();
|
||||
game.addVideo('loseAfter',player);
|
||||
|
@ -3921,6 +3934,7 @@
|
|||
"step 1"
|
||||
card.fix();
|
||||
card.style.transform='';
|
||||
card.classList.remove('drawinghidden');
|
||||
if(player.isMin()){
|
||||
event.finish();
|
||||
ui.discardPile.appendChild(card);
|
||||
|
@ -3953,6 +3967,7 @@
|
|||
}
|
||||
cards[0].fix();
|
||||
cards[0].style.transform='';
|
||||
cards[0].classList.remove('drawinghidden');
|
||||
var viewAs=typeof card=='string'?card:card.name;
|
||||
if(!lib.card[viewAs]||!lib.card[viewAs].effect){
|
||||
ui.discardPile.appendChild(cards[0]);
|
||||
|
@ -5299,7 +5314,7 @@
|
|||
if(animate!==false&&!lib.config.low_performance){
|
||||
cards[i].animate('start');
|
||||
}
|
||||
else{
|
||||
else if(this==game.me){
|
||||
cards[i].classList.add('drawinghidden');
|
||||
}
|
||||
if(lib.isSingleHandcard()||sort>0){
|
||||
|
@ -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;i<this.childNodes.length;i++) width+=this.childNodes[i].offsetWidth;
|
||||
this.style.transition='width 0.2s';
|
||||
ui.refresh(this);
|
||||
this.style.width=width+'px';
|
||||
var that=this;
|
||||
setTimeout(function(){
|
||||
that.style.transition='';
|
||||
},200);
|
||||
}
|
||||
ui.updatec();
|
||||
return this;
|
||||
}
|
||||
},
|
||||
|
@ -8126,7 +8202,7 @@
|
|||
if(nodes[i]==ui.me) continue;
|
||||
nodes[i].remove();
|
||||
}
|
||||
ui.me.innerHTML='';
|
||||
// ui.me.f.innerHTML='';
|
||||
ui.sidebar.innerHTML='';
|
||||
ui.cardPile.innerHTML='';
|
||||
ui.discardPile.innerHTML='';
|
||||
|
@ -8245,8 +8321,8 @@
|
|||
game.me=game.players[0];
|
||||
ui.handcards1=game.me.node.handcards1;
|
||||
ui.handcards2=game.me.node.handcards2;
|
||||
ui.me.appendChild(ui.handcards1);
|
||||
ui.me.appendChild(ui.handcards2);
|
||||
ui.handcards1Container.appendChild(ui.handcards1);
|
||||
ui.handcards2Container.appendChild(ui.handcards2);
|
||||
if(lib.config.mode=='versus'){
|
||||
if(players.bool){
|
||||
ui.arena.dataset.number=parseInt(ui.arena.dataset.number)+1;
|
||||
|
@ -8796,8 +8872,8 @@
|
|||
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();
|
||||
}
|
||||
|
@ -8884,13 +8960,24 @@
|
|||
var cards1=get.infoCards(cards12[0]);
|
||||
var cards2=get.infoCards(cards12[1]);
|
||||
for(var i=0;i<cards1.length;i++){
|
||||
cards1[i].animate('start');
|
||||
if(lib.config.low_performance){
|
||||
cards1[i].classList.add('drawinghidden');
|
||||
}
|
||||
else{
|
||||
cards1[i].animate('start');
|
||||
}
|
||||
player.node.handcards1.insertBefore(cards1[i],player.node.handcards1.firstChild);
|
||||
}
|
||||
for(var i=0;i<cards2.length;i++){
|
||||
cards2[i].animate('start');
|
||||
if(lib.config.low_performance){
|
||||
cards2[i].classList.add('drawinghidden');
|
||||
}
|
||||
else{
|
||||
cards2[i].animate('start');
|
||||
}
|
||||
player.node.handcards2.insertBefore(cards2[i],player.node.handcards2.firstChild);
|
||||
}
|
||||
ui.updatehl();
|
||||
}
|
||||
else{
|
||||
console.log(player);
|
||||
|
@ -9131,8 +9218,8 @@
|
|||
game.me=player;
|
||||
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);
|
||||
if(lib.config.mode=='chess'){
|
||||
|
@ -9167,8 +9254,8 @@
|
|||
game.me=player;
|
||||
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);
|
||||
|
||||
|
@ -10442,8 +10529,8 @@
|
|||
game.me=player;
|
||||
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);
|
||||
}
|
||||
|
@ -10474,8 +10561,8 @@
|
|||
game.me=player;
|
||||
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.addVideo('swapControl',player,get.cardsInfo(player.get('h')));
|
||||
|
||||
|
@ -11406,26 +11493,20 @@
|
|||
control.classList.add('nozoom');
|
||||
}
|
||||
if(control.childNodes.length){
|
||||
control.style.transition='all 0s';
|
||||
var width=control.offsetWidth;
|
||||
control.style.marginLeft=(-width/2)+'px';
|
||||
control.style.marginRight=(-width/2)+'px';
|
||||
control.style.transform='scale(0.8)';
|
||||
ui.refresh(control);
|
||||
if(nozoom){
|
||||
control.style.transition='opacity 0.5s';
|
||||
}
|
||||
else{
|
||||
control.style.transition='';
|
||||
control.style.transform='scale(0.8)';
|
||||
}
|
||||
ui.refresh(control);
|
||||
control.style.marginLeft='';
|
||||
control.style.marginRight='';
|
||||
control.style.transform='';
|
||||
control.style.opacity=1;
|
||||
ui.refresh(control);
|
||||
control.style.transform='';
|
||||
control.style.transition='';
|
||||
}
|
||||
ui.updatec();
|
||||
return control;
|
||||
},
|
||||
confirm:function(str,func){
|
||||
|
@ -13753,7 +13834,12 @@
|
|||
break;
|
||||
|
||||
case 'card':
|
||||
node=item.cloneNode(true);
|
||||
if(typeof item.copy=='function'){
|
||||
node=item.copy();
|
||||
}
|
||||
else{
|
||||
node=item.cloneNode(true);
|
||||
}
|
||||
node.classList.add('button');
|
||||
position.appendChild(node);
|
||||
node.link=item;
|
||||
|
@ -13886,8 +13972,8 @@
|
|||
equips:ui.create.div('.equips',node).hide(),
|
||||
judges:ui.create.div('.judges',node),
|
||||
marks:ui.create.div('.marks',node),
|
||||
handcards1:ui.create.div('#handcards1'),
|
||||
handcards2:ui.create.div('#handcards2'),
|
||||
handcards1:ui.create.div('.handcards'),
|
||||
handcards2:ui.create.div('.handcards'),
|
||||
};
|
||||
node.node.action=ui.create.div('.action',node.node.avatar);
|
||||
|
||||
|
@ -13964,12 +14050,14 @@
|
|||
me:function(){
|
||||
ui.mebg=ui.create.div('#mebg',ui.arena);
|
||||
ui.me=ui.create.div('#me',ui.arena).animate('start');
|
||||
ui.handcards1Container=ui.create.div('#handcards1',ui.me);
|
||||
ui.handcards2Container=ui.create.div('#handcards2',ui.me);
|
||||
if(game.players.length){
|
||||
game.me=game.players[0];
|
||||
ui.handcards1=game.me.node.handcards1;
|
||||
ui.handcards2=game.me.node.handcards2;
|
||||
ui.me.appendChild(ui.handcards1);
|
||||
ui.me.appendChild(ui.handcards2);
|
||||
ui.handcards1Container.appendChild(ui.handcards1);
|
||||
ui.handcards2Container.appendChild(ui.handcards2);
|
||||
ui.updateh(true);
|
||||
}
|
||||
},
|
||||
|
@ -15866,22 +15954,54 @@
|
|||
if(!nodes[i].fixed) nodes[i].delete();
|
||||
}
|
||||
},
|
||||
updatec:function(){
|
||||
var length=0;
|
||||
var controls=[];
|
||||
var widths=[];
|
||||
for(var i=0;i<ui.control.childNodes.length;i++){
|
||||
if(ui.control.childNodes[i].classList.contains('removing')) continue;
|
||||
var thiswidth=parseInt(ui.control.childNodes[i].style.width);
|
||||
if(thiswidth){
|
||||
thiswidth+=8;
|
||||
length+=thiswidth;
|
||||
widths.push(thiswidth);
|
||||
}
|
||||
else{
|
||||
length+=ui.control.childNodes[i].offsetWidth;
|
||||
widths.push(ui.control.childNodes[i].offsetWidth);
|
||||
}
|
||||
controls.push(ui.control.childNodes[i]);
|
||||
if(i>0){
|
||||
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<player.node.handcards1.childElementCount;i++){
|
||||
if(!player.node.handcards1.childNodes[i].classList.contains('removing')){
|
||||
hs1.push(player.node.handcards1.childNodes[i]);
|
||||
for(var i=0;i<ui.handcards1Container.firstChild.childElementCount;i++){
|
||||
if(!ui.handcards1Container.firstChild.childNodes[i].classList.contains('removing')){
|
||||
hs1.push(ui.handcards1Container.firstChild.childNodes[i]);
|
||||
}
|
||||
}
|
||||
for(var i=0;i<player.node.handcards2.childElementCount;i++){
|
||||
if(!player.node.handcards2.childNodes[i].classList.contains('removing')){
|
||||
hs2.push(player.node.handcards2.childNodes[i]);
|
||||
for(var i=0;i<ui.handcards2Container.firstChild.childElementCount;i++){
|
||||
if(!ui.handcards2Container.firstChild.childNodes[i].classList.contains('removing')){
|
||||
hs2.push(ui.handcards2Container.firstChild.childNodes[i]);
|
||||
}
|
||||
}
|
||||
for(var i=0;i<hs1.length;i++){
|
||||
|
@ -15889,28 +16009,30 @@
|
|||
ui.refresh(hs1[i]);
|
||||
hs1[i].classList.remove('drawinghidden');
|
||||
}
|
||||
ui.handcards1Container.firstChild.style.width=(112*hs1.length+8)+'px';
|
||||
for(var i=0;i<hs2.length;i++){
|
||||
hs2[i].style.transform='translateX('+(i*112)+'px)';
|
||||
ui.refresh(hs2[i]);
|
||||
hs2[i].classList.remove('drawinghidden');
|
||||
}
|
||||
ui.handcards2Container.firstChild.style.width=(112*hs2.length+8)+'px';
|
||||
},
|
||||
updateh:function(compute){
|
||||
if(!game.me) return;
|
||||
if(lib.config.low_performance){
|
||||
if(compute) ui.updatehl();
|
||||
return;
|
||||
}
|
||||
if(compute){
|
||||
game.me.node.handcards1._handcardsWidth=game.me.node.handcards1.offsetWidth;
|
||||
game.me.node.handcards2._handcardsWidth=game.me.node.handcards2.offsetWidth;
|
||||
ui.handcards1Container._handcardsWidth=ui.handcards1Container.offsetWidth;
|
||||
ui.handcards2Container._handcardsWidth=ui.handcards2Container.offsetWidth;
|
||||
}
|
||||
ui.updatehx(game.me.node.handcards1);
|
||||
ui.updatehx(game.me.node.handcards2);
|
||||
},
|
||||
updatehxx:function(node){
|
||||
node.dataset.fold=Math.min(6,node.childElementCount-
|
||||
node.getElementsByClassName('removing').length)-3;
|
||||
},
|
||||
updatehx:function(node){
|
||||
var width=node.parentNode._handcardsWidth;
|
||||
var num=node.childElementCount-node.getElementsByClassName('removing').length;
|
||||
var width=node._handcardsWidth;
|
||||
node.classList.remove('fold0');
|
||||
node.classList.remove('fold1');
|
||||
node.classList.remove('fold2');
|
||||
|
@ -16350,8 +16472,7 @@
|
|||
if(card.timeout&&card.destiny){
|
||||
if(card.destiny.classList.contains('equips')) return 'e';
|
||||
if(card.destiny.classList.contains('judges')) return 'j';
|
||||
if(card.destiny.id=='handcards1'||
|
||||
card.destiny.id=='handcards2') return 'h';
|
||||
if(card.destiny.classList.contains('handcards')) return 'h';
|
||||
if(card.destiny.id=='discardPile') return 'd';
|
||||
if(card.destiny.id=='special') return 's';
|
||||
return;
|
||||
|
@ -16359,8 +16480,7 @@
|
|||
if(!card.parentNode) return;
|
||||
if(card.parentNode.classList.contains('equips')) return 'e';
|
||||
if(card.parentNode.classList.contains('judges')) return 'j';
|
||||
if(card.parentNode.id=='handcards1'||
|
||||
card.parentNode.id=='handcards2') return 'h';
|
||||
if(card.parentNode.classList.contains('handcards')) return 'h';
|
||||
if(card.parentNode.id=='discardPile') return 'd';
|
||||
if(card.parentNode.id=='special') return 's';
|
||||
},
|
||||
|
@ -17512,6 +17632,7 @@
|
|||
};
|
||||
HTMLDivElement.prototype.fix=function(){
|
||||
clearTimeout(this.timeout);
|
||||
delete this.timeout;
|
||||
delete this.destiny;
|
||||
this.classList.remove('removing');
|
||||
return this;
|
||||
|
@ -17726,6 +17847,7 @@
|
|||
target.node.handcards1.appendChild(card);
|
||||
game.check();
|
||||
target.update();
|
||||
ui.updatehl();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -17744,6 +17866,7 @@
|
|||
target.node.handcards1.appendChild(card);
|
||||
game.check();
|
||||
target.update();
|
||||
ui.updatehl();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
Before Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 72 KiB |
Before Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 75 KiB |
Before Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 70 KiB |
Before Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 79 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 53 KiB |
Before Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 87 KiB |
Before Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 94 KiB |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 74 KiB |
Before Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 83 KiB |
Before Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 68 KiB |
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 62 KiB |
Before Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 62 KiB |
Before Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 79 KiB |
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 108 KiB After Width: | Height: | Size: 88 KiB |
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 88 KiB After Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 69 KiB |
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 83 KiB After Width: | Height: | Size: 49 KiB |
Before Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 49 KiB |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 51 KiB |
Before Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 508 KiB |
Before Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 69 KiB |
Before Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 62 KiB |
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 89 KiB After Width: | Height: | Size: 49 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 49 KiB |
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 71 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 67 KiB |
Before Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 67 KiB |
Before Width: | Height: | Size: 43 KiB |
Before Width: | Height: | Size: 97 KiB |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 55 KiB |
After Width: | Height: | Size: 611 KiB |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 30 KiB |
After Width: | Height: | Size: 50 KiB |
After Width: | Height: | Size: 86 KiB |
After Width: | Height: | Size: 244 KiB |
After Width: | Height: | Size: 8.5 KiB |
After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 713 KiB After Width: | Height: | Size: 713 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 124 KiB After Width: | Height: | Size: 124 KiB |
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 6.0 KiB |
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 8.8 KiB |
|
@ -1,11 +1,11 @@
|
|||
#arena:not(.low_performance) #me>.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;}
|
||||
|
|
|
@ -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;}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name" : "无名杀",
|
||||
"version" : "1.5.7",
|
||||
"version" : "1.5.8",
|
||||
"main" : "main.js"
|
||||
}
|
||||
|
|
|
@ -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{
|
||||
|
|
|
@ -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{
|
||||
|
|