From db41fc7634d319dc47735c4cdceae281c86ea54d Mon Sep 17 00:00:00 2001 From: 157 <3619242020@qq.com> Date: Mon, 4 Mar 2024 11:49:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E3=80=90=E6=BA=83=E5=87=BB?= =?UTF-8?q?=E3=80=91=E6=97=A0=E6=B3=95=E6=89=A7=E8=A1=8C=E5=9B=9E=E8=A1=80?= =?UTF-8?q?=E6=95=88=E6=9E=9C=E7=9A=84bug=E5=B9=B6=E4=BC=98=E5=8C=96ai?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/xianding.js | 69 +++++++++++++++++++++++++++++-------------- 1 file changed, 47 insertions(+), 22 deletions(-) diff --git a/character/xianding.js b/character/xianding.js index 03fe58fe8..fe99eac88 100644 --- a/character/xianding.js +++ b/character/xianding.js @@ -13435,8 +13435,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.draw(); 'step 1' var next=player.chooseTarget().set('ai',function(target){ - var player=_status.event.player; - return get.damageEffect(target,player,player) + let player=_status.event.player; + if(target.hasSkillTag('filterDamage',null,{ + player:player + },true)) return get.damageEffect(target,player,player); + return 2*get.damageEffect(target,player,player); }); if(!['identity','guozhan'].includes(get.mode())){ next.set('prompt','选择一名体力值最大的敌方角色,对其造成2点伤害'); @@ -13464,9 +13467,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ result:{ target:function(player,target){ - if(!['identity','guozhan'].includes(get.mode())) return 1; - var target=game.filterPlayer(i=>i!=player).sort((a,b)=>b.hp-a.hp)[0]; - return target&&get.damageEffect(target,player,player)>0?1:0; + let es; + if(['identity','guozhan'].includes(get.mode())) es=game.hasPlayer(i=>{ + return i!=player&&!game.hasPlayer(j=>{ + return player!==j&&j.hp>i.hp; + })&&get.attitude(player,i)<0; + }); + else es=game.hasPlayer(i=>{ + return i.isEnemyOf(player)&&!game.hasPlayer(j=>{ + return j.hp>i.hp&&j.isEnemyOf(player); + })&&get.attitude(player,i)<0; + }); + if(es) return 2; + return -1.5; }, }, order:12, @@ -13475,26 +13488,38 @@ game.import('character',function(lib,game,ui,get,ai,_status){ subSkill:{ dying:{ trigger:{global:'dying'}, - forced:true, - popup:false, filter:function(event,player){ - var evt=event.getParent(2); - if(!evt||evt.name!='kuiji_content'||evt.player!=player) return false; - var list=game.filterPlayer(function(current){ - return current.isFriendOf(player); - }).sort(function(a,b){ - return a.hp-b.hp; - }); - return (list.length==1||list[0].hp{ + return current!==trigger.player&&!game.hasPlayer(i=>{ + return trigger.player!==i&&i.hpi.isDamaged()); + else list=game.filterPlayer(current=>{ + return current.isFriendOf(player)&&!game.hasPlayer(i=>{ + return i.hpi.isDamaged()); + if(list.length>1) player.chooseTarget('溃击:选择一名角色回复1点体力',(card,player,target)=>{ + return _status.event.list.includes(target); + },true).set('list',list).set('ai',target=>{ + return get.recoverEffect(target,player,_status.event.player); + }); + else if(list.length) event._result={bool:true,targets:list}; + else event._result={bool:false}; + 'step 1' + if(result.bool){ + let target=result.targets[0]; + player.logSkill('kuiji',target); + target.recover(); + } }, }, },