This commit is contained in:
libccy 2017-03-27 17:37:24 +08:00
parent d36e96a358
commit 120e2dc6f3
18 changed files with 120 additions and 120 deletions

View File

@ -156,7 +156,7 @@ card.gujian={
result:{
target:function(player,target){
if(target==player){
if(target.num('he',{suit:'heart'})){
if(target.countCards('he',{suit:'heart'})){
if(target.isDamaged()) return 1.5;
}
else{
@ -1021,13 +1021,13 @@ card.gujian={
position:'he',
viewAs:{name:'tao'},
viewAsFilter:function(player){
return player.num('he',{suit:'heart'})>0;
return player.countCards('he',{suit:'heart'})>0;
},
prompt:'将一张红桃牌当桃使用',
check:function(card){return 10-ai.get.value(card)},
ai:{
skillTagFilter:function(player){
return player.num('he',{suit:'heart'})>0;
return player.countCards('he',{suit:'heart'})>0;
},
save:true,
}

View File

@ -245,7 +245,7 @@ card.guozhan={
content:function(){
'step 0'
var choiceList=['明置一张武将牌,然后摸一张牌','失去1点体力'];
if(target.num('he',{type:'equip'})){
if(target.countCards('he',{type:'equip'})){
choiceList.push('弃置一张装备牌');
}
target.chooseControl(lib.card.chiling.chooseai).set('prompt','敕令').set('choiceList',choiceList);
@ -915,7 +915,7 @@ card.guozhan={
var target=event.targets.shift();
event.current=target;
var choiceList=['明置一张武将牌,然后摸一张牌','失去1点体力'];
if(target.num('he',{type:'equip'})){
if(target.countCards('he',{type:'equip'})){
choiceList.push('弃置一张装备牌');
}
target.chooseControl(lib.card.chiling.chooseai).set('prompt','敕令').set('choiceList',choiceList);

View File

@ -2539,7 +2539,7 @@ card.swd={
trigger:{player:'phaseEnd'},
direct:true,
filter:function(event,player){
return player.num('he',{color:'black'})>0&&player.hujia==0
return player.countCards('he',{color:'black'})>0&&player.hujia==0
},
content:function(){
'step 0'
@ -2570,7 +2570,7 @@ card.swd={
trigger:{player:'phaseEnd'},
direct:true,
filter:function(event,player){
return player.num('he',{color:'red'})>0&&player.hp<player.maxHp;
return player.countCards('he',{color:'red'})>0&&player.hp<player.maxHp;
},
content:function(){
'step 0'
@ -2602,7 +2602,7 @@ card.swd={
trigger:{player:'phaseEnd'},
direct:true,
filter:function(event,player){
return player.num('he',{color:'red'})>0;
return player.countCards('he',{color:'red'})>0;
},
content:function(){
"step 0"
@ -4461,7 +4461,7 @@ card.swd={
return get.subtype(card)=='equip1';
},
filter:function(event,player){
return player.num('he',{subtype:'equip1'})>0;
return player.countCards('he',{subtype:'equip1'})>0;
},
discard:false,
prepare:'give',

View File

@ -140,7 +140,7 @@ character.diy={
juntun:{
enable:'phaseUse',
filter:function(event,player){
return player.num('he',{type:'equip'})>0;
return player.countCards('he',{type:'equip'})>0;
},
position:'he',
filterCard:{type:'equip'},
@ -393,7 +393,7 @@ character.diy={
trigger:{global:'shaBefore'},
direct:true,
filter:function(event,player){
return get.distance(player,event.target)<=1&&player.num('he',{type:'equip'});
return get.distance(player,event.target)<=1&&player.countCards('he',{type:'equip'});
},
content:function(){
'step 0'
@ -850,9 +850,9 @@ character.diy={
},
position:'he',
filter:function(event,player){
return player.num('he',function(card){
return player.hasCard(function(card){
return get.type(card)!='basic';
})>0;
},'he');
},
viewAs:{name:'shuiyanqijun'},
prompt:'将一张非基本牌当水淹七军使用',
@ -900,7 +900,7 @@ character.diy={
return ai.get.attitude(player,event.player)<0;
},
filter:function(event,player){
return event.source&&event.source!=player&&event.source.num('he',{color:'red'})>0;
return event.source&&event.source!=player&&event.source.countCards('he',{color:'red'})>0;
},
content:function(){
trigger.source.discard(trigger.source.getCards('he',{color:'red'}));
@ -911,7 +911,7 @@ character.diy={
threaten:0.8,
target:function(card,player,target){
if(get.tag(card,'damage')&&ai.get.attitude(target,player)<0){
return [1,0,0,-player.num('he',{color:'red'})];
return [1,0,0,-player.countCards('he',{color:'red'})];
}
}
}

View File

@ -895,15 +895,15 @@ character.extra={
skillTagFilter:function(player,tag){
switch(tag){
case 'respondSha':{
if(player.num('he',{suit:'diamond'})<Math.max(1,player.hp)) return false;
if(player.countCards('he',{suit:'diamond'})<Math.max(1,player.hp)) return false;
break;
}
case 'respondShan':{
if(player.num('he',{suit:'club'})<Math.max(1,player.hp)) return false;
if(player.countCards('he',{suit:'club'})<Math.max(1,player.hp)) return false;
break;
}
case 'save':{
if(player.num('he',{suit:'heart'})<Math.max(1,player.hp)) return false;
if(player.countCards('he',{suit:'heart'})<Math.max(1,player.hp)) return false;
break;
}
}
@ -941,7 +941,7 @@ character.extra={
},
viewAs:{name:'tao'},
filter:function(event,player){
return player.num('he',{suit:'heart'})>=player.hp;
return player.countCards('he',{suit:'heart'})>=player.hp;
},
filterCard:function(card){
return get.suit(card)=='heart';
@ -963,7 +963,7 @@ character.extra={
},
viewAs:{name:'sha',nature:'fire'},
filter:function(event,player){
return player.num('he',{suit:'diamond'})>=player.hp;
return player.countCards('he',{suit:'diamond'})>=player.hp;
},
filterCard:function(card){
return get.suit(card)=='diamond';
@ -985,7 +985,7 @@ character.extra={
},
viewAs:{name:'wuxie'},
viewAsFilter:function(player){
return player.num('he',{suit:'spade'})>=player.hp;
return player.countCards('he',{suit:'spade'})>=player.hp;
},
filterCard:function(card){
return get.suit(card)=='spade';

View File

@ -573,7 +573,7 @@ character.gujian={
globalSilent:true,
trigger:{global:'phaseEnd'},
filter:function(event,player){
return event.player!=player&&!event.player.tempSkills.meiying3&&event.player.isAlive()&&player.num('he',{color:'red'})>0;
return event.player!=player&&!event.player.tempSkills.meiying3&&event.player.isAlive()&&player.countCards('he',{color:'red'})>0;
},
direct:true,
content:function(){
@ -992,7 +992,7 @@ character.gujian={
trigger:{player:'phaseEnd'},
direct:true,
filter:function(event,player){
return player.maxHp>player.hp&&player.num('he',{color:'red'})>0;
return player.maxHp>player.hp&&player.countCards('he',{color:'red'})>0;
},
alter:true,
content:function(){
@ -1128,7 +1128,7 @@ character.gujian={
yanjia_old:{
enable:'chooseToUse',
filter:function(event,player){
return player.num('he',{type:'equip'})>0;
return player.countCards('he',{type:'equip'})>0;
},
filterCard:function(card){
return get.type(card)=='equip';
@ -1138,7 +1138,7 @@ character.gujian={
prompt:'将一张装备牌当无中生有使用',
check:function(card){
var player=_status.currentPhase;
if(player.num('he',{subtype:get.subtype(card)})>1){
if(player.countCards('he',{subtype:get.subtype(card)})>1){
return 11-ai.get.equipValue(card);
}
if(player.countCards('h')<player.hp){

View File

@ -356,7 +356,7 @@ character.hearth={
'step 1'
if(event.targets.length){
event.target=event.targets.shift();
if(event.target.num('he',{color:'black'})){
if(event.target.countCards('he',{color:'black'})){
event.target.chooseCard('he','交给'+get.translation(player)+'一张黑色牌,或失去一点体力',{color:'black'}).ai=function(card){
if(ai.get.attitude(event.target,player)>0) return 10-ai.get.value(card);
return 7-ai.get.value(card);
@ -638,7 +638,7 @@ character.hearth={
yuelu:{
enable:'chooseToUse',
filter:function(event,player){
return event.type=='dying'&&player.num('he',{color:'black'});
return event.type=='dying'&&player.countCards('he',{color:'black'});
},
alter:true,
filterCard:{color:'black'},
@ -657,7 +657,7 @@ character.hearth={
ai:{
order:10,
skillTagFilter:function(player){
if(player.num('he',{color:'black'})==0) return false;
if(player.countCards('he',{color:'black'})==0) return false;
},
save:true,
result:{
@ -753,7 +753,7 @@ character.hearth={
filterCard:{color:'black'},
position:'he',
viewAsFilter:function(player){
if(!player.num('he',{color:'black'})) return false;
if(!player.countCards('he',{color:'black'})) return false;
},
check:function(card){
return 6-ai.get.value(card);
@ -868,7 +868,7 @@ character.hearth={
},
viewAs:{name:'wuzhong'},
viewAsFilter:function(player){
if(!player.num('he',{suit:'spade'})) return false;
if(!player.countCards('he',{suit:'spade'})) return false;
},
prompt:'将一张黑桃手牌当作无中生有使用',
check:function(card){return 7-ai.get.value(card)},
@ -1114,7 +1114,7 @@ character.hearth={
trigger:{player:'phaseEnd'},
direct:true,
filter:function(event,player){
return !player.getStat('damage')&&player.num('he',{color:'black'})>0;
return !player.getStat('damage')&&player.countCards('he',{color:'black'})>0;
},
content:function(){
'step 0'
@ -1544,7 +1544,7 @@ character.hearth={
enable:'phaseUse',
usable:1,
filter:function(event,player){
return player.num('he',{color:'red'})>0
return player.countCards('he',{color:'red'})>0
},
init:function(player){
player.storage.nuyan=[];
@ -4065,7 +4065,7 @@ character.hearth={
enable:['chooseToRespond'],
filterCard:{type:'equip'},
filter:function(event,player){
return player.num('he',{type:'equip'})>0;
return player.countCards('he',{type:'equip'})>0;
},
viewAs:{name:'shan'},
position:'he',
@ -4074,7 +4074,7 @@ character.hearth={
ai:{
respondShan:true,
skillTagFilter:function(player){
if(!player.num('he',{type:'equip'})) return false;
if(!player.countCards('he',{type:'equip'})) return false;
}
}
},
@ -4099,7 +4099,7 @@ character.hearth={
filterCard:{subtype:'equip2'},
position:'he',
filter:function(event,player){
return player.num('he',{subtype:'equip2'})>0;
return player.countCards('he',{subtype:'equip2'})>0;
},
check:function(card){
return 7-ai.get.value(card);
@ -4153,7 +4153,7 @@ character.hearth={
enable:'phaseUse',
filterCard:{color:'red'},
filter:function(event,player){
return player.num('he',{color:'red'})>0;
return player.countCards('he',{color:'red'})>0;
},
position:'he',
usable:1,
@ -4191,7 +4191,7 @@ character.hearth={
enable:'phaseUse',
filterCard:{color:'black'},
filter:function(event,player){
return player.num('he',{color:'black'})>0;
return player.countCards('he',{color:'black'})>0;
},
position:'he',
usable:1,
@ -4222,7 +4222,7 @@ character.hearth={
animationColor:'thunder',
derivation:'xinci',
filter:function(event,player){
return !player.storage.anying&&player.num('he',{color:'black'})>1;
return !player.storage.anying&&player.countCards('he',{color:'black'})>1;
},
selectCard:2,
filterCard:{color:'black'},

View File

@ -667,7 +667,7 @@ character.ow={
trigger:{player:'phaseEnd'},
direct:true,
filter:function(event,player){
return player.num('he',{type:'equip'})>0;
return player.countCards('he',{type:'equip'})>0;
},
content:function(){
"step 0"
@ -948,7 +948,7 @@ character.ow={
filterCard:{suit:'spade'},
position:'he',
filter:function(event,player){
return player.num('he',{suit:'spade'})>0;
return player.countCards('he',{suit:'spade'})>0;
},
check:function(card){
return 7-ai.get.value(card);
@ -1199,7 +1199,7 @@ character.ow={
filterCard:{suit:'diamond'},
position:'he',
filter:function(event,player){
return player.num('he',{suit:'diamond'})>0;
return player.countCards('he',{suit:'diamond'})>0;
},
filterTarget:function(card,player,target){
return target!=player&&get.distance(player,target,'attack')<=1;
@ -1264,13 +1264,13 @@ character.ow={
animationColor:'water',
line:'thunder',
filter:function(event,player){
return !player.storage.baoxue&&player.num('he',{color:'black'})>0;
return !player.storage.baoxue&&player.countCards('he',{color:'black'})>0;
},
filterTarget:function(card,player,target){
return target!=player;
},
selectTarget:function(){
return [1,_status.event.player.num('he',{color:'black'})];
return [1,_status.event.player.countCards('he',{color:'black'})];
},
alter:true,
content:function(){
@ -1300,7 +1300,7 @@ character.ow={
var num=game.countPlayer(function(current){
return ai.get.attitude(player,current)<0;
});
var nh=player.num('he',{color:'black'});
var nh=player.countCards('he',{color:'black'});
if(nh==1&&num>1) return 0;
if(nh>num) return 1;
return 11;
@ -2217,13 +2217,13 @@ character.ow={
position:'he',
viewAs:{name:'sha'},
viewAsFilter:function(player){
if(!player.num('he',{color:'black'})) return false;
if(!player.countCards('he',{color:'black'})) return false;
},
prompt:'将一张黑色牌当杀使用或打出',
check:function(card){return 4-ai.get.value(card)},
ai:{
skillTagFilter:function(player){
if(!player.num('he',{color:'black'})) return false;
if(!player.countCards('he',{color:'black'})) return false;
},
respondSha:true,
},
@ -2245,7 +2245,7 @@ character.ow={
trigger:{player:'phaseEnd'},
direct:true,
filter:function(event,player){
return player.num('he',{color:'red'})>0;
return player.countCards('he',{color:'red'})>0;
},
content:function(){
"step 0"
@ -2716,7 +2716,7 @@ character.ow={
trigger:{player:'phaseEnd'},
direct:true,
filter:function(event,player){
return player.num('he',{color:'black'})>0&&!player.hasSkill('yihun2');
return player.countCards('he',{color:'black'})>0&&!player.hasSkill('yihun2');
},
content:function(){
'step 0'
@ -2789,7 +2789,7 @@ character.ow={
},
filter:function(event,player){
if(player.storage.huoyu) return false;
if(player.num('he',{color:'red'})<2) return false;
if(player.countCards('he',{color:'red'})<2) return false;
return true;
},
filterTarget:function(card,player,target){

View File

@ -1037,7 +1037,7 @@ character.refresh={
if(target.countCards('h')>target.hp+1&&ai.get.recoverEffect(target)>0){
return 1;
}
if(player.canUse('sha',target)&&(player.countCards('h','sha')||player.num('he',{color:'red'}))){
if(player.canUse('sha',target)&&(player.countCards('h','sha')||player.countCards('he',{color:'red'}))){
return -2;
}
return -0.5;
@ -1290,7 +1290,7 @@ character.refresh={
usable:1,
discard:false,
filter:function(event,player){
return player.num('he',{suit:'diamond'})>0;
return player.countCards('he',{suit:'diamond'})>0;
},
prepare:'throw',
position:'he',

View File

@ -1306,7 +1306,7 @@ character.shenhua={
},
check:function(card){
var player=_status.currentPhase;
if(player.num('he',{subtype:get.subtype(card)})>1){
if(player.countCards('he',{subtype:get.subtype(card)})>1){
return 11-ai.get.equipValue(card);
}
return 6-ai.get.value(card);
@ -2025,7 +2025,7 @@ character.shenhua={
return get.color(card)=='black';
},
filter:function(event,player){
return player.num('he',{type:['basic','equip'],color:'black'})
return player.countCards('he',{type:['basic','equip'],color:'black'})
},
position:'he',
viewAs:{name:'bingliang'},
@ -2991,7 +2991,7 @@ character.shenhua={
return !player.hasSkill('xinqiangxi3');
}
else if(player.hasSkill('xinqiangxi3')){
return !player.hasSkill('xinqiangxi2')&&player.num('he',{type:'equip'})>0;
return !player.hasSkill('xinqiangxi2')&&player.countCards('he',{type:'equip'})>0;
}
else{
return true;
@ -3032,7 +3032,7 @@ character.shenhua={
order:8.5,
result:{
target:function(player,target){
if(player.hasSkill('xinqiangxi2')||!player.num('he',{type:'equip'})){
if(player.hasSkill('xinqiangxi2')||!player.countCards('he',{type:'equip'})){
if(player.hp<2) return 0;
if(target.hp>=player.hp) return 0;
}
@ -3369,7 +3369,7 @@ character.shenhua={
trigger:{player:'phaseUseBefore'},
direct:true,
filter:function(event,player){
return player.num('he',{type:'equip'})>0;
return player.countCards('he',{type:'equip'})>0;
},
content:function(){
"step 0"
@ -3570,7 +3570,7 @@ character.shenhua={
trigger:{player:'damageBefore'},
direct:true,
filter:function(event,player){
return player.num('he',{suit:'heart'})>0&&event.num>0&&!player.hasSkill('xintianxiang3');
return player.countCards('he',{suit:'heart'})>0&&event.num>0&&!player.hasSkill('xintianxiang3');
},
content:function(){
"step 0"
@ -3968,7 +3968,7 @@ character.shenhua={
audio:2,
trigger:{global:'judge'},
filter:function(event,player){
return player.num('he',{color:'black'})>0;
return player.countCards('he',{color:'black'})>0;
},
direct:true,
content:function(){

View File

@ -210,7 +210,7 @@ character.sp={
zqingcheng:{
enable:'phaseUse',
filter:function(event,player){
return player.num('he',{type:'equip'});
return player.countCards('he',{type:'equip'});
},
filterCard:{type:'equip'},
position:'he',
@ -2974,11 +2974,11 @@ character.sp={
trigger:{player:'phaseUseBegin'},
direct:true,
filter:function(event,player){
return player.num('he',{type:'equip'})>0;
return player.countCards('he',{type:'equip'})>0;
},
content:function(){
'step 0'
player.chooseToDiscard(get.prompt('jiqiao'),[1,player.num('he',{type:'equip'})],'he',function(card){
player.chooseToDiscard(get.prompt('jiqiao'),[1,player.countCards('he',{type:'equip'})],'he',function(card){
return get.type(card)=='equip';
}).set('ai',function(card){
if(card.name=='bagua') return 10;
@ -3518,7 +3518,7 @@ character.sp={
onunmark:'throw'
},
filter:function(event,player){
return player.num('he',{color:'black'})>0&&player.storage.yinling.length<4;
return player.countCards('he',{color:'black'})>0&&player.storage.yinling.length<4;
},
filterTarget:function(card,player,target){
return target.countCards('he')>0&&target!=player;
@ -3578,7 +3578,7 @@ character.sp={
},
position:'he',
filter:function(event,player){
return player.num('he',{suit:'diamond'})>0;
return player.countCards('he',{suit:'diamond'})>0;
},
discard:false,
prepare:'give',
@ -3821,12 +3821,12 @@ character.sp={
player.storage.yinbing=[];
},
filter:function(event,player){
return player.num('he',{type:'basic'})<player.countCards('he');
return player.countCards('he',{type:'basic'})<player.countCards('he');
},
marktext:'兵',
content:function(){
"step 0"
player.chooseCard([1,player.countCards('he')-player.num('he',{type:'basic'})],'he',get.prompt('yinbing'),function(card){
player.chooseCard([1,player.countCards('he')-player.countCards('he',{type:'basic'})],'he',get.prompt('yinbing'),function(card){
return get.type(card)!='basic';
}).set('ai',function(card){
return 6-ai.get.value(card);
@ -4479,7 +4479,7 @@ character.sp={
trigger:{player:'phaseUseBefore'},
direct:true,
filter:function(event,player){
return player.num('he',{type:'equip'})>0;
return player.countCards('he',{type:'equip'})>0;
},
content:function(){
"step 0"
@ -7052,7 +7052,7 @@ character.sp={
enable:'phaseUse',
usable:1,
filter:function(event,player){
return player.hp<player.maxHp&&player.num('he',{color:'red'})>0;
return player.hp<player.maxHp&&player.countCards('he',{color:'red'})>0;
},
filterTarget:function(card,player,target){
return player!=target&&get.distance(player,target,'attack')<=1;
@ -7743,7 +7743,7 @@ character.sp={
trigger:{player:'phaseEnd'},
direct:true,
filter:function(event,player){
return player.num('he',{type:'equip'})>0;
return player.countCards('he',{type:'equip'})>0;
},
content:function(){
"step 0"

View File

@ -739,7 +739,7 @@ character.standard={
if(!player.countCards('he')) return false;
}
else{
if(!player.num('he',{color:'red'})) return false;
if(!player.countCards('he',{color:'red'})) return false;
}
},
prompt:'将一张红色牌当杀使用或打出',
@ -750,7 +750,7 @@ character.standard={
if(!player.countCards('he')) return false;
}
else{
if(!player.num('he',{color:'red'})) return false;
if(!player.countCards('he',{color:'red'})) return false;
}
},
respondSha:true,
@ -1173,7 +1173,7 @@ character.standard={
position:'he',
viewAs:{name:'guohe'},
viewAsFilter:function(player){
if(!player.num('he',{color:'black'})) return false;
if(!player.countCards('he',{color:'black'})) return false;
},
prompt:'将一张黑色牌当过河拆桥使用',
check:function(card){return 4-ai.get.value(card)}
@ -1275,7 +1275,7 @@ character.standard={
guose:{
audio:1,
filter:function(event,player){
return player.num('he',{suit:'diamond'})>0;
return player.countCards('he',{suit:'diamond'})>0;
},
enable:'chooseToUse',
filterCard:function(card){
@ -1520,7 +1520,7 @@ character.standard={
check:function(card){return 15-ai.get.value(card)},
ai:{
skillTagFilter:function(player){
return player.num('he',{color:'red'})>0&&_status.currentPhase!=player;
return player.countCards('he',{color:'red'})>0&&_status.currentPhase!=player;
},
threaten:1.5,
save:true,

View File

@ -731,7 +731,7 @@ character.swd={
hjifeng_old:{
trigger:{player:'phaseEnd'},
filter:function(event,player){
if(!player.num('he',{type:'equip'})) return false;
if(!player.countCards('he',{type:'equip'})) return false;
if(player.countCards('h',{type:'jiqi'})) return false;
if(get.cardPile(function(card){return get.type(card)=='jiqi'})) return true;
return false;
@ -1023,7 +1023,7 @@ character.swd={
usable:1,
viewAs:{name:'taoyuan'},
filter:function(event,player){
return player.num('he',{color:'black'})>0;
return player.countCards('he',{color:'black'})>0;
},
audio:true,
prompt:'将一张黑色牌当作桃园结义使用',
@ -1057,7 +1057,7 @@ character.swd={
position:'he',
viewAs:{name:'sha'},
viewAsFilter:function(player){
if(!player.num('he',{color:'red'})) return false;
if(!player.countCards('he',{color:'red'})) return false;
},
prompt:'将一张红色牌当杀使用',
check:function(card){return 5-ai.get.value(card)},
@ -1067,7 +1067,7 @@ character.swd={
},
skillTagFilter:function(player,tag,arg){
if(arg!='use') return false;
if(!player.num('he',{color:'red'})) return false;
if(!player.countCards('he',{color:'red'})) return false;
},
},
group:['huanxia_expire','huanxia_draw','huanxia_gain'],
@ -1416,7 +1416,7 @@ character.swd={
heihuo:{
enable:'phaseUse',
filter:function(event,player){
return player.countCards('h')>0&&player.num('he',{type:'equip'})>0&&!player.hasSkill('heihuo2');
return player.countCards('h')>0&&player.countCards('he',{type:'equip'})>0&&!player.hasSkill('heihuo2');
},
filterCard:function(card){
return get.type(card)=='equip';
@ -1429,7 +1429,7 @@ character.swd={
if(nh<2) return 0;
if(nh>4) return 0;
if(nh==4&&pos=='e') return 0;
if(player.num('he',{subtype:get.subtype(card)})>1){
if(player.countCards('he',{subtype:get.subtype(card)})>1){
return 11-ai.get.equipValue(card)+(pos=='e'?0.4:0);
}
return 5.5-ai.get.value(card)+(pos=='e'?0.4:0);
@ -1636,7 +1636,7 @@ character.swd={
enable:'phaseUse',
usable:1,
filter:function(event,player){
return player.num('he',{color:'black',name:'sha'})>0;
return player.countCards('he',{color:'black',name:'sha'})>0;
},
filterCard:function(card){
return card.name=='sha'&&get.color(card)=='black';
@ -1671,7 +1671,7 @@ character.swd={
trigger:{global:'phaseUseBefore'},
direct:true,
filter:function(event,player){
return event.player!=player&&player.num('he',{type:'basic'})<player.countCards('he');
return event.player!=player&&player.countCards('he',{type:'basic'})<player.countCards('he');
},
content:function(){
"step 0"
@ -2657,7 +2657,7 @@ character.swd={
trigger:{player:'damageEnd'},
direct:true,
filter:function(event,player){
return player.num('he',{color:'black'})>0;
return player.countCards('he',{color:'black'})>0;
},
content:function(){
"step 0"
@ -2669,7 +2669,7 @@ character.swd={
filterTarget:function(card,player,target){
return player!=target;
},
selectCard:[1,player.num('he',{color:'black'})],
selectCard:[1,player.countCards('he',{color:'black'})],
selectTarget:function(){
if(ui.selected.targets.length>ui.selected.cards.length){
game.uncheck('target');
@ -3073,13 +3073,13 @@ character.swd={
filterCard:{type:'equip'},
check:function(card){
var player=_status.currentPhase;
if(player.num('he',{subtype:get.subtype(card)})>1){
if(player.countCards('he',{subtype:get.subtype(card)})>1){
return 12-ai.get.equipValue(card);
}
return 8-ai.get.equipValue(card);
},
filter:function(event,player){
return player.num('he',{type:'equip'});
return player.countCards('he',{type:'equip'});
},
filterTarget:function(card,player,target){
return player!=target;
@ -3181,14 +3181,14 @@ character.swd={
jianji:{
enable:'phaseUse',
filter:function(event,player){
return player.num('he',{type:'equip'})>0&&lib.filter.cardEnabled({name:'sha'},player);
return player.countCards('he',{type:'equip'})>0&&lib.filter.cardEnabled({name:'sha'},player);
},
usable:1,
filterCard:{type:'equip'},
position:'he',
check:function(card){
var player=_status.currentPhase;
if(player.num('he',{subtype:get.subtype(card)})>1){
if(player.countCards('he',{subtype:get.subtype(card)})>1){
return 11-ai.get.equipValue(card);
}
return 6-ai.get.equipValue(card);
@ -3237,7 +3237,7 @@ character.swd={
enable:'phaseUse',
filter:function(event,player){
if(!lib.card.chiyuxi) return false;
return !player.getStat('skill').huangyu&&player.num('he',{color:'red'})>1;
return !player.getStat('skill').huangyu&&player.countCards('he',{color:'red'})>1;
},
filterCard:{color:'red'},
selectCard:2,
@ -3263,7 +3263,7 @@ character.swd={
filter:function(event,player){
var type=get.type(event.card,'trick');
if(type!='basic'&&type!='trick') return false;
return event.player!=player&&player.num('he',{type:'equip'})>0&&
return event.player!=player&&player.countCards('he',{type:'equip'})>0&&
event.targets&&event.targets.length>0;
},
direct:true,
@ -3531,7 +3531,7 @@ character.swd={
enable:'phaseUse',
usable:1,
filter:function(event,player){
return player.num('he',{suit:'club'})>0;
return player.countCards('he',{suit:'club'})>0;
},
position:'he',
filterCard:{suit:'club'},
@ -4281,7 +4281,7 @@ character.swd={
position:'he',
usable:1,
filter:function(event,player){
return player.num('he',{suit:'spade'})>0;
return player.countCards('he',{suit:'spade'})>0;
},
check:function(card){
return 10-ai.get.value(card)
@ -4314,7 +4314,7 @@ character.swd={
},
viewAs:{name:'liuxinghuoyu'},
viewAsFilter:function(player){
if(!player.num('he',{suit:'heart'})) return false;
if(!player.countCards('he',{suit:'heart'})) return false;
},
prompt:'将一张红桃手牌当作流星火羽使用',
check:function(card){return 6-ai.get.value(card)},
@ -4361,7 +4361,7 @@ character.swd={
return player.countCards('h',{color:'black'})>0;
},
viewAsFilter:function(player){
if(!player.num('he',{color:'black'})) return false;
if(!player.countCards('he',{color:'black'})) return false;
},
prompt:'将一张黑色牌当作冰魄针使用',
check:function(card){return 5-ai.get.value(card)},
@ -4832,7 +4832,7 @@ character.swd={
direct:true,
filter:function(event,player){
if(get.itemtype(event.cards)!='cards') return false;
return player.num('he',{suit:get.suit(event.cards)})>0;
return player.countCards('he',{suit:get.suit(event.cards)})>0;
},
alter:true,
content:function(){
@ -4859,7 +4859,7 @@ character.swd={
}
player.discard(result.cards);
event.num++;
if(player.num('he',{suit:event.suit})>1&&!get.is.altered('liaoyuan')){
if(player.countCards('he',{suit:event.suit})>1&&!get.is.altered('liaoyuan')){
event.goto(1);
}
}
@ -6749,7 +6749,7 @@ character.swd={
trigger:{player:'damageBefore'},
priority:-10,
filter:function(event,player){
return player.num('he',{type:'equip'});
return player.countCards('he',{type:'equip'});
},
direct:true,
content:function(){
@ -6897,7 +6897,7 @@ character.swd={
filter:function(event,player){
if(!event.player.isLinked()) return false;
if(event.nature=='fire') return false;
if(player.num('he',{color:'red'})) return true;
if(player.countCards('he',{color:'red'})) return true;
return false;
},
direct:true,
@ -6927,7 +6927,7 @@ character.swd={
if(!event.player) return false;
if(event.player==player) return false;
if(event.player.isLinked()&&event.player.isTurnedOver()) return false;
if(player.num('he',{color:'black'})) return true;
if(player.countCards('he',{color:'black'})) return true;
return false;
},
direct:true,
@ -7232,7 +7232,7 @@ character.swd={
usable:1,
discard:false,
filter:function(event,player){
return player.num('he',{type:'trick'})>0;
return player.countCards('he',{type:'trick'})>0;
},
prepare:'throw',
position:'he',
@ -8365,7 +8365,7 @@ character.swd={
enable:'phaseUse',
usable:1,
filter:function(event,player){
return player.num('he',{type:'equip'})>0;
return player.countCards('he',{type:'equip'})>0;
},
filterCard:{type:'equip'},
position:'he',
@ -8390,7 +8390,7 @@ character.swd={
wanjun:{
enable:'chooseToUse',
filter:function(event,player){
return player.num('he',{type:'equip'})>0;
return player.countCards('he',{type:'equip'})>0;
},
filterCard:function(card){
return get.type(card)=='equip';
@ -8400,7 +8400,7 @@ character.swd={
prompt:'将一张装备牌当南蛮入侵使用',
check:function(card){
var player=_status.currentPhase;
if(player.num('he',{subtype:get.subtype(card)})>1){
if(player.countCards('he',{subtype:get.subtype(card)})>1){
return 11-ai.get.equipValue(card);
}
if(player.countCards('h')<player.hp){
@ -8617,7 +8617,7 @@ character.swd={
enable:'phaseUse',
usable:1,
filter:function(event,player){
return player.num('he',{suit:'spade'});
return player.countCards('he',{suit:'spade'});
},
filterTarget:function(card,player,target){
return player!=target;
@ -8688,7 +8688,7 @@ character.swd={
enable:'chooseToUse',
filterCard:{type:'equip'},
filter:function(event,player){
return player.num('he',{type:'equip'});
return player.countCards('he',{type:'equip'});
},
position:'he',
viewAs:{name:'sha'},

View File

@ -125,7 +125,7 @@ character.xianjian={
usable:1,
position:'he',
viewAsFilter:function(player){
if(!player.num('he',{color:'red'})) return false;
if(!player.countCards('he',{color:'red'})) return false;
},
filterCard:{color:'red'},
check:function(card){
@ -194,7 +194,7 @@ character.xianjian={
filterCard:{color:'red'},
position:'he',
filter:function(event,player){
return player.num('he',{color:'red'})>0;
return player.countCards('he',{color:'red'})>0;
},
check:function(card){
return 7-ai.get.value(card);
@ -2338,12 +2338,12 @@ character.xianjian={
position:'he',
viewAs:{name:'shihuifen'},
viewAsFilter:function(player){
return player.num('he',{color:'black'})>0;
return player.countCards('he',{color:'black'})>0;
},
ai:{
shihuifen:true,
skillTagFilter:function(player){
return player.num('he',{color:'black'})>0;
return player.countCards('he',{color:'black'})>0;
}
}
},

View File

@ -4668,7 +4668,7 @@ character.yijiang={
audio:2,
trigger:{player:'damageBegin'},
filter:function(event,player){
return player.num('he',{type:'equip'})&&event.source&&event.source.sex=='male';
return player.countCards('he',{type:'equip'})&&event.source&&event.source.sex=='male';
},
direct:true,
content:function(){
@ -5088,7 +5088,7 @@ character.yijiang={
check:function(card){
if(get.type(card)!='equip') return 0;
var player=_status.currentPhase;
if(player.num('he',{subtype:get.subtype(card)})>1){
if(player.countCards('he',{subtype:get.subtype(card)})>1){
return 11-ai.get.equipValue(card);
}
return 6-ai.get.equipValue(card);
@ -5239,7 +5239,7 @@ character.yijiang={
return card.name=='sha'||get.type(card)=='equip';
},
filter:function(event,player){
return player.countCards('h','sha')>0||player.num('he',{type:'equip'})>0;
return player.countCards('h','sha')>0||player.countCards('he',{type:'equip'})>0;
},
check:function(card){return 8-ai.get.value(card)},
selectTarget:2,
@ -5624,7 +5624,7 @@ character.yijiang={
direct:true,
audio:2,
filter:function(event,player){
return player.countCards('he')>player.num('he',{type:'basic'});
return player.countCards('he')>player.countCards('he',{type:'basic'});
},
content:function(){
"step 0"
@ -6818,7 +6818,7 @@ character.yijiang={
audio:3,
priority:6,
filter:function(event,player){
return event.player!=player&&event.player.hp==1&&player.num('he',{type:'equip'})>0;
return event.player!=player&&event.player.hp==1&&player.countCards('he',{type:'equip'})>0;
},
direct:true,
content:function(){

View File

@ -1759,7 +1759,7 @@ character.yxs={
prompt:'将一张装备区内的牌当南蛮入侵使用',
check:function(card){
var player=_status.currentPhase;
if(player.num('he',{subtype:get.subtype(card)})>1){
if(player.countCards('he',{subtype:get.subtype(card)})>1){
return 11-ai.get.equipValue(card);
}
if(player.countCards('h')<player.hp){
@ -2396,7 +2396,7 @@ character.yxs={
filter:function(event,player){
if(get.position(event.card)!='d') return false;
if(player.hasSkill('jieyong2')) return false;
return player.num('he',{color:'black'})>0;
return player.countCards('he',{color:'black'})>0;
},
content:function(){
"step 0"
@ -2440,7 +2440,7 @@ character.yxs={
filter:function(event,player){
return _status.currentPhase!=player&&event.player!=player&&get.type(event.card)=='trick'&&
get.position(event.card)=='d'&&!player.hasSkill('zhulu2')&&
get.itemtype(event.card)=='card'&&player.num('he',{suit:get.suit(event.card)})>0;
get.itemtype(event.card)=='card'&&player.countCards('he',{suit:get.suit(event.card)})>0;
},
content:function(){
"step 0"

View File

@ -5121,13 +5121,13 @@ mode.chess={
},
check:function(card){
var player=_status.currentPhase;
if(player.num('he',{subtype:get.subtype(card)})>1){
if(player.countCards('he',{subtype:get.subtype(card)})>1){
return 12-ai.get.equipValue(card);
}
return 8-ai.get.equipValue(card);
},
filter:function(event,player){
return player.num('he',{type:'equip'});
return player.countCards('he',{type:'equip'});
},
filterTarget:function(card,player,target){
return player!=target&&get.distance(player,target)<=2;

View File

@ -879,7 +879,7 @@ mode.guozhan={
trigger:{player:'phaseEnd'},
direct:true,
filter:function(event,player){
return player.num('he',{type:'equip'})>0;
return player.countCards('he',{type:'equip'})>0;
},
content:function(){
"step 0"
@ -1536,7 +1536,7 @@ mode.guozhan={
qingcheng:{
enable:'phaseUse',
filter:function(event,player){
return player.num('he',{type:'equip'})&&game.hasPlayer(function(current){
return player.countCards('he',{type:'equip'})&&game.hasPlayer(function(current){
return current!=player&&!current.isUnseen(2);
});
},