This commit is contained in:
parent
09311fcd7a
commit
978a773418
40
game/game.js
40
game/game.js
|
@ -12830,6 +12830,28 @@
|
|||
},100);
|
||||
game.addVideo('smoothAvatar',this);
|
||||
},
|
||||
changeSeat:function(position){
|
||||
var player=this;
|
||||
game.addVideo('changeSeat',player,position);
|
||||
var rect1=player.getBoundingClientRect();
|
||||
player.style.transition='all 0s';
|
||||
ui.refresh(player);
|
||||
player.dataset.position=position;
|
||||
var rect2=player.getBoundingClientRect();
|
||||
var dx=rect1.left-rect2.left;
|
||||
var dy=rect1.top-rect2.top;
|
||||
if((game.chess||(player.dataset.position!=0&&position!=0))&&player.classList.contains('linked')){
|
||||
player.style.transform='rotate(-90deg) translate('+(-dy)+'px,'+(dx)+'px)';
|
||||
}
|
||||
else{
|
||||
player.style.transform='translate('+(dx)+'px,'+(dy)+'px)';
|
||||
}
|
||||
setTimeout(function(){
|
||||
player.style.transition='';
|
||||
ui.refresh(player);
|
||||
player.style.transform='';
|
||||
},100);
|
||||
},
|
||||
send:function(){
|
||||
if(!this.ws||this.ws.closed) return this;
|
||||
this.ws.send.apply(this.ws,arguments);
|
||||
|
@ -22663,8 +22685,8 @@
|
|||
}
|
||||
},
|
||||
changeSeat:function(player,info){
|
||||
if(player&&player.getBoundingClientRect){
|
||||
game.changeSeat(player,info);
|
||||
if(player&&player.getBoundingClientRect&&player.changeSeat){
|
||||
player.changeSeat(info);
|
||||
game.playerMap={};
|
||||
var players=game.players.concat(game.dead);
|
||||
for(var i=0;i<players.length;i++){
|
||||
|
@ -25036,20 +25058,6 @@
|
|||
ui.arena.classList.remove('dragging');
|
||||
_status.dragline.length=0;
|
||||
},
|
||||
changeSeat:function(player,position){
|
||||
game.addVideo('changeSeat',player,position);
|
||||
var rect1=player.getBoundingClientRect();
|
||||
player.style.transition='all 0s';
|
||||
ui.refresh(player);
|
||||
player.dataset.position=position;
|
||||
var rect2=player.getBoundingClientRect();
|
||||
player.style.transform='translate('+(rect1.left-rect2.left)+'px,'+(rect1.top-rect2.top)+'px)';
|
||||
setTimeout(function(){
|
||||
player.style.transition='';
|
||||
ui.refresh(player);
|
||||
player.style.transform='';
|
||||
},100);
|
||||
},
|
||||
swapSeat:function(player1,player2,prompt,behind){
|
||||
if(behind){
|
||||
var totalPopulation=game.players.length+game.dead.length+1;
|
||||
|
|
|
@ -15,11 +15,11 @@ window.noname_update={
|
|||
// 'card/standard.js',
|
||||
'character/*',
|
||||
// 'character/rank.js',
|
||||
// 'mode/boss.js',
|
||||
'mode/boss.js',
|
||||
// 'mode/versus.js',
|
||||
// 'mode/guozhan.js',
|
||||
// 'mode/identity.js',
|
||||
// 'mode/chess.js',
|
||||
'mode/chess.js',
|
||||
// 'mode/tafang.js',
|
||||
// 'mode/guozhan.js',
|
||||
// 'mode/stone.js',
|
||||
|
|
12
mode/boss.js
12
mode/boss.js
|
@ -1053,11 +1053,11 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
game.delay();
|
||||
'step 1'
|
||||
if(game.me!=game.boss){
|
||||
game.changeSeat(game.boss,6);
|
||||
game.boss.changeSeat(6);
|
||||
}
|
||||
else{
|
||||
game.changeSeat(game.boss.nextSeat,3);
|
||||
game.changeSeat(game.boss.previousSeat,5);
|
||||
game.boss.nextSeat.changeSeat(3);
|
||||
game.boss.previousSeat.changeSeat(5);
|
||||
}
|
||||
game.changeBoss('boss_huoshenzhurong');
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
|
@ -1223,11 +1223,11 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
game.delay();
|
||||
'step 1'
|
||||
if(game.me!=game.boss){
|
||||
game.changeSeat(game.boss,6);
|
||||
game.boss.changeSeat(6);
|
||||
}
|
||||
else{
|
||||
game.changeSeat(game.boss.nextSeat,3);
|
||||
game.changeSeat(game.boss.previousSeat,5);
|
||||
game.boss.nextSeat.changeSeat(3);
|
||||
game.boss.previousSeat.changeSeat(5);
|
||||
}
|
||||
game.changeBoss('boss_mushengoumang');
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
|
|
Loading…
Reference in New Issue