增加“卡牌”draw并更新本体相关ai

This commit is contained in:
157 2023-12-27 16:56:34 +08:00
parent 936831fec4
commit d0a3222339
19 changed files with 56 additions and 45 deletions

View File

@ -1350,7 +1350,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
if(get.subtype(card)==='equip2'&&target.getEquip('taipingyaoshu')&&!target.countEmpty(2)){ if(get.subtype(card)==='equip2'&&target.getEquip('taipingyaoshu')&&!target.countEmpty(2)){
target._g_taipingyaoshu_temp=true; target._g_taipingyaoshu_temp=true;
let lose=get.effect(target,{name:'losehp'},target,target), let lose=get.effect(target,{name:'losehp'},target,target),
draw=get.effect(target,{name:'wuzhong'},target,target); draw=2*get.effect(target,{name:'draw'},target,target);
delete target._g_taipingyaoshu_temp; delete target._g_taipingyaoshu_temp;
if(lose<0&&target.hp<=1&&!target.hasCard(i=>{ if(lose<0&&target.hp<=1&&!target.hasCard(i=>{
return get.name(i)==='tao'&&lib.filter.cardEnabled(i,target,'forceEnable'); return get.name(i)==='tao'&&lib.filter.cardEnabled(i,target,'forceEnable');

View File

@ -14,6 +14,16 @@ game.import('card',function(lib,game,ui,get,ai,_status){
} }
} }
}, },
draw:{
ai:{
result:{
target:1
},
tag:{
draw:1
}
}
},
losehp:{ losehp:{
ai:{ ai:{
result:{ result:{

View File

@ -1398,9 +1398,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
target.classList.remove('linked2'); target.classList.remove('linked2');
var eff=cards[0][1]; var eff=cards[0][1];
if(eff>0) return eff; if(eff>0) return eff;
return Math.max((get.effect(target,{name:'wuzhong'},player,player)+get.effect(player,{name:'wuzhong'},player,player)/3),get.recoverEffect(target,player,player)); return Math.max((2*get.effect(target,{name:'draw'},player,player)+0.6*get.effect(player,{name:'draw'},player,player)),get.recoverEffect(target,player,player));
} }
return Math.max((get.effect(target,{name:'wuzhong'},player,player)+get.effect(player,{name:'wuzhong'},player,player)/3),get.recoverEffect(target,player,player)); return Math.max((2*get.effect(target,{name:'draw'},player,player)+0.6*get.effect(player,{name:'draw'},player,player)),get.recoverEffect(target,player,player));
}).set('goon',player.countCards('hs',card=>{ }).set('goon',player.countCards('hs',card=>{
return get.name(card)=='jiu'&&player.hasUseTarget(card); return get.name(card)=='jiu'&&player.hasUseTarget(card);
})&&player.countCards('hs',card=>{ })&&player.countCards('hs',card=>{
@ -1425,7 +1425,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var player=_status.event.player,target=_status.event.getParent().target; var player=_status.event.player,target=_status.event.getParent().target;
if(!target.isDamaged()) return 0; if(!target.isDamaged()) return 0;
if(get.attitude(player,target)<=0&&player.countCards('he',card=>get.value(card)<0)>=2) return 0; if(get.attitude(player,target)<=0&&player.countCards('he',card=>get.value(card)<0)>=2) return 0;
return (get.effect(target,{name:'wuzhong'},player,player)+get.effect(player,{name:'wuzhong'},player,player)/3)>get.recoverEffect(target,player,player)?0:1; return (2*get.effect(target,{name:'draw'},player,player)+0.6*get.effect(player,{name:'draw'},player,player))>get.recoverEffect(target,player,player)?0:1;
}); });
} }
else event.finish(); else event.finish();

View File

@ -794,7 +794,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return get.color(card)==color; return get.color(card)==color;
},'h')){ },'h')){
if(color=='red') return get.recoverEffect(player,player,player)+2/Math.max(2,get.value(button.link)); if(color=='red') return get.recoverEffect(player,player,player)+2/Math.max(2,get.value(button.link));
if(color=='black') return get.effect(target,{name:'wuzhong'},target,player)+2/Math.max(2,get.value(button.link)); if(color=='black') return 2*get.effect(target,{name:'draw'},target,player)+2/Math.max(2,get.value(button.link));
} }
return get.value(button.link)/3; return get.value(button.link)/3;
}) })
@ -828,7 +828,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var prompt2='用'+get.translation(event.card1)+'交换对方的'+get.translation(event.card2); var prompt2='用'+get.translation(event.card1)+'交换对方的'+get.translation(event.card2);
if(color=='black'){ if(color=='black'){
prompt2+=',然后对方摸两张牌'; prompt2+=',然后对方摸两张牌';
next.set('goon',get.effect(target,{name:'wuzhong'},target,player)>0); next.set('goon',2*get.effect(target,{name:'draw'},target,player)>0);
} }
else if(color=='red'&&player.isDamaged()){ else if(color=='red'&&player.isDamaged()){
prompt2+='然后你回复1点体力'; prompt2+='然后你回复1点体力';
@ -1105,7 +1105,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
'step 1' 'step 1'
player.chooseTarget('是否令一名其他角色摸等量的牌?',lib.filter.notMe).set('ai',target=>{ player.chooseTarget('是否令一名其他角色摸等量的牌?',lib.filter.notMe).set('ai',target=>{
var player=get.player(); var player=get.player();
return get.effect(target,{name:'wuzhong'},player,player); return get.effect(target,{name:'draw'},player,player);
}); });
'step 2' 'step 2'
if(result.bool){ if(result.bool){
@ -1676,7 +1676,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return player.countCards('h')==target.countCards('h')&&player!=target; return player.countCards('h')==target.countCards('h')&&player!=target;
}).set('ai',target=>{ }).set('ai',target=>{
var player=get.player(); var player=get.player();
return Math.max(get.effect(target,{name:'wuzhong'},player,player),get.effect(target,{name:'guohe'},player,player)/2); return Math.max(get.effect(target,{name:'draw'},player,player),get.effect(target,{name:'guohe'},player,player)/2);
}); });
if(result.bool){ if(result.bool){
var target=result.targets[0]; var target=result.targets[0];
@ -1729,7 +1729,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
})){ })){
player.chooseTarget('整军:是否令一名角色摸一张牌?').set('ai',function(target){ player.chooseTarget('整军:是否令一名角色摸一张牌?').set('ai',function(target){
var player=_status.event.player; var player=_status.event.player;
return get.effect(target,{name:'wuzhong'},player,player); return get.effect(target,{name:'draw'},player,player);
}); });
} }
else event.goto(2); else event.goto(2);

