diff --git a/character/huicui.js b/character/huicui.js index 5cd1e4d7a..64838d8d1 100644 --- a/character/huicui.js +++ b/character/huicui.js @@ -3397,7 +3397,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ target:function(player,target){ var val=0; var bool1=!game.hasPlayer(current=>current.maxHp0; - }, content:function(){ var card=get.cardPile(function(card){ return card.name=='wuzhong'&&get.suit(card)!='diamond'; @@ -7631,9 +7627,26 @@ game.import('character',function(lib,game,ui,get,ai,_status){ list.push(suit); } } - if(list.length){ - player.chooseControl(list,'cancel2').set('dialog',dialog); - } + if(list.length) player.chooseControl(list,'cancel2').set('dialog',dialog).set('list',list).set('map',map).set('ai',function(){ + let max=0,res='cancel2'; + for(let s of _status.event.list){ + let temp=0; + for(let i of _status.event.map[s]){ + temp+=get.value(i,_status.event.player)+get.sgn(get.attitude(_status.event.player,get.owner(i)))*(6-get.value(i,get.owner(i))); + } + for(let i in _status.event.map){ + if(i===s) continue; + for(let j of _status.event.map[i]){ + temp-=get.sgn(get.attitude(_status.event.player,get.owner(j)))*get.value(j,get.owner(j)); + } + } + if(temp>max){ + res=s; + max=temp; + } + } + return res; + }); else event.finish(); 'step 3' if(result.control!='cancel2'){ @@ -8390,6 +8403,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ subSkill:{ effect:{ audio:'kuanshi', + mark:true, + intro:{ + content:'每回合限一次,当$于一回合内受到第2点伤害后,其回复1点体力。' + }, trigger:{global:'damageEnd'}, forced:true, charlotte:true, @@ -9359,6 +9376,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, dcdanying:{ audio:2, + mod:{ + aiOrder:function(player,card,num){ + if(num<=0 || card.name!=='sha'&&card.name!=='shan' || !player.hasCard(i=>i.hasGaintag('dcmiyun_tag'),'h')) return; + return Math.max(0.12,num/25); + } + }, enable:['chooseToUse','chooseToRespond'], usable:1, hiddenCard:function(player,name){ @@ -9435,11 +9458,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ target:function(card,player,target){ if(_status._dcdanying_aiChecking) return; _status._dcdanying_aiChecking=true; - var eff=get.effect(target,{name:'guohe_copy2'},player,player); + let eff=get.effect(target,{name:'guohe_copy2'},player,player); delete _status._dcdanying_aiChecking; - if(eff>0) eff=-1; - else eff=1; - return [1,eff]; + return [1,get.sgn(eff)]; } } }