commit
e24c6aba62
|
@ -101,10 +101,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
filter(event,player){
|
||||
var filter=event.filterCard;
|
||||
if(filter({name:'sha',nature:'fire'},player,event)&&player.countCards('hes',{suit:'diamond'})) return true;
|
||||
if(filter({name:'shan'},player,event)&&player.countCards('hes',{suit:'club'})) return true;
|
||||
if(filter({name:'tao'},player,event)&&player.countCards('hes',{suit:'heart'})) return true;
|
||||
if(filter({name:'wuxie'},player,event)&&player.countCards('hes',{suit:'spade'})) return true;
|
||||
if(filter(get.autoViewAs({name:'sha',nature:'fire'},'unsure'),player,event)&&player.countCards('hes',{suit:'diamond'})) return true;
|
||||
if(filter(get.autoViewAs({name:'shan'},'unsure'),player,event)&&player.countCards('hes',{suit:'club'})) return true;
|
||||
if(filter(get.autoViewAs({name:'tao'},'unsure'),player,event)&&player.countCards('hes',{suit:'heart'})) return true;
|
||||
if(filter(get.autoViewAs({name:'wuxie'},'unsure'),player,event)&&player.countCards('hes',{suit:'spade'})) return true;
|
||||
return false;
|
||||
},
|
||||
usable:20,
|
||||
|
|
|
@ -2385,8 +2385,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
else wuxie=true;
|
||||
}
|
||||
}
|
||||
if(shan&&event.filterCard({name:'shan'},player,event)) return true;
|
||||
if(wuxie&&event.filterCard({name:'wuxie'},player,event)) return true;
|
||||
if(shan&&event.filterCard(get.autoViewAs({name:'shan'},'unsure'),player,event)) return true;
|
||||
if(wuxie&&event.filterCard(get.autoViewAs({name:'wuxie'},'unsure'),player,event)) return true;
|
||||
return false;
|
||||
},
|
||||
hiddenCard (player,name){
|
||||
|
@ -4815,17 +4815,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
cardEnabled(card,player){
|
||||
if(!player.storage['dddlianer_ceiling']) return;
|
||||
var num=get.number(card);
|
||||
if(typeof num!='number'||player.storage['dddlianer_ceiling']<=num) return false;
|
||||
if(num!='unsure'&&(typeof num!='number'||player.storage['dddlianer_ceiling']<=num)) return false;
|
||||
},
|
||||
cardRespondable(card,player){
|
||||
if(!player.storage['dddlianer_ceiling']) return;
|
||||
var num=get.number(card);
|
||||
if(typeof num!='number'||player.storage['dddlianer_ceiling']<=num) return false;
|
||||
if(num!='unsure'&&(typeof num!='number'||player.storage['dddlianer_ceiling']<=num)) return false;
|
||||
},
|
||||
cardSavable(card,player){
|
||||
if(!player.storage['dddlianer_ceiling']) return;
|
||||
var num=get.number(card);
|
||||
if(typeof num!='number'||player.storage['dddlianer_ceiling']<=num) return false;
|
||||
if(num!='unsure'&&(typeof num!='number'||player.storage['dddlianer_ceiling']<=num)) return false;
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1909,6 +1909,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(!Array.isArray(list)||typeof num!='number'||list.length<=num) return false;
|
||||
var card=get.copy(list[num]);
|
||||
delete card.isCard;
|
||||
card=get.autoViewAs(card,'unsure');
|
||||
if(event.filterCard(card,player,event)) return true;
|
||||
return false;
|
||||
},
|
||||
|
@ -2266,10 +2267,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
for(var i of lib.inpile){
|
||||
var type=lib.skill.nsxingyun.getSixiang(i);
|
||||
if(!type||list.includes(type)) continue;
|
||||
if(event.filterCard({name:i},player,event)) return true;
|
||||
if(event.filterCard(get.autoViewAs({name:i},'unsure'),player,event)) return true;
|
||||
if(i=='sha'){
|
||||
for(var j of lib.inpile_nature){
|
||||
if(event.filterCard({name:i,nature:j},player,event)) return true;
|
||||
if(event.filterCard(get.autoViewAs({name:i,nature:j},'unsure'),player,event)) return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -8202,15 +8203,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
locked:false,
|
||||
mod:{
|
||||
targetInRange(card,player){
|
||||
var list=player.getExpansions('ao_diegui');
|
||||
for(var i=0;i<list.length;i++){
|
||||
if(get.suit(list[i],false)==get.suit(card,false)) return true;
|
||||
const cardSuit = get.suit(card,false);
|
||||
const list = player.getExpansions('ao_diegui');
|
||||
for(let i = 0; i < list.length; i++){
|
||||
if(cardSuit==='unsure'||get.suit(list[i],false)===cardSuit) return true;
|
||||
}
|
||||
},
|
||||
cardUsable(card,player){
|
||||
var list=player.getExpansions('ao_diegui');
|
||||
for(var i=0;i<list.length;i++){
|
||||
if(get.suit(list[i],false)==get.suit(card,false)) return Infinity;
|
||||
const cardSuit = get.suit(card,false);
|
||||
const list = player.getExpansions('ao_diegui');
|
||||
for(let i = 0; i < list.length; i++){
|
||||
if(cardSuit==='unsure'||get.suit(list[i],false)===cardSuit) return Infinity;
|
||||
}
|
||||
},
|
||||
maxHandcard(player,num){
|
||||
|
@ -9508,7 +9511,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(event.type=='wuxie'||!player.countCards('hse',{suit:'diamond'})) return false;
|
||||
for(var i=0;i<lib.inpile.length;i++){
|
||||
var name=lib.inpile[i];
|
||||
if(name!='du'&&name!='shan'&&get.type(name)=='basic'&&event.filterCard({name:name},player,event)) return true;
|
||||
if(name!='du'&&get.type(name)=='basic'&&event.filterCard(get.autoViewAs({name:name},'unsure'),player,event)) return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
@ -9517,7 +9520,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var list=[];
|
||||
for(var i=0;i<lib.inpile.length;i++){
|
||||
var name=lib.inpile[i];
|
||||
if(name=='du'||name=='shan') continue;
|
||||
if(name=='du') continue;
|
||||
if(name=='sha'){
|
||||
list.push(['基本','','sha']);
|
||||
for(var j of lib.inpile_nature) list.push(['基本','',name,j]);
|
||||
|
@ -9529,7 +9532,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return ui.create.dialog('摆尾',[list,'vcard'],'hidden');
|
||||
},
|
||||
filter(button,player){
|
||||
return _status.event.getParent().filterCard({name:button.link[2]},player,_status.event.getParent());
|
||||
return _status.event.getParent().filterCard(get.autoViewAs({name:button.link[2]},'unsure'),player,_status.event.getParent());
|
||||
},
|
||||
check(button){
|
||||
if(_status.event.getParent().type=='phase'){
|
||||
|
@ -9582,27 +9585,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return tag=='fireAttack'||player.countCards('he',{suit:'diamond'})>0;
|
||||
},
|
||||
},
|
||||
group:['inari_baiwei_shan','inari_baiwei_draw'],
|
||||
},
|
||||
inari_baiwei_shan:{
|
||||
prompt:'将一张♦牌当做闪使用或打出',
|
||||
enable:['chooseToRespond','chooseToUse'],
|
||||
viewAs:{name:'shan'},
|
||||
selectCard:1,
|
||||
filterCard:{suit:'diamond'},
|
||||
popname:true,
|
||||
check(card){
|
||||
return 1/Math.max(0.1,get.value(card));
|
||||
},
|
||||
position:'hse',
|
||||
ai:{
|
||||
order:10,
|
||||
result:{player:1},
|
||||
respondShan:true,
|
||||
skillTagFilter(player){
|
||||
return player.countCards('hse',{suit:'diamond'})>0;
|
||||
},
|
||||
},
|
||||
group:['inari_baiwei_draw'],
|
||||
},
|
||||
inari_baiwei_draw:{
|
||||
trigger:{player:['useCardAfter','respondAfter']},
|
||||
|
|
|
@ -1875,7 +1875,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
twgongxin2:{
|
||||
mod:{
|
||||
cardEnabled2(card,player){
|
||||
if(player.getStorage('twgongxin2').includes(get.color(card))) return false;
|
||||
const color = get.color(card);
|
||||
if(color!='unsure' && player.getStorage('twgongxin2').includes(color)) return false;
|
||||
},
|
||||
},
|
||||
charlotte:true,
|
||||
|
@ -2266,10 +2267,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(lib.skill.xunshi.isXunshi(card)) return 'none';
|
||||
},
|
||||
targetInRange(card){
|
||||
if(get.color(card)=='none') return true;
|
||||
const suit = get.color(card);
|
||||
if (suit=='none' || suit=='unsure') return true;
|
||||
},
|
||||
cardUsable(card){
|
||||
if(get.color(card)=='none') return Infinity;
|
||||
const suit = get.color(card);
|
||||
if (suit=='none' || suit=='unsure') return Infinity;
|
||||
},
|
||||
},
|
||||
isXunshi(card){
|
||||
|
@ -2343,10 +2346,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(get.suit(card)=='heart') return false;
|
||||
},
|
||||
targetInRange(card){
|
||||
if(get.suit(card)=='heart') return true;
|
||||
if(card.name === 'sha'){
|
||||
const suit = get.suit(card);
|
||||
if (suit === 'heart' || suit === 'unsure') return true;
|
||||
}
|
||||
},
|
||||
cardUsable(card){
|
||||
if(card.name=='sha'&&get.suit(card)=='heart') return Infinity;
|
||||
if(card.name === 'sha'){
|
||||
const suit = get.suit(card);
|
||||
if (suit === 'heart' || suit === 'unsure') return Infinity;
|
||||
}
|
||||
}
|
||||
},
|
||||
audio:'wushen',
|
||||
|
@ -2511,16 +2520,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(event.responded||event.shouli||event.type=='wuxie') return false;
|
||||
if(game.hasPlayer(function(current){
|
||||
return current.getCards('e',card=>get.is.attackingMount(card)).length>0;
|
||||
})&&event.filterCard({
|
||||
})&&event.filterCard(get.autoViewAs({
|
||||
name:'sha',
|
||||
storage:{shouli:true},
|
||||
},player,event)) return true;
|
||||
},'unsure'),player,event)) return true;
|
||||
if(game.hasPlayer(function(current){
|
||||
return current.getCards('e',card=>get.is.defendingMount(card)).length>0;
|
||||
})&&event.filterCard({
|
||||
})&&event.filterCard(get.autoViewAs({
|
||||
name:'shan',
|
||||
storage:{shouli:true},
|
||||
},player,event)) return true;
|
||||
},'unsure'),player,event)) return true;
|
||||
return false;
|
||||
},
|
||||
delay:false,
|
||||
|
@ -6164,10 +6173,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(get.suit(card)=='heart') return false;
|
||||
},
|
||||
targetInRange(card){
|
||||
if(get.suit(card)=='heart') return true;
|
||||
if(card.name === 'sha'){
|
||||
const suit = get.suit(card);
|
||||
if (suit === 'heart' || suit === 'unsure') return true;
|
||||
}
|
||||
},
|
||||
cardUsable(card){
|
||||
if(card.name=='sha'&&get.suit(card)=='heart') return Infinity;
|
||||
if(card.name === 'sha'){
|
||||
const suit = get.suit(card);
|
||||
if (suit === 'heart' || suit === 'unsure') return Infinity;
|
||||
}
|
||||
}
|
||||
},
|
||||
audio:2,
|
||||
|
@ -6875,13 +6890,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
//获取卡牌花色
|
||||
var name=get.suit(card,player);
|
||||
//如果这张牌是梅花并且当前时机能够使用/打出闪 那么这张牌可以选择
|
||||
if(name=='club'&&filter({name:'shan'},player,event)) return true;
|
||||
if(name=='club'&&filter(get.autoViewAs({name:'shan'},'unsure'),player,event)) return true;
|
||||
//如果这张牌是方片并且当前时机能够使用/打出火杀 那么这张牌可以选择
|
||||
if(name=='diamond'&&filter({name:'sha',nature:'fire'},player,event)) return true;
|
||||
if(name=='diamond'&&filter(get.autoViewAs({name:'sha',nature:'fire'},'unsure'),player,event)) return true;
|
||||
//如果这张牌是黑桃并且当前时机能够使用/打出无懈 那么这张牌可以选择
|
||||
if(name=='spade'&&filter({name:'wuxie'},player,event)) return true;
|
||||
if(name=='spade'&&filter(get.autoViewAs({name:'wuxie'},'unsure'),player,event)) return true;
|
||||
//如果这张牌是红桃并且当前时机能够使用/打出桃 那么这张牌可以选择
|
||||
if(name=='heart'&&filter({name:'tao'},player,event)) return true;
|
||||
if(name=='heart'&&filter(get.autoViewAs({name:'tao'},'unsure'),player,event)) return true;
|
||||
//上述条件都不满足 那么就不能选择这张牌
|
||||
return false;
|
||||
},
|
||||
|
@ -6890,13 +6905,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
//获取当前时机的卡牌选择限制
|
||||
var filter=event.filterCard;
|
||||
//如果当前时机能够使用/打出火杀并且角色有方片 那么可以发动技能
|
||||
if(filter({name:'sha',nature:'fire'},player,event)&&player.countCards('hes',{suit:'diamond'})) return true;
|
||||
if(filter(get.autoViewAs({name:'sha',nature:'fire'},'unsure'),player,event)&&player.countCards('hes',{suit:'diamond'})) return true;
|
||||
//如果当前时机能够使用/打出闪并且角色有梅花 那么可以发动技能
|
||||
if(filter({name:'shan'},player,event)&&player.countCards('hes',{suit:'club'})) return true;
|
||||
if(filter(get.autoViewAs({name:'shan'},'unsure'),player,event)&&player.countCards('hes',{suit:'club'})) return true;
|
||||
//如果当前时机能够使用/打出桃并且角色有红桃 那么可以发动技能
|
||||
if(filter({name:'tao'},player,event)&&player.countCards('hes',{suit:'heart'})) return true;
|
||||
if(filter(get.autoViewAs({name:'tao'},'unsure'),player,event)&&player.countCards('hes',{suit:'heart'})) return true;
|
||||
//如果当前时机能够使用/打出无懈可击并且角色有黑桃 那么可以发动技能
|
||||
if(filter({name:'wuxie'},player,event)&&player.countCards('hes',{suit:'spade'})) return true;
|
||||
if(filter(get.autoViewAs({name:'wuxie'},'unsure'),player,event)&&player.countCards('hes',{suit:'spade'})) return true;
|
||||
return false;
|
||||
},
|
||||
ai:{
|
||||
|
@ -7029,10 +7044,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
filter(event,player){
|
||||
var filter=event.filterCard;
|
||||
if(filter({name:'sha',nature:'fire'},player,event)&&player.countCards('hs',{suit:'diamond'})) return true;
|
||||
if(filter({name:'shan'},player,event)&&player.countCards('hs',{suit:'club'})) return true;
|
||||
if(filter({name:'tao'},player,event)&&player.countCards('hs',{suit:'heart'})) return true;
|
||||
if(filter({name:'wuxie'},player,event)&&player.countCards('hs',{suit:'spade'})) return true;
|
||||
if(filter(get.autoViewAs({name:'sha',nature:'fire'},'unsure'),player,event)&&player.countCards('hs',{suit:'diamond'})) return true;
|
||||
if(filter(get.autoViewAs({name:'shan'},'unsure'),player,event)&&player.countCards('hs',{suit:'club'})) return true;
|
||||
if(filter(get.autoViewAs({name:'tao'},'unsure'),player,event)&&player.countCards('hs',{suit:'heart'})) return true;
|
||||
if(filter(get.autoViewAs({name:'wuxie'},'unsure'),player,event)&&player.countCards('hs',{suit:'spade'})) return true;
|
||||
return false;
|
||||
},
|
||||
precontent(){
|
||||
|
|
|
@ -8885,7 +8885,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(!player.hasCard((card)=>(get.type(card)!='basic'),'ehs')) return false;
|
||||
for(var i of list){
|
||||
var type=get.type2(i,false);
|
||||
if((type=='basic'||type=='trick')&&event.filterCard({name:i},player,event)) return true;
|
||||
if((type=='basic'||type=='trick')&&event.filterCard(get.autoViewAs({name:i},'unsure'),player,event)) return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
@ -8896,7 +8896,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var list2=[];
|
||||
for(var i of list){
|
||||
var type=get.type2(i,false);
|
||||
if((type=='basic'||type=='trick')&&event.filterCard({name:i},player,event)) list2.push([type,'',i]);
|
||||
if((type=='basic'||type=='trick')&&event.filterCard(get.autoViewAs({name:i},'unsure'),player,event)) list2.push([type,'',i]);
|
||||
}
|
||||
return ui.create.dialog('浮萍',[list2,'vcard']);
|
||||
},
|
||||
|
@ -8912,7 +8912,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
popname:true,
|
||||
viewAs:{
|
||||
name:links[0][2],
|
||||
isCard:true,
|
||||
},
|
||||
check:function(card){
|
||||
return 8-get.value(card);
|
||||
|
@ -11058,11 +11057,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
zhente2:{
|
||||
mod:{
|
||||
cardEnabled:function(card,player){
|
||||
if(player.getStorage('zhente2').includes(get.color(card))) return false;
|
||||
cardEnabled(card, player) {
|
||||
const color = get.color(card);
|
||||
if (color != 'unsure' && player.getStorage('zhente2').includes(color)) return false;
|
||||
},
|
||||
cardSavable:function(card,player){
|
||||
if(player.getStorage('zhente2').includes(get.color(card))) return false;
|
||||
cardSavable(card,player) {
|
||||
const color = get.color(card);
|
||||
if (color != 'unsure' && player.getStorage('zhente2').includes(color)) return false;
|
||||
},
|
||||
},
|
||||
charlotte:true,
|
||||
|
|
|
@ -235,7 +235,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
enable:'chooseToUse',
|
||||
filter:function(event,player){
|
||||
for(const name of ['wuxie','huogong']){
|
||||
if(event.filterCard({name},player,event)) return true;
|
||||
if(event.filterCard(get.autoViewAs({name},'unsure'),player,event)) return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
@ -246,7 +246,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
viewAs:function(cards,player){
|
||||
const event=get.event(),filter=event._backup.filterCard;
|
||||
for(const name of ['wuxie','huogong']){
|
||||
if(filter({name},player,event)) return {name};
|
||||
if(filter(get.autoViewAs({name},'unsure'),player,event)) return {name};
|
||||
}
|
||||
return null;
|
||||
},
|
||||
|
@ -508,13 +508,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
onremove:true,
|
||||
mod:{
|
||||
cardEnabled:function(card,player){
|
||||
if(player.getStorage('jsrgfumou_forbid').includes(get.color(card))) return false;
|
||||
const color = get.color(card);
|
||||
if (color != 'unsure' && player.getStorage('jsrgfumou_forbid').includes(color)) return false;
|
||||
},
|
||||
cardRespondable:function(card,player){
|
||||
if(player.getStorage('jsrgfumou_forbid').includes(get.color(card))) return false;
|
||||
const color = get.color(card);
|
||||
if (color != 'unsure' && player.getStorage('jsrgfumou_forbid').includes(color)) return false;
|
||||
},
|
||||
cardSavable:function(card,player){
|
||||
if(player.getStorage('jsrgfumou_forbid').includes(get.color(card))) return false;
|
||||
const color = get.color(card);
|
||||
if (color != 'unsure' && player.getStorage('jsrgfumou_forbid').includes(color)) return false;
|
||||
},
|
||||
},
|
||||
mark:true,
|
||||
|
@ -810,14 +813,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
})) return false;
|
||||
return get.inpileVCardList(info=>{
|
||||
if(info[0]!='basic') return false;
|
||||
return event.filterCard({name:info[2],nature:info[3]},player,event);
|
||||
return event.filterCard(get.autoViewAs({name:info[2],nature:info[3]},'unsure'),player,event);
|
||||
}).length;
|
||||
},
|
||||
chooseButton:{
|
||||
dialog(event,player){
|
||||
const vcards=get.inpileVCardList(info=>{
|
||||
if(info[0]!='basic') return false;
|
||||
return event.filterCard({name:info[2],nature:info[3]},player,event);
|
||||
return event.filterCard(get.autoViewAs({name:info[2],nature:info[3]},'unsure'),player,event);
|
||||
});
|
||||
return ui.create.dialog('镇胆',[vcards,'vcard']);
|
||||
},
|
||||
|
@ -1277,14 +1280,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
})) return false;
|
||||
return get.inpileVCardList(info=>{
|
||||
if(info[0]!='basic') return false;
|
||||
return event.filterCard({name:info[2],nature:info[3]},player,event);
|
||||
return event.filterCard(get.autoViewAs({name:info[2],nature:info[3]},'unsure'),player,event);
|
||||
}).length;
|
||||
},
|
||||
chooseButton:{
|
||||
dialog:function(event,player){
|
||||
const vcards=get.inpileVCardList(info=>{
|
||||
if(info[0]!='basic') return false;
|
||||
return event.filterCard({name:info[2],nature:info[3]},player,event);
|
||||
return event.filterCard(get.autoViewAs({name:info[2],nature:info[3]},'unsure'),player,event);
|
||||
});
|
||||
return ui.create.dialog('惊惧',[vcards,'vcard'],'hidden');
|
||||
},
|
||||
|
@ -4759,11 +4762,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
for(var name of lib.inpile){
|
||||
if(get.type2(name)!='basic') continue;
|
||||
var card={name:name};
|
||||
if(event.filterCard(card,player,event)) return true;
|
||||
if(event.filterCard(get.autoViewAs(card,'unsure'),player,event)) return true;
|
||||
if(name=='sha'){
|
||||
for(var nature of lib.inpile_nature){
|
||||
card.nature=nature;
|
||||
if(event.filterCard(card,player,event)) return true;
|
||||
if(event.filterCard(get.autoViewAs(card,'unsure'),player,event)) return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4775,19 +4778,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var list=[];
|
||||
for(var name of lib.inpile){
|
||||
if(name=='sha'){
|
||||
if(event.filterCard({name:name},player,event)) list.push(['基本','','sha']);
|
||||
if(event.filterCard(get.autoViewAs({name},'unsure'),player,event)) list.push(['基本','','sha']);
|
||||
for(var nature of lib.inpile_nature){
|
||||
if(event.filterCard({name:name,nature:nature},player,event)) list.push(['基本','','sha',nature]);
|
||||
if(event.filterCard(get.autoViewAs({name,nature},'unsure'),player,event)) list.push(['基本','','sha',nature]);
|
||||
}
|
||||
}
|
||||
else if(get.type(name)=='basic'&&event.filterCard({name:name},player,event)) list.push(['基本','',name]);
|
||||
else if(get.type(name)=='basic'&&event.filterCard(get.autoViewAs({name},'unsure'),player,event)) list.push(['基本','',name]);
|
||||
}
|
||||
var dialog=ui.create.dialog('念恩',[list,'vcard']);
|
||||
dialog.direct=true;
|
||||
return dialog;
|
||||
},
|
||||
filter:function(button,player){
|
||||
return _status.event.getParent().filterCard({name:button.link[2],nature:button.link[3]},player,_status.event.getParent());
|
||||
return _status.event.getParent().filterCard(get.autoViewAs({name:button.link[2],nature:button.link[3]},'unsure'),player,_status.event.getParent());
|
||||
},
|
||||
check:function(button){
|
||||
if(_status.event.getParent().type!='phase') return 1;
|
||||
|
@ -5035,7 +5038,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
for(var name of lib.inpile){
|
||||
if(get.type(name)!='basic') continue;
|
||||
if(player.getStorage('jsrgjixiang_used').includes(name)) continue;
|
||||
var card={name:name};
|
||||
var card={name:name,isCard:true};
|
||||
if(event.filterCard(card,event.player,event)) return true;
|
||||
if(name=='sha'){
|
||||
for(var nature of lib.inpile_nature){
|
||||
|
|
|
@ -3108,7 +3108,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
cardEnabled:function(card,player){
|
||||
if(!player.storage.scschihe_blocker) return;
|
||||
var suit=get.suit(card);
|
||||
if(suit=='none') return;
|
||||
if(suit=='none'||suit=='unsure') return;
|
||||
var evt=_status.event;
|
||||
if(evt.name!='chooseToUse') evt=evt.getParent('chooseToUse');
|
||||
if(!evt||!evt.respondTo||evt.respondTo[1].name!='sha') return;
|
||||
|
@ -3222,10 +3222,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
filter:function(event,player){
|
||||
var filter=event.filterCard;
|
||||
if(filter({name:'sha',nature:'fire'},player,event)&&player.countCards('hes',{suit:'diamond'})) return true;
|
||||
if(filter({name:'shan'},player,event)&&player.countCards('hes',{suit:'club'})) return true;
|
||||
if(filter({name:'tao'},player,event)&&player.countCards('hes',{suit:'heart'})) return true;
|
||||
if(filter({name:'wuxie'},player,event)&&player.countCards('hes',{suit:'spade'})) return true;
|
||||
if(filter(get.autoViewAs({name:'sha',nature:'fire'},'unsure'),player,event)&&player.countCards('hes',{suit:'diamond'})) return true;
|
||||
if(filter(get.autoViewAs({name:'shan'},'unsure'),player,event)&&player.countCards('hes',{suit:'club'})) return true;
|
||||
if(filter(get.autoViewAs({name:'tao'},'unsure'),player,event)&&player.countCards('hes',{suit:'heart'})) return true;
|
||||
if(filter(get.autoViewAs({name:'wuxie'},'unsure'),player,event)&&player.countCards('hes',{suit:'spade'})) return true;
|
||||
return false;
|
||||
},
|
||||
precontent:function(){
|
||||
|
@ -3399,10 +3399,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
filter:function(event,player){
|
||||
var filter=event.filterCard;
|
||||
if(filter({name:'sha',nature:'fire'},player,event)&&player.countCards('hes',{suit:'diamond'})) return true;
|
||||
if(filter({name:'shan'},player,event)&&player.countCards('hes',{suit:'club'})) return true;
|
||||
if(filter({name:'tao'},player,event)&&player.countCards('hes',{suit:'heart'})) return true;
|
||||
if(filter({name:'wuxie'},player,event)&&player.countCards('hes',{suit:'spade'})) return true;
|
||||
if(filter(get.autoViewAs({name:'sha',nature:'fire'},'unsure'),player,event)&&player.countCards('hes',{suit:'diamond'})) return true;
|
||||
if(filter(get.autoViewAs({name:'shan'},'unsure'),player,event)&&player.countCards('hes',{suit:'club'})) return true;
|
||||
if(filter(get.autoViewAs({name:'tao'},'unsure'),player,event)&&player.countCards('hes',{suit:'heart'})) return true;
|
||||
if(filter(get.autoViewAs({name:'wuxie'},'unsure'),player,event)&&player.countCards('hes',{suit:'spade'})) return true;
|
||||
return false;
|
||||
},
|
||||
precontent:function(){
|
||||
|
@ -5625,7 +5625,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var evt=lib.skill.dcjianying.getLastUsed(player);
|
||||
if(!evt||!evt.card) return;
|
||||
var num1=get.number(card),num2=get.number(evt.card);
|
||||
if(typeof num1=='number'&&typeof num2=='number'&&num1%num2==0) return Infinity;
|
||||
if(num1==='unsure'||typeof num1=='number'&&typeof num2=='number'&&num1%num2==0) return Infinity;
|
||||
}
|
||||
},
|
||||
aiOrder:function(player,card,num){
|
||||
|
@ -5633,7 +5633,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var evt=lib.skill.dcjianying.getLastUsed(player);
|
||||
if(!evt||!evt.card) return;
|
||||
var num1=get.number(card),num2=num2=get.number(evt.card);
|
||||
if(typeof num1=='number'&&typeof num2=='number'&&num2%num1==0) return num+5;
|
||||
if(num1==='unsure'||typeof num1=='number'&&typeof num2=='number'&&num2%num1==0) return num+5;
|
||||
}
|
||||
},
|
||||
},
|
||||
|
@ -6634,19 +6634,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
audio:2,
|
||||
enable:['chooseToUse','chooseToRespond'],
|
||||
filter:function(event,player){
|
||||
return player.getExpansions('jibing').length>0&&(event.filterCard({name:'sha'},player,event)||event.filterCard({name:'shan'},player,event));
|
||||
return player.getExpansions('jibing').length>0&&(event.filterCard(get.autoViewAs({name:'sha'},'unsure'),player,event)||event.filterCard(get.autoViewAs({name:'shan'},'unsure'),player,event));
|
||||
},
|
||||
chooseButton:{
|
||||
dialog:function(event,player){
|
||||
var dialog=ui.create.dialog('集兵','hidden');
|
||||
if(event.filterCard({name:'sha'},player,event)&&event.filterCard({name:'shan'},player,event)){
|
||||
if(event.filterCard(get.autoViewAs({name:'sha'},'unsure'),player,event)&&event.filterCard(get.autoViewAs({name:'shan'},'unsure'),player,event)){
|
||||
dialog._chooseButton=2;
|
||||
var list=['sha','shan'];
|
||||
dialog.add([list.map(i=>{
|
||||
return [i,get.translation(i)];
|
||||
}),'tdnodes']);
|
||||
}
|
||||
else dialog._cardName=event.filterCard({name:'sha'},player,event)?'sha':'shan';
|
||||
else dialog._cardName=event.filterCard(get.autoViewAs({name:'sha'},'unsure'),player,event)?'sha':'shan';
|
||||
dialog.add(player.getExpansions('jibing'));
|
||||
return dialog;
|
||||
},
|
||||
|
@ -13279,7 +13279,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},'hs')) return false;
|
||||
for(var name of lib.inpile){
|
||||
if(get.type(name)!='basic') continue;
|
||||
if(event.filterCard({name:name},player,event)) return true;
|
||||
if(event.filterCard(get.autoViewAs({name},'unsure'),player,event)) return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
@ -13288,7 +13288,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var list=[];
|
||||
for(var name of lib.inpile){
|
||||
if(get.type(name)!='basic') continue;
|
||||
if(event.filterCard({name:name},player,event)) list.push(['基本','',name]);
|
||||
if(event.filterCard(get.autoViewAs({name},'unsure'),player,event)) list.push(['基本','',name]);
|
||||
if(name!='sha') continue;
|
||||
for(var j of lib.inpile_nature){
|
||||
if(event.filterCard({name:name,nature:j},player,event)) list.push(['基本','','sha',j]);
|
||||
|
@ -14298,10 +14298,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},'hs')) return false;
|
||||
for(var name of lib.inpile){
|
||||
if(get.type(name)!='basic') continue;
|
||||
if(event.filterCard({name:name},player,event)) return true;
|
||||
if(event.filterCard(get.autoViewAs({name},'unsure'),player,event)) return true;
|
||||
if(name=='sha'){
|
||||
for(var nature of lib.inpile_nature){
|
||||
if(event.filterCard({name:'sha',nature:nature},player,event)) return true;
|
||||
if(event.filterCard(get.autoViewAs({name,nature},'unsure'),player,event)) return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -14312,12 +14312,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var list=[];
|
||||
for(var name of lib.inpile){
|
||||
if(get.type(name)!='basic') continue;
|
||||
if(event.filterCard({name:name},player,event)){
|
||||
if(event.filterCard(get.autoViewAs({name},'unsure'),player,event)){
|
||||
list.push(['基本','',name]);
|
||||
}
|
||||
if(name=='sha'){
|
||||
for(var nature of lib.inpile_nature){
|
||||
if(event.filterCard({name:name,nature:nature},player,event)) list.push(['基本','','sha',nature]);
|
||||
if(event.filterCard(get.autoViewAs({name,nature},'unsure'),player,event)) list.push(['基本','','sha',nature]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -597,16 +597,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(event.responded||event.psshouli||event.type=='wuxie') return false;
|
||||
if(game.hasPlayer(function(current){
|
||||
return current.getEquips(4).length>0;
|
||||
})&&event.filterCard({
|
||||
})&&event.filterCard(get.autoViewAs({
|
||||
name:'sha',
|
||||
storage:{psshouli:true},
|
||||
},player,event)) return true;
|
||||
},'unsure'),player,event)) return true;
|
||||
if(game.hasPlayer(function(current){
|
||||
return current.getEquips(3).length>0;
|
||||
})&&event.filterCard({
|
||||
})&&event.filterCard(get.autoViewAs({
|
||||
name:'shan',
|
||||
storage:{psshouli:true},
|
||||
},player,event)) return true;
|
||||
},'unsure'),player,event)) return true;
|
||||
return false;
|
||||
},
|
||||
delay:false,
|
||||
|
@ -1088,7 +1088,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(!player.countMark('pkwuku')||player.hasSkill('pkmiewu2')) return false;
|
||||
for(var i of lib.inpile){
|
||||
var type=get.type(i);
|
||||
if((type=='basic'||type=='trick')&&event.filterCard({name:i},player,event)) return true;
|
||||
if((type=='basic'||type=='trick')&&event.filterCard(get.autoViewAs({name:i},'unsure'),player,event)) return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
@ -1098,19 +1098,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
for(var i=0;i<lib.inpile.length;i++){
|
||||
var name=lib.inpile[i];
|
||||
if(name=='sha'){
|
||||
if(event.filterCard({name:name},player,event)) list.push(['基本','','sha']);
|
||||
for(var j of lib.inpile_nature){
|
||||
if(event.filterCard({name:name,nature:j},player,event)) list.push(['基本','','sha',j]);
|
||||
if(event.filterCard(get.autoViewAs({name},'unsure'),player,event)) list.push(['基本','','sha']);
|
||||
for(var nature of lib.inpile_nature){
|
||||
if(event.filterCard(get.autoViewAs({name,nature},'unsure'),player,event)) list.push(['基本','','sha',j]);
|
||||
}
|
||||
}
|
||||
else if(get.type(name)=='trick'&&event.filterCard({name:name},player,event)) list.push(['锦囊','',name]);
|
||||
else if(get.type(name)=='basic'&&event.filterCard({name:name},player,event)) list.push(['基本','',name]);
|
||||
else if(get.type(name)=='trick'&&event.filterCard(get.autoViewAs({name},'unsure'),player,event)) list.push(['锦囊','',name]);
|
||||
else if(get.type(name)=='basic'&&event.filterCard(get.autoViewAs({name},'unsure'),player,event)) list.push(['基本','',name]);
|
||||
}
|
||||
return ui.create.dialog('灭吴',[list,'vcard']);
|
||||
},
|
||||
filter:function(button,player){
|
||||
return _status.event.getParent().filterCard({name:button.link[2]},player,_status.event.getParent());
|
||||
},
|
||||
//これ 要らない(そよりん声线)
|
||||
//filter:function(button,player){
|
||||
// return _status.event.getParent().filterCard({name:button.link[2]},player,_status.event.getParent());
|
||||
//},
|
||||
check:function(button){
|
||||
if(_status.event.getParent().type!='phase') return 1;
|
||||
var player=_status.event.player;
|
||||
|
@ -2173,7 +2174,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(!player.countCards('hse')||player.hasSkill('pslongyin_used')) return false;
|
||||
for(var i of lib.inpile){
|
||||
var type=get.type(i);
|
||||
if((type=='basic'||type=='trick')&&event.filterCard({name:i},player,event)) return true;
|
||||
if((type=='basic'||type=='trick')&&event.filterCard(get.autoViewAs({name:i},'unsure'),player,event)) return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
@ -4158,24 +4159,24 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
player.storage.jsprende+=cards.length;
|
||||
if(player.storage.jsprende>=2){
|
||||
var list=[];
|
||||
if(lib.filter.cardUsable({name:'sha'},player,event.getParent('chooseToUse'))&&game.hasPlayer(function(current){
|
||||
if(lib.filter.cardUsable({name:'sha',isCard:true},player,event.getParent('chooseToUse'))&&game.hasPlayer(function(current){
|
||||
return player.canUse('sha',current);
|
||||
})){
|
||||
list.push(['基本','','sha']);
|
||||
}
|
||||
for(var i of lib.inpile_nature){
|
||||
if(lib.filter.cardUsable({name:'sha',nature:i},player,event.getParent('chooseToUse'))&&game.hasPlayer(function(current){
|
||||
return player.canUse({name:'sha',nature:i},current);
|
||||
if(lib.filter.cardUsable({name:'sha',nature:i,isCard:true},player,event.getParent('chooseToUse'))&&game.hasPlayer(function(current){
|
||||
return player.canUse({name:'sha',nature:i,isCard:true},current);
|
||||
})){
|
||||
list.push(['基本','','sha',i]);
|
||||
}
|
||||
}
|
||||
if(lib.filter.cardUsable({name:'tao'},player,event.getParent('chooseToUse'))&&game.hasPlayer(function(current){
|
||||
if(lib.filter.cardUsable({name:'tao',isCard:true},player,event.getParent('chooseToUse'))&&game.hasPlayer(function(current){
|
||||
return player.canUse('tao',current);
|
||||
})){
|
||||
list.push(['基本','','tao']);
|
||||
}
|
||||
if(lib.filter.cardUsable({name:'jiu'},player,event.getParent('chooseToUse'))&&game.hasPlayer(function(current){
|
||||
if(lib.filter.cardUsable({name:'jiu',isCard:true},player,event.getParent('chooseToUse'))&&game.hasPlayer(function(current){
|
||||
return player.canUse('jiu',current);
|
||||
})){
|
||||
list.push(['基本','','jiu']);
|
||||
|
@ -4183,7 +4184,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(list.length){
|
||||
player.chooseButton(['是否视为使用一张基本牌?',[list,'vcard']]).set('ai',function(button){
|
||||
var player=_status.event.player;
|
||||
var card={name:button.link[2],nature:button.link[3]};
|
||||
var card={name:button.link[2],nature:button.link[3],isCard:true};
|
||||
if(card.name=='tao'){
|
||||
if(player.hp==1||(player.hp==2&&!player.hasShan())||player.needsToDiscard()){
|
||||
return 5;
|
||||
|
@ -4220,7 +4221,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
'step 1'
|
||||
if(result&&result.bool&&result.links[0]){
|
||||
var card={name:result.links[0][2],nature:result.links[0][3]};
|
||||
var card={name:result.links[0][2],nature:result.links[0][3],isCard:true};
|
||||
player.chooseUseTarget(card,true);
|
||||
}
|
||||
},
|
||||
|
@ -6094,10 +6095,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
mod:{
|
||||
cardRespondable:function(card,player){
|
||||
if(card.name=='shan'&&get.suit(card)!='heart') return false;
|
||||
if(card.name=='shan'){
|
||||
const suit=get.suit(card);
|
||||
if(suit!='heart'&&suit!='unsure') return false;
|
||||
}
|
||||
},
|
||||
cardEnabled:function(card,player){
|
||||
if(card.name=='shan'&&get.suit(card)!='heart') return false;
|
||||
if(card.name=='shan'){
|
||||
const suit=get.suit(card);
|
||||
if(suit!='heart'&&suit!='unsure') return false;
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
|
|
|
@ -528,10 +528,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(!player.countCards('hs')) return false;
|
||||
for(var i of lib.inpile){
|
||||
var type=get.type(i);
|
||||
if((type=='basic'||type=='trick')&&event.filterCard({name:i},player,event)) return true;
|
||||
if((type=='basic'||type=='trick')&&event.filterCard(get.autoViewAs({name:i},'unsure'),player,event)) return true;
|
||||
if(i=='sha'){
|
||||
for(var j of lib.inpile_nature){
|
||||
if(event.filterCard({name:i,nature:j},player,event)) return true;
|
||||
if(event.filterCard(get.autoViewAs({name:i,nature:j},'unsure'),player,event)) return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -541,20 +541,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
dialog:function(event,player){
|
||||
var list=[];
|
||||
for(var i of lib.inpile){
|
||||
if(event.type!='phase') if(!event.filterCard({name:i},player,event)) continue;
|
||||
if(event.type!='phase') if(!event.filterCard(get.autoViewAs({name:i},'unsure'),player,event)) continue;
|
||||
var type=get.type(i);
|
||||
if(type=='basic'||type=='trick') list.push([type,'',i]);
|
||||
if(i=='sha'){
|
||||
if(event.type!='phase') if(!event.filterCard({name:i,nature:j},player,event)) continue;
|
||||
if(event.type!='phase') if(!event.filterCard(get.autoViewAs({name:i,nature:j},'unsure'),player,event)) continue;
|
||||
for(var j of lib.inpile_nature) list.push(['基本','','sha',j]);
|
||||
}
|
||||
}
|
||||
return ui.create.dialog('蛊惑',[list,'vcard']);
|
||||
},
|
||||
filter:function(button,player){
|
||||
var evt=_status.event.getParent();
|
||||
return evt.filterCard({name:button.link[2],nature:button.link[3]},player,evt);
|
||||
},
|
||||
check:function(button){
|
||||
var player=_status.event.player;
|
||||
var order=Math.max(0,get.order(card)+1);
|
||||
|
|
|
@ -205,8 +205,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
let evt=_status.event;
|
||||
if(evt.name!='chooseToUse') evt=evt.getParent('chooseToUse');
|
||||
if(!evt||!evt.respondTo||!storage.includes(evt.respondTo[1])) return;
|
||||
const num=get.number(card,player);
|
||||
if(!(typeof num!='number'||num>=get.number(evt.respondTo[1]))) return false;
|
||||
const num = get.number(card);
|
||||
if(num!='unsure' && (typeof num!='number' || num<=get.number(evt.respondTo[1]))) return false;
|
||||
},
|
||||
},
|
||||
onremove(player){
|
||||
|
|
|
@ -6758,7 +6758,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return Infinity;
|
||||
},
|
||||
cardUsable:function(card,player){
|
||||
if(card.name=='sha'&&player.storage.xingongji2.includes(get.suit(card))) return Infinity;
|
||||
if(card.name=='sha'){
|
||||
const suit = get.suit(card);
|
||||
return suit === 'unsure' || player.storage.xingongji2.includes(suit);
|
||||
}
|
||||
},
|
||||
aiOrder:function(player,card,num){
|
||||
if(get.name(card)=='sha'&&!player.storage.xingongji2.includes(get.suit(card))) return num+1;
|
||||
|
@ -8739,10 +8742,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
filter:function(event,player){
|
||||
var filter=event.filterCard;
|
||||
if(filter({name:'sha'},player,event)&&player.countCards('hs','shan')) return true;
|
||||
if(filter({name:'shan'},player,event)&&player.countCards('hs','sha')) return true;
|
||||
if(filter({name:'tao'},player,event)&&player.countCards('hs','jiu')) return true;
|
||||
if(filter({name:'jiu'},player,event)&&player.countCards('hs','tao')) return true;
|
||||
if(filter(get.autoViewAs({name:'sha'},'unsure'),player,event)&&player.countCards('hs','shan')) return true;
|
||||
if(filter(get.autoViewAs({name:'shan'},'unsure'),player,event)&&player.countCards('hs','sha')) return true;
|
||||
if(filter(get.autoViewAs({name:'tao'},'unsure'),player,event)&&player.countCards('hs','jiu')) return true;
|
||||
if(filter(get.autoViewAs({name:'jiu'},'unsure'),player,event)&&player.countCards('hs','tao')) return true;
|
||||
return false;
|
||||
},
|
||||
ai:{
|
||||
|
@ -10822,10 +10825,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(!player.countCards('hs')||player.hasSkill('reguhuo_phase')) return false;
|
||||
for(var i of lib.inpile){
|
||||
var type=get.type(i);
|
||||
if((type=='basic'||type=='trick')&&event.filterCard({name:i},player,event)) return true;
|
||||
if((type=='basic'||type=='trick')&&event.filterCard(get.autoViewAs({name:i},'unsure'),player,event)) return true;
|
||||
if(i=='sha'){
|
||||
for(var j of lib.inpile_nature){
|
||||
if(event.filterCard({name:i,nature:j},player,event)) return true;
|
||||
if(event.filterCard(get.autoViewAs({name:i,nature:j},'unsure'),player,event)) return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -10845,7 +10848,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
filter:function(button,player){
|
||||
var evt=_status.event.getParent();
|
||||
return evt.filterCard({name:button.link[2],nature:button.link[3]},player,evt);
|
||||
return evt.filterCard(get.autoViewAs({name:button.link[2],nature:button.link[3]},'unsure'),player,evt);
|
||||
},
|
||||
check:function(button){
|
||||
var player=_status.event.player;
|
||||
|
|
|
@ -828,7 +828,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return name=='sha'&&player.countCards('hs');
|
||||
},
|
||||
filter:function(event,player){
|
||||
return event.filterCard({name:'sha'},player,event)||lib.inpile_nature.some(nature=>event.filterCard({name:'sha',nature:nature},player,event));
|
||||
return event.filterCard(get.autoViewAs({name:'sha'},'unsure'),player,event)||lib.inpile_nature.some(nature=>event.filterCard(get.autoViewAs({name:'sha',nature},'unsure'),player,event));
|
||||
},
|
||||
chooseButton:{
|
||||
dialog:function(event,player){
|
||||
|
@ -3763,10 +3763,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(!marked&&name!='sha'&&name!='shan') continue;
|
||||
if(get.type(name)!='basic') continue;
|
||||
if(player.hasCard(lib.skill.sblongdan.getFilter(name,player),'hs')){
|
||||
if(event.filterCard({name:name},player,event)) return true;
|
||||
if(event.filterCard(get.autoViewAs({name},'unsure'),player,event)) return true;
|
||||
if(marked&&name=='sha'){
|
||||
for(var nature of lib.inpile_nature){
|
||||
if(event.filterCard({name:name,nature:nature},player,event)) return true;
|
||||
if(event.filterCard(get.autoViewAs({name,nature},'unsure'),player,event)) return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3781,10 +3781,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(!marked&&name!='sha'&&name!='shan') continue;
|
||||
if(get.type(name)!='basic') continue;
|
||||
if(player.hasCard(lib.skill.sblongdan.getFilter(name,player),'hs')){
|
||||
if(event.filterCard({name:name},player,event)) list.push(['基本','',name]);
|
||||
if(event.filterCard(get.autoViewAs({name},'unsure'),player,event)) list.push(['基本','',name]);
|
||||
if(marked&&name=='sha'){
|
||||
for(var nature of lib.inpile_nature){
|
||||
if(event.filterCard({name:name,nature:nature},player,event)) list.push(['基本','',name,nature])
|
||||
if(event.filterCard(get.autoViewAs({name,nature},'unsure'),player,event)) list.push(['基本','',name,nature])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -150,7 +150,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
enable:'chooseToUse',
|
||||
filter:function(event,player){
|
||||
if(!player.hasCard(card=>get.suit(card)=='club','sh')) return false;
|
||||
return (event.type=='phase'||event.filterCard({name:'tiesuo'},player,event));
|
||||
return (event.type=='phase'||event.filterCard(get.autoViewAs({name:'tiesuo'},'unsure'),player,event));
|
||||
},
|
||||
position:'hs',
|
||||
filterCard:function(card,player,event){
|
||||
|
@ -2259,16 +2259,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
"nzry_chenglve1":{
|
||||
mod:{
|
||||
cardUsable:function(card,player){
|
||||
var cards=player.storage.nzry_chenglve1;
|
||||
for(var i=0;i<cards.length;i++){
|
||||
if(cards[i]==get.suit(card)) return Infinity;
|
||||
}
|
||||
const suit = get.suit(card);
|
||||
if (suit == 'unsure' || player.getStorage('nzry_chenglve1').includes(suit)) return Infinity;
|
||||
},
|
||||
targetInRange:function(card,player){
|
||||
var cards=player.storage.nzry_chenglve1;
|
||||
for(var i=0;i<cards.length;i++){
|
||||
if(cards[i]==get.suit(card)) return true;
|
||||
}
|
||||
const suit = get.suit(card);
|
||||
if (suit == 'unsure' || player.getStorage('nzry_chenglve1').includes(suit)) return true;
|
||||
}
|
||||
},
|
||||
onremove:true,
|
||||
|
@ -7429,10 +7425,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(!player.countCards('hs')) return false;
|
||||
for(var i of lib.inpile){
|
||||
var type=get.type(i);
|
||||
if((type=='basic'||type=='trick')&&event.filterCard({name:i},player,event)) return true;
|
||||
if((type=='basic'||type=='trick')&&event.filterCard(get.autoViewAs({name:i},'unsure'),player,event)) return true;
|
||||
if(i=='sha'){
|
||||
for(var j of lib.inpile_nature){
|
||||
if(event.filterCard({name:i,nature:j},player,event)) return true;
|
||||
if(event.filterCard(get.autoViewAs({name:i,nature:j},'unsure'),player,event)) return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7442,11 +7438,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
dialog:function(event,player){
|
||||
var list=[];
|
||||
for(var i of lib.inpile){
|
||||
if(event.type!='phase') if(!event.filterCard({name:i},player,event)) continue;
|
||||
if(event.type!='phase') if(!event.filterCard(get.autoViewAs({name:i},'unsure'),player,event)) continue;
|
||||
var type=get.type(i);
|
||||
if(type=='basic'||type=='trick') list.push([type,'',i]);
|
||||
if(i=='sha'){
|
||||
if(event.type!='phase') if(!event.filterCard({name:i,nature:j},player,event)) continue;
|
||||
if(event.type!='phase') if(!event.filterCard(get.autoViewAs({name:i,nature:j},'unsure'),player,event)) continue;
|
||||
for(var j of lib.inpile_nature) list.push(['基本','','sha',j]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5780,7 +5780,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(!player.countMark('spwuku')||!player.countCards('hse')||player.hasSkill('spmiewu2')) return false;
|
||||
for(var i of lib.inpile){
|
||||
var type=get.type2(i);
|
||||
if((type=='basic'||type=='trick')&&event.filterCard({name:i},player,event)) return true;
|
||||
if((type=='basic'||type=='trick')&&event.filterCard(get.autoViewAs({name:i},'unsure'),player,event)) return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
@ -5790,19 +5790,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
for(var i=0;i<lib.inpile.length;i++){
|
||||
var name=lib.inpile[i];
|
||||
if(name=='sha'){
|
||||
if(event.filterCard({name:name},player,event)) list.push(['基本','','sha']);
|
||||
for(var j of lib.inpile_nature){
|
||||
if(event.filterCard({name:name,nature:j},player,event)) list.push(['基本','','sha',j]);
|
||||
if(event.filterCard(get.autoViewAs({name},'unsure'),player,event)) list.push(['基本','','sha']);
|
||||
for(var nature of lib.inpile_nature){
|
||||
if(event.filterCard(get.autoViewAs({name,nature},'unsure'),player,event)) list.push(['基本','','sha',j]);
|
||||
}
|
||||
}
|
||||
else if(get.type2(name)=='trick'&&event.filterCard({name:name},player,event)) list.push(['锦囊','',name]);
|
||||
else if(get.type(name)=='basic'&&event.filterCard({name:name},player,event)) list.push(['基本','',name]);
|
||||
else if(get.type2(name)=='trick'&&event.filterCard(get.autoViewAs({name},'unsure'),player,event)) list.push(['锦囊','',name]);
|
||||
else if(get.type(name)=='basic'&&event.filterCard(get.autoViewAs({name},'unsure'),player,event)) list.push(['基本','',name]);
|
||||
}
|
||||
return ui.create.dialog('灭吴',[list,'vcard']);
|
||||
},
|
||||
filter:function(button,player){
|
||||
return _status.event.getParent().filterCard({name:button.link[2]},player,_status.event.getParent());
|
||||
},
|
||||
check:function(button){
|
||||
if(_status.event.getParent().type!='phase') return 1;
|
||||
var player=_status.event.player;
|
||||
|
|
|
@ -797,28 +797,29 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return get.inpileVCardList(info=>{
|
||||
const name=info[2];
|
||||
return get.type(name)=='basic';
|
||||
}).some(card=>event.filterCard({name:card[2],nature:card[3]},player,event));
|
||||
}).some(card=>event.filterCard({name:card[2],nature:card[3],isCard:true},player,event));
|
||||
},
|
||||
chooseButton:{
|
||||
dialog(event,player){
|
||||
const list=get.inpileVCardList(info=>{
|
||||
const name=info[2];
|
||||
return get.type(name)=='basic';
|
||||
}).filter(card=>event.filterCard({name:card[2],nature:card[3]},player,event));
|
||||
}).filter(card=>event.filterCard({name:card[2],nature:card[3],isCard:true},player,event));
|
||||
return ui.create.dialog('诿解',[list,'vcard']);
|
||||
},
|
||||
filter(button,player){
|
||||
return get.event().getParent().filterCard({name:button.link[2],nature:button.link[3]},player,_status.event.getParent());
|
||||
return get.event().getParent().filterCard({name:button.link[2],nature:button.link[3],isCard:true},player,_status.event.getParent());
|
||||
},
|
||||
check(button){
|
||||
if(get.event().getParent().type!='phase') return 1;
|
||||
return get.event('player').getUseValue({name:button.link[2],nature:button.link[3]});
|
||||
return get.event('player').getUseValue({name:button.link[2],nature:button.link[3],isCard:true});
|
||||
},
|
||||
backup(links,player){
|
||||
return {
|
||||
viewAs:{
|
||||
name:links[0][2],
|
||||
nature:links[0][3],
|
||||
isCard:true,
|
||||
},
|
||||
filterCard:()=>false,
|
||||
selectCard:-1,
|
||||
|
@ -2955,7 +2956,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
filter:function(event,player){
|
||||
if(event.responded||event.type=='wuxie'||event.olqifan||!lib.skill.olqifan.getNum()) return false;
|
||||
for(var i of lib.inpile){
|
||||
if(i!='wuxie'&&event.filterCard({name:i},player,event)) return true;
|
||||
if(i!='wuxie'&&event.filterCard(get.autoViewAs({name:i},'unsure'),player,event)) return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
@ -8455,13 +8456,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
filter:function(event,player){
|
||||
if(event.type=='wuxie') return false;
|
||||
if(!player.hasSkill('liangyuan_tao',null,null,false)&&event.filterCard({name:'tao'},player,event)&&game.hasPlayer(function(current){
|
||||
if(!player.hasSkill('liangyuan_tao',null,null,false)&&event.filterCard(get.autoViewAs({name:'tao'},'unsure'),player,event)&&game.hasPlayer(function(current){
|
||||
var storage=current.getExpansions('huamu');
|
||||
return storage.length>0&&storage.filter(function(i){
|
||||
return get.color(i,false)=='red';
|
||||
}).length>0;
|
||||
})) return true;
|
||||
if(!player.hasSkill('liangyuan_jiu',null,null,false)&&event.filterCard({name:'jiu'},player,event)&&game.hasPlayer(function(current){
|
||||
if(!player.hasSkill('liangyuan_jiu',null,null,false)&&event.filterCard(get.autoViewAs({name:'jiu'},'unsure'),player,event)&&game.hasPlayer(function(current){
|
||||
var storage=current.getExpansions('huamu');
|
||||
return storage.length>0&&storage.filter(function(i){
|
||||
return get.color(i,false)=='black';
|
||||
|
@ -8887,12 +8888,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(!bool) return false;
|
||||
for(var name of lib.inpile){
|
||||
if(get.type(name)!='basic'||list.includes(name)) continue;
|
||||
var card={name:name};
|
||||
if(event.filterCard(card,player,event)) return true;
|
||||
var card={name};
|
||||
if(event.filterCard(get.autoViewAs(card,'unsure'),player,event)) return true;
|
||||
if(name=='sha'){
|
||||
for(var nature of lib.inpile_nature){
|
||||
card.nature=nature;
|
||||
if(event.filterCard(card,player,event)) return true;
|
||||
if(event.filterCard(get.autoViewAs(card,'unsure'),player,event)) return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -8904,12 +8905,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var storage=player.getStorage('yilie_count');
|
||||
for(var i of lib.inpile){
|
||||
if(get.type(i)!='basic'||storage.includes(i)) continue;
|
||||
var card={name:i,isCard:true};
|
||||
if(event.filterCard(card,player,event)) list.push(['基本','',i]);
|
||||
var card={name:i};
|
||||
if(event.filterCard(get.autoViewAs(card,'unsure'),player,event)) list.push(['基本','',i]);
|
||||
if(i=='sha'){
|
||||
for(var j of lib.inpile_nature){
|
||||
card.nature=j;
|
||||
if(event.filterCard(card,player,event)) list.push(['基本','',i,j]);
|
||||
if(event.filterCard(get.autoViewAs(card,'unsure'),player,event)) list.push(['基本','',i,j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -13058,7 +13059,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
filter:function(event,player){
|
||||
if(event.responded||event.jinzhi||player.countMark('jinzhi2')>=player.countCards('he')) return false;
|
||||
for(var i of lib.inpile){
|
||||
if(get.type(i)=='basic'&&event.filterCard({name:i},player,event)) return true;
|
||||
if(get.type(i)=='basic'&&event.filterCard({name:i,isCard:true},player,event)) return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
@ -13066,7 +13067,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
dialog:function(event,player){
|
||||
var list=[];
|
||||
for(var i of lib.inpile){
|
||||
if(get.type(i)=='basic'&&event.filterCard({name:i},player,event)){
|
||||
if(get.type(i)=='basic'&&event.filterCard({name:i,isCard:true},player,event)){
|
||||
list.push(['基本','',i]);
|
||||
if(i=='sha'){
|
||||
for(var j of lib.inpile_nature) list.push(['基本','','sha',j]);
|
||||
|
@ -17961,10 +17962,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
filter:function(event,player){
|
||||
if(!player.storage.fanghun||player.storage.fanghun<=0) return false;
|
||||
var filter=event.filterCard;
|
||||
if(filter({name:'sha'},player,event)&&player.countCards('hs','shan')) return true;
|
||||
if(filter({name:'shan'},player,event)&&player.countCards('hs','sha')) return true;
|
||||
if(filter({name:'tao'},player,event)&&player.countCards('hs','jiu')) return true;
|
||||
if(filter({name:'jiu'},player, event)&&player.countCards('hs','tao')) return true;
|
||||
if(filter(get.autoViewAs({name:'sha'},'unsure'),player,event)&&player.countCards('hs','shan')) return true;
|
||||
if(filter(get.autoViewAs({name:'shan'},'unsure'),player,event)&&player.countCards('hs','sha')) return true;
|
||||
if(filter(get.autoViewAs({name:'jiu'},'unsure'),player,event)&&player.countCards('hs','jiu')) return true;
|
||||
if(filter(get.autoViewAs({name:'tao'},'unsure'),player, event)&&player.countCards('hs','tao')) return true;
|
||||
return false;
|
||||
},
|
||||
onrespond:function(){return this.onuse.apply(this,arguments)},
|
||||
|
@ -22864,10 +22865,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
qiangwu3:{
|
||||
mod:{
|
||||
targetInRange:function(card,player){
|
||||
if(_status.currentPhase==player&&card.name=='sha'&&get.number(card)<player.storage.qiangwu) return true;
|
||||
if (card.name == 'sha') {
|
||||
const num = get.number(card);
|
||||
if (num == 'unsure' || num < player.storage.qiangwu) return true;
|
||||
}
|
||||
},
|
||||
cardUsable:function(card,player){
|
||||
if(_status.currentPhase==player&&card.name=='sha'&&get.number(card)>player.storage.qiangwu) return Infinity;
|
||||
if (card.name == 'sha') {
|
||||
const num = get.number(card);
|
||||
if (num == 'unsure' || num > player.storage.qiangwu) return true;
|
||||
}
|
||||
}
|
||||
},
|
||||
trigger:{player:'useCard1'},
|
||||
|
@ -23889,7 +23896,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
filter:function(event,player){
|
||||
if(event.responded||player==_status.currentPhase||event.aocai) return false;
|
||||
for(var i of lib.inpile){
|
||||
if(get.type(i)=='basic'&&event.filterCard({name:i},player,event)) return true;
|
||||
if(get.type(i)=='basic'&&event.filterCard(get.autoViewAs({name:i},'unsure'),player,event)) return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
|
|
@ -874,16 +874,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
audio:2,
|
||||
enable:'chooseToUse',
|
||||
filter:function(event,player){
|
||||
if(!event.filterCard({name:'sha'},player,event)&&!event.filterCard({name:'wuxie'},player,event)) return false;
|
||||
return player.countCards('hs',card=>{
|
||||
return !player.getStorage('starlifeng_count').includes(get.color(card,player))||_status.connectMode;
|
||||
});
|
||||
if(!event.filterCard(get.autoViewAs({name:'sha'},'unsure'),player,event)&&!event.filterCard(get.autoViewAs({name:'wuxie'},'unsure'),player,event)) return false;
|
||||
return player.hasCard(card=>{
|
||||
return !player.getStorage('starlifeng_count').includes(get.color(card,player));
|
||||
},'hs');
|
||||
},
|
||||
chooseButton:{
|
||||
dialog:function(event,player){
|
||||
var list=[];
|
||||
if(event.filterCard({name:'sha'},player,event)) list.push(['基本','','sha']);
|
||||
if(event.filterCard({name:'wuxie'},player,event)) list.push(['锦囊','','wuxie']);
|
||||
if(event.filterCard(get.autoViewAs({name:'sha'},'unsure'),player,event)) list.push(['基本','','sha']);
|
||||
if(event.filterCard(get.autoViewAs({name:'wuxie'},'unsure'),player,event)) list.push(['锦囊','','wuxie']);
|
||||
return ui.create.dialog('砺锋',[list,'vcard']);
|
||||
},
|
||||
check:function(button){
|
||||
|
@ -1566,10 +1566,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
mod:{
|
||||
targetInRange:function(card,player){
|
||||
if(get.color(card)=='none') return true;
|
||||
const color = get.color(card);
|
||||
if (color === 'none' || color === 'unsure') return true;
|
||||
},
|
||||
cardUsable:function(card){
|
||||
if(get.color(card)=='none') return Infinity;
|
||||
const color = get.color(card);
|
||||
if (color === 'none' || color === 'unsure') return Infinity;
|
||||
},
|
||||
}
|
||||
},
|
||||
|
@ -6400,10 +6402,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
},
|
||||
targetInRange:function(card){
|
||||
if(get.color(card)=='black') return true;
|
||||
const color = get.color(card);
|
||||
if (color === 'black' || color === 'unsure') return true;
|
||||
},
|
||||
cardUsable:function(card){
|
||||
if(get.color(card)=='black') return Infinity;
|
||||
const color = get.color(card);
|
||||
if (color === 'black' || color === 'unsure') return Infinity;
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
@ -224,7 +224,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(event.responded) return false;
|
||||
if(player.storage.hujiaing) return false;
|
||||
if(!player.hasZhuSkill('hujia')) return false;
|
||||
if(!event.filterCard({name:'shan'},player,event)) return false;
|
||||
if(!event.filterCard({name:'shan',isCard:true},player,event)) return false;
|
||||
return game.hasPlayer(current=>current!=player&¤t.group=='wei');
|
||||
},
|
||||
check(event,player){
|
||||
|
|
|
@ -6258,7 +6258,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
mod:{
|
||||
cardUsable:function(card,player){
|
||||
if(card.name=='sha'&&player.getStorage('twgongji2').includes(get.suit(card))) return Infinity;
|
||||
if(card.name=='sha'){
|
||||
const suit = get.suit(card);
|
||||
return suit === 'unsure' || player.getStorage('twgongji2').includes(suit);
|
||||
}
|
||||
},
|
||||
aiOrder:function(player,card,num){
|
||||
if(get.name(card)=='sha'&&!player.getStorage('twgongji2').includes(get.suit(card))) return num+1;
|
||||
|
@ -9548,8 +9551,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
filter:function(event,player){
|
||||
const names=[];
|
||||
if(event.filterCard({name:'sha'},player,event)) names.push('shan');
|
||||
if(event.filterCard({name:'shan'},player,event)) names.push('sha');
|
||||
if(event.filterCard(get.autoViewAs({name:'sha'},'unsure'),player,event)) names.push('shan');
|
||||
if(event.filterCard(get.autoViewAs({name:'shan'},'unsure'),player,event)) names.push('sha');
|
||||
return names.length>0&&player.hasCard(function(card){
|
||||
return names.includes(get.name(card));
|
||||
},'hs');
|
||||
|
@ -11293,10 +11296,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
for(var i of lib.inpile){
|
||||
if(i=='wuxie') continue;
|
||||
var type=get.type(i);
|
||||
if((type=='basic'||type=='trick')&&event.filterCard({name:i},player,event)) return true;
|
||||
if((type=='basic'||type=='trick')&&event.filterCard({name:i,isCard:true},player,event)) return true;
|
||||
if(i=='sha'){
|
||||
for(var j of lib.inpile_nature){
|
||||
if(event.filterCard({name:i,nature:j},player,event)) return true;
|
||||
if(event.filterCard({name:i,nature:j,isCard:true},player,event)) return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -281,11 +281,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
for (let target of targets) {
|
||||
if (target.isIn() && player.inRange(target)) {
|
||||
const result = await target.chooseToRespond(prompt, (card,player)=>{
|
||||
return get.type(card) == 'basic' && get.color(card) != 'black';
|
||||
}).set('filterOk', ()=>{
|
||||
const card = get.card();
|
||||
if (card && get.color(card)!='red') return false;
|
||||
return true;
|
||||
if (get.type(card) !== 'basic') return false;
|
||||
const color = get.color(card);
|
||||
return (color == 'red' || color == 'unsure');
|
||||
}).set('ai',card => {
|
||||
const player = get.player(), event = get.event();
|
||||
const source = event.getParent().player;
|
||||
|
@ -3917,7 +3915,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
})) return false;
|
||||
var storage=player.getStorage('dczhaowen_viewed');
|
||||
for(var i of lib.inpile){
|
||||
if(!storage.includes(i)&&get.type(i)=='trick'&&event.filterCard({name:i},player,event)) return true;
|
||||
if(!storage.includes(i)&&get.type(i)=='trick'&&event.filterCard(get.autoViewAs({name:i},'unsure'),player,event)) return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
@ -3929,7 +3927,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var storage=player.getStorage('dczhaowen_viewed');
|
||||
var list=[];
|
||||
for(var i of lib.inpile){
|
||||
if(!storage.includes(i)&&get.type(i)=='trick'&&event.filterCard({name:i},player,event)){
|
||||
if(!storage.includes(i)&&get.type(i)=='trick'&&event.filterCard(get.autoViewAs({name:i},'unsure'),player,event)){
|
||||
list.push(['锦囊','',i]);
|
||||
}
|
||||
}
|
||||
|
@ -6964,7 +6962,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(!storage.length) return false;
|
||||
var storage2=player.getStorage('dcfengying_used')
|
||||
return storage.some(name=>{
|
||||
return !storage2.includes(name)&&event.filterCard({name:name},player,event);
|
||||
return !storage2.includes(name)&&event.filterCard(get.autoViewAs({name},'unsure'),player,event);
|
||||
});
|
||||
},
|
||||
hiddenCard:function(player,name){
|
||||
|
@ -6984,7 +6982,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
filter:function(button,player){
|
||||
var card={name:button.link[2],storage:{dcfengying:true}};
|
||||
if(player.getStorage('dcfengying_used').includes(card.name)) return false;
|
||||
return _status.event.getParent().filterCard(card,player,_status.event.getParent());
|
||||
return _status.event.getParent().filterCard(get.autoViewAs(card,'unsure'),player,_status.event.getParent());
|
||||
},
|
||||
check:function(button){
|
||||
var player=_status.event.player;
|
||||
|
@ -12704,13 +12702,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
filter:function(button,player){
|
||||
var evt=_status.event.getParent();
|
||||
if(evt&&typeof evt.filterCard=='function') return evt.filterCard({name:button.link[2]},player,evt);
|
||||
return lib.filter.filterCard({name:button.link[2]},player,_status.event.getParent());
|
||||
return lib.filter.filterCard({name:button.link[2],isCard:true},player,_status.event.getParent());
|
||||
},
|
||||
check:function(button){
|
||||
var player=_status.event.player;
|
||||
if(player.countCards('h',button.link[2])) return 0;
|
||||
if(_status.event.getParent().type!='phase'&&!_status.event.getParent().lvli6) return 1;
|
||||
return player.getUseValue({name:button.link[2]});
|
||||
return player.getUseValue({name:button.link[2],isCard:true});
|
||||
},
|
||||
backup:function(links,player){
|
||||
return {
|
||||
|
|
|
@ -1505,8 +1505,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
unlimit:{
|
||||
mod:{
|
||||
cardUsable:function(card,player){
|
||||
var list=lib.skill.lkbushi.getBushi(player);
|
||||
if(list[0]==get.suit(card)) return Infinity;
|
||||
const list = lib.skill.lkbushi.getBushi(player), suit = get.suit(card);
|
||||
if (suit === 'unsure' || list[0] === suit) return Infinity;
|
||||
},
|
||||
},
|
||||
trigger:{player:'useCard1'},
|
||||
|
@ -2673,7 +2673,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
audio:'taoluan',
|
||||
enable:'chooseToUse',
|
||||
filter:function(event,player){
|
||||
return !player.hasSkill('xintaoluan3')&&player.countCards('hes',card=>lib.inpile.some(name=>{
|
||||
return !player.hasSkill('xintaoluan3')&&player.hasCard(card=>lib.inpile.some(name=>{
|
||||
if(player.getStorage('xintaoluan').includes(name)) return false;
|
||||
if(get.type(name)!='basic'&&get.type(name)!='trick') return false;
|
||||
if(event.filterCard({name:name,isCard:true,cards:[card]},player,event)) return true;
|
||||
|
@ -2683,7 +2683,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
}
|
||||
return false;
|
||||
}))>0&&!_status.dying.length;
|
||||
},'hes'))>0&&!_status.dying.length;
|
||||
},
|
||||
chooseButton:{
|
||||
dialog:function(event,player){
|
||||
|
@ -5255,7 +5255,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
audio:2,
|
||||
enable:'chooseToUse',
|
||||
filter:function(event,player){
|
||||
return !player.hasSkill('taoluan3')&&player.countCards('hes',card=>lib.inpile.some(name=>{
|
||||
return !player.hasSkill('taoluan3')&&player.hasCard(card=>lib.inpile.some(name=>{
|
||||
if(player.getStorage('taoluan').includes(name)) return false;
|
||||
if(get.type(name)!='basic'&&get.type(name)!='trick') return false;
|
||||
if(event.filterCard({name:name,isCard:true,cards:[card]},player,event)) return true;
|
||||
|
@ -5265,7 +5265,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
}
|
||||
return false;
|
||||
}))>0;
|
||||
},'hes'))>0;
|
||||
},
|
||||
onremove:true,
|
||||
chooseButton:{
|
||||
|
|
|
@ -6141,7 +6141,7 @@ export class Game extends Uninstantable {
|
|||
if (enable) {
|
||||
if (!game.expandSkills(player.getSkills(false).concat(lib.skill.global)).includes(skills2[i]) && (info.noHidden || get.mode() != 'guozhan' || player.hasSkillTag('nomingzhi', false, null, true))) enable = false;
|
||||
if (info.filter && !info.filter(event, player)) enable = false;
|
||||
if (info.viewAs && typeof info.viewAs != 'function' && event.filterCard && !event.filterCard(info.viewAs, player, event)) enable = false;
|
||||
if (info.viewAs && typeof info.viewAs != 'function' && event.filterCard && !event.filterCard(get.autoViewAs(info.viewAs, 'unsure'), player, event)) enable = false;
|
||||
if (info.viewAs && typeof info.viewAs != 'function' && info.viewAsFilter && info.viewAsFilter(player) == false) enable = false;
|
||||
if (info.usable && get.skillCount(skills2[i]) >= info.usable) enable = false;
|
||||
if (info.chooseButton && _status.event.noButton) enable = false;
|
||||
|
|
|
@ -1791,7 +1791,7 @@ export class Get extends Uninstantable {
|
|||
return game.checkMod(card, owner, game.checkMod(card, card.suit, 'suit', owner), 'cardsuit', owner);
|
||||
}
|
||||
}
|
||||
if (lib.suits.includes(card.suit)) return card.suit;
|
||||
if (card.suit === 'unsure' || lib.suits.includes(card.suit)) return card.suit;
|
||||
return 'none';
|
||||
}
|
||||
}
|
||||
|
@ -1810,7 +1810,7 @@ export class Get extends Uninstantable {
|
|||
}
|
||||
return color;
|
||||
}
|
||||
else if (Object.keys(lib.color).includes(card.color)) {
|
||||
else if (card.color === 'unsure' || Object.keys(lib.color).includes(card.color)) {
|
||||
return card.color;
|
||||
}
|
||||
else if (Array.isArray(card.cards) && !lib.suit.includes(card.suit)) {
|
||||
|
@ -1835,7 +1835,8 @@ export class Get extends Uninstantable {
|
|||
var number = null;
|
||||
if ('number' in card) {
|
||||
number = card.number;
|
||||
if (typeof number != 'number') number = null;
|
||||
if (number === 'unsure') return number;
|
||||
else if (typeof number != 'number') number = null;
|
||||
}
|
||||
else {
|
||||
if (card.cards && card.cards.length == 1) number = get.number(card.cards[0], false);
|
||||
|
|
|
@ -97,7 +97,7 @@ export const Content = {
|
|||
event.addSkill.removeArray(duplicatedSkills);
|
||||
event.removeSkill.removeArray(duplicatedSkills);
|
||||
}
|
||||
if (!event.addSkill.length&&!event.removeSkill.length) return;
|
||||
//if (!event.addSkill.length&&!event.removeSkill.length) return;
|
||||
//手动触发时机
|
||||
await event.trigger('changeSkillsBefore');
|
||||
await event.trigger('changeSkillsBegin');
|
||||
|
|
|
@ -310,7 +310,7 @@ export const Contents = {
|
|||
event.addSkill.removeArray(duplicatedSkills);
|
||||
event.removeSkill.removeArray(duplicatedSkills);
|
||||
}
|
||||
if (!event.addSkill.length&&!event.removeSkill.length) return;
|
||||
//if (!event.addSkill.length&&!event.removeSkill.length) return;
|
||||
//手动触发时机
|
||||
await event.trigger('changeSkillsBefore');
|
||||
},
|
||||
|
|
|
@ -7465,6 +7465,22 @@ export class Player extends HTMLDivElement {
|
|||
_status.event.clearStepCache();
|
||||
return this;
|
||||
}
|
||||
$removeAdditionalSkills(skill, target){
|
||||
const additionalSkills = this.additionalSkills[skill];
|
||||
if (Array.isArray(additionalSkills)) {
|
||||
if (typeof target === 'string') {
|
||||
if (additionalSkills.includes(target)) {
|
||||
additionalSkills.remove(target);
|
||||
if (!additionalSkills.length) {
|
||||
delete this.additionalSkills[skill];
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
delete this.additionalSkills[skill];
|
||||
}
|
||||
}
|
||||
}
|
||||
getRemovableAdditionalSkills(skill, target){
|
||||
const player = this, removableSkills = [];
|
||||
if (this.additionalSkills[skill]) {
|
||||
|
@ -7493,22 +7509,22 @@ export class Player extends HTMLDivElement {
|
|||
const player = this, skills = this.getRemovableAdditionalSkills(skill, target);
|
||||
if(skills.length){
|
||||
player.removeSkill(skills);
|
||||
if (player.additionalSkills[skill]&&!player.additionalSkills[skill].length) delete player.additionalSkills[skill];
|
||||
}
|
||||
player.$removeAdditionalSkills(skill, target);
|
||||
_status.event.clearStepCache();
|
||||
return this;
|
||||
}
|
||||
removeAdditionalSkills(skill, target) {
|
||||
const player = this, skills = this.getRemovableAdditionalSkills(skill, target);
|
||||
if(skills.length){
|
||||
return player.changeSkills([], skills).set('$handle', function(player, addSkills, removeSkills){
|
||||
return player.changeSkills([], skills).set('$handle', function(player, addSkills, removeSkills){
|
||||
if(removeSkills.length>0){
|
||||
game.log(player, '失去了技能', ...removeSkills.map(i => {
|
||||
return '#g【' + get.translation(i) + '】';
|
||||
}));
|
||||
player.removeSkill(skills);
|
||||
if (player.additionalSkills[skill]&&!player.additionalSkills[skill].length) delete player.additionalSkills[skill];
|
||||
});
|
||||
}
|
||||
player.removeSkill(removeSkills);
|
||||
}
|
||||
player.$removeAdditionalSkills(skill, target);
|
||||
});
|
||||
}
|
||||
awakenSkill(skill, nounmark) {
|
||||
if (!nounmark) this.unmarkSkill(skill);
|
||||
|
|
|
@ -79,6 +79,11 @@ export class VCard {
|
|||
if (!this.nature) this.nature = get.nature(this);
|
||||
}
|
||||
}
|
||||
else if(numberOrCards === 'unsure' && !this.isCard) {
|
||||
if(!this.suit) this.suit = 'unsure';
|
||||
if(!this.color) this.color = 'unsure';
|
||||
if(!this.number) this.number = 'unsure';
|
||||
}
|
||||
const info = get.info(this, false);
|
||||
if (info) {
|
||||
const autoViewAs = info.autoViewAs;
|
||||
|
|
Loading…
Reference in New Issue