From 947694c8db215dfb5ec12af399e12405d55a02b3 Mon Sep 17 00:00:00 2001 From: mengxinzxz <2223529500@qq.com> Date: Mon, 15 Jan 2024 23:17:25 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=8D=81=E5=91=A8=E5=B9=B4=E4=BA=8C?= =?UTF-8?q?=E4=B9=94bugfix=EF=BC=8CTW/=E5=8D=81=E5=91=A8=E5=B9=B4=E4=BA=8C?= =?UTF-8?q?=E4=B9=94=E4=BD=BF=E7=94=A8tempname=E6=9C=BA=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/tw.js | 17 ++++++----------- character/xianding.js | 38 +++++++++++++++++--------------------- 2 files changed, 23 insertions(+), 32 deletions(-) diff --git a/character/tw.js b/character/tw.js index a81055f87..bd06292b8 100644 --- a/character/tw.js +++ b/character/tw.js @@ -77,7 +77,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ tw_madai:['male','shu',4,['mashu','twqianxi']], tw_niujin:['male','wei',4,['twcuorui','twliewei']], tw_guanqiujian:['male','wei',3,['twzhengrong','twhongju']], - tw_daxiaoqiao:['female','wu',3,['twxingwu','twpingting']], + tw_daxiaoqiao:['female','wu',3,['twxingwu','twpingting'],['tempname:daxiaoqiao']], tw_furong:['male','shu',4,['twxuewei','twliechi']], tw_yl_luzhi:['male','qun',3,['twmingren','twzhenliang']], tw_liuzhang:['male','qun',3,['jutu','twyaohu','rehuaibi']], @@ -6240,7 +6240,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, trigger:{global:['roundStart','dying']}, init:function(player,skill){ - if(player.getExpansions('twxingwu').length) player.addAdditionalSkill(skill,['tianxiang_daxiaoqiao','liuli_daxiaoqiao']); + if(player.getExpansions('twxingwu').length) player.addAdditionalSkill(skill,['tianxiang','liuli']); else player.removeAdditionalSkill(skill); }, filter:function(event,player){ @@ -6269,18 +6269,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, subSkill:{ update:{ - trigger:{ - player:['loseAfter','loseAsyncAfter','addToExpansionAfter'], + trigger:{player:['loseAfter','loseAsyncAfter','addToExpansionAfter']}, + filter:function(event,player){ + var cards=player.getExpansions('twxingwu'),skills=player.additionalSkills.twpingting; + return !((cards.length&&skills&&skills.length)||(!cards.length&&(!skills||!skills.length))); }, forced:true, silent:true, - filter:function(event,player){ - var cards=player.getExpansions('twxingwu'),skills=player.additionalSkills.twpingting; - if((cards.length&&skills&&skills.length)||(!cards.length&&(!skills||!skills.length))){ - return false; - } - return true; - }, content:function(){ lib.skill.twpingting.init(player,'twpingting'); } diff --git a/character/xianding.js b/character/xianding.js index 378428b2a..cd7dc528b 100644 --- a/character/xianding.js +++ b/character/xianding.js @@ -20,7 +20,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ dc_sp_machao:['male','qun',4,['zhuiji','dc_olshichou']], old_huangfusong:['male','qun',4,['xinfenyue']], dc_xiahouba:['male','shu',4,['rebaobian']], - dc_daxiaoqiao:['female','wu',3,['dcxingwu','dcluoyan']], + dc_daxiaoqiao:['female','wu',3,['dcxingwu','dcluoyan'],['tempname:daxiaoqiao']], tianshangyi:['female','wei',3,['dcposuo','dcxiaoren']], sunlingluan:['female','wu',3,['dclingyue','dcpandi']], dc_wangjun:['male','qun',4,['dctongye','dcchangqu']], @@ -1662,33 +1662,29 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, }, - dcluoyan: { - derivation: ['retianxiang', 'liuli'], - init: function (player) { - if (player.getStorage('dcxingwu').length) player.addAdditionalSkill('dcluoyan', ['retianxiang_daxiaoqiao', 'liuli_daxiaoqiao']); + dcluoyan:{ + derivation:['retianxiang','liuli'], + init:function(player){ + if(player.getExpansions('dcxingwu').length) player.addAdditionalSkill('dcluoyan',['retianxiang','liuli']); else player.removeAdditionalSkill('dcluoyan'); }, - onremove: function (player) { + onremove:function(player){ player.removeAdditionalSkill('dcluoyan'); }, - trigger: { - player: ['loseAfter', 'loseAsyncAfter', 'addToExpansionAfter'], + trigger:{player:['loseAfter','loseAsyncAfter','addToExpansionAfter']}, + filter:function(event,player){ + var cards=player.getExpansions('dcxingwu'),skills=player.additionalSkills.dcluoyan; + return !((cards.length&&skills&&skills.length)||(!cards.length&&(!skills||!skills.length))); }, - filter: function (event, player) { - var cards = player.getExpansions('dcxingwu'), skills = player.additionalSkills.dcluoyan; - if ((cards.length && skills && skills.length) || (!cards.length && (!skills || !skills.length))) { - return false; - } - return true; - }, - forced: true, - content: function () { - lib.skill.dcluoyan.init(player, 'dcluoyan'); + forced:true, + silent:true, + content:function(){ + lib.skill.dcluoyan.init(player,'dcluoyan'); }, }, - retianxiang_daxiaoqiao: { - audio: 'tianxiang_daxiaoqiao', - inherit: 'retianxiang', + retianxiang_daxiaoqiao:{ + audio:'tianxiang_daxiaoqiao', + inherit:'retianxiang', }, //田尚衣 dcposuo:{ From 5979d4eea0ea319eefa32d42b236d3b1d4935fd5 Mon Sep 17 00:00:00 2001 From: mengxinzxz <2223529500@qq.com> Date: Mon, 15 Jan 2024 23:19:19 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=AD=A6=E9=99=86?= =?UTF-8?q?=E9=80=8A=E3=80=90=E5=BD=B0=E6=89=8D=E3=80=91=E8=A2=AB=E5=88=A4?= =?UTF-8?q?=E5=AE=9A=E4=B8=BA=E9=94=81=E5=AE=9A=E6=8A=80=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/xianding.js | 1 + 1 file changed, 1 insertion(+) diff --git a/character/xianding.js b/character/xianding.js index cd7dc528b..5b240138a 100644 --- a/character/xianding.js +++ b/character/xianding.js @@ -1333,6 +1333,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return ui.cardPile.childNodes.length+ui.discardPile.childNodes.length>=count; }, frequent:true, + locked:false, content:function(){ var num=player.hasSkill('dczhangcai_all')?get.number(trigger.card):8; var count=1;