优化【父荫】【正序】【恩遇】ai
This commit is contained in:
parent
1cb08bff76
commit
f670242335
|
@ -1037,7 +1037,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
ai:{
|
ai:{
|
||||||
effect:{
|
effect:{
|
||||||
target:function(card,player,target){
|
target:function(card,player,target){
|
||||||
let hs=player.getCards('h',i=>i!==card&&(!card.cards||!card.cards.contains(i))),num=player.getCardUsable('sha');
|
let hs=player.getCards('h',i=>i!==card&&(!card.cards||!card.cards.includes(i))),num=player.getCardUsable('sha');
|
||||||
if(card.name!=='sha'&&card.name!=='juedou'||hs.length<target.countCards('h')) return 1;
|
if(card.name!=='sha'&&card.name!=='juedou'||hs.length<target.countCards('h')) return 1;
|
||||||
if(game.hasPlayer2(function(current){
|
if(game.hasPlayer2(function(current){
|
||||||
return current.getHistory('useCard',function(evt){
|
return current.getHistory('useCard',function(evt){
|
||||||
|
@ -1046,6 +1046,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
})) return 1;
|
})) return 1;
|
||||||
if(card.name==='sha') num--;
|
if(card.name==='sha') num--;
|
||||||
hs=hs.filter(i=>{
|
hs=hs.filter(i=>{
|
||||||
|
if(!player.canUse(i,target)) return false;
|
||||||
if(i.name==='juedou') return true;
|
if(i.name==='juedou') return true;
|
||||||
if(num&&i.name==='sha'){
|
if(num&&i.name==='sha'){
|
||||||
num--;
|
num--;
|
||||||
|
|
|
@ -1531,6 +1531,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
},
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
player.draw(trigger.getl(player).cards2.length);
|
player.draw(trigger.getl(player).cards2.length);
|
||||||
|
},
|
||||||
|
ai:{
|
||||||
|
effect:{
|
||||||
|
target:(card,player,target)=>{
|
||||||
|
if((get.tag(card,'lose')||get.tag(card,'discard'))&&target.getHistory('damage').length&&!target.hasHistory('useSkill',evt=>evt.skill=='dczhengxu_lose')) return [1,1];
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
damage:{
|
damage:{
|
||||||
|
@ -1549,10 +1556,24 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
},
|
},
|
||||||
ai:{
|
ai:{
|
||||||
effect:{
|
effect:{
|
||||||
target:function(card,player,target){
|
target:(card,player,target)=>{
|
||||||
if(player.hasSkillTag('jueqing',false,target)) return;
|
if(player.hasSkillTag('jueqing',false,target)||!get.tag(card,'damage')) return;
|
||||||
if(target.hasHistory('useSkill',evt=>evt.skill=='dczhengxu_damage')) return;
|
if(target.hasHistory('useSkill',evt=>evt.skill=='dczhengxu_damage')||!target.hasHistory('lose',evt=>evt.cards2&&evt.cards2.length)) return;
|
||||||
if(get.tag(card,'damage')) return 0.6;
|
if(get.attitude(player,target)>=0) return 'zeroplayertarget';
|
||||||
|
let num=0,shas=player.getCardUsable('sha'),hs=player.getCards('hs',i=>{
|
||||||
|
if(i===card||card.cards&&card.cards.includes(i)||!get.tag(i,'damage')||!player.canUse(i,target)) return false;
|
||||||
|
if(get.name(i)==='sha'){
|
||||||
|
num++;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
if(card.name==='sha') shas--;
|
||||||
|
num=Math.min(num,shas);
|
||||||
|
num+=hs.length;
|
||||||
|
if(!num) return 'zeroplayertarget';
|
||||||
|
num=1-2/3/num;
|
||||||
|
return [num,0,num,0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4940,11 +4940,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
},
|
},
|
||||||
ai:{
|
ai:{
|
||||||
effect:{
|
effect:{
|
||||||
target:function(card,player,target){
|
target:(card,player,target)=>{
|
||||||
if(player==target) return;
|
if(player===target) return;
|
||||||
if(game.hasPlayer2(current=>{
|
if(game.hasPlayer2(current=>{
|
||||||
return current.hasHistory('useCard',evt=>evt.card.name==card.name&&evt.targets&&evt.targets.contains(player));
|
return current.hasHistory('useCard',evt=>evt.card.name==card.name&&evt.targets&&evt.targets.contains(player));
|
||||||
})) return 'zerotarget';
|
})) return 'zeroplayertarget';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue