Merge pull request #1166 from PZ157/PR-Branch

部分技能优化
This commit is contained in:
Spmario233 2024-04-07 22:40:39 +08:00 committed by GitHub
commit 68b6a39f67
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 34 additions and 35 deletions

View File

@ -4052,7 +4052,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger:{player:'phaseUseEnd'},
zhuSkill:true,
unique:true,
direct:true,
popup:false,
filter:function(event,player){
if(!player.hasZhuSkill('sbjijiang')) return false;
return game.hasPlayer(current=>{
@ -4060,17 +4060,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return game.hasPlayer(currentx=>current.inRange(currentx));
});
},
content:function(){
'step 0'
var next=player.chooseTarget(get.prompt2('sbjijiang'),2);
next.set('filterTarget',(card,player,target)=>{
async cost(event,trigger,player){
event.result=await player.chooseTarget(get.prompt2('sbjijiang'),2).set('filterTarget',(card,player,target)=>{
if(!ui.selected.targets.length) return target.group=='shu'&&target.hp>=player.hp&&target!=player;
var current=ui.selected.targets[0];
return current.inRange(target);
});
next.set('targetprompt',['进行选择','出杀对象']);
next.set('multitarget',true);
next.set('ai',target=>{
}).set('targetprompt',['进行选择','出杀对象']).set('multitarget',true).set('ai',target=>{
var player=_status.event.player;
if(ui.selected.targets.length){
var current=ui.selected.targets[0];
@ -4085,25 +4080,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return -att*get.threaten(target,player);
}
return curs.reduce((max,i)=>Math.max(max,get.effect(i,new lib.element.VCard({name:'sha'}),target,player)),-1);
});
'step 1'
if(result.bool){
var targets=result.targets;
event.targets=targets;
if(targets[0].group!='shu'||targets[0].hp<player.hp||targets[0]==player) targets.reverse();
player.logSkill('sbjijiang',targets,false);
player.line2(targets);
var choiceList=[
'视为对'+get.translation(targets[1])+'使用一张【杀】',
'你的下一个出牌阶段开始前,跳过此阶段'
];
if(!targets[0].canUse({name:'sha',isCard:true},targets[1],false)) event._result={index:1};
else targets[0].chooseControl().set('choiceList',choiceList).set('ai',()=>{
return _status.event.choice;
}).set('choice',get.effect(targets[1],{name:'sha'},targets[0],targets[0])>get.effect(targets[0],{name:'lebu'},targets[0],targets[0])?0:1);
}
else event.finish();
'step 2'
}).forResult();
},
async content(event,trigger,player){
let targets=event.targets;
player.logSkill('sbjijiang',targets,false);
player.line2(targets);
var choiceList=[
'视为对'+get.translation(targets[1])+'使用一张【杀】',
'你的下一个出牌阶段开始前,跳过此阶段'
],result;
if(!targets[0].canUse({name:'sha',isCard:true},targets[1],false)) result={index:1};
else result=await targets[0].chooseControl().set('choiceList',choiceList).set('ai',()=>{
return _status.event.choice;
}).set('choice',get.effect(targets[1],{name:'sha'},targets[0],targets[0])>get.effect(targets[0],{name:'lebu'},targets[0],targets[0])?0:1).forResult();
if(result.index==0){
targets[0].useCard({name:'sha',isCard:true},targets[1],false);
}

View File

@ -718,8 +718,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
},
create:function(group,player){
if(!lib.skill['starcanxi_'+group]){
lib.skill['starcanxi_'+group]={
const skill='starcanxi_'+group;
get.info('starcanxi').createSkill(skill);
if(!_status.postReconnect.starcanxi){
_status.postReconnect.starcanxi=[get.info('starcanxi').createSkill,[]];
}
_status.postReconnect.starcanxi[1].add(skill);
player.addSkill(skill);
},
createSkill(skill){
if(!lib.skill[skill]) game.broadcastAll(skill=>{
const group=skill.slice('starcanxi_'.length);
lib.skill[skill]={
mark:true,
charlotte:true,
onremove:function(player){
@ -727,11 +737,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
intro:{content:'玉玺的一角'},
};
lib.translate['starcanxi_'+group]='残玺·'+get.translation(group+'2');
lib.skill['starcanxi_'+group].marktext=get.translation(group);
lib.translate['starcanxi_'+group+'_bg']=get.translation(group);
}
player.addSkill('starcanxi_'+group);
lib.translate[skill]='残玺·'+get.translation(group+'2');
lib.skill[skill].marktext=get.translation(group);
lib.translate[skill+'_bg']=get.translation(group);
},skill);
},
subSkill:{
wangsheng:{