Example #1
0
        public string GetCardStateName(CardState card)
        {
            string             modifiers = "";
            CardStateModifiers st        = card.GetCardStateModifiers();

            if (st != null)
            {
                List <CardUpgradeState> upgrades = st.GetCardUpgrades().OrderBy(x => x.GetUpgradeTitle()).ToList();
                if (upgrades.Count > 0)
                {
                    modifiers += ":";
                }
                for (int index = 0; index < upgrades.Count; index++)
                {
                    modifiers += GetUpgradeText(data.FindCardUpgradeData(upgrades[index].GetCardUpgradeDataId())) + ((index != upgrades.Count - 1) ? ", " : "");
                }
            }
            string text2 = $"{card.GetTitle()}{modifiers}";

            return(text2);
        }