玉真子添加unequip_equip1为没有addSkill时机的视为装备武器技能使用,并为李异【蘸金】进行适配

This commit is contained in:
mengxinzxz 2024-01-29 03:18:29 +08:00
parent 225df4ec7f
commit 5ba4498dfd
2 changed files with 8 additions and 10 deletions

View File

@ -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;
}

View File

@ -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},
},
},
},