commit
8408da8d09
|
@ -1095,7 +1095,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
forced:true,
|
forced:true,
|
||||||
filter:(event,player)=>{
|
filter:(event,player)=>{
|
||||||
if(event.getParent('phaseDraw',true)) return false;
|
if(event.getParent('phaseDraw',true)) return false;
|
||||||
const evt=player.getHistory('gain')[0];
|
const evt=player.getHistory('gain',i=>!i.getParent('phaseDraw',true))[0];
|
||||||
if(!evt) return false;
|
if(!evt) return false;
|
||||||
if(event.name=='gain'){
|
if(event.name=='gain'){
|
||||||
if(evt!=event||event.getlx===false) return false;
|
if(evt!=event||event.getlx===false) return false;
|
||||||
|
|
|
@ -886,25 +886,39 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
},
|
},
|
||||||
pshengwu:{
|
pshengwu:{
|
||||||
audio:'hengwu',
|
audio:'hengwu',
|
||||||
|
mod:{
|
||||||
|
aiOrder:(player,card,num)=>{
|
||||||
|
if(num>0&&get.tag(card,'draw')&&ui.cardPile.childNodes.length+ui.discardPile.childNodes.length<20) return 0;
|
||||||
|
},
|
||||||
|
aiValue:(player,card,num)=>{
|
||||||
|
if(num>0&&card.name==='zhuge') return 20;
|
||||||
|
},
|
||||||
|
aiUseful:(player,card,num)=>{
|
||||||
|
if(num>0&&card.name==='zhuge') return 10;
|
||||||
|
}
|
||||||
|
},
|
||||||
trigger:{player:['useCard','respond']},
|
trigger:{player:['useCard','respond']},
|
||||||
direct:true,
|
direct:true,
|
||||||
|
locked:false,
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
return game.hasPlayer(i=>i.countCards('ej',cardx=>get.type(cardx)=='equip'&&get.suit(event.card)==get.suit(cardx)));
|
return game.hasPlayer(i=>i.countCards('ej',cardx=>get.type(cardx)=='equip'&&get.suit(event.card)==get.suit(cardx)));
|
||||||
},
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
'step 0'
|
'step 0'
|
||||||
var suit=get.suit(trigger.card);
|
var suit=get.suit(trigger.card),extra=game.filterPlayer().map(i=>i.countCards('ej',cardx=>{
|
||||||
var prompt2='弃置任意张'+get.translation(suit)+'手牌,然后摸X张牌(X为你弃置的牌数+'+game.filterPlayer().map(i=>i.countCards('ej',cardx=>get.type(cardx)=='equip'&&get.suit(trigger.card)==get.suit(cardx))).reduce((p,c)=>p+c)+')';
|
return get.type(cardx)=='equip'&&get.suit(trigger.card)==get.suit(cardx);
|
||||||
|
})).reduce((p,c)=>p+c);
|
||||||
|
var prompt2='弃置任意张'+get.translation(suit)+'手牌,然后摸X张牌(X为你弃置的牌数+'+extra+')';
|
||||||
player.chooseToDiscard('h',[1,player.countCards('h',{suit:suit})],{suit:suit}).set('prompt',get.prompt('pshengwu')).set('prompt2',prompt2).set('ai',card=>{
|
player.chooseToDiscard('h',[1,player.countCards('h',{suit:suit})],{suit:suit}).set('prompt',get.prompt('pshengwu')).set('prompt2',prompt2).set('ai',card=>{
|
||||||
var player=_status.event.player;
|
if(_status.event.tie) return 0;
|
||||||
|
let player=_status.event.player;
|
||||||
if(_status.event.goon) return 12-get.value(card);
|
if(_status.event.goon) return 12-get.value(card);
|
||||||
if(player.countCards('h')>50) return 0;
|
|
||||||
if(player==_status.currentPhase){
|
if(player==_status.currentPhase){
|
||||||
if(['shan','caochuan','tao','wuxie'].includes(card.name)) return 8-get.value(card);
|
if(['shan','caochuan','tao','wuxie'].includes(card.name)) return 8-get.value(card);
|
||||||
return 6-get.value(card);
|
return 6-get.value(card);
|
||||||
}
|
}
|
||||||
return 5.5-get.value(card);
|
return 5.5-get.value(card);
|
||||||
}).set('goon',player.countCards('h',{suit:suit})==1).set('logSkill','pshengwu');
|
}).set('goon',player.countCards('h',{suit:suit})==1).set('tie',extra>ui.cardPile.childNodes.length+ui.discardPile.childNodes.length).set('logSkill','pshengwu');
|
||||||
'step 1'
|
'step 1'
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
var num=result.cards.length;
|
var num=result.cards.length;
|
||||||
|
|
|
@ -145,10 +145,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
return (dis?6:1)-get.useful(card);
|
return (dis?6:1)-get.useful(card);
|
||||||
}
|
}
|
||||||
if(_status.event.hvt.includes(card)){
|
if(_status.event.hvt.includes(card)){
|
||||||
if(_status.event.suits.length>=4){
|
|
||||||
if(cards.length>8) return 0;
|
|
||||||
return 4.5-get.value(card);
|
|
||||||
}
|
|
||||||
if(!_status.event.suits.includes(suit)) return 6-get.value(card);
|
if(!_status.event.suits.includes(suit)) return 6-get.value(card);
|
||||||
if(card.name==='sha') return 3-get.value(card);
|
if(card.name==='sha') return 3-get.value(card);
|
||||||
return 1-get.value(card);
|
return 1-get.value(card);
|
||||||
|
@ -1306,6 +1302,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
},
|
},
|
||||||
dczhangcai:{
|
dczhangcai:{
|
||||||
audio:2,
|
audio:2,
|
||||||
|
mod:{
|
||||||
|
aiOrder:(player,card,num)=>{
|
||||||
|
if(num>0&&get.tag(card,'draw')&&ui.cardPile.childNodes.length+ui.discardPile.childNodes.length<20) return 0;
|
||||||
|
},
|
||||||
|
aiValue:(player,card,num)=>{
|
||||||
|
if(num>0&&card.name==='zhuge') return 20;
|
||||||
|
},
|
||||||
|
aiUseful:(player,card,num)=>{
|
||||||
|
if(num>0&&card.name==='zhuge') return 10;
|
||||||
|
}
|
||||||
|
},
|
||||||
trigger:{
|
trigger:{
|
||||||
player:['useCard','respond'],
|
player:['useCard','respond'],
|
||||||
},
|
},
|
||||||
|
@ -1319,6 +1326,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
if(typeof num=='number') count=Math.max(1,player.countCards('h',card=>get.number(card)==num))
|
if(typeof num=='number') count=Math.max(1,player.countCards('h',card=>get.number(card)==num))
|
||||||
return '你可以摸'+get.cnNumber(count)+'张牌。';
|
return '你可以摸'+get.cnNumber(count)+'张牌。';
|
||||||
},
|
},
|
||||||
|
check:(event,player)=>{
|
||||||
|
const num=player.hasSkill('dczhangcai_all')?get.number(event.card):8;
|
||||||
|
let count=1;
|
||||||
|
if(typeof num=='number') count=Math.max(1,player.countCards('h',card=>get.number(card)==num));
|
||||||
|
return ui.cardPile.childNodes.length+ui.discardPile.childNodes.length>=count;
|
||||||
|
},
|
||||||
frequent:true,
|
frequent:true,
|
||||||
content:function(){
|
content:function(){
|
||||||
var num=player.hasSkill('dczhangcai_all')?get.number(trigger.card):8;
|
var num=player.hasSkill('dczhangcai_all')?get.number(trigger.card):8;
|
||||||
|
|
Loading…
Reference in New Issue