diff --git a/game/game.js b/game/game.js index 19b5fffba..e61265115 100755 --- a/game/game.js +++ b/game/game.js @@ -10078,6 +10078,14 @@ console.log(player); } }, + setIdentity:function(player,identity){ + if(player&&identity){ + player.setIdentity(identity); + } + else{ + console.log(num); + } + }, showCharacter:function(player,num){ if(player&&player.classList){ switch(num){ @@ -16876,6 +16884,7 @@ if(_status.dragged) return; _status.clicked=true; if(!game.getIdentityList) return; + if(_status.video) return; if(_status.clickingidentity){ for(var i=0;i<_status.clickingidentity[1].length;i++){ _status.clickingidentity[1][i].delete(); diff --git a/mode/guozhan.js b/mode/guozhan.js index d1f713a64..367690556 100755 --- a/mode/guozhan.js +++ b/mode/guozhan.js @@ -559,6 +559,15 @@ mode.guozhan={ // this.node.identity.dataset.color=this.identity; this.setIdentity(this.identity); this.ai.shown=1; + + if(_status.clickingidentity&&_status.clickingidentity[0]==this){ + for(var i=0;i<_status.clickingidentity[1].length;i++){ + _status.clickingidentity[1][i].delete(); + _status.clickingidentity[1][i].style.transform=''; + } + delete _status.clickingidentity; + } + game.addVideo('setIdentity',this,this.identity); } var skills; switch(num){ diff --git a/mode/identity.js b/mode/identity.js index 7e9cc1b5f..ef9ba3088 100755 --- a/mode/identity.js +++ b/mode/identity.js @@ -292,6 +292,13 @@ mode.identity={ game.players[i].isZhu=true; } } + if(_status.clickingidentity){ + for(var i=0;i<_status.clickingidentity[1].length;i++){ + _status.clickingidentity[1][i].delete(); + _status.clickingidentity[1][i].style.transform=''; + } + delete _status.clickingidentity; + } }, checkResult:function(){ if(game.zhu.isAlive()&&get.population('fan')+get.population('nei')>0) return; @@ -787,6 +794,13 @@ mode.identity={ if(lib.config.animation&&!lib.config.low_performance) game.zhu.$legend(); game.delay(2); game.zhu.playerfocus(1000); + if(_status.clickingidentity&&_status.clickingidentity[0]==game.zhu){ + for(var i=0;i<_status.clickingidentity[1].length;i++){ + _status.clickingidentity[1][i].delete(); + _status.clickingidentity[1][i].style.transform=''; + } + delete _status.clickingidentity; + } } if(!this.node.dieidentity){ var node=ui.create.div('.damage.dieidentity',get.translation(this.identity+'2'),this);