コード例 #1
0
 public static bool Is(this CardStatus card, Group?group = null, CardType?type = null, Func <CardStatus, bool> filter = null, Faction?faction = null)
 {
     return((faction == null ? true : card.Faction == faction) &&
            (group == null ? true : card.Group == group) &&
            (filter == null ? true : filter(card)) &&
            (type == null ? true : card.Type == type));
 }
コード例 #2
0
 public static GwentCard CardInfo(this CardStatus card) => GwentMap.CardMap[card.CardId];
コード例 #3
0
 public static CardStatus CreateBackCard(this CardStatus card) => new CardStatus()
 {
     IsCardBack = true, DeckFaction = card.DeckFaction
 };
コード例 #4
0
 private void ToDoomed(CardStatus status)
 {
     status.IsDoomed = true;
 }
コード例 #5
0
 public static bool IsAnyGroup(this CardStatus card, params Group[] groups)
 {
     return(groups.Any(x => card.Group == x));
 }
コード例 #6
0
 public static bool HasAllCategorie(this CardStatus card, params Categorie[] categories)
 {
     return(!categories.Any(x => !card.Categories.Contains(x)));
 }
コード例 #7
0
 public static bool HasAnyCategorie(this CardStatus card, params Categorie[] categories)
 {
     return(card.Categories.Intersect(categories).Any());
 }