rejianxiong_old bugfix

This commit is contained in:
mengxinzxz 2024-04-07 19:13:13 +08:00
parent cd154592c0
commit c88f74f955
1 changed files with 24 additions and 26 deletions

View File

@ -13577,40 +13577,38 @@ game.import('character',function(lib,game,ui,get,ai,_status){
gz_caocao:'jianxiong',
},
trigger:{player:'damageEnd'},
direct:true,
content:function(){
"step 0"
if(get.itemtype(trigger.cards)=='cards'&&get.position(trigger.cards[0],true)=='o'){
player.chooseControl('rejianxiong_mopai','rejianxiong_napai','cancel2').set('prompt',get.prompt('rejianxiong')).ai=function(){
var trigger=_status.event.getTrigger();
if(trigger.cards.length==1&&trigger.cards[0].name=='sha') return 0;
return 1;
};
}
else{
player.chooseControl('rejianxiong_mopai','cancel2').set('prompt',get.prompt('rejianxiong'));
}
"step 1"
if(result.control=='rejianxiong_napai'){
player.logSkill('rejianxiong');
player.gain(trigger.cards);
player.$gain2(trigger.cards);
}
else if(result.control=='rejianxiong_mopai'){
player.logSkill('rejianxiong');
player.draw();
async cost(event,trigger,player){
let list=['摸牌'];
if(get.itemtype(trigger.cards)=='cards'&&trigger.cards.filterInD().length){
list.push('拿牌');
}
list.push('cancel2');
const {result:{control}}=await player.chooseControl(list).set('prompt',get.prompt2('rejianxiong_old')).set('ai',()=>{
const player=get.event('player'),trigger=get.event().getTrigger();
const cards=trigger.cards.filterInD();
if(get.event().controls.includes('拿牌')){
if(cards.reduce((sum,card)=>{
return sum+(card.name=='du'?-1:1);
},0)>1||player.getUseValue(cards[0])>6) return '拿牌';
}
return '摸牌';
});
event.result={bool:(control!='cancel2'),cost_data:control};
},
async content(event,trigger,player){
if(event.cost_data=='摸牌') await player.draw();
else await player.gain(trigger.cards.filterInD(),'gain2');
},
ai:{
maixie:true,
maixie_hp:true,
effect:{
target:function(card,player,target){
target(card,player,target){
if(player.hasSkillTag('jueqing',false,target)) return [1,-1];
if(get.tag(card,'damage')&&player!=target) return [1,0.6];
}
}
}
},
},
},
},
reyiji:{
audio:2,