From 630f746f181a6294a45dc0414358e2f869a4b761 Mon Sep 17 00:00:00 2001 From: 157 <144450955+PZ157@users.noreply.github.com> Date: Fri, 6 Oct 2023 21:48:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E3=80=90=E9=AA=81=E6=9E=9C?= =?UTF-8?q?=E3=80=91=E3=80=90=E6=8F=B4=E5=85=B9=E3=80=91=E3=80=90=E6=B8=85?= =?UTF-8?q?=E8=AE=AE=E3=80=91=E3=80=90=E5=B8=A6=E7=A0=BA=E3=80=91ai?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/sp.js | 46 +++++++++++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/character/sp.js b/character/sp.js index 51f9926bc..ff4a0dcec 100755 --- a/character/sp.js +++ b/character/sp.js @@ -3686,15 +3686,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, mod:{ aiValue:function(player,card,num){ - if(get.itemtype(card)!='card'||!card.hasGaintag('oldaili_tag')) return; - if(get.distance(_status.currentPhase,player,'absolute')==1&&!player.isTurnedOver()) return; - if(player.countCards('h',card=>{ + if(num < 0 ||get.itemtype(card) != 'card' || !card.hasGaintag('oldaili_tag')) return; + if(get.distance(_status.currentPhase, player, 'absolute') == 1 && !player.isTurnedOver()) return; + let dai = player.countCards('h', (card) => { return card.hasGaintag('oldaili_tag'); - })%2==0&&!ui.selected.cards.some(card=>{ + }); + if(ui.selected.cards && ui.selected.cards.length) dai += ui.selected.cards.filter((card) => { return card.hasGaintag('oldaili_tag'); - })){ - return num/10; - } + }).length; + if(dai % 2) return Math.sqrt(num); + return num + 6; }, aiUseful:function(){ return lib.skill.oldaili.mod.aiValue.apply(this,arguments); @@ -6113,9 +6114,22 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, ai:{ threaten:1.2, - order:9, + order:9.1, result:{ - target:-1, + player:function(player){ + let min=24; + player.countCards('he',function(card){ + min=Math.min(min,get.value(card)); + }); + if(ui.selected.targets.length==1) return 1-min/6; + return 0.75-min/48; + }, + target:function(player,target){ + if(target.hasCard(function(card){ + return lib.filter.cardDiscardable(card,player,'olqingyi'); + },'he')) return -1; + return 0; + } }, }, group:'olqingyi_gain', @@ -8528,13 +8542,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return player!=event.player&&event.player.isIn()&&player.countCards('h')>0&&!player.hasSkill('yuanzi_round',null,null,false); }, check:function(event,player){ - if(get.attitude(player,event.player)<=4) return false; - if(event.player.hasJudge('lebu')) return false; + if(event.player.hasJudge('lebu')||get.attitude(player,event.player)<2) return false; return game.hasPlayer(function(current){ - return event.player!=player&&game.hasPlayer(function(current){ - return current!=player&¤t!=event.player&&event.player.inRange(current)&&get.attitude(event.player,current)<0; - }); - }) + return current!==player&¤t!==event.player&&event.player.inRange(current)&&get.attitude(event.player,current)<0; + }); }, content:function(){ var cards=player.getCards('h'); @@ -21635,6 +21646,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ "step 1" if(result.bool){ var nono=(get.damageEffect(trigger.player,player,trigger.player)>=0); + if(get.mode()!=='identity'||player.identity!=='nei') player.addExpose(0.15); trigger.player.chooseToDiscard('he','弃置一张装备牌并令'+get.translation(player)+'摸一张牌,或受到一点伤害',{type:'equip'}).set('ai',function(card){ if(_status.event.nono){ return 0; @@ -21653,10 +21665,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ else{ trigger.player.damage(); } - }, - ai:{ - expose:0.3, - threaten:1.3 } }, suishi:{