Merge pull request #898 from PZ157/PR-Branch

bugfix
This commit is contained in:
Spmario233 2024-02-03 15:20:51 +08:00 committed by GitHub
commit 18f79cf21d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 12 deletions

View File

@ -6852,19 +6852,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
'step 6'
if(result.bool&&result.links.length){
var link=result.links[0];
if(get.position(link)=='h'){
event.targets[1].gain(link);
}
else if(get.position(link)=='e'){
event.targets[1].equip(link);
}
else if(link.viewAs){
event.targets[1].addJudge({name:link.viewAs},[link]);
}
if(get.position(link)=='h') event.targets[1].gain(link,event.targets[0],'giveAuto');
else{
event.targets[1].addJudge(link);
event.targets[0].$give(link,event.targets[1],false);
if(get.position(link)=='e') event.targets[1].equip(link);
else if(link.viewAs) event.targets[1].addJudge({name:link.viewAs},[link]);
else event.targets[1].addJudge(link);
}
event.targets[0].$give(link,event.targets[1],false);
game.log(event.targets[0],'的',get.position(link)=='h'?'一张手牌':link,'被移动给了',event.targets[1]);
game.delay();
}

View File

@ -121,7 +121,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
forced:true,
content:function*(event,map){
var player=map.player,trigger=map.trigger;
if(!trigger.card||!trigger.cards.length){
if(!trigger.card||!trigger.cards||!trigger.cards.length){
trigger.num++;
event.finish();
return;