This commit is contained in:
libccy 2017-03-27 17:35:18 +08:00
parent bd8b81a73b
commit d36e96a358
18 changed files with 111 additions and 111 deletions

View File

@ -637,7 +637,7 @@ card.gujian={
},
content:function(){
"step 0"
if(!target.num('h',{color:'black'})){
if(!target.countCards('h',{color:'black'})){
target.loseHp();
event.finish();
}

View File

@ -922,7 +922,7 @@ card.swd={
},
result:{
target:function(player,target){
if(target==player&&target.num('h',{type:'equip'})) return 2.5;
if(target==player&&target.countCards('h',{type:'equip'})) return 2.5;
return 1;
}
}
@ -1448,7 +1448,7 @@ card.swd={
},
content:function(){
"step 0"
if(!target.num('h',{color:'black'})){
if(!target.countCards('h',{color:'black'})){
target.loseHp();
event.finish();
}
@ -2062,7 +2062,7 @@ card.swd={
var skills=player.get('s');
for(var i=0;i<skills.length;i++){
if(skills[i].indexOf('yuchan')==0&&skills[i].indexOf('_equip')!=-1){
return player.num('h',{type:'basic'})>0;
return player.countCards('h',{type:'basic'})>0;
}
}
return false;
@ -3868,7 +3868,7 @@ card.swd={
jiguanyaoshu_skill_old:{
enable:'phaseUse',
filter:function(event,player){
return player.num('h',{type:['trick','delay']})>0;
return player.countCards('h',{type:['trick','delay']})>0;
},
filterCard:{type:['trick','delay']},
check:function(card){
@ -4081,7 +4081,7 @@ card.swd={
selectCard:2,
complexCard:true,
filter:function(event,player){
if(!player.num('h',{type:['hslingjian','jiqi']})) return false;
if(!player.countCards('h',{type:['hslingjian','jiqi']})) return false;
var es=player.getCards('he',{type:'equip'});
for(var i=0;i<es.length;i++){
if(lib.inpile.contains(es[i].name)&&

View File

@ -45,7 +45,7 @@ character.diy={
usable:1,
filterCard:{type:'basic'},
filter:function(event,player){
return player.num('h',{type:'basic'})>0;
return player.countCards('h',{type:'basic'})>0;
},
check:function(card){
return 6-ai.get.value(card);

View File

@ -767,7 +767,7 @@ character.gujian={
return event.source&&ai.get.attitude(player,event.source)<0;
},
filter:function(event,player){
return event.source&&event.source.isAlive()&&player.num('h',{color:'red'})>1||player.num('h',{color:'black'})>1;
return event.source&&event.source.isAlive()&&player.countCards('h',{color:'red'})>1||player.countCards('h',{color:'black'})>1;
},
direct:true,
content:function(){
@ -776,7 +776,7 @@ character.gujian={
if(ui.selected.cards.length){
return get.color(card)==get.color(ui.selected.cards[0]);
}
return player.num('h',{color:get.color(card)})>1;
return player.countCards('h',{color:get.color(card)})>1;
}).set('complexCard',true);
next.ai=function(card){
if(ai.get.damageEffect(trigger.source,player,player,'thunder')>0){
@ -1225,7 +1225,7 @@ character.gujian={
enable:'phaseUse',
usable:1,
filter:function(event,player){
return player.num('h',{type:'basic'})>0&&player.storage.xuanning!=3;
return player.countCards('h',{type:'basic'})>0&&player.storage.xuanning!=3;
},
filterCard:function(card){
return get.type(card)=='basic';
@ -1336,7 +1336,7 @@ character.gujian={
enable:'phaseUse',
filter:function(event,player){
if(player.storage.yangming2>0) return false;
return player.num('h',{color:'red'})>0;
return player.countCards('h',{color:'red'})>0;
},
filterCard:function(card){
return get.color(card)=='red';

View File

@ -483,7 +483,7 @@ character.hearth={
trigger:{source:'damageBegin'},
direct:true,
filter:function(event,player){
return player.num('h',{color:'black'})>0;
return player.countCards('h',{color:'black'})>0;
},
content:function(){
"step 0"
@ -523,7 +523,7 @@ character.hearth={
trigger:{player:'phaseEnd'},
direct:true,
filter:function(event,player){
return player.num('h',{suit:'spade'})>0;
return player.countCards('h',{suit:'spade'})>0;
},
content:function(){
'step 0'
@ -556,7 +556,7 @@ character.hearth={
enable:'phaseUse',
usable:1,
filter:function(event,player){
return player.num('h',{type:['trick','delay']})>0;
return player.countCards('h',{type:['trick','delay']})>0;
},
filterCard:{type:['trick','delay']},
check:function(card){
@ -1636,7 +1636,7 @@ character.hearth={
trigger:{player:['phaseBegin','phaseEnd']},
frequent:true,
filter:function(event,player){
return !player.num('h',{type:'hsdusu'});
return !player.countCards('h',{type:'hsdusu'});
},
content:function(){
var list=['hsdusu_xueji','hsdusu_huangxuecao','hsdusu_kuyecao','hsdusu_shinancao','hsdusu_huoyanhua'];
@ -1862,7 +1862,7 @@ character.hearth={
usable:1,
filter:function(event,player){
if(!player.storage.mobao) return false;
if(!player.num('h',{color:'black'})) return false;
if(!player.countCards('h',{color:'black'})) return false;
for(var i=0;i<player.storage.mobao.length;i++){
if(player.storage.mobao[i].isAlive()) return true;
}
@ -3875,7 +3875,7 @@ character.hearth={
enable:'phaseUse',
usable:1,
filter:function(event,player){
return player.num('h',{type:'basic'})<player.countCards('h');
return player.countCards('h',{type:'basic'})<player.countCards('h');
},
filterCard:function(card){
return get.type(card)!='basic';
@ -4398,7 +4398,7 @@ character.hearth={
zuzhou:{
trigger:{player:'phaseBegin'},
filter:function(event,player){
if(!player.num('h',{suit:'spade'})) return false;
if(!player.countCards('h',{suit:'spade'})) return false;
return !game.hasPlayer(function(current){
return current.hasJudge('shandian');
});
@ -4429,7 +4429,7 @@ character.hearth={
enable:'phaseUse',
filterCard:{color:'black'},
filter:function(event,player){
return player.num('h',{color:'black'})>0;
return player.countCards('h',{color:'black'})>0;
},
filterTarget:function(card,player,target){
return player!=target&&!target.hasSkill('mdzhoufu2');
@ -4651,7 +4651,7 @@ character.hearth={
if(_status.currentPhase!=event.player) return false;
if(event.player.hasSkill('mengun2')) return false;
if(get.itemtype(event.card)!='card') return false;
if(!player.num('h',{suit:get.suit(event.card)})) return false;
if(!player.countCards('h',{suit:get.suit(event.card)})) return false;
return get.type(event.card)=='basic';
},
direct:true,

View File

@ -560,7 +560,7 @@ character.ow={
expose:0.2,
result:{
target:function(player,target){
if(ai.get.damageEffect(target,player,target)<0&&player.num('h',function(card){
if(ai.get.damageEffect(target,player,target)<0&&player.hasCard(function(card){
return get.tag(card,'damage')?true:false;
})){
return -1;
@ -811,7 +811,7 @@ character.ow={
maoding2:{
enable:'phaseUse',
filter:function(event,player){
return player.num('h',{type:'hslingjian'})>1;
return player.countCards('h',{type:'hslingjian'})>1;
},
filterCard:{type:'hslingjian'},
filterTarget:function(card,player,target){
@ -1467,7 +1467,7 @@ character.ow={
}
var success=false;
for(var i=0;i<suits.length;i++){
if(target.num('h',{suit:suits[i]})){
if(target.countCards('h',{suit:suits[i]})){
success=true;break;
}
}
@ -2413,7 +2413,7 @@ character.ow={
return target!=player&&!target.hasSkill('xie2');
},
filter:function(event,player){
return player.num('h',{suit:'heart'});
return player.countCards('h',{suit:'heart'});
},
filterCard:{suit:'heart'},
check:function(card){
@ -2519,7 +2519,7 @@ character.ow={
return target!=player&&!target.hasSkill('luan2');
},
filter:function(event,player){
return player.num('h',{suit:'spade'});
return player.countCards('h',{suit:'spade'});
},
filterCard:{suit:'spade'},
check:function(card){

View File

@ -1156,7 +1156,7 @@ character.refresh={
result:{
player:function(player){
if(player.hp<=2) return player.countCards('h')==0?1:0;
if(player.num('h',{name:'sha',color:'red'})) return 1;
if(player.countCards('h',{name:'sha',color:'red'})) return 1;
return player.countCards('h')<=player.hp?1:0;
}
},

View File

@ -313,7 +313,7 @@ character.shenhua={
lianhuan3:{
enable:'phaseUse',
filter:function(event,player){
return player.num('h',{suit:'club'})>0;
return player.countCards('h',{suit:'club'})>0;
},
filterCard:{suit:'club'},
viewAs:{name:'tiesuo'},
@ -872,7 +872,7 @@ character.shenhua={
if(player.countCards('h')>player.hp+1){
check=false;
}
else if(player.num('h',{name:['wuzhong']})){
else if(player.countCards('h',{name:['wuzhong']})){
check=false;
}
else{
@ -1299,7 +1299,7 @@ character.shenhua={
audio:2,
enable:'phaseUse',
filter:function(event,player){
return player.num('h',{type:'equip'})>0;
return player.countCards('h',{type:'equip'})>0;
},
filterCard:function(card){
return get.type(card)=='equip';
@ -2368,7 +2368,7 @@ character.shenhua={
},
viewAs:{name:'jiu'},
viewAsFilter:function(player){
if(!player.num('h',{suit:'spade'})) return false;
if(!player.countCards('h',{suit:'spade'})) return false;
},
prompt:'将一张黑桃手牌当酒使用',
check:function(card){
@ -2377,7 +2377,7 @@ character.shenhua={
},
ai:{
skillTagFilter:function(player){
return player.num('h',{suit:'spade'})>0&&player.hp<=0;
return player.countCards('h',{suit:'spade'})>0&&player.hp<=0;
},
threaten:1.5,
save:true,
@ -2601,7 +2601,7 @@ character.shenhua={
},
viewAs:{name:'huogong',nature:'fire'},
viewAsFilter:function(player){
if(!player.num('h',{color:'red'})) return false;
if(!player.countCards('h',{color:'red'})) return false;
},
prompt:'将一张红色牌当火攻使用',
check:function(card){
@ -2639,7 +2639,7 @@ character.shenhua={
return get.color(card)=='black';
},
viewAsFilter:function(player){
return player.num('h',{color:'black'})>0;
return player.countCards('h',{color:'black'})>0;
},
viewAs:{name:'wuxie'},
prompt:'将一张黑色手牌当无懈可击使用',
@ -2653,7 +2653,7 @@ character.shenhua={
audio:2,
enable:'phaseUse',
filter:function(event,player){
return player.num('h',{suit:'club'})>0;
return player.countCards('h',{suit:'club'})>0;
},
filterCard:function(card){
return get.suit(card)=='club';
@ -2666,7 +2666,7 @@ character.shenhua={
audio:2,
enable:'phaseUse',
filter:function(event,player){
return player.num('h',{suit:'club'})>0;
return player.countCards('h',{suit:'club'})>0;
},
filterCard:function(card){
return get.suit(card)=='club';
@ -3479,7 +3479,7 @@ character.shenhua={
trigger:{player:'damageBefore'},
direct:true,
filter:function(event,player){
return player.num('h',{suit:'heart'})>0&&event.num>0;
return player.countCards('h',{suit:'heart'})>0&&event.num>0;
},
content:function(){
"step 0"

View File

@ -1528,7 +1528,7 @@ character.sp={
filterCard:{type:'basic'},
viewAs:{name:'tao'},
viewAsFilter:function(player){
if(!player.num('h',{type:'basic'})) return false;
if(!player.countCards('h',{type:'basic'})) return false;
},
prompt:'将一张基本牌当桃使用',
check:function(card){
@ -1536,7 +1536,7 @@ character.sp={
},
ai:{
skillTagFilter:function(player){
if(!player.num('h',{type:'basic'})) return false;
if(!player.countCards('h',{type:'basic'})) return false;
},
save:true,
}
@ -1546,13 +1546,13 @@ character.sp={
filterCard:{type:'basic'},
viewAs:{name:'sha'},
viewAsFilter:function(player){
if(!player.num('h',{type:'basic'})) return false;
if(!player.countCards('h',{type:'basic'})) return false;
},
prompt:'将一张基本牌当杀使用',
check:function(card){return 4-ai.get.value(card)},
ai:{
skillTagFilter:function(player){
if(!player.num('h',{type:'basic'})) return false;
if(!player.countCards('h',{type:'basic'})) return false;
},
respondSha:true,
}
@ -1562,7 +1562,7 @@ character.sp={
filterCard:{type:'basic'},
viewAs:{name:'jiu'},
viewAsFilter:function(player){
if(!player.num('h',{type:'basic'})) return false;
if(!player.countCards('h',{type:'basic'})) return false;
},
prompt:'将一张基本牌当酒使用',
check:function(card){
@ -1571,7 +1571,7 @@ character.sp={
},
ai:{
skillTagFilter:function(player){
return player.num('h',{type:'basic'})>0&&player.hp<=0;
return player.countCards('h',{type:'basic'})>0&&player.hp<=0;
},
save:true,
}
@ -2125,7 +2125,7 @@ character.sp={
animationColor:'thunder',
skillAnimation:'epic',
filter:function(event,player){
return !player.storage.jianshu&&player.num('h',{color:'black'})>0;
return !player.storage.jianshu&&player.countCards('h',{color:'black'})>0;
},
init:function(player){
player.storage.jianshu=false;
@ -3664,7 +3664,7 @@ character.sp={
if(ai.get.attitude(player,trigger.player)>0){
return 9-ai.get.value(card);
}
if(player.num('h',{name:'shan'})) return -1;
if(player.countCards('h',{name:'shan'})) return -1;
return 7-ai.get.value(card);
});
next.logSkill='anxian';
@ -4249,7 +4249,7 @@ character.sp={
audio:2,
trigger:{player:'phaseDrawBegin'},
check:function(event,player){
return player.countCards('h')-player.num('h',{type:'equip'})+2<=player.hp;
return player.countCards('h')-player.countCards('h',{type:'equip'})+2<=player.hp;
},
content:function(){
trigger.num+=2;
@ -4337,7 +4337,7 @@ character.sp={
trigger:{source:'damageBegin'},
direct:true,
filter:function(event,player){
if(!player.num('h',{color:'black'})) return false;
if(!player.countCards('h',{color:'black'})) return false;
return event.player.hp>=player.hp&&player!=event.player;
},
content:function(){
@ -4362,7 +4362,7 @@ character.sp={
audio:true,
trigger:{player:'damageBegin'},
filter:function(event,player){
if(!player.num('h',{color:'red'})) return false;
if(!player.countCards('h',{color:'red'})) return false;
return event.source&&event.source.hp>=player.hp&&player!=event.source;
},
direct:true,
@ -4618,7 +4618,7 @@ character.sp={
forced:true,
audio:2,
filter:function(event,player){
return event.parent.name=='phaseDiscard'&&player.num('h',{type:'basic'})<player.countCards('h');
return event.parent.name=='phaseDiscard'&&player.countCards('h',{type:'basic'})<player.countCards('h');
},
content:function(){},
mod:{
@ -4997,7 +4997,7 @@ character.sp={
'step 1'
if(result.control&&result.control!='cancel2'){
player.logSkill('fengpo');
var nd=trigger.target.num('h',{suit:'diamond'});
var nd=trigger.target.countCards('h',{suit:'diamond'});
if(result.control=='draw_card'){
player.draw(nd);
}
@ -6665,7 +6665,7 @@ character.sp={
return ai.get.damageEffect(event.player,player,player)>0;
},
filter:function(event,player){
return event.player.isAlive()&&event.player!=player&&player.num('h',{type:'basic'});
return event.player.isAlive()&&event.player!=player&&player.countCards('h',{type:'basic'});
},
direct:true,
content:function(){

View File

@ -466,14 +466,14 @@ character.standard={
},
viewAs:{name:'shan'},
viewAsFilter:function(player){
if(!player.num('h',{color:'black'})) return false;
if(!player.countCards('h',{color:'black'})) return false;
},
prompt:'将一张黑色手牌当闪打出',
check:function(){return 1},
ai:{
respondShan:true,
skillTagFilter:function(player){
if(!player.num('h',{color:'black'})) return false;
if(!player.countCards('h',{color:'black'})) return false;
},
effect:{
target:function(card,player,target,current){

View File

@ -328,7 +328,7 @@ character.swd={
tiebi:{
trigger:{global:'shaBegin'},
filter:function(event,player){
return player.num('h',{color:'black'})&&!event.target.hujia&&get.distance(player,event.target)<=1;
return player.countCards('h',{color:'black'})&&!event.target.hujia&&get.distance(player,event.target)<=1;
},
direct:true,
content:function(){
@ -461,7 +461,7 @@ character.swd={
prompt:'横置武将牌,视为使用一张无视距离的杀',
ai:{
order:function(){
// if(_status.event.player.num('h',{type:'equip'})) return 9;
// if(_status.event.player.countCards('h',{type:'equip'})) return 9;
return 3.15;
},
skillTagFilter:function(player,tag,arg){
@ -671,7 +671,7 @@ character.swd={
if(!player.hasFriend()) return 0;
var enemies=player.getEnemies();
if(enemies.length+1==game.players.length) return 0;
var num=player.num('h',function(card){
var num=player.hasCard(function(card){
return card.name=='sha'||get.color(card)=='red';
});
if(num<2) return 0;
@ -700,7 +700,7 @@ character.swd={
enable:'phaseUse',
filter:function(event,player){
if(!player.countCards('h')) return false;
if(player.num('h',{type:'jiqi'})) return false;
if(player.countCards('h',{type:'jiqi'})) return false;
return true;
},
discard:false,
@ -732,7 +732,7 @@ character.swd={
trigger:{player:'phaseEnd'},
filter:function(event,player){
if(!player.num('he',{type:'equip'})) return false;
if(player.num('h',{type:'jiqi'})) return false;
if(player.countCards('h',{type:'jiqi'})) return false;
if(get.cardPile(function(card){return get.type(card)=='jiqi'})) return true;
return false;
},
@ -1038,7 +1038,7 @@ character.swd={
enable:'phaseUse',
usable:1,
filter:function(event,player){
return player.num('h',{suit:['spade','heart']})>0;
return player.countCards('h',{suit:['spade','heart']})>0;
},
filterCard:{suit:['spade','heart']},
viewAs:{name:'fengyinzhidan'},
@ -1295,13 +1295,13 @@ character.swd={
selectCard:2,
viewAs:{name:'sha'},
viewAsFilter:function(player){
if(player.num('h',{type:['trick','delay']})<2) return false;
if(player.countCards('h',{type:['trick','delay']})<2) return false;
},
check:function(){return 1},
ai:{
skillTagFilter:function(player,tag,arg){
if(arg!='use') return false;
if(player.num('h',{type:['trick','delay']})<2) return false;
if(player.countCards('h',{type:['trick','delay']})<2) return false;
},
respondSha:true,
order:function(){
@ -3396,7 +3396,7 @@ character.swd={
enable:'phaseUse',
filterCard:{color:'black'},
filter:function(event,player){
return player.num('h',{color:'black'})>0;
return player.countCards('h',{color:'black'})>0;
},
selectCard:[1,Infinity],
prompt:'弃置任意张黑色手牌并摸等量的牌',
@ -3499,7 +3499,7 @@ character.swd={
if(ai.get.attitude(player,trigger.player)>0){
return 9-ai.get.value(card);
}
if(player.num('h',{name:'shan'})) return -1;
if(player.countCards('h',{name:'shan'})) return -1;
return 7-ai.get.value(card);
}
"step 1"
@ -3919,7 +3919,7 @@ character.swd={
enable:'phaseUse',
usable:1,
filter:function(event,player){
return player.hp<player.maxHp&&player.num('h',{color:'red'})>0;
return player.hp<player.maxHp&&player.countCards('h',{color:'red'})>0;
},
filterTarget:function(card,player,target){
return player!=target;//&&get.distance(player,target,'attack')<=1;
@ -4358,7 +4358,7 @@ character.swd={
viewAs:{name:'bingpotong'},
position:'he',
filter:function(event,player){
return player.num('h',{color:'black'})>0;
return player.countCards('h',{color:'black'})>0;
},
viewAsFilter:function(player){
if(!player.num('he',{color:'black'})) return false;
@ -4417,7 +4417,7 @@ character.swd={
return player.attitudeTo(event.player)>3;
},
filter:function(event,player){
if(get.is.altered('susheng')&&!player.num('h',{color:'red'})) return false;
if(get.is.altered('susheng')&&!player.countCards('h',{color:'red'})) return false;
return player.countCards('h')>0&&!player.hasSkill('susheng2');
},
content:function(){
@ -5596,8 +5596,8 @@ character.swd={
usable:1,
filter:function(event,player){
if(get.is.altered('xianjiang')&&player.countCards('e')) return false;
if(player.num('h',{type:'trick'})) return true;
if(player.num('h',{type:'delay'})) return true;
if(player.countCards('h',{type:'trick'})) return true;
if(player.countCards('h',{type:'delay'})) return true;
return false;
},
selectCard:1,
@ -6489,7 +6489,7 @@ character.swd={
return get.type(card,'trick')=='trick';
},
filter:function(event,player){
return player.num('h',{type:['trick','delay']})>0;
return player.countCards('h',{type:['trick','delay']})>0;
},
filterTarget:function(card,player,target){
var names=[];
@ -6872,7 +6872,7 @@ character.swd={
return get.distance(player,target)<=1||player==target;
},
filter:function(event,player){
return player.num('h',{color:'red'})>0;
return player.countCards('h',{color:'red'})>0;
},
selectTarget:-1,
content:function(){

View File

@ -760,7 +760,7 @@ character.xianjian={
trigger:{player:'phaseEnd'},
direct:true,
filter:function(event,player){
if(!player.num('h',{color:'black'})) return false;
if(!player.countCards('h',{color:'black'})) return false;
if(player.storage.leiyu){
for(var i=0;i<player.storage.leiyu.length;i++){
if(player.storage.leiyu[i].isAlive()) return true;
@ -925,7 +925,7 @@ character.xianjian={
},
filterCard:{color:'black'},
filter:function(event,player){
return player.num('h',{color:'black'});
return player.countCards('h',{color:'black'});
},
check:function(card){
return 5-ai.get.value(card);
@ -1810,7 +1810,7 @@ character.xianjian={
trigger:{global:'dying'},
priority:6,
filter:function(event,player){
return event.player.hp<=0&&player.num('h',{color:'red'});
return event.player.hp<=0&&player.countCards('h',{color:'red'});
},
check:function(event,player){
if(ai.get.attitude(player,event.player)<=0) return false;
@ -1952,7 +1952,7 @@ character.xianjian={
return get.color(card)=='black'&&get.type(card)!='basic';
});
}
return player.num('h',{type:'basic'})<player.countCards('he');
return player.countCards('h',{type:'basic'})<player.countCards('he');
},
init:function(player){
player.storage.zhuyue=[];
@ -2085,7 +2085,7 @@ character.xianjian={
unique:true,
enable:'phaseUse',
filter:function(event,player){
return !player.storage.guanri&&player.num('h',{color:'red'})>=2;
return !player.storage.guanri&&player.countCards('h',{color:'red'})>=2;
},
check:function(card){
return 8-ai.get.value(card);
@ -2305,16 +2305,16 @@ character.xianjian={
return get.suit(card)=='club';
},
filter:function(event,player){
return player.num('h',{suit:'club'});
return player.countCards('h',{suit:'club'});
},
viewAs:{name:'shunshou'},
viewAsFilter:function(player){
if(!player.num('h',{suit:'club'})) return false;
if(!player.countCards('h',{suit:'club'})) return false;
},
prompt:'将一张装备牌当顺手牵羊使用',
check:function(card){
var player=_status.currentPhase;
if(player.num('h',{subtype:get.subtype(card)})>1){
if(player.countCards('h',{subtype:get.subtype(card)})>1){
return 11-ai.get.equipValue(card);
}
if(player.countCards('h')<player.hp){

View File

@ -336,7 +336,7 @@ character.yijiang={
check:function(button){
var player=_status.event.player;
var players=game.filterPlayer();
if(player.num('h',button.link)) return 0;
if(player.countCards('h',button.link)) return 0;
if(button.link=='wuzhong'){
if(player.countCards('h')<player.hp){
return 3+Math.random();
@ -1624,7 +1624,7 @@ character.yijiang={
return get.color(card)=='black';
},
viewAsFilter:function(player){
return player.num('h',{color:'black'})>0;
return player.countCards('h',{color:'black'})>0;
},
viewAs:{name:'wuxie'},
prompt:'将一张黑色手牌当无懈可击使用',
@ -1639,7 +1639,7 @@ character.yijiang={
},
viewAs:{name:'shan'},
viewAsFilter:function(player){
if(!player.num('h',{color:'red'})) return false;
if(!player.countCards('h',{color:'red'})) return false;
},
audio:true,
prompt:'将一张红色手牌当闪打出',
@ -1647,7 +1647,7 @@ character.yijiang={
ai:{
respondShan:true,
skillTagFilter:function(player){
if(!player.num('h',{color:'red'})) return false;
if(!player.countCards('h',{color:'red'})) return false;
},
effect:{
target:function(card,player,target,current){
@ -2330,7 +2330,7 @@ character.yijiang={
audio:2,
trigger:{player:'phaseUseBegin'},
check:function(event,player){
var nh=player.countCards('h')-player.num('h',{type:'equip'});
var nh=player.countCards('h')-player.countCards('h',{type:'equip'});
if(nh<=1) return true;
if(player.countCards('h','tao')) return false;
if(nh<=2) return Math.random()<0.7;
@ -2439,14 +2439,14 @@ character.yijiang={
usable:1,
delay:0,
filter:function(event,player){
return player.num('h',{color:'red'})&&player.num('h',{color:'black'});
return player.countCards('h',{color:'red'})&&player.countCards('h',{color:'black'});
},
content:function(){
'step 0'
player.chooseControl('红色','黑色').set('ai',function(){
var player=_status.event.player;
if(player.num('h',{color:'red'})==1&&
player.num('h',{color:'black'})>1) return '红色';
if(player.countCards('h',{color:'red'})==1&&
player.countCards('h',{color:'black'})>1) return '红色';
return '黑色';
});
'step 1'
@ -2490,8 +2490,8 @@ character.yijiang={
},
ai:{
order:function(item,player){
if(player.num('h',{color:'red'})==1) return 10;
if(player.num('h',{color:'black'})==1) return 10;
if(player.countCards('h',{color:'red'})==1) return 10;
if(player.countCards('h',{color:'black'})==1) return 10;
return 1;
},
result:{
@ -5524,12 +5524,12 @@ character.yijiang={
return false;
}
if(get.tag(event.card,'respondSha')){
if(player.num('h',{name:'sha'})==0){
if(player.countCards('h',{name:'sha'})==0){
return true;
}
}
else if(get.tag(event.card,'respondShan')){
if(player.num('h',{name:'shan'})==0){
if(player.countCards('h',{name:'shan'})==0){
return true;
}
}
@ -5928,10 +5928,10 @@ character.yijiang={
var e2=target.getEquip(2);
if(e2){
if(e2.name=='tengjia'){
if(!player.num('h',{name:'sha',nature:'fire'})&&!player.num('e','zhuque')) return 0;
if(!player.countCards('h',{name:'sha',nature:'fire'})&&!player.num('e','zhuque')) return 0;
}
if(e2.name=='renwang'){
if(!player.num('h',{name:'sha',color:'red'})) return 0;
if(!player.countCards('h',{name:'sha',color:'red'})) return 0;
}
if(e2.name=='baiyin') return 0;
}
@ -6650,7 +6650,7 @@ character.yijiang={
"step 0"
var check=false;
if(trigger.player==player){
if(player.num('h',function(card){
if(player.hasCard(function(card){
return get.type(card)!='basic';
})){
check=true;

View File

@ -274,7 +274,7 @@ character.yxs={
},
discard:false,
filter:function(event,player){
if(player.num('h',{suit:'heart'})){
if(player.countCards('h',{suit:'heart'})){
return true;
}
return false;
@ -684,7 +684,7 @@ character.yxs={
enable:'phaseUse',
usable:1,
viewAsFilter:function(player){
return player.num('h',{suit:'heart'})>0;
return player.countCards('h',{suit:'heart'})>0;
},
viewAs:{name:'wuzhong'},
filterCard:{suit:'heart'},
@ -928,7 +928,7 @@ character.yxs={
target.popup(result.control);
target.showHandcards();
"step 2"
if(target.num('h',{suit:event.choice})){
if(target.countCards('h',{suit:event.choice})){
target.damage();
}
},
@ -1551,7 +1551,7 @@ character.yxs={
trigger:{global:'dying'},
priority:11,
filter:function(event,player){
return event.player.hp<=0&&(player.countCards('h','jiu')>0||player.num('h',{color:'black'})>=2)&&player!=event.player;
return event.player.hp<=0&&(player.countCards('h','jiu')>0||player.countCards('h',{color:'black'})>=2)&&player!=event.player;
},
check:function(event,player){
return ai.get.attitude(player,event.player)<0;

View File

@ -18593,7 +18593,7 @@
if(lib.config.tao_enemy&&event.dying.side!=player.side&&lib.config.mode!='identity'&&lib.config.mode!='guozhan'){
event._result={bool:false}
}
else if(player.isOnline()||(_status.connectMode&&player==game.me)||player.hasSkillTag('save',true)||player.num('h',function(card){
else if(player.isOnline()||(_status.connectMode&&player==game.me)||player.hasSkillTag('save',true)||player.hasCard(function(card){
var savable=get.info(card).savable;
if(typeof savable=='function') savable=savable(card,player,event.dying);
return savable;
@ -18667,7 +18667,7 @@
logv:false,
prompt:'将要重铸的牌置入弃牌堆并摸一张牌',
filter:function(event,player){
return (player.num('h',function(card){
return (player.hasCard(function(card){
var info=get.info(card);
if(typeof info.chongzhu=='function'){
return info.chongzhu(event,player);
@ -18686,7 +18686,7 @@
player.$throw(cards,1000);
},
check:function(card){
// if(get.type(card)=='stonecharacter'&&_status.event.player.num('h',{type:'stonecharacter'})<=1){
// if(get.type(card)=='stonecharacter'&&_status.event.player.countCards('h',{type:'stonecharacter'})<=1){
// return 0;
// }
return 1;

View File

@ -5095,7 +5095,7 @@ mode.chess={
return get.distance(player,target)<=5&&player!=target;
},
filter:function(event,player){
return player.num('h',{color:'red'})>0;
return player.countCards('h',{color:'red'})>0;
},
selectTarget:-1,
content:function(){

View File

@ -947,7 +947,7 @@ mode.guozhan={
inherit:'kanpo',
zhenfa:'inline',
viewAsFilter:function(player){
return _status.currentPhase.inline(player)&&!player.hasSkill('kanpo')&&player.num('h',{color:'black'})>0;
return _status.currentPhase.inline(player)&&!player.hasSkill('kanpo')&&player.countCards('h',{color:'black'})>0;
},
},
yizhi:{
@ -1615,7 +1615,7 @@ mode.guozhan={
usable:4,
filterCard:{color:'red'},
viewAsFilter:function(player){
return player.num('h',{color:'red'})>0;
return player.countCards('h',{color:'red'})>0;
},
check:function(card){
return 5-ai.get.value(card);

View File

@ -5940,7 +5940,7 @@ mode.stone={
forced:true,
unique:true,
filter:function(event,player){
return player.getLeader().num('h',{type:'stonecharacter'})>0;
return player.getLeader().countCards('h',{type:'stonecharacter'})>0;
},
content:function(){
player.addSkill('stone_chongfeng');
@ -6155,7 +6155,7 @@ mode.stone={
forced:true,
unique:true,
filter:function(event,player){
return player.getLeader().num('h',{type:'stonecharacter'})>0;
return player.getLeader().countCards('h',{type:'stonecharacter'})>0;
},
content:function(){
player.maxHp++;
@ -7246,7 +7246,7 @@ mode.stone={
forced:true,
unique:true,
filter:function(event,player){
return player.getLeader().num('h',{type:'stonecharacter'})>0;
return player.getLeader().countCards('h',{type:'stonecharacter'})>0;
},
content:function(){
player.draw();
@ -9118,14 +9118,14 @@ mode.stone={
nopop:true,
check:function(){return 1},
filter:function(event,player){
return player.num('h',{type:'equip'})>0;
return player.countCards('h',{type:'equip'})>0;
},
viewAsFilter:function(player){
return player.num('h',{type:'equip'})>0;
return player.countCards('h',{type:'equip'})>0;
},
ai:{
skillTagFilter:function(player){
return player.num('h',{type:'equip'})>0;
return player.countCards('h',{type:'equip'})>0;
},
respondSha:true,
order:4,
@ -9149,14 +9149,14 @@ mode.stone={
nopop:true,
check:function(){return 1},
filter:function(event,player){
return player.num('h',{type:['stonecharacter','stonecard']})>0;
return player.countCards('h',{type:['stonecharacter','stonecard']})>0;
},
viewAsFilter:function(player){
return player.num('h',{type:['stonecharacter','stonecard']})>0;
return player.countCards('h',{type:['stonecharacter','stonecard']})>0;
},
ai:{
skillTagFilter:function(player){
return player.num('h',{type:['stonecharacter','stonecard']})>0;
return player.countCards('h',{type:['stonecharacter','stonecard']})>0;
},
respondShan:true,
order:4,