This commit is contained in:
parent
9c78dc1f06
commit
b6b8793dcf
21
game/game.js
21
game/game.js
|
@ -11891,6 +11891,9 @@
|
||||||
if(player.hp<=0&&!player.nodying) player.die(event.reason);
|
if(player.hp<=0&&!player.nodying) player.die(event.reason);
|
||||||
},
|
},
|
||||||
die:function(){
|
die:function(){
|
||||||
|
if(_status.roundStart==player){
|
||||||
|
_status.roundStart=player.next||player.getNext()||game.players[0];
|
||||||
|
}
|
||||||
var logvid=game.logv(player,'die',source);
|
var logvid=game.logv(player,'die',source);
|
||||||
if(source&&source!=player){
|
if(source&&source!=player){
|
||||||
game.log(player,'被',source,'杀害');
|
game.log(player,'被',source,'杀害');
|
||||||
|
@ -13440,6 +13443,9 @@
|
||||||
var next=game.createEvent('phase');
|
var next=game.createEvent('phase');
|
||||||
next.player=this;
|
next.player=this;
|
||||||
next.setContent('phase');
|
next.setContent('phase');
|
||||||
|
if(!_status.roundStart){
|
||||||
|
_status.roundStart=this;
|
||||||
|
}
|
||||||
return next;
|
return next;
|
||||||
},
|
},
|
||||||
phaseJudge:function(){
|
phaseJudge:function(){
|
||||||
|
@ -19099,6 +19105,9 @@
|
||||||
}
|
}
|
||||||
_status.currentPhase=player;
|
_status.currentPhase=player;
|
||||||
game.phaseNumber++;
|
game.phaseNumber++;
|
||||||
|
if(player==_status.roundStart){
|
||||||
|
game.roundNumber++;
|
||||||
|
}
|
||||||
game.syncState();
|
game.syncState();
|
||||||
game.addVideo('phaseChange',player);
|
game.addVideo('phaseChange',player);
|
||||||
if(game.phaseNumber==1&&lib.configOL.observe){
|
if(game.phaseNumber==1&&lib.configOL.observe){
|
||||||
|
@ -26298,6 +26307,9 @@
|
||||||
return player;
|
return player;
|
||||||
},
|
},
|
||||||
removePlayer:function(player){
|
removePlayer:function(player){
|
||||||
|
if(_status.roundStart==player){
|
||||||
|
_status.roundStart=player.next||player.getNext()||game.players[0];
|
||||||
|
}
|
||||||
var players=game.players.concat(game.dead);
|
var players=game.players.concat(game.dead);
|
||||||
player.style.top=player.offsetTop+'px';
|
player.style.top=player.offsetTop+'px';
|
||||||
player.style.left=player.offsetLeft+'px';
|
player.style.left=player.offsetLeft+'px';
|
||||||
|
@ -26351,6 +26363,9 @@
|
||||||
while(player4.isDead()) player4=player4.previousSeat;
|
while(player4.isDead()) player4=player4.previousSeat;
|
||||||
player4.next=player2;
|
player4.next=player2;
|
||||||
player2.previous=player4;
|
player2.previous=player4;
|
||||||
|
if(_status.roundStart==player){
|
||||||
|
_status.roundStart=player2;
|
||||||
|
}
|
||||||
return player2;
|
return player2;
|
||||||
},
|
},
|
||||||
arrangePlayers:function(){
|
arrangePlayers:function(){
|
||||||
|
@ -26536,7 +26551,9 @@
|
||||||
dead:[],
|
dead:[],
|
||||||
imported:[],
|
imported:[],
|
||||||
playerMap:{},
|
playerMap:{},
|
||||||
phaseNumber:0
|
phaseNumber:0,
|
||||||
|
roundNumber:0,
|
||||||
|
shuffleNumber:0,
|
||||||
};
|
};
|
||||||
var ui={
|
var ui={
|
||||||
updates:[],
|
updates:[],
|
||||||
|
@ -35791,6 +35808,7 @@
|
||||||
uiintro.add('剩余 <span style="font-family:'+'xinwei'+'">'+num);
|
uiintro.add('剩余 <span style="font-family:'+'xinwei'+'">'+num);
|
||||||
|
|
||||||
if(_status.connectMode) return uiintro;
|
if(_status.connectMode) return uiintro;
|
||||||
|
uiintro.add('<div class="text center">轮数 <span style="font-family:xinwei">'+game.roundNumber+'</span> 洗牌 <span style="font-family:xinwei">'+game.shuffleNumber+'</div>');
|
||||||
uiintro.add('<div class="text center">弃牌堆</div>');
|
uiintro.add('<div class="text center">弃牌堆</div>');
|
||||||
if(ui.discardPile.childNodes.length){
|
if(ui.discardPile.childNodes.length){
|
||||||
var list=[];
|
var list=[];
|
||||||
|
@ -39739,6 +39757,7 @@
|
||||||
}
|
}
|
||||||
_status.maxShuffle--;
|
_status.maxShuffle--;
|
||||||
}
|
}
|
||||||
|
game.shuffleNumber++;
|
||||||
var cards=[],i;
|
var cards=[],i;
|
||||||
for(var i=0;i<lib.onwash.length;i++){
|
for(var i=0;i<lib.onwash.length;i++){
|
||||||
lib.onwash[i]();
|
lib.onwash[i]();
|
||||||
|
|
|
@ -625,6 +625,9 @@ mode.chess={
|
||||||
game.players.remove(this);
|
game.players.remove(this);
|
||||||
_status.friends.remove(this);
|
_status.friends.remove(this);
|
||||||
this.classList.add('dead');
|
this.classList.add('dead');
|
||||||
|
if(_status.roundStart==this){
|
||||||
|
_status.roundStart=player.next||player.getNext()||game.players[0];
|
||||||
|
}
|
||||||
if(this==game.me){
|
if(this==game.me){
|
||||||
if(ui.confirm){
|
if(ui.confirm){
|
||||||
ui.confirm.close();
|
ui.confirm.close();
|
||||||
|
@ -1710,6 +1713,7 @@ mode.chess={
|
||||||
if(game.players[i].isOut()) continue;
|
if(game.players[i].isOut()) continue;
|
||||||
game.players[i].classList.remove('acted');
|
game.players[i].classList.remove('acted');
|
||||||
}
|
}
|
||||||
|
delete _status.roundStart;
|
||||||
event.redo();
|
event.redo();
|
||||||
game.delay();
|
game.delay();
|
||||||
return;
|
return;
|
||||||
|
@ -1777,6 +1781,9 @@ mode.chess={
|
||||||
next=game.players[i];
|
next=game.players[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(_status.roundStart&&_status.roundStart.side==player.side){
|
||||||
|
delete _status.roundStart;
|
||||||
|
}
|
||||||
var num2=game.players.length-num1;
|
var num2=game.players.length-num1;
|
||||||
if(num2>num1){
|
if(num2>num1){
|
||||||
if(next.side==game.me.side){
|
if(next.side==game.me.side){
|
||||||
|
|
|
@ -2425,6 +2425,7 @@ mode.versus={
|
||||||
if(game.players[i].isOut()) continue;
|
if(game.players[i].isOut()) continue;
|
||||||
game.players[i].classList.remove('acted');
|
game.players[i].classList.remove('acted');
|
||||||
}
|
}
|
||||||
|
delete _status.roundStart;
|
||||||
event.redo();
|
event.redo();
|
||||||
game.delay();
|
game.delay();
|
||||||
return;
|
return;
|
||||||
|
@ -2491,6 +2492,7 @@ mode.versus={
|
||||||
for(var i=0;i<game.players.length;i++){
|
for(var i=0;i<game.players.length;i++){
|
||||||
game.players[i].classList.remove('acted');
|
game.players[i].classList.remove('acted');
|
||||||
}
|
}
|
||||||
|
delete _status.roundStart;
|
||||||
}
|
}
|
||||||
var list=(_status.currentSide==game.me.side)?game.friend.slice(0):game.enemy.slice(0);
|
var list=(_status.currentSide==game.me.side)?game.friend.slice(0):game.enemy.slice(0);
|
||||||
for(var i=0;i<list.length;i++){
|
for(var i=0;i<list.length;i++){
|
||||||
|
|
Loading…
Reference in New Issue