This commit is contained in:
libccy 2016-04-04 22:15:58 +08:00
parent db27b14f05
commit 41ab4b06e0
4 changed files with 50 additions and 53 deletions

View File

@ -1221,6 +1221,9 @@ card.standard={
qinglong_skill:{
trigger:{player:'shaMiss'},
direct:true,
filter:function(event,player){
return player.canUse('sha',event.target);
},
content:function(){
"step 0"
if(player.skills.contains('jiu')){

View File

@ -6188,6 +6188,12 @@
for(var i=0;i<cards.length;i++){
cards[i].goto(ui.discardPile);
}
if(game.online&&player==game.me&&!_status.over&&!game.controlOver&&!ui.exit){
ui.exit=ui.create.control('退出联机',function(){
game.saveConfig('reconnect_info');
game.reload();
});
}
if(lib.config.background_speak){
if(lib.character[player.name]&&
@ -6209,6 +6215,7 @@
ui.restart=ui.create.control('restart',game.reload);
}
}
if(!_status.connectMode&&player==game.me&&!game.modeSwapPlayer){
// _status.auto=false;
if(ui.auto){
@ -9652,11 +9659,6 @@
top+this.offsetHeight-30,700,'thunder');
},
$rare2:function(){
game.broadcast(function(player){
if(!lib.config.low_performance){
player.$rare2();
}
},this);
game.addVideo('flame',this,'rare2');
var rect=this.getBoundingClientRect();
var left=rect.left;
@ -9665,11 +9667,6 @@
top+this.offsetHeight-30,700,'rare');
},
$epic2:function(){
game.broadcast(function(player){
if(!lib.config.low_performance){
player.$epic2();
}
},this);
game.addVideo('flame',this,'epic2');
var rect=this.getBoundingClientRect();
var left=rect.left;
@ -9678,11 +9675,6 @@
top+this.offsetHeight-30,700,'epic');
},
$legend2:function(){
game.broadcast(function(player){
if(!lib.config.low_performance){
player.$legend2();
}
},this);
game.addVideo('flame',this,'legend2');
var rect=this.getBoundingClientRect();
var left=rect.left;
@ -9691,11 +9683,6 @@
top+this.offsetHeight-30,700,'legend');
},
$rare:function(time){
game.broadcast(function(player,time){
if(!lib.config.low_performance){
player.$rare(time);
}
},this,time);
time=time||700;
game.addVideo('flame',this,'rare');
var left,top;
@ -9714,11 +9701,6 @@
top+this.offsetHeight-30,time,'rare');
},
$epic:function(time){
game.broadcast(function(player,time){
if(!lib.config.low_performance){
player.$epic(time);
}
},this,time);
time=time||700;
game.addVideo('flame',this,'epic');
var left,top;
@ -9737,11 +9719,6 @@
top+this.offsetHeight-30,time,'epic');
},
$legend:function(time){
game.broadcast(function(player,time){
if(!lib.config.low_performance){
player.$legend(time);
}
},this,time);
time=time||700;
game.addVideo('flame',this,'legend');
var left,top;
@ -11046,7 +11023,7 @@
var mod=game.checkMod(card,player,'unchanged','cardSavable',player.get('s'));
if(mod!='unchanged') return mod;
var savable=get.info(card).savable;
if(typeof savable=='function') savable=savable(card,player,event.dying);
if(typeof savable=='function') savable=savable(card,player,_status.event.dying);
return savable;
},
filterTarget:trigger.player,
@ -11553,6 +11530,12 @@
game.createEvent('game',false).content=lib.init.startOnline;
game.loop();
game.send('reinited');
if(!observe&&game.me&&game.me.isDead){
ui.exit=ui.create.control('退出联机',function(){
game.saveConfig('reconnect_info');
game.reload();
});
}
});
},
exec:function(func){
@ -14089,6 +14072,12 @@
game.playAudio('effect','tie');
}
}
if(!ui.exit){
ui.exit=ui.create.control('退出联机',function(){
game.saveConfig('reconnect_info');
game.reload();
});
}
return;
}
if(lib.config.background_audio){
@ -22059,7 +22048,7 @@
avatar:function(){
if(!lib.config.change_skin) return;
if(this.parentNode.classList.contains('unseen')) return;
if(!this.name) return;
if(!this.parentNode.name) return;
var avatar=this;
var player=this.parentNode;
if(!this._doubleClicking){
@ -22097,7 +22086,7 @@
avatar2:function(){
if(!lib.config.change_skin) return;
if(this.parentNode.classList.contains('unseen2')) return;
if(!this.name2) return;
if(!this.parentNode.name2) return;
var avatar=this;
var player=this.parentNode;
if(!this._doubleClicking){

View File

@ -1,7 +1,7 @@
window.noname_update={
version:'1.8.2.8',
version:'1.8.2.9',
changeLog:[
'旁观',
'修复无懈卡死问题'
'联机死亡后可退出',
'修复双击换肤'
]
}

View File

@ -1131,15 +1131,17 @@ mode.identity={
},
dieAfter:function(source){
this.dieSpeak();
if(get.config('show_identity')&&!this.identityShown){
this.setIdentity(this.identity);
this.identityShown=true;
if(!this.identityShown){
game.broadcastAll(function(player){
player.setIdentity(player.identity);
player.identityShown=true;
},this);
}
game.checkResult();
if(game.zhu.isZhu){
if(get.population('zhong')+get.population('nei')==0||
get.population('zhong')+get.population('fan')==0){
game.showIdentity();
game.broadcastAll(game.showIdentity);
}
}
if(this.identity=='fan'&&source) source.draw(3);
@ -1151,21 +1153,24 @@ mode.identity={
delete game.zhu.storage.enhance_zhu;
}
if(this==game.zhong){
game.zhu.identityShown=true;
game.zhu.ai.shown=1;
game.zhu.setIdentity();
game.zhu.isZhu=true;
delete game.zhong;
if(lib.config.animation&&!lib.config.low_performance) game.zhu.$legend();
game.broadcastAll(function(player){
game.zhu=player;
game.zhu.identityShown=true;
game.zhu.ai.shown=1;
game.zhu.setIdentity();
game.zhu.isZhu=true;
if(lib.config.animation&&!lib.config.low_performance) game.zhu.$legend();
delete game.zhong;
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;
}
},game.zhu);
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(!_status.over){