From ace1e1a3628d693be13eb33b1904edb1910b3afc Mon Sep 17 00:00:00 2001 From: mengxinzxz <2223529500@qq.com> Date: Sat, 4 Nov 2023 13:25:27 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BA=BF=E4=B8=8B=E5=88=98=E5=8D=8F=E3=80=90?= =?UTF-8?q?=E6=B1=89=E7=BB=9F=E3=80=91=E7=AE=80=E5=8C=96=E4=B8=BA=E6=96=B0?= =?UTF-8?q?=E4=B8=BB=E5=85=AC=E6=8A=80=E5=86=99=E6=B3=95=E5=B9=B6=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0ai?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/offline.js | 57 +++++++++++++++++++++++++++++++++----------- 1 file changed, 43 insertions(+), 14 deletions(-) diff --git a/character/offline.js b/character/offline.js index ffc9fc00c..43c52621a 100644 --- a/character/offline.js +++ b/character/offline.js @@ -4836,7 +4836,26 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, content:function(){ 'step 0' - player.chooseButton([get.prompt('sphantong'),player.storage.sphantong],function(button){return -1}); + player.chooseButton([get.prompt('sphantong'),player.storage.sphantong],function(button){ + var player=_status.event.player; + if(_status.currentPhase==player){ + //血裔 + if((player.hasJudge('lebu')||player.skipList.includes('phaseUse'))&&game.hasPlayer(function(current){ + return current!=player&¤t.group=='qun'; + })) return 1; + //激将 + if(!player.hasJudge('lebu')&&!player.skipList.includes('phaseUse')&&game.hasPlayer(function(current){ + return current!=player&¤t.group=='shu'&¤t.hasSha()&&get.attitude(player,current)>0&&get.attitude(current,player)>0; + })&&game.hasPlayer(function(target){ + return player.canUse({name:'sha'},target)&&get.effect(target,{name:'sha'},player,player)>0; + })) return 1; + } + //护驾 + else if(!player.hasShan()&&game.hasPlayer(function(current){ + return current!=player&¤t.group=='wei'&¤t.mayHaveShan()&&get.attitude(player,current)>0&&get.attitude(current,player)>0; + })) return 1; + return -1; + }); 'step 1' if(result.bool){ player.logSkill('sphantong'); @@ -4848,31 +4867,41 @@ game.import('character',function(lib,game,ui,get,ai,_status){ game.cardsDiscard(card); var list=['hujia','jijiang','jiuyuan','xueyi']; for(var i=0;i0&&get.attitude(current,player)>0; + })&&game.hasPlayer(function(target){ + return player.canUse({name:'sha'},target)&&get.effect(target,{name:'sha'},player,player)>0; + })) return 'jijiang'; + } + //护驾 + else if(!player.hasShan()&&game.hasPlayer(function(current){ + return current!=player&¤t.group=='wei'&¤t.mayHaveShan()&&get.attitude(player,current)>0&&get.attitude(current,player)>0; + })) return 'hujia'; + }); } - if(list.length>0) player.chooseControl(list).set('prompt','选择获得以下技能中的一个'); else event.finish(); } else event.finish(); 'step 2' var skill=result.control; player.addTempSkill(skill); - if(!player.storage.zhuSkill_sphantong) player.storage.zhuSkill_sphantong=[]; - player.storage.zhuSkill_sphantong.add(skill); player.popup(skill,'wood'); game.log(player,'获得了技能','#g【'+get.translation(skill)+'】'); - var next=game.createEvent('sphantong_clear',false); - event.next.remove(next); - trigger.after.push(next); - next.player=player; - next.skill=skill; - next.setContent(function(){ - if(player.storage.zhuSkill_sphantong) player.storage.zhuSkill_sphantong.remove(event.skill); - }) }, }, sphuangen:{ - trigger:{global:'useCardToPlayered'}, + trigger:{global:'useCardToPlayered'}, filter:function(event,player){ if(!event.isFirstTarget) return false; if(get.type(event.card)!='trick') return false;