From 5ba4498dfd63bd4c3d6aa1b06b766541b6958d4c Mon Sep 17 00:00:00 2001 From: mengxinzxz <2223529500@qq.com> Date: Mon, 29 Jan 2024 03:18:29 +0800 Subject: [PATCH] =?UTF-8?q?=E7=8E=89=E7=9C=9F=E5=AD=90=E6=B7=BB=E5=8A=A0un?= =?UTF-8?q?equip=5Fequip1=E4=B8=BA=E6=B2=A1=E6=9C=89addSkill=E6=97=B6?= =?UTF-8?q?=E6=9C=BA=E7=9A=84=E8=A7=86=E4=B8=BA=E8=A3=85=E5=A4=87=E6=AD=A6?= =?UTF-8?q?=E5=99=A8=E6=8A=80=E8=83=BD=E4=BD=BF=E7=94=A8=EF=BC=8C=E5=B9=B6?= =?UTF-8?q?=E4=B8=BA=E6=9D=8E=E5=BC=82=E3=80=90=E8=98=B8=E9=87=91=E3=80=91?= =?UTF-8?q?=E8=BF=9B=E8=A1=8C=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/sp.js | 5 +++-- character/tw.js | 13 +++++-------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/character/sp.js b/character/sp.js index 9bd3ffa87..28aaed999 100755 --- a/character/sp.js +++ b/character/sp.js @@ -853,7 +853,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ equipSkill:true, trigger:{player:['shaMiss','eventNeutralized']}, filter:function(event,player){ - if(!player.hasEmptySlot(1)||!lib.card.guanshi) return false; + if(!player.hasEmptySlot(1)||!lib.card.guanshi||player.hasSkillTag('unequip_equip1')) return false; if(event.type!='card'||event.card.name!='sha'||!event.target.isIn()) return false; return player.countCards('he')>=2; }, @@ -889,7 +889,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ directHit_ai:true, skillTagFilter:function(player,tag,arg){ - if(player._olzhanjin_guanshi_temp||!player.hasEmptySlot(1)||!lib.card.guanshi) return; + if(player._olzhanjin_guanshi_temp||!player.hasEmptySlot(1)||!lib.card.guanshi||player.hasSkillTag('unequip_equip1')) return; player._guanshi_temp=true; var bool=(get.attitude(player,arg.target)<0&&arg.card&&arg.card.name=='sha'&&player.countCards('he',card=>{ return card!=arg.card&&(!arg.card.cards||!arg.card.cards.includes(card))&&get.value(card)<5; @@ -899,6 +899,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, effect:{ target:function(card,player,target){ + if(player.hasSkillTag('unequip_equip1')) return; if(player==target&&get.subtype(card)=='equip1'){ if(get.equipValue(card)<=get.equipValue({name:'guanshi'})) return 0; } diff --git a/character/tw.js b/character/tw.js index 68dc405cb..aea80de68 100644 --- a/character/tw.js +++ b/character/tw.js @@ -295,16 +295,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ twhuajing:{ audio:2, getSkills(player){ - let skills=player.getSkills(false,null,false).filter(skill=>{ - const info=get.info(skill); - return info&&info.equipSkill&&info.equipSkill=='equip1'; - }); - skills.addArray(player.getCards('e',card=>get.subtype(card)=='equip1').reduce((list,card)=>{ + return player.getCards('e',card=>get.subtype(card)=='equip1').reduce((list,card)=>{ const info=get.info(card); if(info&&info.skills) return list.addArray(info.skills); return list; - },[])); - return skills; + },[]); }, trigger:{global:'phaseBefore',player:'enterGame'}, filter(event,player){ @@ -517,9 +512,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, trigger:{ player:'loseAfter', - global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'], + global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter','phaseBefore'], }, filter(event,player){ + if(event.name=='phase') return true; if(event.name=='equip'&&event.player==player&&get.subtype(event.card)=='equip1') return true; const evt=event.getl(player); return evt&&evt.player==player&&evt.es&&evt.es.some(card=>get.subtype(card)=='equip1'); @@ -531,6 +527,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ await player.enableSkill('twhuajing_blocker'); await player.disableSkill('twhuajing_blocker',lib.skill.twhuajing.getSkills(player)); }, + ai:{unequip_equip1:true}, }, }, },