孙茹二技能bugfix

This commit is contained in:
mengxinzxz 2023-10-24 10:11:11 +08:00 committed by GitHub
parent ecba8d4dcc
commit b6d3af6bbb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 24 additions and 18 deletions

View File

@ -6473,25 +6473,31 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.choosePlayerCard(trigger.player,true,'h'); player.choosePlayerCard(trigger.player,true,'h');
} }
'step 1' 'step 1'
var card=result.cards[0]; if(result.bool){
event.card=card; var card=result.cards[0];
var str=get.translation(player); event.card=card;
if(player!=trigger.player) str+=('对'+get.translation(trigger.player)); var str=get.translation(player);
str+='发动了【忧恤】'; if(player!=trigger.player) str+=('对'+get.translation(trigger.player));
player.showCards(card,str); str+='发动了【忧恤】';
player.chooseTarget('令一名角色获得'+get.translation(card),'若其体力值为全场最少则其回复1点体力',function(card,player,target){ player.showCards(card,str);
return target!=_status.event.getTrigger().player; player.chooseTarget('令一名角色获得'+get.translation(card),'若其体力值为全场最少则其回复1点体力',function(card,player,target){
}).set('ai',function(target){ return target!=_status.event.getTrigger().player;
var player=_status.event.player,att=get.attitude(player,target); }).set('ai',function(target){
if(att<0) return 0; var player=_status.event.player,att=get.attitude(player,target);
if(target.isDamaged()&&target.isMinHp&&get.recoverEffect(target,player,player)>0) return 4*att; if(att<0) return 0;
return att; if(target.isDamaged()&&target.isMinHp&&get.recoverEffect(target,player,player)>0) return 4*att;
}); return att;
});
}
else event.finish();
'step 2' 'step 2'
var target=result.targets[0]; if(result.bool){
event.target=target; var target=result.targets[0];
player.line(target,'green'); event.target=target;
target.gain(card,trigger.player,'give').giver=player; player.line(target,'green');
target.gain(card,trigger.player,'give').giver=player;
}
else event.finish();
'step 3' 'step 3'
if(target.isMinHp()) target.recover(); if(target.isMinHp()) target.recover();
}, },