canCompare添加参数,在player/target没牌时仍视为满足条件
This commit is contained in:
parent
5e646da84d
commit
7225dcc149
|
@ -1096,7 +1096,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
audio:2,
|
audio:2,
|
||||||
trigger:{player:'useCardToPlayered'},
|
trigger:{player:'useCardToPlayered'},
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
return event.targets.length==1&&event.card.name=='sha'&&!player.hasSkillTag('noCompareSource')&&event.target.countCards('h')>0&&!event.target.hasSkillTag('noCompareTarget');
|
return event.targets.length==1&&event.card.name=='sha'&&player.canCompare(event.target,true);
|
||||||
},
|
},
|
||||||
check:function(event,player){
|
check:function(event,player){
|
||||||
return get.attitude(player,event.target)<=0||game.hasPlayer(current=>get.damageEffect(current,player,player)>0);
|
return get.attitude(player,event.target)<=0||game.hasPlayer(current=>get.damageEffect(current,player,player)>0);
|
||||||
|
|
|
@ -2276,11 +2276,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
enable:'phaseUse',
|
enable:'phaseUse',
|
||||||
usable:1,
|
usable:1,
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
return !player.hasSkillTag('noCompareSource');
|
return game.hasPlayer(target=>player.canCompare(target,true));
|
||||||
},
|
},
|
||||||
filterTarget:function(card,player,target){
|
filterTarget:function(card,player,target){
|
||||||
return target!=player&&target.countCards('h')>0&&
|
return player.canCompare(target,true);
|
||||||
!target.hasSkillTag('noCompareTarget');
|
|
||||||
},
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
'step 0'
|
'step 0'
|
||||||
|
|
|
@ -8586,14 +8586,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
if(!event.isFirstTarget||!get.tag(event.card,'damage')) return false;
|
if(!event.isFirstTarget||!get.tag(event.card,'damage')) return false;
|
||||||
return !player.hasSkillTag('noCompareSource')&&game.hasPlayer(target=>{
|
return !player.hasSkillTag('noCompareSource')&&game.hasPlayer(target=>{
|
||||||
return target!=player&&target.countCards('h')>0&&!target.hasSkillTag('noCompareTarget');
|
return player.canCompare(target,true);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
direct:true,
|
direct:true,
|
||||||
content:function(){
|
content:function(){
|
||||||
'step 0'
|
'step 0'
|
||||||
player.chooseTarget(get.prompt2('twzhenhu'),[1,3],function(card,player,target){
|
player.chooseTarget(get.prompt2('twzhenhu'),[1,3],function(card,player,target){
|
||||||
return target!=player&&target.countCards('h')>0&&!target.hasSkillTag('noCompareTarget');
|
return player.canCompare(target,true);
|
||||||
}).set('ai',function(target){
|
}).set('ai',function(target){
|
||||||
var player=_status.event.player,targets=_status.event.getTrigger().targets;
|
var player=_status.event.player,targets=_status.event.getTrigger().targets;
|
||||||
var num=0;
|
var num=0;
|
||||||
|
|
|
@ -22383,9 +22383,9 @@ new Promise(resolve=>{
|
||||||
next.setContent('swapEquip');
|
next.setContent('swapEquip');
|
||||||
return next;
|
return next;
|
||||||
}
|
}
|
||||||
canCompare(target){
|
canCompare(target,goon,bool){
|
||||||
if(this==target) return false;
|
if(this==target) return false;
|
||||||
if(!this.countCards('h')||!target.countCards('h')) return false;
|
if((!this.countCards('h')&&goon!==true)||(!target.countCards('h')&&bool!==true)) return false;
|
||||||
if(this.hasSkillTag('noCompareSource')||target.hasSkillTag('noCompareTarget')) return false;
|
if(this.hasSkillTag('noCompareSource')||target.hasSkillTag('noCompareTarget')) return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue