QOL for yijin & lieshi

This commit is contained in:
Kirin Xiao 2023-10-15 11:03:28 +00:00
parent 3f91566a0c
commit c98343a860
2 changed files with 6 additions and 2 deletions

View File

@ -1951,7 +1951,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
else list.push('选项'+get.cnNumber(ind+1,true));
return link;
});
if(!list.length){event.finish(); return;}
if(!list.length){
game.log(target, "没有能执行的选项");
event.finish();
return;
}
target.chooseControl(list).set('choiceList',choiceList).set('ai',()=>{
var controls=_status.event.controls.slice(),player=_status.event.player,user=_status.event.getParent().player;
if(controls.length==1) return controls[0];

View File

@ -3476,7 +3476,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
direct:true,
group:['yijin_upstart','yijin_die'],
filter:function(event,player){
if(!game.hasPlayer(current=>current!=player)) return false;
if(!game.hasPlayer(current=>current!=player && !lib.skill.yijin.getKane(current).length)) return false;
return lib.skill.yijin.getKane(player).length;
},
getKane:function(player){