<commit_before>﻿using Hearthstone_Deck_Tracker;
using Hearthstone_Deck_Tracker.Enums;
using Hearthstone_Deck_Tracker.Hearthstone.Entities;
using Shamanic.Properties;
using System.Linq;
using static HearthDb.CardIds;

namespace Shamanic
{
    internal static class Helper
    {
        public static Entity PlayerSnowfuryGiant => Core.Game.Player.PlayerEntities.FirstOrDefault(x => x.CardId == Collectible.Shaman.SnowfuryGiant && x.Info.OriginalZone != null);
        public static Entity PlayerThingFromBelow => Core.Game.Player.PlayerEntities.FirstOrDefault(x => (x.CardId == Collectible.Shaman.ThingFromBelow || x.CardId == NonCollectible.Shaman.ThingFromBelow) && x.Info.OriginalZone != null);

        public static bool? SnowfuryGiantInDeck => DeckContains(Collectible.Shaman.SnowfuryGiant);
        public static bool? ThingFromBelowInDeck => DeckContains(Collectible.Shaman.ThingFromBelow) | DeckContains(NonCollectible.Shaman.ThingFromBelow);

        private static bool? DeckContains(string cardId) => DeckList.Instance.ActiveDeck?.Cards.Any(x => x.Id == cardId);

        private static bool CheckShaman(string @class) => @class == "Shaman";

        private static bool CheckClass(string @class) => CheckShaman(@class) || @class == "Rogue" || @class == "Priest";

        private static bool CheckCard(bool? card, Entity entity)=> card.HasValue && (entity != null || card.Value);

        public static bool ShowOverloadCounter => 
            Settings.Default.OverloadCounterDisplay == DisplayMode.Always
            || (Settings.Default.OverloadCounterDisplay == DisplayMode.Shaman && CheckShaman(Core.Game.Player.Class))
            || (Settings.Default.OverloadCounterDisplay == DisplayMode.Class && CheckClass(Core.Game.Player.Class))
            || (Settings.Default.OverloadCounterDisplay == DisplayMode.Card && CheckCard(SnowfuryGiantInDeck, PlayerSnowfuryGiant));

        public static bool ShowTotemsCounter => 
            Settings.Default.TotemsCounterDisplay == DisplayMode.Always
            || (Settings.Default.TotemsCounterDisplay == DisplayMode.Shaman && CheckShaman(Core.Game.Player.Class))<commit_msg>Remove NonCollectible card references<commit_after>﻿using Hearthstone_Deck_Tracker;
using Hearthstone_Deck_Tracker.Enums;
using Hearthstone_Deck_Tracker.Hearthstone.Entities;
using Shamanic.Properties;
using System.Linq;
using static HearthDb.CardIds;

namespace Shamanic
{
    internal static class Helper
    {
        public static Entity PlayerSnowfuryGiant => Core.Game.Player.PlayerEntities.FirstOrDefault(x => x.CardId == Collectible.Shaman.SnowfuryGiant && x.Info.OriginalZone != null);
        public static Entity PlayerThingFromBelow => Core.Game.Player.PlayerEntities.FirstOrDefault(x => (x.CardId == Collectible.Shaman.ThingFromBelow) && x.Info.OriginalZone != null);

        public static bool? SnowfuryGiantInDeck => DeckContains(Collectible.Shaman.SnowfuryGiant);
        public static bool? ThingFromBelowInDeck => DeckContains(Collectible.Shaman.ThingFromBelow);

        private static bool? DeckContains(string cardId) => DeckList.Instance.ActiveDeck?.Cards.Any(x => x.Id == cardId);

        private static bool CheckShaman(string @class) => @class == "Shaman";

        private static bool CheckClass(string @class) => CheckShaman(@class) || @class == "Rogue" || @class == "Priest";

        private static bool CheckCard(bool? card, Entity entity)=> card.HasValue && (entity != null || card.Value);

        public static bool ShowOverloadCounter => 
            Settings.Default.OverloadCounterDisplay == DisplayMode.Always
            || (Settings.Default.OverloadCounterDisplay == DisplayMode.Shaman && CheckShaman(Core.Game.Player.Class))
            || (Settings.Default.OverloadCounterDisplay == DisplayMode.Class && CheckClass(Core.Game.Player.Class))
            || (Settings.Default.OverloadCounterDisplay == DisplayMode.Card && CheckCard(SnowfuryGiantInDeck, PlayerSnowfuryGiant));

        public static bool ShowTotemsCounter => 
            Settings.Default.TotemsCounterDisplay == DisplayMode.Always
            || (Settings.Default.TotemsCounterDisplay == DisplayMode.Shaman && CheckShaman(Core.Game.Player.Class))
{'fraction_non_alphanumeric': 0.11081920229281109, 'fraction_numerical': 0.0, 'mean_word_length': 4.37612323491656, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6494010', 'n_tokens_mistral': 1222, 'n_tokens_neox': 1169, 'n_words': 221}