Merge pull request #998 from copcap/dev

刘繇和胡遵相关bug修复
This commit is contained in:
Spmario233 2024-02-28 18:33:08 +08:00 committed by GitHub
commit 461e124058
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 14 additions and 6 deletions

View File

@ -16029,7 +16029,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
requanfeng_info:'限定技。①其他角色死亡时你可失去〖弘仪〗然后获得其武将牌上的所有非主公技非隐匿技和非Charlotte技加1点体力上限并回复1点体力。②当你处于濒死状态时你可以加2点体力上限然后回复4点体力。',
quanfeng:'劝封',
quanfeng_info:'锁定技限定技一名角色死亡时你选择获得其的一个技能主公技限定技觉醒技隐匿技使命技带有Charlotte标签的技能除外然后加1点体力上限并回复1点体力。',
simashi:'司马师',
simashi:'手杀司马师',
simashi_prefix:'手杀',
baiyi:'败移',
baiyi_info:'限定技,出牌阶段,若你已受伤,你可以交换两名其他角色的座次。',
jinglve:'景略',

View File

@ -2037,7 +2037,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
filter(event,player){
if(!player.hasZhuSkill('twniju')) return false;
if(event.iwhile||(event.target&&event.compareMeanwhile)) return false;
return true;
const participant=[event.player];
if(event.targets) participant.addArray(event.targets);
else participant.add(event.target);
return participant.includes(player);
},
direct:true,
async content(event,trigger,player){

View File

@ -119,7 +119,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audio:2,
trigger:{global:'damageEnd'},
filter(event,player){
return event.source&&event.source!=player&&event.player.isIn();
if(!event.player.isIn()||(event.player!==player&&!player.inRange(event.player))) return false;
return event.source&&event.source!=player;
},
check(event,player){
if(!event.source.isIn()||!event.card||typeof get.number(event.card)!=='number') return 0;
@ -128,12 +129,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
logTarget:'player',
async content(event,trigger,player){
player.judge(card=>{
const evt=get.event().getParent().getTrigger();
const evt=get.event().getParent(get.event('eventName')).getTrigger();
if(!evt.source.isIn()||!evt.card||typeof get.number(evt.card)!=='number') return 0;
if(get.number(card)>get.number(evt.card)) return 1.5;
return 0;
}).set('judge2',r=>r.bool).set('callback',()=>{
const evt=event.getParent(2).getTrigger();
const evtx=event.getParent();
const evt=event.getParent(evtx.eventName).getTrigger();
if(!evt.source.isIn()||!evt.card||typeof get.number(evt.card)!=='number') return;
if(event.judgeResult.number>get.number(evt.card)){
const sha=new lib.element.VCard({name:'sha'}),target=evt.source;
@ -142,6 +144,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
}
})
.set('eventName',event.name)
}
},
dcanjing:{
@ -151,6 +154,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return game.hasPlayer(current=>current.isDamaged());
},
usable:1,
direct:true,
async content(event,trigger,player){
const maxCount=player.getAllHistory('useSkill',evt=>evt.skill==='dcanjing').length+1;
const result=await player.chooseTarget(get.prompt2('dcanjing'),(card,player,target)=>target.isDamaged(),[1,maxCount])
@ -158,7 +162,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return get.attitude(get.player(),target)>0;
})
.forResult();
if(!result.bool) return;
if(!result.bool) return player.storage.counttrigger.dcanjing--;
const targets=result.targets.slice();
targets.sortBySeat(_status.currentPhase);
player.logSkill('dcanjing',targets);