优化【文和乱武】ai
This commit is contained in:
parent
b40817bc68
commit
a81c5c5c9f
|
@ -225,7 +225,20 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
player.chooseControl().set('prompt','文和乱武:请选择一项').set('choiceList',[
|
||||
'令'+str+'弃置两张类型不同的手牌',
|
||||
'弃置'+str+'的一张手牌',
|
||||
]);
|
||||
]).set('ai',()=>{
|
||||
let target=_status.event.getParent().target,hs=target.getCards('h'),type=[];
|
||||
if(hs.length<2) return 0;
|
||||
hs.forEach(i=>{
|
||||
type.add(get.type2(i,target));
|
||||
});
|
||||
if(target.identity!=='qun'){
|
||||
if(type.length>1) return 0;
|
||||
return 1;
|
||||
}
|
||||
if(type.length<2||target.hp<3) return 1;
|
||||
if(hs.length===2) return 0;
|
||||
return 1;
|
||||
});
|
||||
'step 2'
|
||||
if(result.index==0){
|
||||
var list=[],hs=target.getCards('h');
|
||||
|
|
Loading…
Reference in New Issue