Exemple #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));
 }
Exemple #2
0
 public static GwentCard CardInfo(this CardStatus card) => GwentMap.CardMap[card.CardId];
Exemple #3
0
 public static CardStatus CreateBackCard(this CardStatus card) => new CardStatus()
 {
     IsCardBack = true, DeckFaction = card.DeckFaction
 };
Exemple #4
0
 private void ToDoomed(CardStatus status)
 {
     status.IsDoomed = true;
 }
Exemple #5
0
 public static bool IsAnyGroup(this CardStatus card, params Group[] groups)
 {
     return(groups.Any(x => card.Group == x));
 }
Exemple #6
0
 public static bool HasAllCategorie(this CardStatus card, params Categorie[] categories)
 {
     return(!categories.Any(x => !card.Categories.Contains(x)));
 }
Exemple #7
0
 public static bool HasAnyCategorie(this CardStatus card, params Categorie[] categories)
 {
     return(card.Categories.Intersect(categories).Any());
 }