From 3c665facfa21869e81f07fbc4fbd5ceee6dbb7be Mon Sep 17 00:00:00 2001 From: 157 <144450955+PZ157@users.noreply.github.com> Date: Fri, 6 Oct 2023 17:27:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E3=80=90=E8=8B=B1=E9=AD=82?= =?UTF-8?q?=E3=80=91ai?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/shenhua.js | 47 ++++++++++++++++++++++++++++++++++++++------ 1 file changed, 41 insertions(+), 6 deletions(-) diff --git a/character/shenhua.js b/character/shenhua.js index 2921d8533..1946bb80b 100755 --- a/character/shenhua.js +++ b/character/shenhua.js @@ -5030,6 +5030,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ re_sunyi:'gzyinghun_re_sunyi', tw_ol_sunjian:'yinghun_ol_sunjian', }, + mod:{ + aiOrder:function(player,card,num){ + if(num>0&&_status.event&&_status.event.type=='phase'&&get.tag(card,'recover')){ + if(player.needsToDiscard()) return num/3; + return 0; + } + } + }, trigger:{player:'phaseZhunbeiBegin'}, direct:true, preHidden:true, @@ -5081,6 +5089,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(event.num>0) event.target.chooseToDiscard(event.num,true,'he'); } }, + ai:{ + effect:{ + target:function(card,player,target){ + if(get.tag(card,'damage')&&get.itemtype(player)==='player'&&target.hp>(player.hasSkillTag('damageBonus',true,{ + target:target, + card:card + })?2:1)) return [1,1]; + } + }, + threaten:function(player,target){ + return Math.max(0.5,target.getDamagedHp()/2); + }, + maixie:true + } }, gzyinghun:{ audio:'yinghun', @@ -5089,6 +5111,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ re_sunyi:'gzyinghun_re_sunyi', tw_ol_sunjian:'yinghun_ol_sunjian', }, + mod:{ + aiOrder:function(player,card,num){ + if(num>0&&_status.event&&_status.event.type=='phase'&&get.tag(card,'recover')){ + if(player.needsToDiscard()) return num/3; + return 0; + } + } + }, trigger:{player:'phaseZhunbeiBegin'}, filter:function(event,player){ return player.getDamagedHp()>0; @@ -5143,13 +5173,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, ai:{ - threaten:function(player,target){ - if(target.hp==target.maxHp) return 0.5; - if(target.hp==1) return 2; - if(target.hp==2) return 1.5; - return 0.5; + effect:{ + target:function(card,player,target){ + if(get.tag(card,'damage')&&get.itemtype(player)==='player'&&target.hp>(player.hasSkillTag('damageBonus',true,{ + target:target, + card:card + })?2:1)) return [1,1]; + } }, - maixie:true, + threaten:function(player,target){ + return Math.max(0.5,target.getDamagedHp()/2); + }, + maixie:true } }, yinghun_ol_sunjian:{audio:2},