神鲁肃更新&bugfix
This commit is contained in:
parent
88749fd97d
commit
e963654b04
|
@ -100,20 +100,25 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
filter(event,player){
|
filter(event,player){
|
||||||
const num=player.countCards('he');
|
const num=player.countCards('he');
|
||||||
return game.hasPlayer(current=>{
|
return game.hasPlayer(current=>{
|
||||||
|
if(current==player) return false;
|
||||||
const total=current.countCards('ej');
|
const total=current.countCards('ej');
|
||||||
return total>0&&num>=total;
|
return total>0&&num>total;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
filterCard:true,
|
filterCard:true,
|
||||||
selectCard:[1,Infinity],
|
selectCard(){
|
||||||
|
return [1,Math.max(...game.filterPlayer(i=>i!=get.player()).map(i=>i.countCards('ej')))+1];
|
||||||
|
},
|
||||||
check(card){
|
check(card){
|
||||||
return 7-get.value(card);
|
return 7-get.value(card);
|
||||||
},
|
},
|
||||||
filterTarget(card,player,target){
|
filterTarget(card,player,target){
|
||||||
return ui.selected.cards.length==target.countCards('ej')&&player!=target;
|
const num=target.countCards('ej');
|
||||||
|
if(!num) return false;
|
||||||
|
return ui.selected.cards.length==num+1&&player!=target;
|
||||||
},
|
},
|
||||||
filterOk(){
|
filterOk(){
|
||||||
return ui.selected.cards.length==ui.selected.targets[0].countCards('ej');
|
return ui.selected.cards.length==ui.selected.targets[0].countCards('ej')+1;
|
||||||
},
|
},
|
||||||
position:'he',
|
position:'he',
|
||||||
lose:false,
|
lose:false,
|
||||||
|
@ -130,7 +135,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
result:{
|
result:{
|
||||||
target(player,target){
|
target(player,target){
|
||||||
let eff=0;
|
let eff=0;
|
||||||
if(ui.selected.cards.length) eff-=ui.selected.cards.map(card=>get.value(card)).reduce((p,c)=>p+c,0);
|
if(ui.selected.cards.length) eff=ui.selected.cards.map(card=>get.value(card)).reduce((p,c)=>p+c,0);
|
||||||
|
if(player.hasSkill('zhimeng')) eff*=1+get.sgnAttitude(player,target)*0.15;
|
||||||
const es=target.getCards('e'),js=target.getCards('j');
|
const es=target.getCards('e'),js=target.getCards('j');
|
||||||
es.forEach(card=>{
|
es.forEach(card=>{
|
||||||
eff-=get.value(card,target);
|
eff-=get.value(card,target);
|
||||||
|
@ -245,7 +251,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
const {result}=await next;
|
const {result}=await next;
|
||||||
if(!result.bool) return;
|
if(!result.bool) return;
|
||||||
player.logSkill('tamo');
|
player.logSkill('tamo');
|
||||||
console.log(result.moved)
|
|
||||||
const resultList=result.moved[0].map(info=>{
|
const resultList=result.moved[0].map(info=>{
|
||||||
return parseInt(info.split('|')[0]);
|
return parseInt(info.split('|')[0]);
|
||||||
});
|
});
|
||||||
|
@ -253,11 +258,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
const cmp=(a,b)=>{
|
const cmp=(a,b)=>{
|
||||||
return resultList.indexOf(a)-resultList.indexOf(b);
|
return resultList.indexOf(a)-resultList.indexOf(b);
|
||||||
}
|
}
|
||||||
for(let i of toSortPlayers){
|
for(let i=0;i<toSortPlayers.length;i++){
|
||||||
for(let j of toSortPlayers){
|
for(let j=0;j<toSortPlayers.length;j++){
|
||||||
if(cmp(i.getSeatNum(),j.getSeatNum())<0){
|
if(cmp(toSortPlayers[i].getSeatNum(),toSortPlayers[j].getSeatNum())<0){
|
||||||
toSwapList.push([i,j]);
|
toSwapList.push([toSortPlayers[i],toSortPlayers[j]]);
|
||||||
[i,j]=[j,i];
|
[toSortPlayers[i],toSortPlayers[j]]=[toSortPlayers[j],toSortPlayers[i]];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8299,7 +8304,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
shen_lusu:'神鲁肃',
|
shen_lusu:'神鲁肃',
|
||||||
shen_lusu_prefix:'神',
|
shen_lusu_prefix:'神',
|
||||||
dingzhou:'定州',
|
dingzhou:'定州',
|
||||||
dingzhou_info:'出牌阶段限一次。你可以交给一名角色X张牌,然后你获得其装备区和判定区里的所有牌(X为其装备区与判定区里的牌数之和)。',
|
dingzhou_info:'出牌阶段限一次。你可以将X张牌交给一名场上有牌的角色,然后你获得其场上的所有牌(X为其场上的牌数+1)。',
|
||||||
tamo:'榻谟',
|
tamo:'榻谟',
|
||||||
tamo_info:'游戏开始时,你可以重新分配除主公外所有角色的座次。',
|
tamo_info:'游戏开始时,你可以重新分配除主公外所有角色的座次。',
|
||||||
zhimeng:'智盟',
|
zhimeng:'智盟',
|
||||||
|
|
|
@ -66,7 +66,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
return game.countPlayer(current=>lib.skill.sbquhu.filterTarget(null,player,current))>1;
|
return game.countPlayer(current=>lib.skill.sbquhu.filterTarget(null,player,current))>1;
|
||||||
},
|
},
|
||||||
filterTarget(card,player,target){
|
filterTarget(card,player,target){
|
||||||
return player!=target&&target.countCards('he');
|
return player!=target&&target.countCards('he')>0;
|
||||||
},
|
},
|
||||||
selectTarget:2,
|
selectTarget:2,
|
||||||
multitarget:true,
|
multitarget:true,
|
||||||
|
@ -374,7 +374,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
player.logSkill('sbjieming',target);
|
player.logSkill('sbjieming',target);
|
||||||
await target.draw(3);
|
await target.draw(3);
|
||||||
num=Math.max(1,player.getDamagedHp());
|
num=Math.max(1,player.getDamagedHp());
|
||||||
const {result:{bool:bool2,cards}}=await target.chooseToDiscard('节命:是否弃置任意张牌?',`若你本次弃置的牌数小于${get.cnNumber(num)}张,${get.translation(player)}失去1点体力。`,[1,Infinity]).set('ai',card=>{
|
const {result:{bool:bool2,cards}}=await target.chooseToDiscard('节命:是否弃置任意张牌?',`若你本次弃置的牌数小于${get.cnNumber(num)}张,${get.translation(player)}失去1点体力。`,[1,Infinity],'he').set('ai',card=>{
|
||||||
if(get.event('nope')) return 0;
|
if(get.event('nope')) return 0;
|
||||||
if(ui.selected.cards.length>=get.event('num')) return 0;
|
if(ui.selected.cards.length>=get.event('num')) return 0;
|
||||||
return 5.5-get.value(card);
|
return 5.5-get.value(card);
|
||||||
|
|
Loading…
Reference in New Issue