diff --git a/character/refresh.js b/character/refresh.js index 9a252ded3..a093c23ba 100644 --- a/character/refresh.js +++ b/character/refresh.js @@ -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; diff --git a/character/sp.js b/character/sp.js index e0909612e..782862b08 100644 --- a/character/sp.js +++ b/character/sp.js @@ -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&¤t.isDamaged(); + })){ + return -1; + } if(get.color(card)=='black') return -1; return 9-ai.get.value(card); }, diff --git a/character/standard.js b/character/standard.js index 743e29f07..7bd56a597 100644 --- a/character/standard.js +++ b/character/standard.js @@ -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; diff --git a/game/game.js b/game/game.js index fa5ada786..953ebbe5c 100644 --- a/game/game.js +++ b/game/game.js @@ -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;