This commit is contained in:
libccy 2017-03-17 17:28:56 +08:00
parent 9b9784d098
commit 4d239b9693
4 changed files with 47 additions and 16 deletions

View File

@ -158,6 +158,7 @@ character.refresh={
result:{
target:function(player,target){
if(ui.selected.cards.length&&ui.selected.cards[0].name=='du'){
if(target.hasSkillTag('nodu')) return 0;
return -10;
}
if(target.num('j','lebu')) return 0;
@ -503,6 +504,7 @@ character.refresh={
ai2:function(target){
var att=ai.get.attitude(_status.event.player,target);
if(ui.selected.cards.length&&ui.selected.cards[0].name=='du'){
if(target.hasSkillTag('nodu')) return 0;
return 1-att;
}
if(target.num('h')>_status.event.player.num('h')) return 0;
@ -769,6 +771,7 @@ character.refresh={
player.chooseTarget('选择获得此牌的角色').set('ai',function(target){
var att=ai.get.attitude(_status.event.player,target);
if(_status.event.du){
if(target.hasSkillTag('nodu')) return 0;
return -att;
}
if(att>0){
@ -902,6 +905,7 @@ character.refresh={
ai2:function(target){
var att=ai.get.attitude(_status.event.player,target);
if(ui.selected.cards.length&&ui.selected.cards[0].name=='du'){
if(target.hasSkillTag('nodu')) return 0;
return 1-att;
}
return att-4;

View File

@ -6821,6 +6821,12 @@ character.sp={
return ui.selected.cards.length;
},
check:function(card){
var player=_status.event.player;
if(ui.selected.cards.length>=game.countPlayer(function(current){
return ai.get.attitude(player,current)>0&&current.isDamaged();
})){
return -1;
}
if(get.color(card)=='black') return -1;
return 9-ai.get.value(card);
},

View File

@ -378,6 +378,7 @@ character.standard={
ai2:function(target){
var att=ai.get.attitude(_status.event.player,target);
if(ui.selected.cards.length&&ui.selected.cards[0].name=='du'){
if(target.hasSkillTag('nodu')) return 0;
return 1-att;
}
return att-4;
@ -538,6 +539,7 @@ character.standard={
result:{
target:function(player,target){
if(ui.selected.cards.length&&ui.selected.cards[0].name=='du'){
if(target.hasSkillTag('nodu')) return 0;
return -10;
}
if(target.num('j','lebu')) return 0;

View File

@ -23255,8 +23255,9 @@
else if(Array.isArray(card)){
node.cards=card[1];
card=card[0];
if(!Array.isArray(node.cards)){
node.cards=[];
var info=[card.suit||'',card.number||'',card.name||'',card.nature||''];
if(!Array.isArray(node.cards)||!node.cards.length){
node.cards=[ui.create.card(node,'noclick',true).init(info)];
}
if(card.name=='wuxie'){
if(ui.historybar.firstChild&&ui.historybar.firstChild.type=='wuxie'){
@ -23273,7 +23274,6 @@
card.copy(node,false);
}
else{
var info=[card.suit||'',card.number||'',card.name||'',card.nature||''];
card=ui.create.card(node,'noclick',true);
card.init(info);
}
@ -23332,9 +23332,9 @@
node.addEventListener('touchstart',ui.click.intro);
}
else{
node.addEventListener('mouseenter',ui.click.intro);
// node.addEventListener('mousemove',ui.click.logv);
// node.addEventListener('mouseleave',ui.click.logvleave);
// node.addEventListener('mouseenter',ui.click.intro);
node.addEventListener('mousemove',ui.click.logv);
node.addEventListener('mouseleave',ui.click.logvleave);
}
node.logvid=logvid;
node.added=[];
@ -34502,19 +34502,36 @@
},
logv:function(e){
if(_status.currentlogv){
clearTimeout(_status.currentlogv.logvtimeout);
delete _status.currentlogv.logvtimeout;
if(_status.currentlogv==this) return;
if(_status.logvtimeout){
clearTimeout(_status.logvtimeout);
}
var that=this;
_status.logvtimeout=setTimeout(function(){
if(!_status.currentlogv){
_status.currentlogv=that;
ui.click.intro.call(that,e);
}
},200);
this.logvtimeout=_status.logvtimeout;
}
else{
_status.currentlogv=this;
ui.click.intro.call(this,e);
}
var that=this;
_status.currentlogv=that;
that.logvtimeout=setTimeout(function(){
ui.click.intro.call(that,e);
},200);
},
logvleave:function(){
if(_status.currentlogv){
clearTimeout(_status.currentlogv.logvtimeout);
delete _status.currentlogv.logvtimeout;
if(_status.currentlogv==this){
setTimeout(function(){
delete _status.currentlogv;
},150);
}
if(this.logvtimeout){
clearTimeout(this.logvtimeout);
if(_status.logvtimeout==this.logvtimeout){
delete _status.logvtimeout;
}
delete this.logvtimeout;
}
},
charactercard:function(name,sourcenode,noedit){
@ -34811,6 +34828,7 @@
uiintro.delete();
this.remove();
ui.historybar.style.zIndex='';
delete _status.currentlogv;
if(!ui.arena.classList.contains('menupaused')) game.resume2();
e.stopPropagation();
return false;
@ -34837,6 +34855,7 @@
layer.remove();
this.delete();
ui.historybar.style.zIndex='';
delete _status.currentlogv;
if(!ui.arena.classList.contains('menupaused')) game.resume2();
};
var currentpop=this;