commit
7c83ba1143
|
@ -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');
|
||||
|
@ -1331,6 +1344,19 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
})){
|
||||
return [0,0,0,0];
|
||||
}
|
||||
},
|
||||
target:(card,player,target)=>{
|
||||
if(target._g_taipingyaoshu_temp) return;
|
||||
if(get.subtype(card)==='equip2'&&target.getEquip('taipingyaoshu')&&!target.countEmpty(2)){
|
||||
target._g_taipingyaoshu_temp=true;
|
||||
let lose=get.effect(target,{name:'losehp'},target,target),
|
||||
draw=2*get.effect(target,{name:'draw'},target,target);
|
||||
delete target._g_taipingyaoshu_temp;
|
||||
if(lose<0&&target.hp<=1&&!target.hasCard(i=>{
|
||||
return get.name(i)==='tao'&&lib.filter.cardEnabled(i,target,'forceEnable');
|
||||
})) draw=0;
|
||||
return [1,(lose+draw)/get.attitude(target,target)];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,6 +14,16 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
}
|
||||
},
|
||||
draw:{
|
||||
ai:{
|
||||
result:{
|
||||
target:1
|
||||
},
|
||||
tag:{
|
||||
draw:1
|
||||
}
|
||||
}
|
||||
},
|
||||
losehp:{
|
||||
ai:{
|
||||
result:{
|
||||
|
@ -254,7 +264,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
order:function(item,player){
|
||||
if(player.hasSkillTag('presha',true,null,true)) return 10;
|
||||
if(typeof item==='object'&&item.hasNature('linked')){
|
||||
if(typeof item==='object'&&game.hasNature(item,'linked')){
|
||||
if(game.hasPlayer(function(current){
|
||||
return current!=player&¤t.isLinked()&&player.canUse(item,current,null,true)&&get.effect(current,item,player,player)>0&&lib.card.sha.ai.canLink(player,current,item);
|
||||
})&&game.countPlayer(function(current){
|
||||
|
|
|
@ -1398,9 +1398,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
target.classList.remove('linked2');
|
||||
var eff=cards[0][1];
|
||||
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=>{
|
||||
return get.name(card)=='jiu'&&player.hasUseTarget(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;
|
||||
if(!target.isDamaged()) 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();
|
||||
|
|
|
@ -794,7 +794,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return get.color(card)==color;
|
||||
},'h')){
|
||||
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;
|
||||
})
|
||||
|
@ -828,7 +828,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var prompt2='用'+get.translation(event.card1)+'交换对方的'+get.translation(event.card2);
|
||||
if(color=='black'){
|
||||
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()){
|
||||
prompt2+=',然后你回复1点体力';
|
||||
|
@ -1105,7 +1105,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
'step 1'
|
||||
player.chooseTarget('是否令一名其他角色摸等量的牌?',lib.filter.notMe).set('ai',target=>{
|
||||
var player=get.player();
|
||||
return get.effect(target,{name:'wuzhong'},player,player);
|
||||
return get.effect(target,{name:'draw'},player,player);
|
||||
});
|
||||
'step 2'
|
||||
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;
|
||||
}).set('ai',target=>{
|
||||
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){
|
||||
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){
|
||||
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);
|
||||
|
|
|
@ -1414,7 +1414,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var player=_status.event.player,target=_status.event.getParent().target;
|
||||
switch(button.link){
|
||||
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 '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=>{
|
||||
switch(choice){
|
||||
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 '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){
|
||||
var player=_status.event.player;
|
||||
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);
|
||||
});
|
||||
}
|
||||
|
@ -12458,7 +12458,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
choicex=choices.slice(0);
|
||||
var getx=function(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);
|
||||
default:return 0;
|
||||
}
|
||||
|
|
|
@ -374,6 +374,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
//神贾诩
|
||||
jxlianpo:{
|
||||
audio:2,
|
||||
init:()=>{
|
||||
game.addGlobalSkill('jxlianpo_global');
|
||||
},
|
||||
onremove:()=>{
|
||||
if(!game.hasPlayer(i=>i.hasSkill('jxlianpo'),true)) game.removeGlobalSkill('jxlianpo_global');
|
||||
},
|
||||
trigger:{global:'dieAfter'},
|
||||
filter:function(event,player){
|
||||
if(lib.skill.jxlianpo.getMax().length<=1) return false;
|
||||
|
@ -381,7 +387,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
forced:true,
|
||||
logTarget:'source',
|
||||
global:'jxlianpo_global',
|
||||
getMax:()=>{
|
||||
const map={
|
||||
zhu:game.countPlayer(current=>{
|
||||
|
@ -521,20 +526,29 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
});
|
||||
},
|
||||
cardSavable:function(card,player,target){
|
||||
if(card.name=='tao'){
|
||||
if(card.name=='tao'&&!player.hasSkill('jxlianpo')){
|
||||
if(!lib.skill.jxlianpo.getMax().includes('zhu')) return;
|
||||
if(player==target) return;
|
||||
return false;
|
||||
}
|
||||
},
|
||||
playerEnabled:function(card,player,target){
|
||||
if(card.name=='tao'){
|
||||
if(card.name=='tao'&&!player.hasSkill('jxlianpo')){
|
||||
if(!lib.skill.jxlianpo.getMax().includes('zhu')) return;
|
||||
if(player==target) return;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
},
|
||||
trigger:{player:'dieAfter'},
|
||||
filter:()=>{
|
||||
return !game.hasPlayer(i=>i.hasSkill('jxlianpo'),true);
|
||||
},
|
||||
silent:true,
|
||||
forceDie:true,
|
||||
content:()=>{
|
||||
game.removeGlobalSkill('jxlianpo_global');
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -2193,6 +2207,22 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
intro:{
|
||||
content:'受到的伤害+1且改为雷属性',
|
||||
},
|
||||
ai:{
|
||||
effect:{
|
||||
target:(card,player,target)=>{
|
||||
if(!get.tag(card,'damage')) return;
|
||||
if(target.hasSkillTag('nodamage')||target.hasSkillTag('nothunder')) return 'zeroplayertarget';
|
||||
if(target.hasSkillTag('filterDamage',null,{
|
||||
player:player,
|
||||
card:lib.element.VCard({
|
||||
name:card.name,
|
||||
nature:'thunder'
|
||||
},[card])
|
||||
})) return;
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
init:{
|
||||
audio:'shouli',
|
||||
|
@ -2286,6 +2316,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return get.suit(card,current)==suit;
|
||||
});
|
||||
})];
|
||||
},
|
||||
target:(card,player,target)=>{
|
||||
if(card.name==='sha'&&!player.hasSkillTag('directHit_ai',true,{
|
||||
target:target,
|
||||
card:card
|
||||
},true)&&game.hasPlayer(current=>{
|
||||
return current.hasCard(cardx=>{
|
||||
return get.subtype(cardx)==='equip3';
|
||||
},'e');
|
||||
})) return [0, -0.5];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6164,7 +6164,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
logTarget:'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);
|
||||
return eff;
|
||||
},
|
||||
|
@ -7513,7 +7513,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
result:{
|
||||
player:function(player,target){
|
||||
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;
|
||||
},
|
||||
},
|
||||
|
|
|
@ -1583,8 +1583,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return false;
|
||||
})&&(player.hp>2||get.damageEffect(player,player,player)>=0)) return player;
|
||||
var info=game.filterPlayer().map(current=>{
|
||||
let damage=undamaged.includes(current),card={name:damage?'damage':'wuzhong'};
|
||||
return [current,get.effect(current,card,player,player)/(damage?1.5:1)];
|
||||
let damage=undamaged.includes(current),card={name:damage?'damage':'draw'};
|
||||
return [current,get.effect(current,card,player,player)*(damage?0.7:2)];
|
||||
}).sort((a,b)=>b[1]-a[1])[0];
|
||||
if(info[1]>0) return info[0];
|
||||
return null;
|
||||
|
@ -5392,7 +5392,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
onremove:true,
|
||||
prompt2:'失去1点体力并防止此伤害,然后你与其各摸一张牌',
|
||||
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',
|
||||
content:function(){
|
||||
|
@ -5452,23 +5453,23 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
// trigger.getParent().triggeredTargets4=trigger.getParent().triggeredTargets4.concat(trigger.targets);
|
||||
trigger.getParent().effectCount++;
|
||||
},
|
||||
ai:{
|
||||
effect:{
|
||||
target:function(card,player,target){
|
||||
if(player._jsrgzhenqiao_aiChecking) return;
|
||||
if(target===player&&get.subtype(card)==='equip1'&&!player.getEquip(1)){
|
||||
if(card.name!=='zhuge'||target.getCardUsable('sha')||!target.needsToDiscard()) return;
|
||||
if(target.countCards('hs',i=>{
|
||||
return get.name(i)==='sha'&&lib.filter.cardEnabled(i,target);
|
||||
})>1) return 'zeroplayertarget';
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
mod:{
|
||||
attackRange:function(player,num){
|
||||
return num+1;
|
||||
},
|
||||
aiOrder:(player,card,num)=>{
|
||||
if(num>0&&get.itemtype(card)==='card'&&get.subtype(card)==='equip1'&&!player.getEquip(1)){
|
||||
if(card.name!=='zhuge'||player.getCardUsable('sha')||!player.needsToDiscard()||player.countCards('hs',i=>{
|
||||
return get.name(i)==='sha'&&lib.filter.cardEnabled(i,target);
|
||||
})<2) return 0;
|
||||
}
|
||||
},
|
||||
aiValue:(player,card,num)=>{
|
||||
if(num>0&&get.itemtype(card)==='card'&&card.name!=='zhuge'&&get.subtype(card)==='equip1'&&!player.getEquip(1)) return 0.01*num;
|
||||
},
|
||||
aiUseful:()=>{
|
||||
return lib.skill.jsrgzhenqiao.mod.aiValue.apply(this,arguments);
|
||||
}
|
||||
}
|
||||
},
|
||||
//王允
|
||||
|
|
|
@ -1193,7 +1193,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
]).set('prompt','雀颂:请选择一项').set('ai',()=>{
|
||||
var player=_status.event.player;
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
@ -3588,7 +3588,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
for(var card of cards){
|
||||
var num=i+1;
|
||||
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=>{
|
||||
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){
|
||||
let dis=Math.sqrt(get.distance(player,target,'absolute'));
|
||||
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)){
|
||||
case 'wushi':
|
||||
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 hs=player.countCards('h'),ht=target.countCards('h');
|
||||
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(hs<=ht){
|
||||
|
|
|
@ -758,6 +758,22 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
intro:{
|
||||
content:'受到的伤害+1且改为雷属性',
|
||||
},
|
||||
ai:{
|
||||
effect:{
|
||||
target:(card,player,target)=>{
|
||||
if(!get.tag(card,'damage')) return;
|
||||
if(target.hasSkillTag('nodamage')||target.hasSkillTag('nothunder')) return 'zeroplayertarget';
|
||||
if(target.hasSkillTag('filterDamage',null,{
|
||||
player:player,
|
||||
card:lib.element.VCard({
|
||||
name:card.name,
|
||||
nature:'thunder'
|
||||
},[card])
|
||||
})) return;
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
init:{
|
||||
audio:'psshouli',
|
||||
|
@ -900,6 +916,32 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
ai:{
|
||||
threaten:100,
|
||||
reverseEquip:true,
|
||||
ai:{
|
||||
effect:{
|
||||
player:(card,player,target)=>{
|
||||
if(typeof card!=='object') return;
|
||||
let suit=get.suit(card);
|
||||
if(!lib.suit.contains(suit)||player.hasCard(function(i){
|
||||
return get.suit(i,player)==suit;
|
||||
},'h')) return;
|
||||
return [1,game.countPlayer(current=>{
|
||||
return current.countCards('e',card=>{
|
||||
return get.suit(card,current)==suit;
|
||||
});
|
||||
})];
|
||||
},
|
||||
target:(card,player,target)=>{
|
||||
if(card.name==='sha'&&!player.hasSkillTag('directHit_ai',true,{
|
||||
target:target,
|
||||
card:card
|
||||
},true)&&game.hasPlayer(current=>{
|
||||
return current.hasCard(cardx=>{
|
||||
return get.subtype(cardx)==='equip3';
|
||||
},'e');
|
||||
})) return [0, -0.5];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
//战役篇田丰
|
||||
|
@ -3046,7 +3088,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
player.chooseTarget(get.prompt('zylianji'),'令一名角色摸一张牌').set('ai',target=>{
|
||||
var player=_status.event.player;
|
||||
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'
|
||||
if(result.bool){
|
||||
|
|
|
@ -139,7 +139,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
]).set('ai',()=>{
|
||||
var player=_status.event.player;
|
||||
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);
|
||||
return num1*list[0]>num2*list[1]?0:1;
|
||||
}).set('list',[-num1,player.getDamagedHp()]);
|
||||
|
|
|
@ -3479,7 +3479,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
case 'diamond':
|
||||
if(target.isIn()){
|
||||
str+=(',令'+strt+'摸两张牌');
|
||||
goon=get.effect(target,{name:'wuzhong'},player,player);
|
||||
goon=2*get.effect(target,{name:'draw'},player,player);
|
||||
}
|
||||
break;
|
||||
case 'spade':
|
||||
|
@ -11588,45 +11588,40 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
direct:true,
|
||||
content:function (){
|
||||
'step 0'
|
||||
player.gainPlayerCard(get.prompt('new_liyu',trigger.player),trigger.player,'hej','visibleMove').set('ai',function(card){
|
||||
var player=_status.event.player;
|
||||
var evt=_status.event.target;
|
||||
if(get.attitude(player,evt)>0&&get.position(card)=='j') return 4+get.value(card);
|
||||
if(get.type(card)=='equip'){
|
||||
if(get.attitude(player,evt)>0&&game.hasPlayer(function(current){
|
||||
return (player.canUse({name:'juedou'},current)&¤t!=evt.target&&get.effect(current,{name:'juedou'},player,player)>2);
|
||||
})){
|
||||
return 5;
|
||||
}
|
||||
else if(game.hasPlayer(function(current){
|
||||
return (player.canUse({name:'juedou'},current)&¤t!=evt&¤t!=player&&get.effect(current,{name:'juedou'},player,player)<0);
|
||||
})){
|
||||
return 1;
|
||||
}
|
||||
else return 4;
|
||||
}
|
||||
player.gainPlayerCard(get.prompt('new_liyu',trigger.player),trigger.player,'hej','visibleMove').set('ai',function(button){
|
||||
var player=_status.event.player,target=_status.event.target;
|
||||
if(get.attitude(player,target)>0&&get.position(button.link)==='j') return 4+get.value(button.link);
|
||||
if(get.type(button.link)==='equip') return _status.event.juedou;
|
||||
return 3;
|
||||
}).set('logSkill',['new_liyu',trigger.player]);
|
||||
}).set('juedou',(()=>{
|
||||
if(get.attitude(player,trigger.player)>0&&game.hasPlayer(function(current){
|
||||
return (player.canUse({name:'juedou'},current)&¤t!=trigger.player&¤t!=player&&get.effect(current,{name:'juedou'},player,_status.event.player)>2);
|
||||
})) return 5;
|
||||
if(game.hasPlayer(function(current){
|
||||
return (player.canUse({name:'juedou'},current)&¤t!=trigger.player&¤t!=player&&get.effect(current,{name:'juedou'},player,_status.event.player)<0);
|
||||
})) return 1;
|
||||
return 4;
|
||||
})()).set('logSkill',['new_liyu',trigger.player]);
|
||||
'step 1'
|
||||
if(result.bool){
|
||||
if(get.type(result.cards[0])!='equip'){
|
||||
trigger.player.draw();
|
||||
event.finish();
|
||||
}
|
||||
else{
|
||||
if(!game.hasPlayer(function(current){
|
||||
return current!=player&¤t!=trigger.player&&player.canUse('juedou',current);
|
||||
})){
|
||||
event.finish();
|
||||
return;
|
||||
}
|
||||
trigger.player.chooseTarget(true,function(card,player,target){
|
||||
var evt=_status.event.getParent();
|
||||
return evt.player.canUse({name:'juedou'},target)&&target!=_status.event.player;
|
||||
},'请选择一名角色,视为'+get.translation(player)+'对其使用【决斗】').set('ai',function(target){
|
||||
var evt=_status.event.getParent();
|
||||
return get.effect(target,{name:'juedou'},evt.player,_status.event.player)-2;
|
||||
});
|
||||
else{
|
||||
if(!game.hasPlayer(function(current){
|
||||
return current!=player&¤t!=trigger.player&&player.canUse('juedou',current);
|
||||
})){
|
||||
event.finish();
|
||||
return;
|
||||
}
|
||||
trigger.player.chooseTarget(true,function(card,player,target){
|
||||
var evt=_status.event.getParent();
|
||||
return evt.player.canUse({name:'juedou'},target)&&target!=_status.event.player;
|
||||
},'请选择一名角色,视为'+get.translation(player)+'对其使用【决斗】').set('ai',function(target){
|
||||
var evt=_status.event.getParent();
|
||||
return get.effect(target,{name:'juedou'},evt.player,_status.event.player)-2;
|
||||
});
|
||||
}
|
||||
}
|
||||
else event.finish();
|
||||
|
|
|
@ -3992,7 +3992,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
'step 0'
|
||||
trigger.source.chooseBool('樵拾:是否令'+get.translation(player)+'回复'+trigger.num+'点体力,然后你摸两张牌?').set('ai',()=>{
|
||||
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'
|
||||
if(result.bool){
|
||||
player.logSkill('sbqiaoshi');
|
||||
|
@ -4047,7 +4047,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}).length;
|
||||
player.chooseTarget(get.prompt('sbyanyu'),'令一名其他角色摸'+get.cnNumber(event.num)+'张牌',lib.filter.notMe).set('ai',target=>{
|
||||
var player=_status.event.player;
|
||||
return get.effect(target,{name:'wuzhong'},player,player);
|
||||
return get.effect(target,{name:'draw'},player,player);
|
||||
});
|
||||
'step 1'
|
||||
if(result.bool){
|
||||
|
@ -4842,7 +4842,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
player:function(player){
|
||||
var num=0,targets=game.filterPlayer(current=>current.hasMark('sbjieyin_mark'));
|
||||
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;
|
||||
return 1;
|
||||
|
|
|
@ -3536,7 +3536,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(player.countCards('h')>player.hp+1){
|
||||
check=false;
|
||||
}
|
||||
else if(player.countCards('h',{name:['wuzhong']})){
|
||||
else if(player.countCards('h',{name:'wuzhong'})){
|
||||
check=false;
|
||||
}
|
||||
else{
|
||||
|
@ -4146,6 +4146,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
logTarget:'source',
|
||||
ai:{
|
||||
maixie_defend:true,
|
||||
threaten:function(player,target){
|
||||
if(target.hp==1) return 0.2;
|
||||
return 1.5;
|
||||
|
|
|
@ -364,7 +364,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
event.list=list;
|
||||
var num1=0,num2=0,num3=0;
|
||||
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);
|
||||
}
|
||||
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;}
|
||||
player.chooseTarget('整军:是否令一名其他角色也回复1点体力或摸两张牌?',lib.filter.notMe).set('ai',function(target){
|
||||
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'
|
||||
if(result.bool){
|
||||
var target=result.targets[0];
|
||||
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);
|
||||
player.line(target);
|
||||
if(target.isHealthy()) result.index=0;
|
||||
|
|
|
@ -3848,7 +3848,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var fn=function(control){
|
||||
switch(control){
|
||||
case '选项一':
|
||||
return player.getUseValue({name:'wuzhong'})/2;
|
||||
return player.getUseValue({name:'draw'});
|
||||
case '选项二':
|
||||
return Math.max.apply(Math,game.filterPlayer().map(current=>{
|
||||
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;
|
||||
if(target.hasCard(function(card){
|
||||
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;
|
||||
});
|
||||
'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));
|
||||
},
|
||||
选项四: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];
|
||||
game.countPlayer(function(current){
|
||||
|
@ -9671,7 +9671,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}],
|
||||
['选择一名角色,令其摸两张牌',function(target){
|
||||
var player=_status.event.player;
|
||||
return get.effect(target,{name:'wuzhong'},player,player);
|
||||
return 2*get.effect(target,{name:'draw'},player,player);
|
||||
}]
|
||||
][index];
|
||||
var targets=game.filterPlayer(function(current){
|
||||
|
|
|
@ -923,7 +923,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}).set('ai',function(button){
|
||||
var target=_status.event.target;
|
||||
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.recoverEffect(target,player,player),
|
||||
][button.link];
|
||||
|
@ -8253,6 +8253,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
ai:{
|
||||
expose:0.5,
|
||||
maixie_defend:true
|
||||
},
|
||||
},
|
||||
"yechou2":{
|
||||
|
|
|
@ -3151,7 +3151,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var eff=list.map(target=>{
|
||||
if(target==player) return 0;
|
||||
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(eff>0) return 0;
|
||||
return 'cancel2';
|
||||
|
@ -3173,7 +3173,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return _status.event.getParent().list.contains(target);
|
||||
}).set('ai',function(target){
|
||||
var player=_status.event.player;
|
||||
return get.effect(target,{name:'wuzhong'},player,player);
|
||||
return get.effect(target,{name:'draw'},player,player);
|
||||
});
|
||||
else event.finish();
|
||||
}
|
||||
|
@ -12668,7 +12668,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(!ui.selected.cards.length) return 0;
|
||||
var sub=get.subtype(ui.selected.cards[0],false);
|
||||
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);
|
||||
return eff;
|
||||
},
|
||||
|
|
|
@ -5089,7 +5089,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
targetsx.removeArray(targets);
|
||||
return targetsx.reduce((p,c)=>{
|
||||
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'
|
||||
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());
|
||||
},
|
||||
选项二: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){
|
||||
if(player.isTurnedOver()) max+=25;
|
||||
|
|
|
@ -995,7 +995,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var user=trigger.player,target=previous;
|
||||
event.user=user;event.target=target;
|
||||
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'
|
||||
if(result.bool){
|
||||
|
@ -2387,7 +2387,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}).set('ai',function(target){
|
||||
var player=_status.event.player;
|
||||
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('制衡')) return get.effect(target,{name:'kaihua'},player,player);
|
||||
return 0;
|
||||
|
@ -2424,7 +2424,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var target=_status.event.target;
|
||||
var controls=_status.event.controls.slice();
|
||||
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:'kaihua'},player,player),
|
||||
};
|
||||
|
|
|
@ -8366,6 +8366,12 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
},
|
||||
boss_wuxin:{
|
||||
audio:2,
|
||||
mod:{
|
||||
targetEnabled:function(card,player,target){
|
||||
if(get.type(card)=='delay'&&player!=target) return false;
|
||||
}
|
||||
},
|
||||
trigger:{player:'damageBefore'},
|
||||
forced:true,
|
||||
priority:10,
|
||||
|
@ -8373,7 +8379,6 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
trigger.cancel();
|
||||
player.loseHp();
|
||||
},
|
||||
audio:2,
|
||||
},
|
||||
shenwei:{
|
||||
audio:2,
|
||||
|
|
Loading…
Reference in New Issue