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