修复并优化【望梅止渴】
This commit is contained in:
parent
8360f72c1e
commit
d124f8edd6
Binary file not shown.
|
@ -480,39 +480,79 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
||||||
fullskin:true,
|
fullskin:true,
|
||||||
type:'trick',
|
type:'trick',
|
||||||
enable:true,
|
enable:true,
|
||||||
filterTarget:function(card,player,target){
|
filterTarget:true,
|
||||||
return (target.isMinHp()&&target.isDamaged())||target.isMinHandcard();
|
content(){
|
||||||
},
|
|
||||||
content:function(){
|
|
||||||
'step 0'
|
'step 0'
|
||||||
if(target.isMinHp()&&target.isDamaged()){
|
if(target.isMinHp()&&target.isDamaged()){
|
||||||
target.recover();
|
target.recover();
|
||||||
event.rec=true;
|
event.rec=true;
|
||||||
}
|
}
|
||||||
'step 1'
|
'step 1'
|
||||||
if(target.isMinHandcard()){
|
if(target.isMinHandcard()) target.draw(event.rec?1:2);
|
||||||
target.draw(event.rec?1:2);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
ai:{
|
ai:{
|
||||||
order:2.5,
|
order(){
|
||||||
|
let player=_status.event.player,
|
||||||
|
nan=player.hasCard(card=>{
|
||||||
|
return get.name(card)==='nanman';
|
||||||
|
},'hs'),
|
||||||
|
wan=player.hasCard(card=>{
|
||||||
|
return get.name(card)==='wanjian';
|
||||||
|
},'hs'),
|
||||||
|
aoe=0,
|
||||||
|
max=0;
|
||||||
|
game.countPlayer(current=>{
|
||||||
|
if(get.attitude(player,current)<=0) return false;
|
||||||
|
let hp=current.isMinHp(),
|
||||||
|
hc=current.isMinHandcard();
|
||||||
|
if((nan || wan)&&(hp || hc)) aoe=1;
|
||||||
|
if(hp&&hc&&max!==1) max=current===player?1:-1;
|
||||||
|
});
|
||||||
|
if(aoe){
|
||||||
|
if(nan) aoe=Math.max(aoe,get.order('nanman'));
|
||||||
|
if(wan) aoe=Math.max(aoe,get.order('wanjian'));
|
||||||
|
return aoe+0.2;
|
||||||
|
}
|
||||||
|
if(max) return 5.8;
|
||||||
|
if(player.isDamaged()&&player.isMinHp()&&player.countCards('hs','tao')) return get.order('tao')+0.2;
|
||||||
|
return 0.5;
|
||||||
|
},
|
||||||
value:7,
|
value:7,
|
||||||
result:{
|
result:{
|
||||||
target:function(player,target){
|
target(player,target){
|
||||||
var num=0;
|
let num=0,
|
||||||
if(target.isMinHp()&&get.recoverEffect(target)>0){
|
current=player.next,
|
||||||
if(target.hp==1){
|
mei=1,
|
||||||
num+=3;
|
draw=target.hasSkillTag('nogain')?0.1:1;
|
||||||
|
if(!ui.selected.cards) mei=0;
|
||||||
|
let mine=player.countCards('h',card=>{
|
||||||
|
if(mei>0&& ui.selected.cards.includes(card)) return false;
|
||||||
|
if(!mei&&get.name(card)==='phd_wmzk'){
|
||||||
|
mei=-1;
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
else{
|
return true;
|
||||||
num+=2;
|
});
|
||||||
|
if(player.hasSkillTag('noh')&&player.countCards('h')) mine++;
|
||||||
|
let min=mine;
|
||||||
|
while(current!==player){
|
||||||
|
if(current.countCards('h')<min) min=current.countCards('h');
|
||||||
|
current=current.next;
|
||||||
}
|
}
|
||||||
|
if(target.isMinHp()&&target.isDamaged()&&get.recoverEffect(target)>0){
|
||||||
|
if(target.hp===1) num+=3;
|
||||||
|
else num+=2;
|
||||||
}
|
}
|
||||||
if(target.isMinHandcard()){
|
if(player===target){
|
||||||
num+=2;
|
if(mine<=min) num+=(num?2:1)*draw;
|
||||||
}
|
}
|
||||||
|
else if(target.countCards('h')<=min) num+=(num?2:1)*draw;
|
||||||
return num;
|
return num;
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
tag:{
|
||||||
|
draw:1,
|
||||||
|
recover:0.5
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue