Merge pull request #520 from nofficalfs/Dev-FixGetNoArgs

#514 补充修订
This commit is contained in:
Spmario233 2023-10-13 16:09:37 +08:00 committed by GitHub
commit c4d462ac89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 21 deletions

View File

@ -57022,7 +57022,7 @@
}
return true;
},
altered:lib.filter.none,
altered:()=>false,
/*
skill=>{
return false;
@ -58965,8 +58965,9 @@
result._filter_args=[filter,i];
return result;
},
cardCount:function(card,player){
cardCount:(card,player)=>{
var num;
if(player==undefined) player=_status.event.player;
if(card==true){
num=0;
var stat=player.getStat('card');
@ -58975,7 +58976,6 @@
}
return num;
}
if(player==undefined) player=_status.event.player;
if(typeof card=='object'){
card=card.name;
}
@ -58983,7 +58983,7 @@
if(num==undefined) return 0;
return num;
},
skillCount:function(skill,player){
skillCount:(skill,player)=>{
if(player==undefined) player=_status.event.player;
var num=player.getStat('skill')[skill];
if(num==undefined) return 0;
@ -58994,23 +58994,13 @@
noSelected:()=>ui.selected.buttons.length+ui.selected.cards.length+ui.selected.targets.length==0,
population:identity=>identity==undefined?
game.players.length+game.dead.length:
game.players.filter(current=>current.identity==identity),
totalPopulation:identity=>{
if(identity==undefined) return game.players.length+game.dead.length;
var i,players=game.players.concat(game.dead);
var num=0;
for(i=0;i<players.length;i++){
if(players[i].identity==identity) num++;
}
return num;
},
cardtag:(item,tag)=>{
if(item.cardid&&(get.itemtype(item)=='card'||!item.cards||!item.cards.length||item.name==item.cards[0].name)&&_status.cardtag&&_status.cardtag[tag]&&_status.cardtag[tag].contains(item.cardid)){
return true;
}
if(item.cardtags&&item.cardtags.contains(tag)) return true;
return false;
},
game.players.filter(current=>current.identity==identity).length,
totalPopulation:identity=>identity==undefined?
game.players.length+game.dead.length:
game.players.concat(game.dead).filter(current=>current.identity==identity).length,
cardtag:(item,tag)=>
(item.cardid&&(get.itemtype(item)=='card'||!item.cards||!item.cards.length||item.name==item.cards[0].name)&&_status.cardtag&&_status.cardtag[tag]&&_status.cardtag[tag].contains(item.cardid))
||(item.cardtags&&item.cardtags.contains(tag)),
tag:(item,tag,item2,bool)=>{
var result;
if(get.info(item)&&get.info(item).ai&&get.info(item).ai.tag){