View File

@ -1414,7 +1414,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var player=_status.event.player,target=_status.event.getParent().target; var player=_status.event.player,target=_status.event.getParent().target;
switch(button.link){ switch(button.link){
case 'damage':return get.damageEffect(target,player,player); case 'damage':return get.damageEffect(target,player,player);
case 'draw':return get.effect(player,{name:'wuzhong'},player,player) case 'draw':return 2*get.effect(player,{name:'draw'},player,player)
case 'discard':return get.effect(target,{name:'guohe_copy2'},player,player)*Math.min(1.6,target.countCards('he')); case 'discard':return get.effect(target,{name:'guohe_copy2'},player,player)*Math.min(1.6,target.countCards('he'));
case 'use':return _status.event.getRand('minagi_peiquan')*4; case 'use':return _status.event.getRand('minagi_peiquan')*4;
} }
@ -1447,7 +1447,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return baseEffect+Math.max(...choices.map(choice=>{ return baseEffect+Math.max(...choices.map(choice=>{
switch(choice){ switch(choice){
case 'damage':return get.damageEffect(target,player,player); case 'damage':return get.damageEffect(target,player,player);
case 'draw':return get.effect(player,{name:'wuzhong'},player,player); case 'draw':return 2*get.effect(player,{name:'draw'},player,player);
case 'discard':return get.effect(target,{name:'guohe_copy2'},player,player)*Math.min(1.6,target.countCards('he')); case 'discard':return get.effect(target,{name:'guohe_copy2'},player,player)*Math.min(1.6,target.countCards('he'));
case 'use':return _status.event.getRand('minagi_peiquan')*4; case 'use':return _status.event.getRand('minagi_peiquan')*4;
} }
@ -2643,7 +2643,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.chooseTarget('退论:是否令一名角色摸一张牌或弃置一张牌?').set('ai',function(target){ player.chooseTarget('退论:是否令一名角色摸一张牌或弃置一张牌?').set('ai',function(target){
var player=_status.event.player; var player=_status.event.player;
var att=get.attitude(player,target); var att=get.attitude(player,target);
if(att>0||target.countCards('he')==0) return get.effect(target,{name:'wuzhong'},player,player)/2; if(att>0||target.countCards('he')==0) return get.effect(target,{name:'draw'},player,player);
return get.effect(target,{name:'guohe_copy2'},target,player); return get.effect(target,{name:'guohe_copy2'},target,player);
}); });
} }
@ -12458,7 +12458,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
choicex=choices.slice(0); choicex=choices.slice(0);
var getx=function(a){ var getx=function(a){
switch(a){ switch(a){
case 'draw':return get.effect(player,{name:'wuzhong'},player,player); case 'draw':return 2*get.effect(player,{name:'draw'},player,player);
case 'damage':return get.damageEffect(_status.event.getParent().target,player,player); case 'damage':return get.damageEffect(_status.event.getParent().target,player,player);
default:return 0; default:return 0;
} }

View File

@ -6164,7 +6164,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
logTarget:'player', logTarget:'player',
check:function(event,player){ check:function(event,player){
var eff=get.effect(player,{name:'wuzhong'},player,player)/2; var eff=get.effect(player,{name:'draw'},player,player);
if(player.countCards('h')+1<=event.player.countCards('h')&&event.player.countCards('he')>0) eff+=get.effect(event.player,{name:'guohe_copy2'},player,player); if(player.countCards('h')+1<=event.player.countCards('h')&&event.player.countCards('he')>0) eff+=get.effect(event.player,{name:'guohe_copy2'},player,player);
return eff; return eff;
}, },
@ -7513,7 +7513,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
result:{ result:{
player:function(player,target){ player:function(player,target){
var eff=get.recoverEffect(target,player,player); var eff=get.recoverEffect(target,player,player);
if(target.getDamagedHp()>1) eff+=get.effect(target,{name:'wuzhong'},player,player)/2; if(target.getDamagedHp()>1) eff+=get.effect(target,{name:'draw'},player,player);
return eff; return eff;
}, },
}, },

View File

@ -1583,8 +1583,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return false; return false;
})&&(player.hp>2||get.damageEffect(player,player,player)>=0)) return player; })&&(player.hp>2||get.damageEffect(player,player,player)>=0)) return player;
var info=game.filterPlayer().map(current=>{ var info=game.filterPlayer().map(current=>{
let damage=undamaged.includes(current),card={name:damage?'damage':'wuzhong'}; let damage=undamaged.includes(current),card={name:damage?'damage':'draw'};
return [current,get.effect(current,card,player,player)/(damage?1.5:1)]; return [current,get.effect(current,card,player,player)*(damage?0.7:2)];
}).sort((a,b)=>b[1]-a[1])[0]; }).sort((a,b)=>b[1]-a[1])[0];
if(info[1]>0) return info[0]; if(info[1]>0) return info[0];
return null; return null;
@ -5392,7 +5392,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
onremove:true, onremove:true,
prompt2:'失去1点体力并防止此伤害然后你与其各摸一张牌', prompt2:'失去1点体力并防止此伤害然后你与其各摸一张牌',
check:function(event,player){ check:function(event,player){
return get.damageEffect(event.player,event.source,player,event.nature)*Math.sqrt(event.num)<=get.effect(player,{name:'losehp'},player,player); return get.damageEffect(event.player,event.source,_status.event.player,event.nature)*event.num <
get.effect(player,{name:'losehp'},player,_status.event.player)+get.effect(player,{name:'draw'},player,_status.event.player)+get.effect(event.player,{name:'draw'},player,_status.event.player)/2;
}, },
group:'jsrgjishan_recover', group:'jsrgjishan_recover',
content:function(){ content:function(){

View File

@ -1193,7 +1193,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
]).set('prompt','雀颂:请选择一项').set('ai',()=>{ ]).set('prompt','雀颂:请选择一项').set('ai',()=>{
var player=_status.event.player; var player=_status.event.player;
var len=_status.event.len; var len=_status.event.len;
return get.effect(player,{name:'wuzhong'},player,player)*len/2>=get.recoverEffect(player,player,player)?0:1; return get.effect(player,{name:'draw'},player,player)*len>=get.recoverEffect(player,player,player)?0:1;
}).set('len',len); }).set('len',len);
} }
} }
@ -3588,7 +3588,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
for(var card of cards){ for(var card of cards){
var num=i+1; var num=i+1;
if(cards2.slice(0,num).contains(card)) continue; if(cards2.slice(0,num).contains(card)) continue;
if(get.tag(card,'damage')&&i>0) count+=get.effect(player,{name:'wuzhong'},player)/2; if(get.tag(card,'damage')&&i>0) count+=get.effect(player,{name:'draw'},player);
var targets2=targets.filter(current=>{ var targets2=targets.filter(current=>{
return player.canUse(card,current,false)&&get.distance(player,current)<=num&&get.effect(current,card,player,player)>0; return player.canUse(card,current,false)&&get.distance(player,current)<=num&&get.effect(current,card,player,player)>0;
}); });
@ -3827,7 +3827,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
getValue:function(player,mark,target){ getValue:function(player,mark,target){
let dis=Math.sqrt(get.distance(player,target,'absolute')); let dis=Math.sqrt(get.distance(player,target,'absolute'));
if(target.isTurnedOver()) dis++; if(target.isTurnedOver()) dis++;
let draw=get.effect(target,{name:'wuzhong'},target,target)/2; let draw=get.effect(target,{name:'draw'},target,target);
switch(mark.slice(6)){ switch(mark.slice(6)){
case 'wushi': case 'wushi':
if(target.hasJudge('bingliang')) return 12/(1+target.getCardUsable('sha',true)); if(target.hasJudge('bingliang')) return 12/(1+target.getCardUsable('sha',true));
@ -4486,7 +4486,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var att=get.attitude(player,target),eff=[0,0]; var att=get.attitude(player,target),eff=[0,0];
var hs=player.countCards('h'),ht=target.countCards('h'); var hs=player.countCards('h'),ht=target.countCards('h');
if(hs>=ht){ if(hs>=ht){
eff[0]=get.effect(target,{name:'wuzhong'},player,player)/2; eff[0]=get.effect(target,{name:'draw'},player,player);
if(player.storage.sbyaoming_status==0) eff[0]*=1.2; if(player.storage.sbyaoming_status==0) eff[0]*=1.2;
} }
if(hs<=ht){ if(hs<=ht){

View File

@ -3088,7 +3088,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.chooseTarget(get.prompt('zylianji'),'令一名角色摸一张牌').set('ai',target=>{ player.chooseTarget(get.prompt('zylianji'),'令一名角色摸一张牌').set('ai',target=>{
var player=_status.event.player; var player=_status.event.player;
if(target==player&&player.needsToDiscard(1)) return 1; if(target==player&&player.needsToDiscard(1)) return 1;
return get.effect(target,{name:'wuzhong'},player,player); return get.effect(target,{name:'draw'},player,player);
}); });
'step 1' 'step 1'
if(result.bool){ if(result.bool){

View File

@ -139,7 +139,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
]).set('ai',()=>{ ]).set('ai',()=>{
var player=_status.event.player; var player=_status.event.player;
var list=_status.event.list; var list=_status.event.list;
var num1=get.effect(player,{name:'wuzhong'},player,player)/2; var num1=get.effect(player,{name:'draw'},player,player);
var num2=get.recoverEffect(player,player,player); var num2=get.recoverEffect(player,player,player);
return num1*list[0]>num2*list[1]?0:1; return num1*list[0]>num2*list[1]?0:1;
}).set('list',[-num1,player.getDamagedHp()]); }).set('list',[-num1,player.getDamagedHp()]);

View File

@ -3479,7 +3479,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
case 'diamond': case 'diamond':
if(target.isIn()){ if(target.isIn()){
str+=(',令'+strt+'摸两张牌'); str+=(',令'+strt+'摸两张牌');
goon=get.effect(target,{name:'wuzhong'},player,player); goon=2*get.effect(target,{name:'draw'},player,player);
} }
break; break;
case 'spade': case 'spade':

View File

@ -3992,7 +3992,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
'step 0' 'step 0'
trigger.source.chooseBool('樵拾:是否令'+get.translation(player)+'回复'+trigger.num+'点体力,然后你摸两张牌?').set('ai',()=>{ trigger.source.chooseBool('樵拾:是否令'+get.translation(player)+'回复'+trigger.num+'点体力,然后你摸两张牌?').set('ai',()=>{
return _status.event.bool; return _status.event.bool;
}).set('bool',get.recoverEffect(player,trigger.source,trigger.source)+get.effect(trigger.source,{name:'wuzhong'},trigger.source)>5); }).set('bool',get.recoverEffect(player,trigger.source,trigger.source)+2*get.effect(trigger.source,{name:'draw'},trigger.source)>5);
'step 1' 'step 1'
if(result.bool){ if(result.bool){
player.logSkill('sbqiaoshi'); player.logSkill('sbqiaoshi');
@ -4047,7 +4047,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}).length; }).length;
player.chooseTarget(get.prompt('sbyanyu'),'令一名其他角色摸'+get.cnNumber(event.num)+'张牌',lib.filter.notMe).set('ai',target=>{ player.chooseTarget(get.prompt('sbyanyu'),'令一名其他角色摸'+get.cnNumber(event.num)+'张牌',lib.filter.notMe).set('ai',target=>{
var player=_status.event.player; var player=_status.event.player;
return get.effect(target,{name:'wuzhong'},player,player); return get.effect(target,{name:'draw'},player,player);
}); });
'step 1' 'step 1'
if(result.bool){ if(result.bool){
@ -4842,7 +4842,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player:function(player){ player:function(player){
var num=0,targets=game.filterPlayer(current=>current.hasMark('sbjieyin_mark')); var num=0,targets=game.filterPlayer(current=>current.hasMark('sbjieyin_mark'));
for(var current of targets){ for(var current of targets){
num+=get.effect(current,{name:'wuzhong'},player,player); num+=2*get.effect(current,{name:'draw'},player,player);
} }
if(num>0) return 3; if(num>0) return 3;
return 1; return 1;

View File

@ -3536,7 +3536,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(player.countCards('h')>player.hp+1){ if(player.countCards('h')>player.hp+1){
check=false; check=false;
} }
else if(player.countCards('h',{name:['wuzhong']})){ else if(player.countCards('h',{name:'wuzhong'})){
check=false; check=false;
} }
else{ else{

View File

@ -364,7 +364,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
event.list=list; event.list=list;
var num1=0,num2=0,num3=0; var num1=0,num2=0,num3=0;
for(var target of list){ for(var target of list){
num1+=get.effect(target,{name:'wuzhong'},player,player); num1+=2*get.effect(target,{name:'draw'},player,player);
num2+=get.recoverEffect(target,player,player); num2+=get.recoverEffect(target,player,player);
} }
trigger.player.chooseControl('摸两张牌','回复体力','cancel2').set('prompt','整肃奖励:请选择'+get.translation(list)+'的整肃奖励').set('ai',function(){ trigger.player.chooseControl('摸两张牌','回复体力','cancel2').set('prompt','整肃奖励:请选择'+get.translation(list)+'的整肃奖励').set('ai',function(){
@ -437,13 +437,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(result.control=='cancel2'){event.finish();return;} if(result.control=='cancel2'){event.finish();return;}
player.chooseTarget('整军是否令一名其他角色也回复1点体力或摸两张牌',lib.filter.notMe).set('ai',function(target){ player.chooseTarget('整军是否令一名其他角色也回复1点体力或摸两张牌',lib.filter.notMe).set('ai',function(target){
var player=_status.event.player; var player=_status.event.player;
return Math.max(get.effect(target,{name:'wuzhong'},target,player),get.recoverEffect(target,target,player)); return Math.max(2*get.effect(target,{name:'draw'},target,player),get.recoverEffect(target,target,player));
}); });
'step 2' 'step 2'
if(result.bool){ if(result.bool){
var target=result.targets[0]; var target=result.targets[0];
event.target=target; event.target=target;
var num1=get.effect(target,{name:'wuzhong'},target,player); var num1=2*get.effect(target,{name:'draw'},target,player);
var num2=get.recoverEffect(target,target,player); var num2=get.recoverEffect(target,target,player);
player.line(target); player.line(target);
if(target.isHealthy()) result.index=0; if(target.isHealthy()) result.index=0;

View File

@ -3848,7 +3848,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var fn=function(control){ var fn=function(control){
switch(control){ switch(control){
case '选项一': case '选项一':
return player.getUseValue({name:'wuzhong'})/2; return player.getUseValue({name:'draw'});
case '选项二': case '选项二':
return Math.max.apply(Math,game.filterPlayer().map(current=>{ return Math.max.apply(Math,game.filterPlayer().map(current=>{
if(current.hasSkillTag('noh')) return -1; if(current.hasSkillTag('noh')) return -1;
@ -9252,7 +9252,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var player=_status.event.player,target=_status.event.getTrigger().player; var player=_status.event.player,target=_status.event.getTrigger().player;
if(target.hasCard(function(card){ if(target.hasCard(function(card){
return lib.filter.canBeDiscarded(card,player,target); return lib.filter.canBeDiscarded(card,player,target);
},'he')&&get.effect(target,{name:'guohe_copy2'},player,player)>get.effect(player,{name:'wuzhong'},player,player)/2) return 1; },'he')&&get.effect(target,{name:'guohe_copy2'},player,player)>get.effect(player,{name:'draw'},player,player)) return 1;
return 0; return 0;
}); });
'step 1' 'step 1'
@ -9640,7 +9640,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(num>0) max=Math.max(max,Math.sqrt(Math.min(2,num))*get.effect(target,{name:'guohe_copy2'},player,player)); if(num>0) max=Math.max(max,Math.sqrt(Math.min(2,num))*get.effect(target,{name:'guohe_copy2'},player,player));
}, },
选项四:function(target){ 选项四:function(target){
max=Math.max(max,get.effect(target,{name:'wuzhong'},player,player)); max=Math.max(max,2*get.effect(target,{name:'draw'},player,player));
}, },
}[choice]; }[choice];
game.countPlayer(function(current){ game.countPlayer(function(current){
@ -9671,7 +9671,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}], }],
['选择一名角色,令其摸两张牌',function(target){ ['选择一名角色,令其摸两张牌',function(target){
var player=_status.event.player; var player=_status.event.player;
return get.effect(target,{name:'wuzhong'},player,player); return 2*get.effect(target,{name:'draw'},player,player);
}] }]
][index]; ][index];
var targets=game.filterPlayer(function(current){ var targets=game.filterPlayer(function(current){

View File

@ -923,7 +923,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}).set('ai',function(button){ }).set('ai',function(button){
var target=_status.event.target; var target=_status.event.target;
return [ return [
get.effect(target,{name:'wuzhong'},player,player)/2, get.effect(target,{name:'draw'},player,player),
get.effect(target,{name:'shunshou_copy2'},player,player), get.effect(target,{name:'shunshou_copy2'},player,player),
get.recoverEffect(target,player,player), get.recoverEffect(target,player,player),
][button.link]; ][button.link];

View File

@ -3151,7 +3151,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var eff=list.map(target=>{ var eff=list.map(target=>{
if(target==player) return 0; if(target==player) return 0;
return get.effect(target,{name:'sha'},player,player); return get.effect(target,{name:'sha'},player,player);
}).reduce((p,c)=>p+c,0),eff2=list2.map(target=>get.effect(target,{name:'wuzhong'},player,player)).reduce((p,c)=>p+c,0); }).reduce((p,c)=>p+c,0),eff2=list2.map(target=>2*get.effect(target,{name:'draw'},player,player)).reduce((p,c)=>p+c,0);
if(_status.event.controls.contains('选项二')&&eff2>eff) return '选项二'; if(_status.event.controls.contains('选项二')&&eff2>eff) return '选项二';
if(eff>0) return 0; if(eff>0) return 0;
return 'cancel2'; return 'cancel2';
@ -3173,7 +3173,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return _status.event.getParent().list.contains(target); return _status.event.getParent().list.contains(target);
}).set('ai',function(target){ }).set('ai',function(target){
var player=_status.event.player; var player=_status.event.player;
return get.effect(target,{name:'wuzhong'},player,player); return get.effect(target,{name:'draw'},player,player);
}); });
else event.finish(); else event.finish();
} }
@ -12668,7 +12668,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(!ui.selected.cards.length) return 0; if(!ui.selected.cards.length) return 0;
var sub=get.subtype(ui.selected.cards[0],false); var sub=get.subtype(ui.selected.cards[0],false);
var eff=get.effect(target,ui.selected.cards[0],player,target); var eff=get.effect(target,ui.selected.cards[0],player,target);
if(sub=='equip2') eff+=(get.effect(target,{name:'wuzhong'},target,target)/2); if(sub=='equip2') eff+=(get.effect(target,{name:'draw'},target,target));
if(target.isDamaged()&&(sub=='equip3'||sub=='equip4'||sub=='equip5')) eff+=get.recoverEffect(target,player,player); if(target.isDamaged()&&(sub=='equip3'||sub=='equip4'||sub=='equip5')) eff+=get.recoverEffect(target,player,player);
return eff; return eff;
}, },

View File

@ -5089,7 +5089,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
targetsx.removeArray(targets); targetsx.removeArray(targets);
return targetsx.reduce((p,c)=>{ return targetsx.reduce((p,c)=>{
return p+Math.max(0,get.effect(c,{name:'shunshou_copy2'},player,player)); return p+Math.max(0,get.effect(c,{name:'shunshou_copy2'},player,player));
},0)>get.effect(player,{name:'wuzhong'},player,player)/1.5?'选项一':'选项二'; },0)>get.effect(player,{name:'draw'},player,player)*1.3?'选项一':'选项二';
}()); }());
'step 1' 'step 1'
if(result.control=='cancel2'){ if(result.control=='cancel2'){
@ -8521,7 +8521,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
max=get.recoverEffect(current,player,player)*Math.min(evt.getParent().num,player.getDamagedHp()); max=get.recoverEffect(current,player,player)*Math.min(evt.getParent().num,player.getDamagedHp());
}, },
选项二:function(target){ 选项二:function(target){
max=get.effect(target,{name:'wuzhong'},player,player)/2*evt.getParent().num; max=get.effect(target,{name:'draw'},player,player)*evt.getParent().num;
}, },
选项三:function(target){ 选项三:function(target){
if(player.isTurnedOver()) max+=25; if(player.isTurnedOver()) max+=25;

View File

@ -995,7 +995,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var user=trigger.player,target=previous; var user=trigger.player,target=previous;
event.user=user;event.target=target; event.user=user;event.target=target;
if(user){ if(user){
user.chooseBool('是否对'+get.translation(target)+'发动【联对】?','令'+get.translation(target)+'摸两张牌').set('ai',()=>_status.event.bool).set('bool',get.effect(target,{name:'wuzhong'},user,user)>0); user.chooseBool('是否对'+get.translation(target)+'发动【联对】?','令'+get.translation(target)+'摸两张牌').set('ai',()=>_status.event.bool).set('bool',get.effect(target,{name:'draw'},user,user)>0);
} }
'step 1' 'step 1'
if(result.bool){ if(result.bool){
@ -2387,7 +2387,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}).set('ai',function(target){ }).set('ai',function(target){
var player=_status.event.player; var player=_status.event.player;
var storage=player.getStorage('xinyaoming_kanon'); var storage=player.getStorage('xinyaoming_kanon');
if(get.attitude(player,target)>0&&!storage.contains('摸牌')&&target!=player) return get.effect(target,{name:'wuzhong'},player,player)/2; if(get.attitude(player,target)>0&&!storage.contains('摸牌')&&target!=player) return get.effect(target,{name:'draw'},player,player);
if(get.attitude(player,target)<0&&!storage.contains('弃牌')&&target!=player&&target.countCards('h')) return get.effect(target,{name:'guohe_copy2'},player,player); if(get.attitude(player,target)<0&&!storage.contains('弃牌')&&target!=player&&target.countCards('h')) return get.effect(target,{name:'guohe_copy2'},player,player);
if(get.attitude(player,target)>0&&!storage.contains('制衡')) return get.effect(target,{name:'kaihua'},player,player); if(get.attitude(player,target)>0&&!storage.contains('制衡')) return get.effect(target,{name:'kaihua'},player,player);
return 0; return 0;
@ -2424,7 +2424,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var target=_status.event.target; var target=_status.event.target;
var controls=_status.event.controls.slice(); var controls=_status.event.controls.slice();
var map={ var map={
'摸牌':get.effect(target,{name:'wuzhong'},player,player)/2, '摸牌':get.effect(target,{name:'draw'},player,player),
'弃牌':get.effect(target,{name:'guohe_copy2'},player,player), '弃牌':get.effect(target,{name:'guohe_copy2'},player,player),
'制衡':get.effect(target,{name:'kaihua'},player,player), '制衡':get.effect(target,{name:'kaihua'},player,player),
}; };