This commit is contained in:
Spmario233 2023-10-28 15:38:19 +08:00
parent 6b08d70dc2
commit 3d27ea4c28
2 changed files with 10 additions and 4 deletions

View File

@ -8395,6 +8395,7 @@
var that=this; var that=this;
this.timeout=setTimeout(function(){ this.timeout=setTimeout(function(){
console.log(that,that._selfDestroyed)
if(!that._selfDestroyed){ if(!that._selfDestroyed){
position.appendChild(that); position.appendChild(that);
} }
@ -19694,6 +19695,7 @@
else if(cards[i].hasOwnProperty('destroyed')){ else if(cards[i].hasOwnProperty('destroyed')){
if(event.getlx!==false&&event.position&&cards[i].willBeDestroyed(event.position.id,null,event)){ if(event.getlx!==false&&event.position&&cards[i].willBeDestroyed(event.position.id,null,event)){
cards[i].selfDestroy(event); cards[i].selfDestroy(event);
continue;
} }
} }
else if(info.destroy){ else if(info.destroy){
@ -19779,7 +19781,7 @@
event.xs=xs; event.xs=xs;
game.clearCardKnowers(hs); game.clearCardKnowers(hs);
if(hs.length && !event.visible){ if(hs.length && !event.visible){
this.getCards('h').forEach(hcard=>{hcard.clearKnowers();}); player.getCards('h').forEach(hcard=>{hcard.clearKnowers();});
} }
"step 2" "step 2"
if(num<cards.length){ if(num<cards.length){
@ -30713,7 +30715,10 @@
if(this._uncheck.length==0) this.classList.remove('uncheck'); if(this._uncheck.length==0) this.classList.remove('uncheck');
} }
discard(bool){ discard(bool){
this.fix(); if(!this._selfDestroyed){
this.fix();
ui.discardPile.appendChild(this);
}
this.classList.remove('glow'); this.classList.remove('glow');
if(bool===false){ if(bool===false){
ui.cardPile.insertBefore(this,ui.cardPile.childNodes[Math.floor(Math.random()*ui.cardPile.childNodes.length)]); ui.cardPile.insertBefore(this,ui.cardPile.childNodes[Math.floor(Math.random()*ui.cardPile.childNodes.length)]);

View File

@ -192,8 +192,9 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
game.gameDraw(event.playerx); game.gameDraw(event.playerx);
game.broadcastAll(function(player){ game.broadcastAll(function(player){
for(var i=0;i<game.players.length;i++){ for(var i=0;i<game.players.length;i++){
game.players[i].name=get.seatTranslation(get.distance(player,game.players[i],'absolute')); var seatNum=get.distance(player,game.players[i],'absolute');
game.players[i].node.name_seat=ui.create.div('.name.name_seat',get.verticalStr(lib.translate[game.players[i].name]),game.players[i]); game.players[i].name=`unknown${seatNum}`;
game.players[i].node.name_seat=ui.create.div('.name.name_seat',get.seatTranslation(seatNum),game.players[i]);
// if(game.players[i]==game.me){ // if(game.players[i]==game.me){
// lib.translate[game.players[i].name]+='(你)'; // lib.translate[game.players[i].name]+='(你)';
// } // }