From 0c57827800dceb7ce1431926a31072f39d4f007d Mon Sep 17 00:00:00 2001 From: 157 <3619242020@qq.com> Date: Mon, 25 Dec 2023 15:28:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B0=8F=E6=A6=82=E7=8E=87?= =?UTF-8?q?=E8=BF=87=E6=97=A9=E7=A7=BB=E9=99=A4=E5=85=A8=E5=B1=80=E6=8A=80?= =?UTF-8?q?=E8=83=BD=E7=9A=84bug(=E9=83=A8=E5=88=86)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/huicui.js | 12 +++--------- character/jsrg.js | 4 ++-- character/refresh.js | 4 ++-- character/shiji.js | 2 +- character/tw.js | 2 +- character/xianding.js | 6 +++--- character/yijiang.js | 4 ++-- 7 files changed, 14 insertions(+), 20 deletions(-) diff --git a/character/huicui.js b/character/huicui.js index af0e6172c..a17358c08 100644 --- a/character/huicui.js +++ b/character/huicui.js @@ -7974,9 +7974,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ init:function(player){ game.addGlobalSkill('huguan_all'); }, - onremove:function(player){ - game.removeGlobalSkill('huguan_all'); - }, trigger:{global:'useCard'}, direct:true, filter:function(event,player){ @@ -8052,7 +8049,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ let num = -157; game.countPlayer(function (current){ if(current.hasSkill('huguan')) num = Math.max(num, get.attitude(_status.event.player, current)); - }); + }, true); if(num === -157) game.removeGlobalSkill('huguan_all'); else if(num === 0) player.storage.huguan_all = 6; else if(num > 0) player.storage.huguan_all = 9; @@ -9168,7 +9165,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ game.addGlobalSkill('fengxiang_use'); }, onremove:function(player){ - game.removeGlobalSkill('fengxiang_use'); + if(!game.hasPlayer(current=>current.hasSkill('fengxiang'),true)) game.removeGlobalSkill('fengxiang_use'); }, trigger:{player:'damageEnd'}, forced:true, @@ -9210,10 +9207,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, trigger:{player:'dieAfter'}, filter:function(event,player){ - for(let i of game.players){ - if(i.hasSkill('fengxiang')) return false; - } - return true; + return !game.hasPlayer(current=>current.hasSkill('fengxiang'),true); }, silent:true, forceDie:true, diff --git a/character/jsrg.js b/character/jsrg.js index 87921e89f..4847fa1dd 100644 --- a/character/jsrg.js +++ b/character/jsrg.js @@ -682,7 +682,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ game.addGlobalSkill('jsrgninghan_frozen'); }, onremove:(player)=>{ - game.removeGlobalSkill('jsrgninghan_frozen'); + if(!game.hasPlayer(current=>current.hasSkill('jsrgninghan'),true)) game.removeGlobalSkill('jsrgninghan_frozen'); }, trigger:{global:'damageEnd'}, filter:function(event,player){ @@ -709,7 +709,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, trigger:{player:'dieAfter'}, filter:(event,player)=>{ - return !game.hasPlayer(current=>!current.hasSkill('jsrgninghan')); + return !game.hasPlayer(current=>!current.hasSkill('jsrgninghan'),true); }, silent:true, forceDie:true, diff --git a/character/refresh.js b/character/refresh.js index dbd13f0b4..00090875c 100755 --- a/character/refresh.js +++ b/character/refresh.js @@ -5828,7 +5828,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ game.addGlobalSkill('relongyin_order'); }, onremove:(player)=>{ - game.removeGlobalSkill('relongyin_order'); + if(!game.hasPlayer(current=>current.hasSkill('relongyin'),true)) game.removeGlobalSkill('relongyin_order'); }, trigger:{global:'useCard'}, direct:true, @@ -5917,7 +5917,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, trigger:{player:'dieAfter'}, filter:(event,player)=>{ - return !game.hasPlayer(current=>current.hasSkill('relongyin')); + return !game.hasPlayer(current=>current.hasSkill('relongyin'),true); }, silent:true, forceDie:true, diff --git a/character/shiji.js b/character/shiji.js index 93afe4dd4..94fe88ffd 100644 --- a/character/shiji.js +++ b/character/shiji.js @@ -5994,7 +5994,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ game.addGlobalSkill('spshanxi_bj'); }, onremove:function(player){ - game.removeGlobalSkill('spshanxi_bj'); + if(!game.hasPlayer(current=>current.hasSkill('spshanxi'),true)) game.removeGlobalSkill('spshanxi_bj'); }, trigger:{player:'phaseUseBegin'}, direct:true, diff --git a/character/tw.js b/character/tw.js index 42dd48fdf..45bbc0723 100644 --- a/character/tw.js +++ b/character/tw.js @@ -11909,7 +11909,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ game.addGlobalSkill('twzhian_ai'); }, onremove:function(player){ - game.removeGlobalSkill('twzhian_ai'); + if(!game.hasPlayer((current)=>current.hasSkill('twzhian'),true)) game.removeGlobalSkill('twzhian_ai'); }, usable:1, trigger:{global:'useCardAfter'}, diff --git a/character/xianding.js b/character/xianding.js index 70d2cbf03..e55242c72 100644 --- a/character/xianding.js +++ b/character/xianding.js @@ -4783,7 +4783,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ game.addGlobalSkill('dcaichen_hit'); }, onremove:function(player){ - game.removeGlobalSkill('dcaichen_hit'); + if(!game.hasPlayer(current=>current.hasSkill('dcaichen'),true)) game.removeGlobalSkill('dcaichen_hit'); }, trigger:{ player:['loseAfter','phaseDiscardBefore'], @@ -4813,7 +4813,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ hit:{ trigger:{player:'dieAfter'}, filter:function(event,player){ - return !game.hasPlayer(current=>current.hasSkill('dcaichen')); + return !game.hasPlayer(current=>current.hasSkill('dcaichen'),true); }, silent:true, forceDie:true, @@ -5526,7 +5526,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ all:{ trigger:{player:'dieAfter'}, filter:function(event,player){ - return !game.hasPlayer(current=>current.hasSkill('dcwumei_wake')); + return !game.hasPlayer(current=>current.hasSkill('dcwumei_wake'),true); }, silent:true, forceDie:true, diff --git a/character/yijiang.js b/character/yijiang.js index f91eecc10..7eef0fb8e 100755 --- a/character/yijiang.js +++ b/character/yijiang.js @@ -7558,7 +7558,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ game.addGlobalSkill('longyin_order'); }, onremove:(player)=>{ - game.removeGlobalSkill('longyin_order'); + if(!game.hasPlayer(current=>current.hasSkill('longyin'),true)) game.removeGlobalSkill('longyin_order'); }, trigger:{global:'useCard'}, direct:true, @@ -7647,7 +7647,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, trigger:{player:'dieAfter'}, filter:(event,player)=>{ - return !game.hasPlayer(current=>current.hasSkill('longyin')); + return !game.hasPlayer(current=>current.hasSkill('longyin'),true); }, silent:true, forceDie:true,