From c6238743efb5cdb0c191376704bd17e13f2ec987 Mon Sep 17 00:00:00 2001 From: mengxinzxz <2223529500@qq.com> Date: Wed, 29 Nov 2023 12:17:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=81=B5=E9=9B=8E=E3=80=90?= =?UTF-8?q?=E7=84=9A=E5=BF=83=E3=80=91=EF=BC=8C=E6=AD=A5=E9=AA=98=E3=80=90?= =?UTF-8?q?=E5=AE=9A=E5=8F=9B=E3=80=91=E4=BA=8E=E6=AC=A2=E4=B9=90=E6=88=90?= =?UTF-8?q?=E5=8F=8C=E6=A8=A1=E5=BC=8F=E7=9A=84=E6=8A=80=E8=83=BD=EF=BC=8C?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=91=A3=E6=98=AD=E3=80=90=E9=80=A0=E7=8E=8B?= =?UTF-8?q?=E3=80=91=E4=BA=8E332=E6=A8=A1=E5=BC=8F=E5=8F=AF=E7=94=A8?= =?UTF-8?q?=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/sp.js | 57 +++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 48 insertions(+), 9 deletions(-) diff --git a/character/sp.js b/character/sp.js index 3b3ed9ab5..9ed759f8f 100755 --- a/character/sp.js +++ b/character/sp.js @@ -10596,6 +10596,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, olzaowang:{ mode:['identity'], + available:function(mode){ + if(mode=='identity'&&_status.mode=='purple') return false; + }, audio:2, enable:'phaseUse', limited:true, @@ -17668,7 +17671,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ else num=get.population('fan'); } else if(mode=='versus'){ - num=player.getEnemies().length; + if(!_status.mode||_status.mode!='two') num=player.getEnemies().length; + else{ + var target=game.findPlayer(x=>{ + var num=x.getFriends().length; + return !game.hasPlayer(y=>{ + return x!=y&&y.getFriends().length>num; + }); + }); + num=(target?target.getFriends(true).length:1); + } } else{ num=1; @@ -19871,18 +19883,45 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, fenxin:{ - mode:['identity'], + mode:['identity','versus'], available:function(mode){ if(mode=='identity'&&_status.mode=='purple') return false; + if(mode=='versus'&&_status.mode!='two') return false; }, - trigger:{global:'dieAfter'}, + trigger:{global:['dieAfter','damageEnd']}, filter:function(event,player){ - return ['fan','zhong','nei'].contains(event.player.identity)&&!player.hasSkill('fenxin_'+event.player.identity); + var list=['fan','zhong','nei']; + if(get.mode()=='identity') return event.name=='die'&&list.includes(event.player.identity)&&!player.hasSkill('fenxin_'+event.player.identity); + return event.name=='damage'&&event.player!=player&&list.some(identity=>!player.hasSkill('fenxin_'+identity))&&event.player.getHistory('damage').indexOf(event)==0; }, forced:true, + logTarget:'player', content:function(){ - player.addSkill('fenxin_'+trigger.player.identity); - player.markSkill('fenxin'); + 'step 0' + if(get.mode()=='identity'){ + event._result={ + bool:true, + links:[trigger.player.identity], + }; + } + else{ + player.chooseButton([ + '焚心:请选择〖竭缘〗的升级方式', + [[ + ['fenxin_fan','发动〖竭缘〗增加伤害无体力值限制'], + ['fenxin_zhong','发动〖竭缘〗减少伤害无体力值限制'], + ['fenxin_nei','将〖竭缘〗中的黑色手牌和红色手牌改为一张牌'], + ].filter(list=>!player.hasSkill(list[0])),'textbutton'] + ],true).set('ai',function(button){ + return ['fenxin_fan','fenxin_zhong','fenxin_nei'].indexOf(button.link)+1; + }); + } + 'step 1' + if(result.bool){ + var ideitity=result.links[0]; + player.addSkill('fenxin_'+identity); + player.markSkill('fenxin'); + } }, intro:{ mark:function(dialog,content,player){ @@ -19902,9 +19941,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ zhong:{charlotte:true}, nei:{charlotte:true} }, - ai:{ - combo:'jieyuan' - } + ai:{combo:'jieyuan'}, }, xisheng:{ enable:'chooseToUse', @@ -25754,6 +25791,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ hongde_info:'当你一次获得或失去至少两张牌后,你可以令一名其他角色摸一张牌。', dingpan:'定叛', dingpan_info_identity:'出牌阶段限X次,你可以令一名装备区里有牌的角色摸一张牌,然后其选择一项:1.令你弃置其装备区里的一张牌;2.获得其装备区里的所有牌,若如此做,你对其造成1点伤害。(X为场上存活的反贼数)', + dingpan_info_versus_two:'出牌阶段限X次,你可以令一名装备区里有牌的角色摸一张牌,然后其选择一项:1.令你弃置其装备区里的一张牌;2.获得其装备区里的所有牌,若如此做,你对其造成1点伤害。(X为场上存活的最大阵营角色数)', dingpan_info_versus:'出牌阶段限X次,你可以令一名装备区里有牌的角色摸一张牌,然后其选择一项:1.令你弃置其装备区里的一张牌;2.获得其装备区里的所有牌,若如此做,你对其造成1点伤害。(X为场上存活的敌方角色数)', dingpan_info:'出牌阶段限一次,你可以令一名装备区里有牌的角色摸一张牌,然后其选择一项:1.令你弃置其装备区里的一张牌;2.获得其装备区里的所有牌,若如此做,你对其造成1点伤害。', weidi:'伪帝', @@ -25842,6 +25880,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ jieyuan_info:'当你对一名其他角色造成伤害时,若其体力值大于或等于你的体力值,你可弃置一张黑色手牌,令此伤害+1;当你受到一名其他角色造成的伤害时,若其体力值大于或等于你的体力值,你可弃置一张红色手牌,令此伤害-1。', fenxin:'焚心', fenxin_info:'锁定技,一名其他角色死亡后,若其身份为:忠臣,你本局内发动〖竭缘〗减少伤害时无视体力值限制;反贼,你本局内发动〖竭缘〗增加伤害时无视体力值限制;内奸,你本局内选择发动〖竭缘〗的牌时无颜色和区域限制。', + bolfenxin_info:'锁定技,一名其他角色首次受到伤害后,你选择本局游戏未选择过的一项:1.发动〖竭缘〗减少伤害时无视体力值限制;2.发动〖竭缘〗增加伤害时无视体力值限制;3.发动〖竭缘〗选择的牌时无颜色和区域限制。', qingyi:'轻逸', qingyi1:'轻逸', qingyi2:'轻逸',