diff --git a/card/standard.js b/card/standard.js index bf32ab24e..2e57e6280 100644 --- a/card/standard.js +++ b/card/standard.js @@ -1005,23 +1005,29 @@ game.import('card',function(lib,game,ui,get,ai,_status){ }, result:{ target:function(player,target){ - var es=target.getCards('e'); + var att=get.attitude(player,target); var nh=target.countCards('h'); - var noe=(es.length==0||target.hasSkillTag('noe')); - var noe2=(es.length==1&&es[0].name=='baiyin'&&target.hp=0){ - return -1.5; + if(att>0){ + var js=target.getCards('j'); + if(js.length){ + var jj=js[0].viewAs?{name:js[0].viewAs}:js[0]; + if(jj.name=='guohe'||js.length>1||get.effect(target,jj,target,player)<0){ + return 2; + } + } + if(target.getEquip('baiyin')&&target.isDamaged()&& + ai.get.recoverEffect(target,player,player)>0){ + if(target.hp==1&&!target.hujia) return 1.6; + if(target.hp==2) return 0.01; + return 0; } - return 2; } + var es=target.getCards('e'); + var noe=(es.length==0||target.hasSkillTag('noe')); + var noe2=(es.length==1&&es[0].name=='baiyin'&&target.isDamaged()); + var noh=(nh==0||target.hasSkillTag('noh')); + if(noh&&(noe||noe2)) return 0; + if(att<=0&&!target.countCards('he')) return 1.5; return -1.5; }, }, diff --git a/character/hearth.js b/character/hearth.js index e5a42aa3e..b10956189 100644 --- a/character/hearth.js +++ b/character/hearth.js @@ -2115,7 +2115,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, lianjin:{ enable:'phaseUse', - usable:2, + usable:1, filterCard:function(card){ return get.type(card)!='hsyaoshui'; }, @@ -2269,6 +2269,34 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, threaten:1.4 }, + group:'lianjin_discard', + subSkill:{ + discard:{ + trigger:{player:'discardAfter'}, + forced:true, + filter:function(event){ + for(var i=0;i0; + return target.countCards('ej')>0; }).set('ai',function(target){ var player=_status.event.player; - return get.attitude(player,target)*lib.card.guohe.ai.result.target(player,target); + var att=get.attitude(player,target); + + if(att>0){ + var js=target.getCards('j'); + if(js.length){ + var jj=js[0].viewAs?{name:js[0].viewAs}:js[0]; + if(jj.name=='guohe'||js.length>1||get.effect(target,jj,target,player)<0){ + return 2*att; + } + } + if(target.getEquip('baiyin')&&target.isDamaged()&& + ai.get.recoverEffect(target,player,player)>0){ + if(target.hp==1&&!target.hujia) return 1.6*att; + if(target.hp==2) return 0.01*att; + return 0; + } + } + var es=target.getCards('e'); + var noe=target.hasSkillTag('noe'); + var noe2=(es.length==1&&es[0].name=='baiyin'&&target.isDamaged()); + if(noe||noe2) return 0; + if(att<=0&&!es.length) return 1.5*att; + return -1.5*att; }); 'step 1' if(result.bool){ @@ -1885,10 +1913,10 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ } 'step 2' if(event.target){ - player.discardPlayerCard('hej',true,event.target); + player.discardPlayerCard('ej',true,event.target); } }, - group:'dongcha_begin', + group:['dongcha_begin','dongcha_log'], subSkill:{ begin:{ trigger:{global:'gameStart'}, @@ -1903,7 +1931,29 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ } var target=list.randomGet(); player.storage.dongcha=target; - player.chooseControl('ok').set('dialog',[get.translation(target)+'是反贼',[[target.name],'character']]); + if(!_status.connectMode){ + if(player==game.me){ + target.setIdentity('fan'); + target.node.identity.classList.remove('guessing'); + target.fanfixed=true; + player.line(target,'green'); + player.popup('dongcha'); + } + } + else{ + player.chooseControl('ok').set('dialog',[get.translation(target)+'是反贼',[[target.name],'character']]); + } + } + }, + log:{ + trigger:{player:'useCard'}, + forced:true, + popup:false, + filter:function(event,player){ + return event.targets.length==1&&event.targets[0]==player.storage.dongcha&&event.targets[0].ai.shown<0.95; + }, + content:function(){ + trigger.targets[0].addExpose(0.2); } } }