Add files via upload

This commit is contained in:
Spmario233 2020-01-07 22:47:47 +08:00 committed by GitHub
parent 0552f47163
commit 9c74deae06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 20 additions and 12 deletions

View File

@ -23521,13 +23521,23 @@
var info=get.info(card); var info=get.info(card);
//if(info.toself&&!lib.filter.targetEnabled(card,player,player)) return false; //if(info.toself&&!lib.filter.targetEnabled(card,player,player)) return false;
if(player==undefined) player=_status.event.player; if(player==undefined) player=_status.event.player;
if(!lib.filter.cardEnabled(card,player,event)||!lib.filter.cardUsable(card,player,event)) return false;
if(info.notarget) return true;
var range;
var select=get.copy(info.selectTarget);
if(select==undefined){
if(info.filterTarget==undefined) return true;
range=[1,1];
}
else if(typeof select=='number') range=[select,select];
else if(get.itemtype(select)=='select') range=select;
else if(typeof select=='function') range=select(card,player);
game.checkMod(card,player,range,'selectTarget',player);
if(!range||range[1]!=-1) return true;
var filterTarget=(event&&event.filterTarget)?event.filterTarget:lib.filter.filterTarget; var filterTarget=(event&&event.filterTarget)?event.filterTarget:lib.filter.filterTarget;
return (lib.filter.cardEnabled(card,player,event)&& return game.hasPlayer(function(current){
lib.filter.cardUsable(card,player,event)&& return filterTarget(card,player,current);
(info.notarget||!player||game.hasPlayer(function(current){ });
return filterTarget(card,player,current);
}))
);
}, },
targetEnabled:function(card,player,target){ targetEnabled:function(card,player,target){
if(!card) return false; if(!card) return false;
@ -26046,6 +26056,10 @@
(!lib.skill.global.contains(skill)||lib.skill[skill].forceaudio)){ (!lib.skill.global.contains(skill)||lib.skill[skill].forceaudio)){
var audioname=skill; var audioname=skill;
var audioinfo=info.audio; var audioinfo=info.audio;
if(typeof audioinfo=='string'&&lib.skill[audioinfo]){
audioname=audioinfo;
audioinfo=lib.skill[audioname].audio;
}
if(typeof audioinfo=='string'){ if(typeof audioinfo=='string'){
if(audioinfo.indexOf('ext:')==0){ if(audioinfo.indexOf('ext:')==0){
audioinfo=audioinfo.split(':'); audioinfo=audioinfo.split(':');
@ -26062,12 +26076,6 @@
} }
return; return;
} }
else{
audioname=audioinfo;
if(lib.skill[audioinfo]){
audioinfo=lib.skill[audioinfo].audio;
}
}
} }
else if(Array.isArray(audioinfo)){ else if(Array.isArray(audioinfo)){
audioname=audioinfo[0]; audioname=audioinfo[0];