Merge pull request #981 from mengxinzxz/PR-Branch

bugfix
This commit is contained in:
Spmario233 2024-02-24 12:13:37 +08:00 committed by GitHub
commit 9ef717e6c8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 10 additions and 8 deletions

View File

@ -205,8 +205,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
let evt=_status.event; let evt=_status.event;
if(evt.name!='chooseToUse') evt=evt.getParent('chooseToUse'); if(evt.name!='chooseToUse') evt=evt.getParent('chooseToUse');
if(!evt||!evt.respondTo||!storage.includes(evt.respondTo[1])) return; if(!evt||!evt.respondTo||!storage.includes(evt.respondTo[1])) return;
const num=get.number(card); const num=get.number(card,player);
if(typeof num!='number'||num<get.number(evt.respondTo[1])) return false; if(!(typeof num!='number'||num>=get.number(evt.respondTo[1]))) return false;
}, },
}, },
onremove(player){ onremove(player){
@ -237,7 +237,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audio:2, audio:2,
trigger:{global:['loseAfter','equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter']}, trigger:{global:['loseAfter','equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter']},
filter(event,player){ filter(event,player){
if(!player.hasEquipableSlot(1)||player.getEquip('sizhaojian')) return false; if(!player.hasEquipableSlot(1)||player.getEquip(1)||player.getEquip('sizhaojian')) return false;
const card=get.cardPile('sizhaojian','field'); const card=get.cardPile('sizhaojian','field');
if(!card||!player.canEquip(card,true)) return false; if(!card||!player.canEquip(card,true)) return false;
return game.hasPlayer(target=>{ return game.hasPlayer(target=>{
@ -1025,9 +1025,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
olsbyufeng_block:'思召剑', olsbyufeng_block:'思召剑',
olsbyufeng_info:'游戏开始时,若【思召剑】未加入本局游戏,若你可装备【思召剑】,则你将【思召剑】置入装备区。', olsbyufeng_info:'游戏开始时,若【思召剑】未加入本局游戏,若你可装备【思召剑】,则你将【思召剑】置入装备区。',
sizhaojian:'思召剑', sizhaojian:'思召剑',
sizhaojian_info:'当你使用有点数的【杀】指定目标后,你令目标角色只能使用有点数且点数大于等于此【杀】的【闪】响应此牌。', sizhaojian_info:'当你使用有点数的【杀】指定目标后,你令目标角色只能使用无点数或点数大于等于此【杀】的【闪】响应此牌。',
olsbshishou:'士首', olsbshishou:'士首',
olsbshishou_info:'主公技,其他群势力角色失去装备区的牌后,若你的装备区中没有【思召剑】,且【思召剑】存在于场上/牌堆/弃牌堆中,其可令你将【思召剑】置入装备区。', olsbshishou_info:'主公技,其他群势力角色失去装备区的牌后,若你的装备区中没有武器牌,且【思召剑】存在于场上/牌堆/弃牌堆中,其可令你将【思召剑】置入装备区。',
onlyOL_yijiang1:'OL专属·将1', onlyOL_yijiang1:'OL专属·将1',
onlyOL_yijiang2:'OL专属·将2', onlyOL_yijiang2:'OL专属·将2',

View File

@ -8922,7 +8922,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger:{source:'damageBegin1'}, trigger:{source:'damageBegin1'},
forced:true, forced:true,
audio:'paoxiao', audio:'paoxiao',
audioname:['re_zhangfei','guanzhang','xiahouba'], audioname:['re_zhangfei','guanzhang','xiahouba','re_guanzhang'],
filter:function(event,player){ filter:function(event,player){
return event.card&&event.card.name=='sha'&&player.countMark('olpaoxiao2')>0; return event.card&&event.card.name=='sha'&&player.countMark('olpaoxiao2')>0;
}, },

View File

@ -9538,6 +9538,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
group:'fuhun2' group:'fuhun2'
}, },
fuhun2:{ fuhun2:{
audio:'fuhun',
audioname:['re_guanzhang'],
trigger:{source:'damageSource'}, trigger:{source:'damageSource'},
forced:true, forced:true,
filter:function(event,player){ filter:function(event,player){

View File

@ -7462,7 +7462,7 @@ export class Player extends HTMLDivElement {
const player = this, skills = this.getRemovableAdditionalSkills(skill, target); const player = this, skills = this.getRemovableAdditionalSkills(skill, target);
if(skills.length){ if(skills.length){
player.removeSkill(skills); player.removeSkill(skills);
if (player.additionalSkills[skill]&&player.additionalSkills[skill].length) delete player.additionalSkills[skill]; if (player.additionalSkills[skill]&&!player.additionalSkills[skill].length) delete player.additionalSkills[skill];
} }
_status.event.clearStepCache(); _status.event.clearStepCache();
return this; return this;
@ -7475,7 +7475,7 @@ export class Player extends HTMLDivElement {
return '#g【' + get.translation(i) + '】'; return '#g【' + get.translation(i) + '】';
})); }));
player.removeSkill(skills); player.removeSkill(skills);
if (player.additionalSkills[skill]&&player.additionalSkills[skill].length) delete player.additionalSkills[skill]; if (player.additionalSkills[skill]&&!player.additionalSkills[skill].length) delete player.additionalSkills[skill];
}); });
} }
} }